What's with the miscalculations in the schematics?

Discussion and suggestions regarding the site and/or forum.

Moderator: Forum Moderator

Post Reply
Liakhara
Novice Crafter
Posts: 5
Joined: Fri Aug 16, 2013 2:36 am

What's with the miscalculations in the schematics?

Post by Liakhara » Wed Aug 16, 2017 3:21 pm

I'm looking at the DL44 Metal schematic, here: http://swgcraft.org/dev/viewschematic.php?schem=6561

It requires 50% CD, 50% OQ across the board for experimentation.

My server is Tarkin, so that's what I'm looking at, and I see these recommendations for best in spawn (below).

Can you tell me why the values for Steel aren't being calculated correctly?

For example, Cokiris is 706 CD and 1000 OQ. (706*0.5)+(1000*0.5) = 853, not 1000.
It's listed as 853 under "Metal" but 1000 under "Steel."


Current resources:

Metal:
Teleu (922.00000000)
Cokiris (853.00000000)
Kaima (795.00000000)

Steel:
Cokiris (1000.00000000)
Beaharis (698.57692308)
Reha (619.84615385)

Steel:
Cokiris (1000.00000000)
Beaharis (698.57692308)
Reha (619.84615385)

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: What's with the miscalculations in the schematics?

Post by Sobuno » Wed Aug 16, 2017 8:14 pm

Update: My answer relates to NGE, not pre-CU!

The values are calculated correctly if you take caps into account. A similar search done through "Find resources" would be this: http://swgcraft.org/dev/find_resources. ... rating&o=1

Note that if you press "Modify Search", "Consider Caps?" is checked.

The reason it is done like this can be found by reading Zimoon's "Beginner's Guide for Traders", section 8 "Power Crafting", subsection "Resource Caps":
http://swgcraft.org/dev/guides.php?id=3#p1651 (Although give the entire thing a read instead, it is quite nice). It is how the game also applies the weights when the resources are actually used.

In your case, Metal has max caps for CD and OQ of 1000. Hence, the calculation that is done is (MIN(706,1000)/1000*0.5+MIN(1000,1000)/1000*0.5)*1000 = 853. However, Steel has a cap for CD of 650. This means the calculation suddenly becomes (MIN(706,650)/650*0.5+MIN(1000,1000)/1000*0.5)*1000 = 1000

MIN(x,y) means use the lowest value of the two values mentioned. For all resources except for resources introduced by JTL, the caps of a sub-resource category will always be lower or equal to the caps of the parent category. JTL resources break those rules by being uncapped (i.e. cap at 1000), hence they are very nice resources to use in some cases (such as in the Steel slot of the schematic you are looking at)

User avatar
Savacc
Architect & Shipwright Forum Moderator
Posts: 1182
Joined: Mon Mar 26, 2007 9:45 pm
Location: Central Oregon

Re: What's with the miscalculations in the schematics?

Post by Savacc » Wed Aug 16, 2017 8:27 pm

You are right and the way Sobuno coded the feature for best resources in schematics is wrong. Sobuno is incorrectly applying an adjustment for resource caps to the resources. Why did Sobuno do that? Well because that is the correct way in the CU and NGE. It is only in pre-CU that it is wrong.

I noticed it a long time ago, I may have mentioned it to Sobuno, but decided I didn't really care if he ever got around to fixing it. I was just happy to see that Sobuno added this feature at all as GH had this feature long before we did.

The way to use this feature is as a way to find the best resource, current or all-time, to use. And it does that. Cokiris will not be 1000, like the feature says. It will be 853 (then adjusted for amounts) but it will be the best steel to use. That is all I am asking this feature to do, so I am happy.

EDIT: I see Sobuno posting the same time I am.

Hmmm, Zimoon's guide is an NGE guide and true for the NGE. But it is not accurate for pre-CU. In pre-CU caps are not adjusted for. That did not start happening till the CU.

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: What's with the miscalculations in the schematics?

Post by Sobuno » Wed Aug 16, 2017 9:00 pm

The "Best resources" feature now takes into account whether it is a pre-CU or CU/NGE server when searching and will apply consideration of caps appropriately.

User avatar
Savacc
Architect & Shipwright Forum Moderator
Posts: 1182
Joined: Mon Mar 26, 2007 9:45 pm
Location: Central Oregon

Re: What's with the miscalculations in the schematics?

Post by Savacc » Thu Aug 17, 2017 12:06 am

You are awesome, now if you could figure out a way to add new planets...

Just kidding, whenever, if ever is fine with me. I wish I could code and help in this kind of way, but I can't.

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: What's with the miscalculations in the schematics?

Post by Sobuno » Thu Aug 24, 2017 8:45 pm

Savacc wrote:
Thu Aug 17, 2017 12:06 am
You are awesome, now if you could figure out a way to add new planets...
The hard part is not adding planets, a planet consists of two things: an ID number and a name. It is all the stuff surrounding them that are more tricky.

I have just right now added the ability for certain planets to only show for specific servers, but as you can see from the planet "Test" on the "SWGCraft.co.uk" server, nothing can really spawn there: http://swgcraft.org/dev/resource_tree.p ... &mode=full. Notice none of the actual spawnable resource categories are present, only more broad categories.

Not even the generic resources such as Axidite Iron can spawn there by default.

Even then, there are other areas that need development as well here. SWGAide for instance does not fetch planets dynamically from SWGCraft, only servers, so it would know nothing about new planets.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests