documentation
Now another technology named TB is researched (which may have in its requiretechnology field the id of TA so it is available after TA) which has an improvement value of 2048. The new weapon strength is now 1536 * 2048 / 1024 = 3072, that is 3 times the startup value.
Suppose we have a vehicle that requires a weapon improvement of 2048 to be produced (this is set in its first class; this class may be nameless so you don't notice it is a class at all). You can build this vehicle as soon as you have researched TB. This unit will then have a weapon that is twice (NOT 3 times !) as powerful as the value specified in its weapon definition.
Lets us note that a vehicle with a specific class ALLWAYS has the properties defined by the class, never a higher or lower strength, armor etc. There is just one exception: you can create "special" units in the mapeditor whith ANY values, regardless of their classes.
The reason why we multiply the value of the weapon definition is the class system: Usually a research dependent unit in the game has two (or more) classes. Typically (but not necessarily as you have seen in the example above) the first class requires no weapon improvement, and the second class requires it. Since the weapon strength in the weapons section of the unit does not change with the classes we have to multiply it with the weapon improvement.
The improvement values in this example are just to illustrate the functionality and are much too high to be used in the game without severely spoiling the gameplay. 1200 would be a realistic value for example.
Armor works exactly the same.
Now you start the game with techlevel 2: TB will automatically be an already "researched" technology although it has TA as required technology! The techlevel overrides everything else! So the value for the weapon improvement in the game will be initialized with 2048 and the vehicle will be producable!
But if this vehicle type has in its technology required field the id of TA it will be available as soon as TA is researched, since the weapon strength alone is not sufficient. But if we now start the game with techlevel 4, this dependency is overridden by the techlevel and the vehicle is available.
Now a third variant: If the vehicle had a TechlevelGet of 1 and we start the game with Techlevel 1, the vehicle will be available and it starts with twice its basic weapon strength, although the map still has an internal improvement variable of 1024 !
Here is a small example again:
Suppose we have three technologies:
We have the following Technologies (numbers in brackets mean default values):
Name | requires | torpedo improvement | machine gun improvement | armor improvement | techlevelGet |
---|---|---|---|---|---|
Torpedo Level 2 | 1100 | (1024) | (1024) | ? | |
Torpedo Level 3 | Torpedo Level 2 | 1200 | (1024) | (1024) | ? |
Torpedo Level 4 | Torpedo Level 3 | 1300 | (1024) | (1024) | ? |
Armor Level 2 | (1024) | (1024) | 1120 | ? | |
Armor Level 3 | Armor Level 2 | (1024) | (1024) | 1100 | ? |
Machine Gun Level 2 | (1024) | 1100 | (1024) | ? |
and the following unit:
Unit Name | torpedo strength | machinegun strength | armor |
---|---|---|---|
Nautilus | 82 | 27 | 1227 |
Class Name | required Torpedo improvement | required Machinegun improvement | required Armor improvement | Techlevel |
---|---|---|---|---|
Narwhal Class | 1024 | 1024 | 1024 | 0 |
Salmen Class | 1100 | 1024 | 1100 | 250 |
Gato Class | 1200 | 1024 | 1100 | 251 |
Tench Class | 1250 | 1100 | 1200 | 252 |
Class | torpedo strength | machinegun strength | armor |
---|---|---|---|
Narwhal | 82 | 27 | 1227 |
Suppose we research Torpedo Level 2. This increases the internal Torpedo improvement variable from 1024 to 1024*1100/1024=
1100 .
Now we build a second submarine. It will still be
Class | torpedo strength | machinegun strength | armor |
---|---|---|---|
Narwhal | 82 | 27 | 1227 |
We continue research. The technologies Armor Level 2, Torpedo Level 3 and Machinegun Level 2 are available.
Suppose we now research Armor Level 2. This increases the internal Armor improvement variable from 1024 to 1024*1120/1024=
1120 .
Now we build a third submarine. It will be
Class | torpedo strength | machinegun strength | armor |
---|---|---|---|
Salmen | 88 (=82*1100/1024) |
27 | 1318 (=1227*1100/1024) |
Suppose we now research Machine Gun Level 2. This increases the internal Machine Gun improvement variable from 1024 to 1024*1100/1024=
1100 .
Now we build a forth submarine. It will be
Class | torpedo strength | machinegun strength | armor |
---|---|---|---|
Salmen | 88 | 27 | 1318 |
Suppose we now research Armor Level 3. This increases the internal Armor improvement variable from 1100 to 1120*1100/1024=
1203 . A new submarine would still be Salmen Class!
And we research Torpedo Level 3 which increases the internal Torpedo improvement variable from 1100 to 1100*1200/1024=
1289 .
A submarine build now will be:
Class | torpedo strength | machinegun strength | armor |
---|---|---|---|
Tench | 100 (=82*1250/1024) |
29 (=27*1100/1024) |
1437 (=1227*1200/1024) |
If we had researched Torpedo Level 3 before Armor Level 3, we would have been able to build the Gato Class after achieving Torpedo Level 3.