The Spanish update’s changelog said that .tactics file now support additive modding, but this is not the case. The guide for additive files (https://support.ageofempires.com/hc/en-us/articles/360062106732-Additive-Data-Mods) hasn’t been updated for .tactics files.
The naming convention necessary for additive .tactics modding is unknown, the devs forgot to tell us. I tried naming a .tactics file “unitname.mods.tactics.xmb”, but it broke the AI, since apparently, if you name a .tactics file anything other than “unitname.tactics.xmb”, it will break the AI and make games against AI unplayable.
Can a developer share his secrets? In my mod (OligarchyMod), I made some changes to the Outpost’s tactics file, and I really want to make it additive before Knights of the Mediterranean hits and messes things up.
I have the same question, and would also like an update to the Additive Data Mods page.
@VitezVaddiszno @pwaopwao apologies for the lack of updates to the Additive Data Mods page. There should be an update coming soon.
In the meantime, Vitez, it sounds like you are on the right track with modding the tactics file. To additively mod the Outpost’s tactics the file should be combatbuilding.mods.tactics.xmb and this should be in the data\tactics folder. And the root node in the file should be named tacticsmods. (Note that you can also skip the xmb step so using the file combatbuilding.mods.tactics should also work).
Here is an example that changes the projectile for the RangedAttack action of the Outpost to be a Flaming Arrow…
Let me know if you still have any issues with it.
Thank you very much for answering @SmokeyTadpole72, please I would like to ask you to also add someday Additive Data Mods for other files like voice files for units
<protounitsounddef> and also for unit textures/models
<animfile>, etc. and in this way add modifications without altering those original files.
Thank you, it works for me. However, there are some secret pitfalls of .tactics file modding;
If you use brand-new tactics files in your mod (for your new units), they must be converted into .xmb or else it will display an error message upon starting a match, break the AI and make it useless. However, if you’re additively modding an existing unit, it must be in an .xml format, as .xmb formats will once again break the AI. I don’t know the exact reason behind these weird conventions, but maybe there’s some bug on the backend that you guys could look into. It took a lot of trial and error to figuring these issues and workarounds out, and they needlessly complicate modding.
@VitezVaddiszno I’m not seeing the same issue that you are seeing. Using a .xmb or .tactics file for both a new tactics file and additively modding an existing tactics file is working fine for me.
I’ve attached a zip file with a couple of test mods (rename the attached file to .zip - it wouldn’t let me upload a .zip). Both are identical but one is an xmb version. I tested this in the current Update Preview build without an issue.
If you are still having a problem maybe you can upload a small example that shows the issue?
TacticsExampleMods.txt (15.1 KB)
@pwaopwao thankyou for the suggestive improvements to the Additive Data Mod system. I have added them to our database.
The issue is definitely there, since every time a big update (like today’s pre-KoTM) comes out, the dreaded AI break comes. Let me attach some screenshots that show them.
AI break 1 that comes up during the loading screen:
AI break 2 that comes up when I’m in the match already:
This kills the AI and he can not act at all for the rest game. This is easily reproduceable by isolating the problematic .tactics file (you got to track it down first though) and removing/adding it back in its folder.
I usually repair this issue by removing all .tactics files from my mod (of which I have 38, so it’s a thankless job), then putting them back one by one and starting them game to check if the error comes up. Today’s patch broke 6 of the 38 .tactics files at random, and do you know what fixed them? By converting them back to .xml and putting them back in without any more modifications! That’s right, having the exact same .tactics file in a different format SOMEHOW breaks the AI’s pathfinding at the start of the match (even if the unit with the .tactics file in question is not even present), and nobody, not even the devs know about this issue, except 1 random guy who made a parody Hungary mod. It’s baffling! The even more surprising thing is that the units in question work just fine! They perform all their functions contained within their “buggy” .tactics files, it’s only the AI that breaks!
With that said, I’m willing to extensively cooperate with you in tracking down the origin of this issue, if you’re interested. Since February I got hooked on modding and spent 8+ hours a day modding OligarchyMod (which became a damn fine mod, I must say) so I’m pretty keen on the ins and outs already. I daresay I’m the most proficient/active modder in AoE3DE at the moment.
@VitezVaddiszno I downloaded your mod and got the same errors that you were seeing compiling the AI script.
The issue is caused by the blank line in your tactics files that define a Default tactic. The code didn’t handle this blank line properly and that caused the problem with the AI script.
I’m putting in a fix for the code that parses the tactics so it will handle the blank line in future. This fix will be released in the next patch. In the meantime, if you still need to work around the issue you can delete the blank line in those tactics files. The files are: olblackcar.tactics.xmb, olivorytower.tactics.xmb, olmosque.tactics.xmb, olmucsi.tactics.xmb, olparliament.tactics.xmb and poster.tactics.xmb. I guess these are the 6 files you were referring to in your post.
I also noticed a couple of other minor issues with your mod:
- There is a duplicate string id 800438 “Death Sentence”
- There are a couple of missing attachment model files for your Home City:
Oh, so THAT was it! Thank you so much, I thought some complex mechanic was causing the issue, I never would have guessed it was a blank line (since xml-type files are usually lenient with formatting - techtreemods, for example). You have no idea how glad I am to receive the real answer that has been behind these anomalies for so long. That’s the sweet thing about being a dev, being able to see these causes that us modders only see the effects of.
Yep, it was those 6 files, and I suppose why reason formatting “fixed” them is that it automatically removed these blank lines upon conversion. But now there’s no need to leave them in .xmb anymore.
Thank you for notifying me about the duplicate string id as well. I try to weed them out as much as much as I can but sometimes they still slip through. The missing guards and Gatling Gun are not a bug though; I removed them on purpose because Oligarchy is a nation of Alcoholics and they are not organized or smart enough to stand guard or operate a machine gun ^^
Also, if you’ve read through the code so rigorously, I hope the technician in you appreciated the intricate shadowteching mechanism behind cards such as Shuttercock Policy and Rubik’s Cube - with 30-40 shadowtechs, one can set up a system of logic gates to determine effects based on a ruleset, instead of evaluating a myriad different permutations case by case. In this case, whether the player chose the same or different Parties through the Ages. But I digress.