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

AoW1 Mod Packs
Moderated by Enginerd, Ziggurat Mason

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Modding limitations? - a rambling post
posted 04-09-21 07:16 AM EDT (US)   
I just checked into the forum today - and wow! So much has happened in the past few months!

I used to play AOW back in the early 2000s with my friends on a laptop that we'd just pass around. We'd make some really huge multi level maps (with faux surface graphics). We made our own MOD too with excessive new units and buildings (lots of sub races ripping off whatever we were into at the time). It was a total mess but lots of fun!

I'm just trying to get my head around the new possibilites for modding with the recent efforts showcased by ANDG and ZIGGURAT.

Would anyone be able to help me formulate a list of what CAN and CAN'T be done?

I'd be interested to know if any recent discoveries could facilitate anything from introducing NEW abilities, spells, behaviours, buildables in cities etc.

Is it possible to introduce NEW races at all? Or use modifications to race relations to just have a simple GOOD/EVIL split?

Is there any likelihood that there could be 'evolvable' units like in some AOW2 mods?

Could we even end up with larger map sizes - or more levels?

The list could grow - and I'd also be interested to know how this compares to the scope and modability of AOW2. There's a very extensive mod I'd love to do that would employ units of troops to simulate the grind of combat (a bit like in MASTER OF MAGIC or in tabletop games like WARHAMMER). I wasn't concerned about having little troops drop off graphically - but did want to repurpose existing mechanics to simulate things such as morale, leadership etc.

Thanks!
Replies:
posted 04-09-21 08:19 AM EDT (US)     1 / 8  
First of all, if you look at the full changelog of my AoW+ patch you will get a pretty good idea of what sort of modifications can be made with reasonable effort.

In theory, you can do anything you want by editing the binaries. In practice, figuring out exactly how the machine code works is an extremely difficult and tedious process, and for someone like me who's not a software engineer and only learned the basics of assembly for the purpose of AoW modding, complex changes are effectively impossible.

As a general rule, modifying existing objects and behaviour is way easier than adding anything new, and even if you do for example manage to add a new ability, getting the AI to actually use it will likely be an impossible task.

Even simple modifications are impossible if you can't figure out where to make them. For example, I still haven't found where terrain movement cost is defined.

If you're in any way serious about learning how to mod the AoW engine, your best bet is to first learn an object oriented programming language, ideally Delphi which AoW was written in, and then follow my ASM crash course which will probably be wrapped up within a week or two.
posted 04-10-21 04:18 AM EDT (US)     2 / 8  
Thanks for the reply!

I've been loading the various libraries and executables into various decompilers and it is quite intimidating!

Your crash course reads really well - and at some point I'll have a crack at having a more informed dig through!
posted 04-16-21 12:25 PM EDT (US)     3 / 8  
Your guide is a most appreciated contribution And G! Excellent work!

Would you have any recommendations for software to compare two different AoWEPack files, and search for specific byte edits? I just can't seem to find the Keeper Campaign Playable Races, but there must be a better way of looking if both vanilla/AoW+ values are known.
posted 04-16-21 10:39 PM EDT (US)     4 / 8  
Selectable races are in AoW.exe in TCampaignJoinDlg.CampaignJoinDlgDestroy. There are actually like 8 selectable races each, but you can't select the races further down the dropdown list because it goes outside the bounds of the frame.

I use HxD for binary comparison.

Note that with the latest post of my tutorial I have pretty much covered the basics of assembly; future posts will only become more and more complicated. I strongly advise that you practice what I've covered until you've well and truly internalised it, including stuff I've only mentioned in passing, e.g. arithmetic operations like IMUL. I can't explain every single instruction, so you need to look up what you don't know on your own, e.g. SAR/SAL etc.

Here are some AoW+ changes that you should now be able to reconstruct:
  • City income (TCity.UpdateIncome and TCity.ListIncomeInfo)
  • Campaign item transfer cost (TItem.GetObtainValue)
  • Unit build turns (TCityProductionControl.UnitProductionTime)
  • Fortify turns (TCity.FortifyTime)

    I recommend that you play around with these until you feel that you fully understand all the basic stuff.

    [This message has been edited by And G (edited 04-16-2021 @ 10:41 PM).]

  • posted 04-17-21 11:44 AM EDT (US)     5 / 8  
    Cheers And G, you sir are a gentleman and a scholar. I admittedly have lots of reading up to do, but I foolishly promised I'd release my custom campaign demo this weekend. The release is saved!

    [This message has been edited by IniochReborn (edited 04-17-2021 @ 01:17 PM).]

    posted 04-19-21 07:07 AM EDT (US)     6 / 8  
    Would you mind explaining where you made the following changes in AoW+? I tried to copy them over but must not've caught every change in the code.
    -Altering the mana generation from Spellcasting Heroes
    -Making cities/units recruitable at Neutral relations for a higher cost

    Also, this one should be easy for you, but I can't yet "read" the code:
    -altering goldcost for Arena training. There's a line which I'm sure defines this in Arena.TArena.UnitTrainCost: "lea eax,[esi+esi*4]", so 5 gold per XP remaining to reach next medal. I tried changing it, but didn't know how.

    Do you think Leadership as a multi-level ability could realistically be restored or re-implemented? (might be able to find and copy code from AoW2 for this)

    Also, where can I look up how to write certain instructions? I've started making a list, but is there any resource for this?



    Oh and one more thing: could the hit-chance system be changed, such that the maximum values of ATK and DEF are increased to 20, and each difference modifies chance to hit by 5%, not 10%?

    I came across AoWE.HitRoleProbability in AoWEPack.dpl which seems to have 10, 90, 50 - which are the relevant parameters.

    [This message has been edited by Ziggurat Mason (edited 04-19-2021 @ 08:40 AM).]

    posted 04-20-21 00:21 AM EDT (US)     7 / 8  
    I will explain specific changes in more detail once I've finished writing the tutorial. I haven't looked into leadership, hit chances, etc. so I can't really comment on that.

    In the first post of the tutorial I linked an online assembler/disassembler which you can use to convert assembly to machine code and vice versa. This is the main tool you need for writing your own code.
    posted 04-21-21 10:07 AM EDT (US)     8 / 8  
    Thanks, I edited Arena cost using https://disasm.pro/ to guide me!
    Age of Wonders 2 Heaven » Forums » AoW1 Mod Packs » Modding limitations? - a rambling post
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Wonders 2 Heaven | HeavenGames