Quote Originally Posted by the_foz_4
Ahh, had not considered doing that. Nice one.

The triggers are of no concern, as the game doesn't spend any significant amount of time whatsoever dealing with them. I wrote a workaround for the dysfunctional antitrait mechanic, and it involves 17,000 new triggers, several hundred going off every time an event of any sort happens, including begin and end turn... and the game didn't flinch at all. So whatever does take time in the game, it sure isn't the trigger checking.

As for how to accomplish this per your suggestion Alpaca... any idea if we're allowed to do this?:

Condition Trait TradeBonus > Attribute Trading

-1 TradeBonus

You'd repeat that same trigger a few times to make sure any difference is accounted for, then more triggers for TradeBonus < Trading that would +1 TradeBonus. It's in doubt because I don't think traits are ever directly compared to attributes in the file, but it's certainly possible it's supported even if it's never needed. It'd be really handy here, as a direct comparison allows for a relatively simple trigger setup to change it correctly. That would avoid the mess of trying to reset the trait every turn and run a bunch of triggers to set it again, which makes less sense when you read through it, and probably takes more triggers too.
Well that depends on the conditions. It's often safe to use events that are triggered often, if you use conditions that are not likely to change too often I think (well deriving from a theory about the event system I made up).
Anyways, you can only check constants in conditions, so what you'd have to do is using

Condition Attribute Trade = 0
Condition Attribute Trade = 1

etc.

Could you run a test for me to see if when assigning a trait negative values if it goes to 0 or it actually accepts negative?
I.e. trying this:

Affects GoodCommander -99 Chance 100
Affects GoodCommander 1 Chance 100

And see if you get the GoodCommander trait? I don't have access to my modding envi for a day or so, so I can't test that myself right now ;)

If it would only set it to 0 you can do stuff like

WhenToTest CharacterTurnStart

Condition Attribute Trade (<-- insert actual name here) = 0

Affects TradeBonus -99 chance 100


WhenToTest CharacterTurnStart

Condition Attribute Trade = 1

Affects TradeBonus -99 chance 100
Affects TradeBonus 1 chance 100

Do this for each attribute level (possibly including second level traits after you reached the maximum number of levels), you could do this.