I've found today the AI trade offers don't work as intended : the relation based modifier is broken.
This might be for the better as it allows trade offers to be limited from ~50% to up to ~200% trade value. That's a lot, it means trading a 24 value spell (Lightning Bolt) for the highest value Time Stop (55) in the best case scenario. Good thing it never worked as intended because this much bonus is unreasonable.
So we need to remake this formula. I believe instead of a percentage, a simple addition is better. Each 10-15 trade value represents an entire tier, so if we want trades to allow a specific amount of tiers of difference, addition works, multiplication does not.
We can include of exclude anything, these were in the original :
Trade Interest : This is how much the AI wants to trade, basically the time elapsed since the last trade happened. It has to be at least halfway filled otherwise a trade doesn't get offered, meaning using this variable in the formula feels unneeded redundancy. I think not including it is better.
Relation : How much the enemy likes you from -100 to 100. Most likely should be the main factor.
Hidden Relation : Same effect on diplomacy but the value is not included in the displayed relation level. Should be included the same way as he above in my opinion.
Treaty status : The AI won't make offers during war so this is limited to Nothing, Wizard's Pact or Alliance. I think only an Alliance should improve the trades, and only if an AI enemy with much larger power than this allied AI exists. Otherwise the AI should be aware they are "the" enemy the player will eventually use the spell against after breaking the alliance.
Luck: I see no reason for excluding this, as long as the effect is small enough. Sometimes the AI is in a better or worse mood. AI offers should not be predictable, and should risk losing the opportunity to trade for the good spell if they don't accept the offer immediately.
Other factors : Can't think of any but there might be something else worth including.
For the amounts added by each, it's entirely up to how much we want the offer to be affected.
My current plan is to use these modifiers :
Relation and hidden relation adds their summed value/10, but a max of 6. So you get ~+/-6 out of it which is roughly half of a tier difference.
Being allied against a much more powerful enemy should be a large boost, like +7. This extends the effect of the two together to a full tier difference.
Luck I think at most 0-2 subtracted, so equivalent to a change of 20 (one displayed category) of relation?
This might be for the better as it allows trade offers to be limited from ~50% to up to ~200% trade value. That's a lot, it means trading a 24 value spell (Lightning Bolt) for the highest value Time Stop (55) in the best case scenario. Good thing it never worked as intended because this much bonus is unreasonable.
So we need to remake this formula. I believe instead of a percentage, a simple addition is better. Each 10-15 trade value represents an entire tier, so if we want trades to allow a specific amount of tiers of difference, addition works, multiplication does not.
We can include of exclude anything, these were in the original :
Trade Interest : This is how much the AI wants to trade, basically the time elapsed since the last trade happened. It has to be at least halfway filled otherwise a trade doesn't get offered, meaning using this variable in the formula feels unneeded redundancy. I think not including it is better.
Relation : How much the enemy likes you from -100 to 100. Most likely should be the main factor.
Hidden Relation : Same effect on diplomacy but the value is not included in the displayed relation level. Should be included the same way as he above in my opinion.
Treaty status : The AI won't make offers during war so this is limited to Nothing, Wizard's Pact or Alliance. I think only an Alliance should improve the trades, and only if an AI enemy with much larger power than this allied AI exists. Otherwise the AI should be aware they are "the" enemy the player will eventually use the spell against after breaking the alliance.
Luck: I see no reason for excluding this, as long as the effect is small enough. Sometimes the AI is in a better or worse mood. AI offers should not be predictable, and should risk losing the opportunity to trade for the good spell if they don't accept the offer immediately.
Other factors : Can't think of any but there might be something else worth including.
For the amounts added by each, it's entirely up to how much we want the offer to be affected.
My current plan is to use these modifiers :
Relation and hidden relation adds their summed value/10, but a max of 6. So you get ~+/-6 out of it which is roughly half of a tier difference.
Being allied against a much more powerful enemy should be a large boost, like +7. This extends the effect of the two together to a full tier difference.
Luck I think at most 0-2 subtracted, so equivalent to a change of 20 (one displayed category) of relation?