Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » Race Wizard almost done (but not quite)
Race Wizard disection Fri, 07 September 2007 05:51 Go to previous messageGo to previous message
mazda is currently offline mazda

 
Lieutenant

Messages: 655
Registered: April 2003
Location: Reading, UK
mazda wrote on Fri, 17 August 2007 16:07

Not sure I've seen anything that explains the difference between shifting left and right yet either.


Got this bit now !
Not yet made up my mind whether I think it is intended or not.
Difficult to tell with no comments in the code.

Code is as follows :-

planetDesir = planetValueCalc(testPlanetHab);
v100 = v108[0]+v108[1]+v108[2];
IF (v100>TTCorrFactor)
{
planetDesir -= v100-TTCorrFactor;
if (planetDesir<0) planetDesir=0;
)

At this point it is calculating the habs of the 1331 test planets and adding them all together to get a point score.
The more total hab then the more it costs in the RW. Simple.

The array v108[] is a set of three values representing the distance between the the ideal for the race and the planet hab being tested.

If the v108[] values are sufficiently positive then the RW thinks the test planet is less desirable and hence it costs you less.
However these values have a sign - if the planet value is higher (to the right of) than the centre point of the race band then these values are instead negative and so unlikely to produce a reduction in desirability and hence no reduction in RW cost.

So the more test planets you have with hab values left of your ideal values then the less points you will pay.

Comparing a left-shifted hab scheme with a right-shifted hab scheme it is easy to see which of them will have more test planets left of your ideal values.
As soon as the notional terra of 15 clicks hits the left edge then you start to lose planets because you can't go any further left.
The right-shifted scheme doesn't lose these planets and hence you pay less.

I think there are quite complicated interactions between distance from the edge and rounding that give rise to the odd behaviour that we see in these regions of the hab screen.


[Updated on: Fri, 07 September 2007 05:56]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Detailed mineral mining table
Next Topic: Just a Clone?
Goto Forum:
  


Current Time: Mon Apr 29 08:29:40 EDT 2024