Thread: Free Units
View Single Post
Old 02-06-2003, 06:52 PM   #2 (permalink)
Marshall7a
Senior Member
 
Join Date: Dec 2002
Location: UK
Posts: 434
Default

There is no way around this other than cloning the chrono/war miner (which leaves you with the problem of chrono/war miners not all being selected by the 'select all of type' button (if you consider that to be a problem).

Another interesting fact: The Soviet Industrial Plant affects the cost of buildings that have free units.


The following 'pseudo-code' explains how the game works out the cost of a building.
Taking the existing Ore Refinery as an example (and using the default ini values), the game breaks up the cost as such: (note that NAINDP is the Soviet Industrial Plant)

Let Y=NAREFN.FreeUnit[HARV].Cost

"Y is now 1400"

Let X=NAREFN.Cost

"X is now 2000"

If X<Y Then Let X=Y ;note that this is where OneWingedAngel's problem is.

"X is now 2000"

Let STRUCTURE_VALUE=X-Y

"STRUCTURE_VALUE is now 600"


If Exist NAINDP Then

Let VEHICLE_MULTIPLIER=NAINDP.UnitsCostBonus

"VEHICLE_MULTIPLIER is now 0.75"

Let STRUCTURE_MULTIPLIER=NAINDP.BuildingsCostBonus

"STRUCTURE_MULTIPLIER is now 1.0"

Let STRUCTURE_VALUE=STRUCTURE_VALUE*STRUCTURE_MULTIPLI ER

"STRUCTUREVALUE is now 600"

Let Y=Y*VEHICLEMULTIPLIER

"Y is now 1050"

End If


Let FINAL_VALUE_OF_REFINERY=STRUCTURE_VALUE+Y

"FINAL_VALUE_OF_REFINERY is now 1650"


Try running through the pseudo-code with different values for the harvester cost, ore refinery cost, and industrial plant multipliers.


Hope that was of use, or at least mild interest to someone
Marshall7a is offline   Reply With Quote