Antal1987
Warlord
After first publication about my trainer, I decided to share info about very cool game hacks I've implemented in it.
Currently there are:
Part 2. Pollution.
Pollution in the game is computing for each city having the following formula:
CityPollution = City.Production / City.RecyclingRatio + PollutionFreeValue + City.Size * City.PollutionRatio / 4;
where:
There are 3 same formulas in the game.
The easiest way to affect on the formulas is modifying PollutionFreeValue constant.
The lower the constant value, the lower the resulting value of pollution.
The constant is fixed 16-bit value located in the following asm command:
The command can be found by the pattern:
If you change all 3 constant values to (for example) -2000 (18 FC) there will be no pollution at all.
Therefore, here is the patch:
To be continued...
Currently there are:
- Zero unhappiness
- Zerro pollution
- Zero corruption
- Grassland fix. Grassland terrain produce shields even if it has no special mark (green shield on the map square).
Part 2. Pollution.
Pollution in the game is computing for each city having the following formula:
CityPollution = City.Production / City.RecyclingRatio + PollutionFreeValue + City.Size * City.PollutionRatio / 4;
where:
- City.Production - Total shields count being produced by the City
- City.RecyclingRatio - Ratio depending on City having RecyclingCenter:
City.RecyclingRatio = City.HasImprovement(RecyclingCenter) ? 3 : 1; - PollutionFreeValue = -20 - A constant hardly coded in the game
- City.PollutionRatio - Ratio depending on City having MassTransit and Player's Civ having advances: Industrialization, Automobile, Mass Production and Plastics
City.PollutionRatio = City.HasImprovement(MassTransit) ? 0 : (
Advances[City.Civ].HasAdvance(Industrialization) ? 1 : 0 +
Advances[City.Civ].HasAdvance(Automobile) ? 1 : 0 +
Advances[City.Civ].HasAdvance(Mass Production) ? 1 : 0 +
Advances[City.Civ].HasAdvance(Plastics) ? 1 : 0
There are 3 same formulas in the game.
- Response for printing pollution value in a City window
- Response for game logic when City square pollution is computed
- Response for printing pollution value in a demographics report window
The easiest way to affect on the formulas is modifying PollutionFreeValue constant.
The lower the constant value, the lower the resulting value of pollution.
The constant is fixed 16-bit value located in the following asm command:
add ax, 0FFECh
(0FFECh = -20)The command can be found by the pattern:
05 EC FF
at the one of the following addresses:- 0x13C27
- 0x158F6
- 0x6A510
If you change all 3 constant values to (for example) -2000 (18 FC) there will be no pollution at all.
Therefore, here is the patch:
- Locate pattern 05 EC FF at 0x13C27, 0x158F6 and 0x6A510
- Change EC FF to very low value (18 FC, for example)
- Enjoy
To be continued...