Or, my take on scripting the fall of the Roman Empire would be to use the stability() method to give them stability penalties until the built-in secessions and finally a collapse takes care of it. But it is of course possible to mod how this is implemented in the mod, but that would involve editing the Stability and/or RiseAndFall modules.
But I realize of course the use for a stability check Condition. Right now I'm pondering how to best implement it though. (It would be a breeze to code something like that in Python. But making it a general PyScenario Condition requires some afterthought.)
Maybe have two methods for this? Like stable(iStability) and unstable(iStability) - the first one checks if Stability is equal or more than iStabilty, and the second one checks if Stability is less than iStability. Or there could just be a boolean argument as you suggested. (I think I included something like this in the found() Condition.)
Perhaps two booleans instead of the suggested one? bGreaterThan and bEqualTo - the first one will determine whether or not Stability needs to be more or less than iStability, and the second one will also accept the actual iStability value - regardless of the the previous boolean setting.
But all of this strikes me as very awkward, when all that really is needed is this code:
All that really needs to be done is change the == (equal to) to < (less than), <= (less than or equal to), > (greater than) or >= (equal to or greater than) to get whatever Condition you need. I'm almost tempted to make the user enter one of these comparison operators in the method (as a string).
Or make my own custom comparison type with these five settings plus != (not equal to). Then the user would either enter a numerical value between 0 and 4 - or use the type as a string: "ComparisonType_EqualTo" 
But I realize of course the use for a stability check Condition. Right now I'm pondering how to best implement it though. (It would be a breeze to code something like that in Python. But making it a general PyScenario Condition requires some afterthought.)
Maybe have two methods for this? Like stable(iStability) and unstable(iStability) - the first one checks if Stability is equal or more than iStabilty, and the second one checks if Stability is less than iStability. Or there could just be a boolean argument as you suggested. (I think I included something like this in the found() Condition.)
Perhaps two booleans instead of the suggested one? bGreaterThan and bEqualTo - the first one will determine whether or not Stability needs to be more or less than iStability, and the second one will also accept the actual iStability value - regardless of the the previous boolean setting.
But all of this strikes me as very awkward, when all that really is needed is this code:
Code:
if utils.getStability(ePlayer) == iStability:
...

