Hi fellow scripters!
Maybe I'm wrong and make my usual mistake posting stuff unchecked but in fast test this syntax works!
and PercentageUnitCategory cavalry > 0 factions { denmark, moors, spain, }
Hi fellow scripters!
Maybe I'm wrong and make my usual mistake posting stuff unchecked but in fast test this syntax works!
and PercentageUnitCategory cavalry > 0 factions { denmark, moors, spain, }
It's a false positive. So yes it seems to work, but regardless of the content (as long as PercentageUnitCategory is true), like this:
Code:monitor_event PostBattle CharacterIsLocal and PercentageUnitCategory cavalry > 0 factions { xxx } historic_event test end_monitor
My script of the americas has two instances of that condition without any syntax, would be pointless given the other condition:
And given how the faction syntax works you would need a comma at the end anyhow. But as Erken points out: even an invalid entry returns true, meaning the syntax gets ignored, eg no further processing of the condition occurs after the value.Code:;;; Counter - Apachean beat army with cavalry monitor_event PostBattle not WonBattle and GeneralFoughtFaction apachean and PercentageUnitCategory cavalry > 0 inc_counter apachean_cavalry_killed 1 end_monitor ;;; Counter - Chichimeca beat army with cavalry monitor_event PostBattle not WonBattle and GeneralFoughtFaction chichimeca and PercentageUnitCategory cavalry > 0 inc_counter chichimeca_cavalry_killed 1 end_monitor
Can't test now because of COVID.
So this
monitor_event PostBattle not WonBattle
and GeneralFoughtFaction apachean
and PercentageUnitCategory cavalry > 0 factions { norway, spain, }
inc_counter apachean_cavalry_killed 1
end_monitor
will returned true regardless who fought apacheans if had cavalry in stack?
Checked it, you absolutely right, it's false positive, it doesn't match faction in braces.
Small offtop, if you please. I checked this condition for one local forum mate who is making outstanding project named Vinland TW - it's about vikings settling North America in XI-XV centuries. Can you advise any mods with native indian unit models?
Reminds me of my team's idea about Romans settling in North America - we intended to build it on the americas campaign for convenience. Can't find the teaser\trailer version with translated titles, so the German version will have to do.
Even got as far as using the 'playable horde' principle for the Romans and other script gems like getting them ship wrecked at the coast, with storm and stuff. Makes me itch to have a go at it again...
The vanilla Americas campaign has Apache units.