Dresden
Emperor
- Joined
- Jul 10, 2008
- Messages
- 1,081
@EF: It uses nearly the exact same attitude counting method as the Glance screen on the BUG FA uses; I copied the calculateRelations function from there verbatim but I make two small additions later: an attitude of Friendly will be a mimimum of +10 and an attitude of Pleased will be a maximum of +9. This should make things slightly more accurate in some rare situations when the hidden diplo stuff pushes someone just over that border, but it's still based on what you actually see on the attitude summaries and so is spoiler-free. That adjustment is easy to identify and comment-out if you disagree.
@ruff:Code is attached. Should be easy enough to follow. I tried to make sure all my code changes are in blocks that begin with
and end with
If original code was modified it is still there but commented out. All the text is hardcoded but shouldn't be hard to localize.
A few caveats on my mechanism for determining candidates and support:
Anyhow, it should be a good starting point for you and if I find I made any major mistakes while I'm playing around with it, I'll be sure to warn you.
@ruff:
Code:
#DAS START Changes -- [I]description[/I]
Code:
#DAS END Changes
A few caveats on my mechanism for determining candidates and support:
- As you'll be able to read in my comments, I'm not sure of the best way to handle attitude ties.
- The vassal situation is handled but permanent alliances may not be since I don't really understand the whole team thing.
- My determining of the candidates might be too simple: the first candidate is the secretary general/AP resident and the second is the person with the most votes among the others. The whole full member/voting member thing might mess with that in some rare situations so there should probably be a check to make sure that the second candidate is a full member.
Anyhow, it should be a good starting point for you and if I find I made any major mistakes while I'm playing around with it, I'll be sure to warn you.