Modding Questions for DE (Custom Civ/Units/etc. in Scenario)

I’ve been trying to get some custom units and such to work in a custom scenario, so I figured I’d ask here about some of the problems I’m having that I can’t seem to figure out.

  • Sometimes, the second resource in a unit or technology cost won’t appear in-game. For instance, a xx Wood xx Coin unit will only cost Wood. Is there a value somewhere that sets how many resources can be used for a unit?
  • What is necessary to do to make a unit that can gather from certain objects without being a villager? For instance, I tried to replicate the Karelian Jaeger or Priestess upgrades to gather from certain things, but sometimes the unit will not do it or will not actually collect resources when tasked to the object. (Also, they won’t auto-gather from crates even with the flag added.)
  • Is there a way to change the villager attack animation to use a bow instead of a blunderbuss? If so, where is that controlled? (Similarly, are there any non-cannon attacks for ships?)
  • When playing with a custom civilization, I noticed there are no unit sounds and no music. How does one add these things?
  • Some of the units I copied as bases for other units have abilities, like Convert or building tasks. But the custom versions don’t seem to have these abilities on the command bar. Do they have to be enabled somewhere, like in the Age0 tech for the civilization?

As a side note, is there perhaps a guide for all of these custom unit/civ/tech/etc. things, since a lot of this is similar to the original game?

Lastly, is there a plan to fix the way string tables are handled when mods are installed and active? I find it a bit strange that I have to change the active language to play custom scenarios that use a modded string table. I doubt many players would be forgiving of that, assuming it’s the fault of the modder.

Edit: I also realized that I don’t know how to make the little bridges that appear on the Honshu map. Are those a special type of decoration?

1 Like

I think I figured this one out. I was writing “Coin” as a resource, but the internal name for the Coin resource is “Gold”. So the resources that are allowed are Food/Wood/Gold(Coin)/Ships(Shipments)/Trade(Export).

I may have figured out this one as well. It seems that if a unit’s animation file doesn’t have an animation for an action, the unit will not actually be able to perform the action. Seems odd to me, but it does give me a direction to look. I’ve now managed to swap out villager guns for bows and allow a military unit to gather from certain resources, but still am not sure how to handle auto-gather from crates. (Is it the “Hunting” action?)

A new thing I came up with: is there a way to split the protoy.xml into multiple files that append to the main file? For instance, to extend the unit list without breaking other mods that affect the base game’s units. Otherwise, I’d expect only one data mod to work at any one time…

1 Like

Yeah, that is correct. Leftover from AoM.

My guess would be the auto-gather behavior is hardcoded to a certain unit type (AbstractVillager?).


A “data mod” does not necessarily change the protoy file. But yes, each mod essentially overrides your files, so in general you can only have one mod’s changes applied to a particular file (be it protoy, techtreey, some ui file, anything).

1 Like

I thought for sure that I had seen other units automatically gather from crates, but I’m not sure what part of the unit data might control that. After all, I discovered today that the Japanese villagers’ bows are considered blunderbusses for the sake of damage. It feels like the strangest parts of the code are modular sometimes…

While that may be how it works for this game, I’ve seen other games where data can potentially be appended instead of fully replacing the existing files. This game probably wasn’t designed with that kind of modding-friendly modularity in mind, but I’ve seen it done before and know how to make similar frameworks. I don’t know if XML files can be appended to without jumping some hoops, though, so unless the internal code of the game can handle multiple XML files for the same data it’s probably not going to happen.

For instance, my ideal situation would involve something where a modder could create a data file kind of like this:

    ## new unit prototype data here

Then, at runtime, the game would add all of the new entries to the end of the main proto file, in this case protoy.xml. That way, you could have multiple mods that add entries to the data files. (IDs could potentially still be an issue, though…)

1 Like

I’m still having some problems with adding commands/tactics to new units. For example, I created a copy of the Rice Paddy building, but even if I make it identical to the original building (aside from the unit ID) it won’t show the commands to change the production type. I tried to edit the .tactics file, but even a custom tactics file didn’t seem to make any commands show up.

Therefore, does anyone know which files must be edited to allow custom units to use commands/tactics/stances?

Would also need to edit protounitcommands.xml file. However, I’m not sure whether DE allows creating new ones (legacy originally did not allow it).

Additionally, I’m fairly sure the Rice Paddy behavior of stationary gatherers cannot be replicated whatsoever (villagers will constantly move around, like on Mills).

I’ve added a command to the protounitcommands.xml file, but even the existing commands will not appear on custom units. So the duplicated Rice Paddy does not have even the original Food/Coin switching.

As for the stationary gatherers, I’ve not even looked into that too much. I thought they were stationary in my tests, but I didn’t take too much time to investigate that. The lack of resource switching was my main focus. (I even considered using techs to emulate stance swapping, but I don’t know what to edit to change a unit’s resource capacity via technology.)

I feel like it’s becoming necromantic to keep using the same topic, but I feel like it would be unfair to hog attention with new topics for each question so I’ll keep adding to here for now…

In regards to my last post, I discovered that I had to include the flag “ShowTactics” to get the custom Rice Paddy to show any tactics. No idea why; must be a hardcoded thing for the original unit. Also, protocommands seem to still be hardcoded, so I had to change the strings for an existing command instead of using a new command.

My latest questions:

  • I noticed some of the UI code is in the game .bar files, but the actual code executed when hitting buttons and such is not there. Is that all hard-coded? Does this mean it is not possible to, for example, allow more civilizations and/or AI personalities in Skirmish mode?
  • What programs can open and edit GR2 files? (The files used for animations and 3D models.) I was trying to make mounted villagers for a steppe scenario idea, but I realized that villagers don’t have the right skeletons for the mounted animations. I assume it’s possible to add new models, since mods for the original game did, but I don’t know where to start with modding the GR2 files.
  • Are there any good resources for learning RM and AI scripting? I have only found a few for the latter, and only one that really seems detailed enough to be useful for learning.

I feel like there is a lot of potential for really cool mods for this game, which makes me sad that few seem to be making progress with mods. I also want to do a lot more, but I don’t always have the patience to try to work around the weird issues some of these systems have (like the Rice Paddy tactics) or figure out how things need to be built to work (trading sites and minor civs, for example). So it’s a bit frustrating, sitting here with a lot of vague ideas but little idea of how to actually make them real.

An example of an idea I had:

  • Skirmish-type setup with limited ability to age up (lower power cap).
  • Each player starts with only economic and exploration capabilities, like normal age 1 play.
  • To get military units, the player has to use minor civilization sites. (Kind of like control points in Battlefront or territories in Risk.)
  • Higher focus on controlling trading posts than building a centralized base.
  • HC shipments for emergency military forces, like when all other sites are controlled.
  • Non-conquest victory as an option. (Trade monopoly mechanic?)

The above sounds relatively simple as bullet points, but could easily be weeks of work just for the aspects I know how to do. Unless I make a single catch-all “civilization” for the players, I’d need to make low-power versions of every civilization in addition to separating existing units into the minor civilizations (such as Egypt: Mameluke, Nizam Fusilier, and Stradiot). I’d also need to figure out whether production buildings should stay and how they should work to keep the game mobile but balanced. Then there’s all of the HC shipments and figuring out how trade sites work. And all of this could end up as scenario-only if the Skirmish UI can’t handle new civilizations, and it could become multiplayer-only if I can’t learn AI scripting.

I ended up rambling a lot more than I planned to or should have… I’ll leave it as it is for now. My main modding questions are regarding GR2 and the different scripting types. If there’s a version of the original game’s mods (like Wars of Liberty) that doesn’t require an original game install to examine, I’d also like to see how they managed things. And lastly, I’d love to see more mods adding new minor civilizations and more random map locations. (A Silk Road map with all of the different cultures there could be amazing.)

I still don’t have perfect answers to all the questions, but it’s been 3 months so I might as well give you what I got.


Not necessarily. Such things are usually loaded in dynamically from the XML data files, in this case civs.xml and such. I do not know whether the number of civs/personalities is hardcoded on DE or not (it was hardcoded in the legacy game).

I’ve personally never dealt with models at all, but this might help: Workflow - Importing a Model to AOE3 (Part1) - YouTube

They’re for legacy, but 95% should still be applicable to DE.

It should be totally possible to download Wars of Liberty and examine its files, without having the original game installed.


Nope, our installer checks if the game is installed.
but, all our files are unpacked and open for the eyes.

1 Like

Normally all you need to do, is copy the tacktics file.

Oh, right, I forgot about that… perhaps creating a fake age3y.exe file would be enough to make the installer run?

1 Like

Nope, it will copy the needed gamefiles from the orginal installation.
If there is no orginal installation, it wont install :smiley: