Bay 12 Games Forum
Dwarf Fortress => DF Modding => Topic started by: BoogieMan on June 22, 2023, 09:45:50 pm
-
Steam version. Can someone help me by explaining what I need to do to allow monarchs/nobles to be appointed to military positions? I have rudimentary modding experience with DF.
And is this possible to make this change to an existing save? My by far best fighter just got named King, and not being able to have him fight is a serious blow to the fortress. Being at war with Goblins, Kobolds, and a nearby Tower, this one thing is probably going to spell doom for this fledgling fortress otherwise.
-
Honestly I'm surprised if you can't. I mean, my nobles have always been a part of my military. The Duchess of my current fort is in a squad right now, and I'm pretty sure the Monarch of my very first fort was also in a squad.
Or maybe it's just that they can't be the commander of the squad? Not sure on that, I guess. My Duchess is not the commander of her squad, and I don't remember from my past forts which positions in the military squads the nobles held.
But if that's the case, well, just don't make them the squad leader, and you should still be able to make them a squad member which would still allow them to fight. No modding necessary. That's been my experience with the Steam version of the game, anyway.
-
Honestly I'm surprised if you can't. I mean, my nobles have always been a part of my military. The Duchess of my current fort is in a squad right now, and I'm pretty sure the Monarch of my very first fort was also in a squad.
Or maybe it's just that they can't be the commander of the squad? Not sure on that, I guess. My Duchess is not the commander of her squad, and I don't remember from my past forts which positions in the military squads the nobles held.
But if that's the case, well, just don't make them the squad leader, and you should still be able to make them a squad member which would still allow them to fight. No modding necessary. That's been my experience with the Steam version of the game, anyway.
Thanks, You are correct, they can be a member of a squad, but not the leader. It's a start. But he's still the best suited for a job and I kind of like the idea of a warrior king who personally leads his soldiers in to battle. I imagine it would be possible by editing the raws, and I'd still like to try it if anyone can figure out how to allow them to be squad leaders.
-
You could try adding the SQUAD (https://dwarffortresswiki.org/index.php/Position_token#SQUAD) token to their entry ([POSITION:MONARCH]) in vanilla_entities/objects/entity_default.txt, some thing like
[SQUAD:10:royal guard:royal guards]
or relonduthnur, the literal translation in dwarven.
-
You could try adding the SQUAD (https://dwarffortresswiki.org/index.php/Position_token#SQUAD) token to their entry ([POSITION:MONARCH]) in vanilla_entities/objects/entity_default.txt, some thing like
[SQUAD:10:royal guard:royal guards]
or relonduthnur, the literal translation in dwarven.
Thanks, I did so. But the save game seems to be compressed so I don't know how to edit the files for the save so I imagine it'll be tricky to test since it relies on having a monarch in your fort.
-
There is the DFHack command https://docs.dfhack.org/en/stable/docs/tools/make-monarch.html, that might work for a test.
-
There is the DFHack command https://docs.dfhack.org/en/stable/docs/tools/make-monarch.html, that might work for a test.
Ah, very interesting. Thanks again!
-
You could try adding the SQUAD (https://dwarffortresswiki.org/index.php/Position_token#SQUAD) token to their entry ([POSITION:MONARCH]) in vanilla_entities/objects/entity_default.txt, some thing like
[SQUAD:10:royal guard:royal guards]
or relonduthnur, the literal translation in dwarven.
I think you need to gen a new world for that to take. It doesn't work on a save, even when editing the raws in the save folder. (I'm playing on 47.05 though, because I play adventurer mode too.)
I tried doing this in a running game with DFhack's lua using the code below, it didn't work. What am I doing wrong? Please note that this is just something I copied from dfwiki and I do not understand code.
dfhack.units.getNoblePositions(unit)[1].position.squad_size = 10
dfhack.units.getNoblePositions(unit)[1].position.squad[0]="soldier"
dfhack.units.getNoblePositions(unit)[1].position.squad[1]="soldiers"
By the way, make-monarch will pass kingship to a different unit (try a goblin or a yak for the hurr durr--but backup first just in case), and should make your current king an ordinary warrior again, thus able to lead squads. But not king anymore, obviously.