New unit (Halberdier hero) either doesn't appear in Scenario Editor or crashes the game

Newbie here, in fact I’m totally new to modding and stuff.

I’m trying to use Advanced Genie Editor (AGE) to create a new unit - a halberdier hero unit, but failed. Obviously it is based on a halberdier so I just simply copied the info of halberdier (359), created a new unit (1701 in my system) and pasted there, while editing a few of the characteristics.

I do not want to change any of the graphics at the moment, and merely increased the HP to 180, base attack (Class 4) to 18, and checked “Hero Mode” (because it’s a hero unit!).

But here the problem comes in terms of naming. If I change the “Language File Name” to 0, no matter what “Internal Name” I give (whether it is HLBDMH in this screenshot, or “Halberdier Hero”), the unit would not appear in the Scenario Editor. (Note that the Internal Name for the normal halberdier is “HLBDM”)

Whereas if I link the “Language File Name” to something in the language file, whether I leave it as “5409” (“Halberdier”) or I changed it to something else, say, “6037” (“Name”) (since I can use trigger to change the name in the Scenario Editor), though the unit appears in the Scenario Editor, once I place the unit and test the scenario, the game would crash. (Note that I have changed the Internal Name as “HLBDMH” as mentioned above)

Even if I created a dead unit based on HLBDM_D (502) and name it as HLBDMH_D (1702 in my system) in order to make it as the dead unit for my new unit, it doesn’t help at all either.

I have read this but I have no clue on solving my own problem.

Wonder what has gone wrong, thanks.

Did you ever find a solution to this problem? I’m running into the same issues!

As I understand it, you created a unit out of nothing; you can’t do that, it doesn’t matter if everything is the same, whatever you want to change in the game you can’t do from scratch (from the experience I already have), then do the following: delete your “.DAT” file and copy the original “DAT” again, just in case, because that file is probably already in error.
Second, open the “.DAT” file copied from the original with the “Advanced Genie Editor 2020.10.2” program with the correct paths and copy the “Halberdier” to a new ID (for example, ID 1701).
Third, if you want to change the name of the drive you should always have a number that you have in the file “key-value-modded-strings-utf8”, but if the name you want to put in the drive does not exist in this file, you must create one new mod (COMPLETELY SEPARATE FROM YOUR PERSONALIZED “DAT” MOD) in which in your personalized “key-value-modded-strings-utf8” file you write the number with the desired name.
NOTE: In units / buildings, the language number can never be 0.

If with this information the game crashes when creating a new unit, subscribe to these 2 mods I made, so you can see in more detail how I did it.
Subscribe : “AOE2_Golden_DE (DAT)”; “AOE2_Golden_DE (STRINGS)”.

Information: Most likely my mod “dat” will be very useful for your case, because I made many units / buildings / technologies and also a new Age (including I also made a new halberdier with the name “Heavy Halberdier”).

Thank you, I’ll check it out! I’ve been able to replace existing units with new units, but adding new unit IDs crashes the game. However, the mod I’ve been copying from had added like 60 new units which all worked. When contacting him he said he cant add any new ones anymore since a patch at some point broke that functionality.

I’ll sub to your mod and see!

UPDATE: The recent update 47820 has fixed the issue of crashing caused by a modified data file containing more than 1701 units. So I’m able to use the halberdier hero while testing the scenario. I leave the name as “Halberdier” while changing the internal name as “HLBDMH”.

However, how shall I modify the graphic by adding the hero glow? Thanks