Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emigrate nobles #1382

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open

Conversation

ong-yinggao98
Copy link

@ong-yinggao98 ong-yinggao98 commented Jan 28, 2025

Adds a script to allow players to make inherited nobles emigrate to govern their rightful lands.
For those who want a non-violent way of getting unnecessary nobles to stop imposing on them and do their jobs.

  • Argument handling
    • Select specific noble for emigration by ID
    • Select all nobles
    • Select current unit
  • Allow immigration of your rightful ruler (if your original died and the heir is off-site)
  • Noble takes family with him/her (as an option)
  • Make sure when noble leaves, the noble:
    • Is not an administrator in the fortress - block
    • Is not in a military squad - block
    • Is not in a strange mood - block
    • Has no symbols of office
    • Stops any social activities
    • Has no more mandates

@ong-yinggao98 ong-yinggao98 marked this pull request as ready for review January 29, 2025 16:25
@ong-yinggao98
Copy link
Author

Ideally I would have noble items unassigned but I can't seem to find them. I guess I could assume that players who want to be rid of their nobles would not assign items to them first...

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc review done

@ong-yinggao98

This comment was marked as resolved.

@myk002
Copy link
Member

myk002 commented Feb 8, 2025

May lead to citizens being sentenced ahead of time

I'm pretty sure this will be safe. DF would punish citizens when the mandate expires, but if it were to just disappear from the world.mandates list, then it would be like the mandate never existed

@myk002
Copy link
Member

myk002 commented Feb 9, 2025

Noble has been unassigned items of office

Copied from Discord:

so, from the perspective of emigrate nobles, you'd:

  • find the noble position of the noble you're kicking out
  • get the related historical_entity (e.g. civ, for barons)
  • scan the artifact_claims vector and look for claim_type=Symbol and symbol_claim_id=noble position idx
  • remove those items from the vector and delete them
  • remove the entity_claim on the associated artifact record

If the noble is the owner of the artifact item, remove ownership
might need to do more to get them to drop it if they're carrying it

@myk002 myk002 changed the title Add emigrate-nobles.lua emigrate nobles Feb 10, 2025
@ong-yinggao98
Copy link
Author

The todo i recently added to the script can be safely ignored, just realised it is not possible for citizens to inherit titles from another civilisation.

@ong-yinggao98
Copy link
Author

I've done a scan, didn't see any other restructured stuff other than mandates. It's ready now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review In Progress
Development

Successfully merging this pull request may close these issues.

2 participants