And a follow up question: why are the laws of hardcoding allowed to randomly change at the whims of the magicians who work on this game with their superhuman powers?
The most obvious limitation is the inability to modding new civilizations without replacing existing ones.
Interestingly, AoE3: DE and AoM allow this, whereas Age of Empires II: DE and AoE4 do not,perhaps to avoid hurting sales of future DLCs for those two titles.
Even Return of Rome has this limitation, although the likelihood of it receiving a DLC is very slim.
Of all the titles, Return of Rome (aoe1) is the most severely limited; it has only 17 civilizations that can be replaced (even though it runs within AoE2), compared to the 53 in the main game (+ 6 if we count the Chronicles civilizations).
Yet here’s a fun post by the man who is supposedly not born with coding talent: https://aoezone.net/threads/new-expansion-site-added-19-sep.68879/page-59
See this post from 2012 berserk Regen was HARDCODED yet nowadays Regen is supposedly not. Why were the rules allowed to change when hardcoding means thou cannot ever break it
Devs have the base code so they can change so called hardcoded stuff.is that so hard for you to understand being around all this time?
You can add civis in data the issue is the UI is hardcoded and we cant add new civi selection.
The problem is if I make a civ I risk a schrodingers hatred: either it changes too much and doesn’t obey the classic rules or it doesn’t change enough and it won’t impress my way up the ladder so not wasting time feels safe
And when I do try I run into issues like when I create a new tech in AGE and try to type in a description for it it doesn’t change it or create a string for me
You have to edit a string file directly and put that mod higher than any other mod that modifies that string number.
I think I get that but how do you just make a string and have it magically show up in game. Im trying but it doesnt seem intuitive like theres some force trying to stop us plebs
From the player side, there’s actually not much we can do.
Back in the old AoE2/Conquerors days, modders could modify the EXE and DAT to work around hard-coded limits. But that was still a workaround, not proper native support.
Today, we can modify the data exposed to us, but we can’t really change the underlying architecture. The DAT is already extremely large, so there’s only so much more content we can squeeze into it.
RoR already has its own DAT, but it’s still closely connected to AoE2 at the architectural level. So the data is separated, but the architecture isn’t completely independent.
That’s why I think the long-term solution is to reduce unnecessary coupling between AoE2, RoR, and Chronicles, rather than simply adding more content to the existing structure.
But that’s not something we can do as players.
Maybe you can help me: Im trying to enable a few bonuses:
Fortified Churches grant nearby melee units +4 damage and ranged units +2.
Meat sources provide 20% wood while being gathered
Lets start here since this might be basic but I dont see the resource code that unlocks this
The Fortified Church bonus should be more doable. I’m fairly sure AGE has supported attack bonuses through Auras since the Three Kingdoms era, as long as the target types are configured correctly.
You could also take a simpler approach and give the affected units +4 melee and +2 pierce directly. Most common land units don’t use both damage types at the same time, with Fire Ships being the obvious exception.
There were also some limitations with Auras in older versions. For example, Zhou Yu had an Aura that was supposed to provide extra range, but the range effect didn’t actually work because that attribute wasn’t properly supported by the Aura system at the time.
The Meat → Wood bonus is harder. Compared with something like gathering efficiency, I don’t think the Aura system currently extends to generating a different resource while gathering.
Its mostly to offset the lack of Iron Casting and Chemistry. Basically its meant to be a strategic use since cavalry have +.5 attack range which is nerfed by lacking attack damage
Not looking for an aura. Just the Portuguese effect but for hunt sheep and pasture meat
Then you could treat the Fortified Church more like a technology: once built, it becomes a global effect, so you don’t have to deal with the limitations of the Aura system.
For auras like strongholds and civ bonus fortified Church workrate i keep seeing 33 Food Maintenance. Which is… strange both have different effects but both have the same resource.
I think the 33 Food Maintenance is more of a trigger parameter than an actual resource value. Changing it to another number makes the effect stop working.
Older AGE implementations handled similar effects through parameters stored in both Effects and Units. Ordo Cavalry is a good example. Its old implementation could increase the HP recovery based on how many enemies it was engaging at close range, so fighting multiple enemies could push the effect beyond the normal 150% cap. The current implementation no longer scales that way.
Even the relatively simple Celts’ Stronghold effect works in a similar way. Earlier implementations also wrote these parameters directly into the Effects and Units.
So I suspect the 33 is basically a value the game checks to activate a specific mechanic, rather than an actual Food value.
The game engine is old, from a time where processor speed, graphic cards capacities, memory storage were VERY different than today’s technology.
The engine was not designed for age of empries 2 from straight, it’s an engine that was improved for multiple RTS game of that era, and limitations were kinda established by the programmers of that era.
With the time going, the dev team tend to break more and more of those hardcoded things, but some are kept hardcoded for stability reason most of the time. When you allow soemthing to be edited, you have to make sure it’s not leading to crashes, and some mechanics are sometime causing issues from the start.
There is also the simple answer of: “it’s easier to hardcode something, rather than making it dynamic”.
Why that ? Hardcoding is just based on a condition detection “if unit id is the id I want to hardcod, then bypass behavior and do something else”. The hussite wagon attack method is a good example of that. It’s a unit that doesn’t require to rotate the unit toward the target to attack. It’s basically the same as buildings, they don’t rotate to attacks.
The question of hardcoding here is on how the core engine code is designed. Are the specific behavior, like rotate-toward-target-before-attack, built in the Class of the object or in the Type of the object, or in the Task, or in its attributes. Changing something from hardcoded to dynamic editing sometime is a damn nightmare because some hidden side-effects may occure because changes can impact other things.
The actual dev team is not the team that designed the engine back in 1999, they had to learn first as modders, and then as professionnals to “tame” the engine and taking the control on the code behavior, which they did with the Definitive Edition release.
Compared to 2017, when I was activelly working on datamods on the HD version, today hardcoded limits are damn less restrictive than what they used to. Every major update brings tons of new polishing and quality of life improvement, allowing modders to go further everytime.
But limits will always exist, even if you own a product, there will always be some limits.
The trick is to find a way to ignore those limits ahaha. Like MacGyver, take some tape-band, a swiss knife, and some trash to do your work.