You must be logged in to post messages.
Please login or register

AoW1 Mod Packs
Moderated by Enginerd, Ziggurat Mason

Hop to:    
Topic Subject: Modifying the binaries
posted 06-23-20 05:26 AM EDT (US)   
The following is copied from the AoW+ thread over at the GOG forum and posted here for future reference.
There aren't all that many instances of simple byte edits; most of what I do involves rewriting routines. For that you need a disassembler and some knowledge of assembly. However, there is a data section in AoWEPACK that contains some tables. Here's a list of offsets with effective data sizes and labels:
0x558E8294 0x34 AoWE.RaceColors
0x558E8330 0x07 AoWE.StormDamageType
0x558E8338 0x32 AoWE.Player2GroupBehaviorTable
0x558E836C 0x28 AoWE.IndependentGroupBehaviorTable
0x558E8394 0x30 AoWE.RaceTerrain
0x558E83C4 0x03 AoWE.DefenseRankProgression
0x558E83C8 0x03 AoWE.AttackRankProgression
0x558E83CC 0x03 AoWE.DamageRankProgression
0x558E83D0 0x03 AoWE.ResistanceRankProgression
0x558E83D4 0x03 AoWE.HitsRankProgression
0x558E83D8 0x05 AoWE.MoraleResistanceModifier
0x558E83E0 0x05 AoWE.MoraleDefenseModifier
0x558E83E8 0x01 AoWE.LeadershipAttackProgression
0x558E83EC 0x01 AoWE.LeadershipDefenseProgression
0x558E83F0 0x90 AoWE.DefaultRaceRelations
0x558E8480 0x31 AoWE.dAlignmentToStatusValue
0x558E84B4 0x30 AoWE.HeroExperienceTable
0x558E8DE0 0x04 City.CityUpgradeCost
0x558E8DE4 0x04 City.CityUpgradeStoneWallCost
0x558E8DE8 0x04 City.CityUpgradeWoodenWallCost
0x559E8E3C 0x14 City.JoinAmount

As you can see the labels are quite descriptive. Note that if you play around with city upgrade costs you should probably also update the following dwords in related AI routines:
0x557AE9C0 City.TCityAIPA.UpgradeCity
0x557AEA73 City.TCityAIPA.ValidateUpgradeBudget
0x557AED3B City.TCityAIPA.ValidateFortifyBudget

All offsets are virtual; you need to subtract 0x55701200 from data offsets and 0x55700C00 from code offsets to get the actual file offsets.

Throughout the code section there are lots of other operand dwords and bytes that can be edited as data. Maybe at some point in the future I'll go through my batch files and list the ones I've experimented with, but this is not a priority for me right now. If there's anything in particular you want to mess about with you should familiarise yourself with a disassembler (I use PE Explorer, which looks like this) and just poke around AoWEPACK.

[This message has been edited by And G (edited 06-23-2020 @ 02:43 PM).]

posted 08-13-20 01:59 AM EDT (US)     1 / 2  

[This message has been edited by Ziggurat Mason (edited 03-22-2021 @ 05:54 PM).]

posted 09-26-20 03:46 PM EDT (US)     2 / 2

I just managed to use PE Explorer/HxD, along with your posts as reference, to change Wood Wall Upgrade Cost. I may be able to do the CBD mod myself but invite you to join the Discord Southern started, particularly our hex editing discussion. I posted a very basic tutorial on how I followed your instructions, to hopefully help more people get involved from the active group.

Edit: Also 100 gold was just a test, not a final value lol

[This message has been edited by IniochReborn (edited 09-26-2020 @ 03:48 PM).]

Age of Wonders 2 Heaven » Forums » AoW1 Mod Packs » Modifying the binaries
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Wonders 2 Heaven | HeavenGames