# Advanced Strategic Command

documentation

## MakeTech

The usage of `MAKETEC.EXE` should be clear if you understand the research system of ASC so I describe it here.

### Weapon strength

ASC maintains a table that contains the strength improvement for each weapon type and for armor. This table is initialized with the standard value of 1024 which means there is no improvement. Technologies (with weapon/armor improvements) multiply this value with their improvement value divided by 1024.

#### An example:

The standard value is 1024.
A technology named TA is researched which has an improvement value for this weapon of 1536. The new weapon strength is 1024 * 1536 / 1024 = 1536, that is 1.5 times the startup value.

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.

### Techlevel

The Techlevel is NOT a factor that affects any strength or armor values. It is just used to set up starting conditions of a map.
The techlevel overrides everything else.

#### TechlevelGet

Lets suppose that TA has a TechlevelGet of 5, TB a TechlevelGet of 2 (which is absolutely stupid in 'real life', since it normally requires TA) and the vehicle a TechlevelGet of 4 . This means you will get TA if you start with Techlevel 5 or higher. But if you started with techlevel 0 and researched TA 'the hard way', the techlevel will not be affected.

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 !

#### TechLevelSet

This is a new addition to the techlevel system. A technology may raise the techlevel of a map when it is researched. The TechlevelSet should only be used for key technologies and it should allways be far lower than its TechlevelGet.

Here is a small example again:

Suppose we have three technologies:

- the wheel ; TechlevelGet 1; researchpoints 100
- the bicycle; TechlevelGet 3; researchpoints 500; requires 'the wheel'
- the car; TechlevelGet 8; researchpoints 10000; requires 'the wheel'; TechlevelSet 3

You start the map and research 'the wheel'. You now have the choice to research either 'the bicycle' or 'the car' which takes much longer to research. If you chose 'the car' and finish it, this will raise the global techlevel to 3. So you get the technology 'the bicycle' ( and all other technologies or vehicles with a TechlevelGet of 3 or lower) completely free.

### Including text files as a description

The format of text files in ASC is described in text.htm

### Another Example, straight from the game

I originally wanted to create all technologies that are mentionioned here and a corresponding map, where you can replay this example. But I could not find the time to do this, perhaps this will be added later...

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

with these classes:

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

Now we start a map with Techlevel 0. This is the default and it does absolutely nothing, so we don't have to care about the Techlevel any more. No technologies are available yet.
If you build a submarine, it will have the following values:

Class | torpedo strength | machinegun strength | armor
--- | --- | --- | ---
Narwhal | 82 | 27 | 1227

Now we start research. The technologies `Armor Level 2`, `Torpedo Level 2` and `Machinegun Level 2` are available.

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

The Torpedo strength has NOT changed since the submarine is still Narwhal Class !

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)`

We continue research. The technologies `Armor Level 3`, `Torpedo Level 3` and `Machinegun Level 2` are available.

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

Again, nothing has changed since it is still Salmen Class !

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)`

We can't build a submarine that is any stronger, even if we researched `Torpedo Level 4`, since the Tench Class is the highest class for this unit.

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`.