
Originally Posted by
Malrubius
Any idea what the maximum value of Electability is?
I'll do a quick test.

Originally Posted by
Malrubius
(IOW, don't notch your chickens before they're hatched

)
That's why I said "Probably".
Edit: I removed all triggers from EDCT, gave Good_Commander (which Flavius Julius starts with in vanilla) the effect of Electability 1000000000, and then added the following triggers:
Code:
;------------------------------------------
Trigger inherited
WhenToTest CharacterTurnEnd
Condition Attribute Electability [gt]= 1000000000
Affects GoodAttacker 20 Chance 100
;------------------------------------------
Trigger inherited
WhenToTest CharacterTurnEnd
Condition Attribute Electability [gt]= 1000000
Affects GoodDefender 20 Chance 100
;------------------------------------------
Trigger inherited
WhenToTest CharacterTurnEnd
Condition Attribute Electability [gt]= 1000
Affects Drink 100 Chance 100
I then started a game and ended my turn. Suddenly, good ol' Flavius was a heroic attacker and defender, but Paralytic. I think we can safely guess that there's not any limit. 1,000,000,000 is good enough for 29-30 ancillaries, in any case.
Of course, there's the slight problem of having to list roughly 500,000,000 possibilities to check for the presence of any given ancillary, but this can be simplified substantially by translating the triggers into ranges. The 29th ancillary, for instance, has a code number of 268,435,456, so (assuming 30 ancillaries) we can just check:
Code:
Condition Attribute Electability [gt]= 268435456
and Attribute Electability [lt]= 536870911
[next trigger]
Condition Attribute Electability [gt]= 805306368
and Attribute Electability [lt]= 1073741823
The number of triggers will then double for each step down, all the way up to the maximum of 536,870,912 for the first ancillary (listing all odd numbers from 1 through 1,073,741,823). Of course, such problems wouldn't really arise if we just selected a few ancillaries we wanted to check for.
Given the Senate's removal, perhaps we could also use SenateStanding and PopularStanding? Or are those used? They would, of course, reduce the burden exponentially.
I can't help but think there must be some way to refine the system. What if we had, for each ancillary with code number N, a hidden trait, which would give -N electability? We could then have a progression of trigger pairs for CharacterTurnEnd that would grant or remove the traits in succession, such that only one pair would be necessary per ancillary. For example, say we have N ancillaries, where any ancillary N gives an Electability bonus of 2^(N−1) = N'. Then we would have a series of triggers such as:
Code:
;------------------------------------------
Trigger AncillaryNGain
WhenToTest CharacterTurnEnd
Condition Attribute Electability [gt]= N'
Affects AncillaryN 1 Chance 100
;------------------------------------------
Trigger AncillaryN−1Gain
WhenToTest CharacterTurnEnd
Condition Attribute Electability [gt]= N'/2
Affects AncillaryN−1 1 Chance 100
. . .
;------------------------------------------
Trigger Ancillary1Gain
WhenToTest CharacterTurnEnd
Condition Attribute Electability [gt]= 1
Affects Ancillary1 1 Chance 100
AncillaryNGain would, of course, give Electability -N' for any N. Now, consider. For the first trigger, what combination of ancillaries could possibly cause an Electability bonus of [gt]= N'? Only one that contains Ancillary N, because all other ancillaries' Electability combined amounts only to N'−1 Electability.
So if the character has the ancillary, he'll gain the AncillaryN trait, which will reduce his Electability by N'. After that's checked, he can only have more than (N−1)' = N'/2 Electability if he has Ancillary N−1. And so on, all the way down to Ancillary 1. Do you follow?
Okay, now after all those triggers, if the player hasn't traded away any ancillaries, Electability will be 0. If he has traded away ancillaries, we can test in exactly the same way as before. If the player traded away Ancillary N, Electability will be at -N' due to the AncillaryN trait, and so we check for that and adjust traits accordingly to account for lost ancillaries.
Finally, as an error-catcher: immediately after all these checks are done, have the game check to be sure Electability is 0. If it's not, have a warning message popup saying "BUG! Save this game and send it to EB at foo@bar.com, or post it on our message boards!"
Bookmarks