For Code Raiders
This map has the following code that is worth looking at;
Buy Tech advances in the Purchase Phase, like Age of Tribes, but is ++++,
+Tech uses isSea & isAir so AI will target its Tech advances if it needs Sea or Air
+Tech advances are shown on Tech grid on Players tab
+Display grouping, Tech is prefixed with _DevL, _DevA, _DevS (Land, Air, Sea)
+Uses Foreach for easy xml maintenance, hundreds of lines of code, reduced to tens of lines
66ab8a45-1a7a-442b-98bc-db6d88f88865-image.png
.
Custom Purchase Panel (see above) (see file production_tabs.Autocrats.properties)
As the Purchase Panels are complex with lots of Tech Research & units being added & removed it has the following tabs
< All > < Land & Land-Tech > < Air & Air-Tech > < Sea & Sea-Tech > < All-Tech-Research > < Tech-Land > < Tech-Air > < Tech-Sea >
.
Search GO RandomField - to see how the following are placed
randomly
40 Coal-Field - generate 1 pu/turn
8 Oil-Field - generate 1 tech/turn
3 Inf-Garrison
8 Oil-Field Fixed
.
Politics has 5 relationships
War -> Neutral -> Accord -> Allied (note HOSTILE is skipped when suing for peace, goes from War to Neutral)
War <- HOSTILE <- Neutral <- Accord <- Allied
Uses Foreach for easier xml maintenance, thousands of lines of code, reduced to hundreds of lines
.
Impending Victory - When this is notified all
isAI players that are;
HOSTILE will declare War on the impending victory alliance
Neutral will be HOSTILE to the impending victory alliance
.
Using
atWarPlayers function a player faction will if;
At War earn 1 Tech /turn with one or more factions
At Peace earn 10 pu /turn with
all faction so HOSTILE, Neutral, Accord, Allied (not at War)