Skip to content

Feature #40: Forced ideology per pawnkind#56

Open
feldoh wants to merge 1 commit into
mainfrom
feature/40-forced-ideology
Open

Feature #40: Forced ideology per pawnkind#56
feldoh wants to merge 1 commit into
mainfrom
feature/40-forced-ideology

Conversation

@feldoh
Copy link
Copy Markdown
Owner

@feldoh feldoh commented Apr 12, 2026

Summary

  • Adds ForcedIdeoName field to PawnKindEdit (nullable string, backwards compatible)
  • New PawnGenPatchIdeo Harmony postfix on GenerateNewPawnInternal resolves ideo by name and calls SetIdeo
  • UI in General tab: toggle + ideo picker from Find.IdeoManager when a world is loaded; read-only display when editing from main menu
  • Guarded by ModsConfig.IdeologyActive throughout — safe when DLC absent
  • 7 new translation keys added

Design notes

  • Ideos are world instances, not defs — stored by name string for cross-world preset portability
  • If the named ideo doesn't exist in the current world, the override is silently skipped
  • Specific pawnkind edits override global edits (standard TC pattern)

Test plan

  • Enable Ideology DLC, load a world
  • Open a pawnkind edit in General tab — verify "Forced Ideology" toggle appears
  • Toggle on, select an ideo from the dropdown
  • Trigger a raid — verify spawned pawns have the forced ideo
  • Toggle off — verify pawns revert to faction default ideo
  • Test from main menu (no world) — field should show stored name read-only
  • Test without Ideology DLC — field should not appear
  • Save/reload preset — verify field persists

Closes #40

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Allow users to force a specific ideology (Ideo) on generated pawns via
PawnKindEdit. Stored by name string for world-instance compatibility.

- PawnKindEdit: new ForcedIdeoName field with XML serialization
- PawnGenPatchIdeo: postfix on GenerateNewPawnInternal resolves ideo by
  name from IdeoManager and applies via SetIdeo
- GeneralTab: toggle + dropdown UI (requires Ideology DLC, non-animal,
  world loaded to select)
- Translation keys for all new UI strings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forced Ideology Per Pawnkind

1 participant