Skip to content

Refactor RuleSet#703

Merged
wvpm merged 1 commit intomasterfrom
refactor_ruleset
Feb 18, 2026
Merged

Refactor RuleSet#703
wvpm merged 1 commit intomasterfrom
refactor_ruleset

Conversation

@wvpm
Copy link
Contributor

@wvpm wvpm commented Feb 17, 2026

Rules in Victoria 2 are completely hardcoded. You can't add any without changing the sim binary. So I'm making it all hardcoded.

The way conflicting or unspecified rules are resolved is as follows:

  • For boolean rules (yes/no) no is the default and yes overrides it.
  • For mutually exclusive rules, I only tested same_as_ruling_party = yes & rich_only = yes, same_as_ruling_party applied. So I'm applying them in order of enum value.

Resolving conflicting or missing values is logged either as warning or error depending on the severity of the conflict.
Mutually exclusive rules set to yes is an error. The rest is a warning.

{230C1615-6E9A-4E24-B5B9-7A673A005770} Rules have a hardcoded order in the tooltip.

@wvpm wvpm added enhancement New feature or request topic:society labels Feb 17, 2026
@wvpm wvpm added this to the 0.9.0 milestone Feb 17, 2026
@wvpm wvpm force-pushed the refactor_ruleset branch 4 times, most recently from 41c489a to 8c4d682 Compare February 17, 2026 23:18
@wvpm wvpm force-pushed the refactor_ruleset branch 4 times, most recently from 1e21716 to 7651491 Compare February 18, 2026 10:12
@wvpm wvpm marked this pull request as ready for review February 18, 2026 10:12
@wvpm wvpm marked this pull request as draft February 18, 2026 10:22
@wvpm wvpm marked this pull request as ready for review February 18, 2026 10:55
@wvpm wvpm force-pushed the refactor_ruleset branch 2 times, most recently from 9330856 to 6b72836 Compare February 18, 2026 11:04
@wvpm wvpm enabled auto-merge February 18, 2026 12:27
@wvpm wvpm merged commit 2775e5c into master Feb 18, 2026
16 checks passed
@Spartan322 Spartan322 deleted the refactor_ruleset branch February 18, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request topic:society

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants