Okay. So you want to add MANAGER positions and the like. And you already have some way to make PLAINS civilizations playable, when they were non-playable when the world was generated. Right?
Yes. Making them playable is a simple matter of adding SITE_CONTROLLABLE to the entity raws. This is one of the raw edits that works in generated worlds.
Ideally I'd like to learn how to make new positions in a generated world to any of the civs (dwarves, elves, humans, etc.). If such a thing is possible, of course.
(Normally I'd just generate a new world and mod it with raws, but since it's a long-running world that I want to stick with, I'm trying to figure how much I can edit the existing world. Also, I'm pretty certain there's others out there who'd like to know if adding positions to existing worlds is possible.)
Maybe you want to just copy all of the positions from a MOUNTAIN race civilization? Or, better, pick-and-choose which ones to copy?
I tried out something similar and looked up a human site's lord (CUSTOM_LAW_MAKER) and manually copied it to (the site government).positions.own. Added a new entity_position to the blank screen with alt+i. But this isn't apparently enough, or I did something wrong, which is possible (nothing shows up in the nobles screen).
So, I assume I have to make an entry in positions.assignments, and this is where I run into problems. For a new site, this screen is blank, so I tried adding a new entity_position_assignment with alt+i, which adds it. However, when editing the entity_position_assignment, it has a part called 'flags' <BitArray ....> . This screen is empty in the one I added. In existing assignments flags contains true/false fields (or whatever they're called) from 0-31.
So, if I try to manually add a new one to the empty assigment flags, I crash to desktop.
I was thinking of trying out if I add to the human parent civ (before embarking) site specific positions (that is to <civ>positions.site.) and see if it creates the position assignments to the new site. Haven't yet tested this, but if it works, it wouldn't require messing around with the assignment fields.
That could probably be done in Lua. Trying to do this through gm-editor... it would be possible, I suppose, but very tedious and error-prone.
Yeah, I guess I should start learning lua (which has been in the plans for a bit too long). But I'm also fine with tedious manual entries.
A big issue would be keeping the raws in sync. Maybe that doesn't matter though. It looks like civ entities get saved/loaded in whole, maybe they don't refer back to the raws. Worth trying.
I actually tried editing existing raw defined positions in a dwarf player fortress (such as changing names). Saving and loading didn't seem to change these, so it might be that they aren't checked from the raws once they've been made to the site? Just my guess.
Might have to obliterate the modded GUILD_REPRESENTATIVE position. No big loss. Could cause some flakiness if the position is filled in your target civ.
The human civs have these positions assigned, so it's possible it'll cause issues. I could try it and see what happens.
Anyway, thanks!