Skip to content

The engine does not handle " < " correctly for "count" and "demesne_size" #177

@VisarDomi

Description

@VisarDomi

CleanSlate uses < a lot, where the base game does not use it anywhere for certain conditions, like count and demesne_size.

Count is mentioned here: https://ck2.paradoxwikis.com/Scripting#Count

"In practice, some mod developers have had difficulty using < and <= operators with the count condition. (In particular, the base game only ever uses count = and count >=, so it's possible any bugs were simply never noticed by the developers.)"

"count < 2" does not work, so you have to invert the logic. Same for demesne_size. Take a look at the trigger section of a character_event:

trigger = {
	NOT = {
		any_child = {
			count >= 2
			is_female = yes
		}
	}
}

That works as intented. This one does not work though:

trigger = {
	any_child = {
		count < 2
		is_female = yes
	}
}

The second one is more readable. It checks if the character has less than two daughters. Too bad it doesn't work.

Makes you wonder how many similar pitfalls to this there are.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CleanSlate BugSomething isn't working (and it's our fault)bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions