I followed the tutorials I could find here on creating a new unit, but it's not working. It's not crashing, but the unit's not available in either custom battles or campaign mode. It's set to "wh_main_dwf_dwarfs" in units_custom_battle_table and should be buildable at the Workshop 2, 3, and 4, but no go.
It's a sniper, so I cloned the entry for "wh_main_dwf_inf_thunderers_0", renamed it "wh_main_dwf_inf_sniper" and adjusted things. I had to make a new (cloned) rifle, axe and bullet so it wouldn't use existing assets and mess with the standard Thunderers. I had hoped to give it a different armor as well (the dwarf warrior armor), but with the difficulties I'm having now I think I'd better get it working before I break it further, yes?
Firstly, did you use the Assembly Kit to create the unique IDs for buildings_unit_allowed_table and main_units table?
Secondly, you're missing cdir_military_generator_unit_qualities_table and variants_table.
Thirdly, I don't think you need unit_set_to_unit_junctions table.
Finally, I don't think the unit ability will work since its a hero perk rather than a unit perk (no idea if that even matters tbh).
Its probably the Assembly Kit bit that's missing, good luck.
No, I used PFM for the IDs. I'll start there.
From what I saw that cdir file was linked to the AI. I wanted to get the unit in and working for the player before I gave it to the AI, so leaving it out was deliberate and temporary. Would missing that make it not show up at all?
As to the unit_set_to_unit_junction_table, as I understand it this defines what type of unit this is for the purposes of applying upgrades through special buildings or technology. Is that right?
Scrubbed the ability, just in case.
Is there a way to make him able to be hidden in any terrain?
On a slightly different note, PFM can't see my install of TWW or TWR2. I found gamedirs.txt, but it's totally empty. What's the syntax there so I can add a path manually?
Can't check the pack right now but try using a random vanilla main_units number key. Don't worry, it's meaningless now and it won't override the other unit as long as you use a different unit key (I have multiple units in the same pack using the exact same number and they work just fine).
For some reason typing it or renumbering it in PFM will not crash but will not show up the unit either. Been there the first time.
Unit set: yeah, don't forget it if you want them to receive lord/tech buffs.
About the hide anywhere, try looking up the attributes used by night gobbos, they should have it. Pretty simple to assemble a new attribute set if needed too.
As for the gamedirs, this is my address for example: "TWH;D:\SteamLibrary\steamapps\common\Total War WARHAMMER".