Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How can I allow monarchs to be militia commanders/squad leaders?  (Read 690 times)

BoogieMan

  • Bay Watcher
  • Hi
    • View Profile

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.
Logged
(╯°□°)╯︵ ┻━┻ BoogieMan, Forumscrub cancels tantrum: Seeking Dr. Pepper

BlueTrillium

  • Bay Watcher
    • View Profile
Re: How can I allow monarchs to be militia commanders/squad leaders?
« Reply #1 on: June 22, 2023, 09:53:20 pm »

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.
Logged

BoogieMan

  • Bay Watcher
  • Hi
    • View Profile
Re: How can I allow monarchs to be militia commanders/squad leaders?
« Reply #2 on: June 22, 2023, 10:18:15 pm »

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.
Logged
(╯°□°)╯︵ ┻━┻ BoogieMan, Forumscrub cancels tantrum: Seeking Dr. Pepper

Ziusudra

  • Bay Watcher
    • View Profile
Re: How can I allow monarchs to be militia commanders/squad leaders?
« Reply #3 on: June 22, 2023, 10:41:51 pm »

You could try adding the SQUAD token to their entry ([POSITION:MONARCH]) in vanilla_entities/objects/entity_default.txt, some thing like
Code: [Select]
[SQUAD:10:royal guard:royal guards]
or relonduthnur, the literal translation in dwarven.
« Last Edit: June 22, 2023, 10:45:08 pm by Ziusudra »
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

BoogieMan

  • Bay Watcher
  • Hi
    • View Profile
Re: How can I allow monarchs to be militia commanders/squad leaders?
« Reply #4 on: June 23, 2023, 11:07:42 am »

You could try adding the SQUAD token to their entry ([POSITION:MONARCH]) in vanilla_entities/objects/entity_default.txt, some thing like
Code: [Select]
[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.
Logged
(╯°□°)╯︵ ┻━┻ BoogieMan, Forumscrub cancels tantrum: Seeking Dr. Pepper

Ziusudra

  • Bay Watcher
    • View Profile
Re: How can I allow monarchs to be militia commanders/squad leaders?
« Reply #5 on: June 24, 2023, 04:10:46 am »

There is the DFHack command https://docs.dfhack.org/en/stable/docs/tools/make-monarch.html, that might work for a test.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

BoogieMan

  • Bay Watcher
  • Hi
    • View Profile
Re: How can I allow monarchs to be militia commanders/squad leaders?
« Reply #6 on: June 24, 2023, 09:28:05 pm »

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!
Logged
(╯°□°)╯︵ ┻━┻ BoogieMan, Forumscrub cancels tantrum: Seeking Dr. Pepper

DerpFortress

  • Bay Watcher
    • View Profile
Re: How can I allow monarchs to be militia commanders/squad leaders?
« Reply #7 on: June 28, 2023, 04:56:11 am »

You could try adding the SQUAD token to their entry ([POSITION:MONARCH]) in vanilla_entities/objects/entity_default.txt, some thing like
Code: [Select]
[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.

Code: [Select]
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.
Logged