- Joined
- Nov 30, 2007
- Messages
- 1,202
My map is based on each city having local tech-trees. Meaning building a barrack in one city doesn’t improve the tech of another city. Because of this I use dummy units that are created/removed when it’s time to build something. Now to the problem, these dummy units have arbitrary requirments. Here is a example:
Building: Estate
Requirments:
- 1 Granary
- 1 Well
- 1 Agora
- 1 Temple
- 1 Stables
Building: Temple of Ares
Requirments:
- 3 Houses
- 1 Barrack
So the requirment descriptions here are units, for example ”3 houses” is a dummy. I was wondering how could one store this information effectivly? Currently I have to make a if-statement for each tech unit. But if i instead could loop through a unit list of TechType and make those requirments accessable somehow...
Task: Store one or more UnitType(s) and a integer (amount required) to another UnitType (dummy tech unit).
Building: Estate
Requirments:
- 1 Granary
- 1 Well
- 1 Agora
- 1 Temple
- 1 Stables
Building: Temple of Ares
Requirments:
- 3 Houses
- 1 Barrack
So the requirment descriptions here are units, for example ”3 houses” is a dummy. I was wondering how could one store this information effectivly? Currently I have to make a if-statement for each tech unit. But if i instead could loop through a unit list of TechType and make those requirments accessable somehow...
Task: Store one or more UnitType(s) and a integer (amount required) to another UnitType (dummy tech unit).