New BETA Version - 4.17.8 (December 16, 2024)

Status
Not open for further replies.
That's the refugees mod, right? If so I'm interested in a solution as well as I use it for flavor.
aye, same, its one of those unsung always-on mods for me. may be time for some updated functionality, but i need a fix here first. Either that or some insight on how to block production in the new 4.17 tables, its not obvious to me if its changed
 
CTD when capturing cities! reported on Github and case closed.. downloaded newest version, reinstalled with latest but still CTD in new game
anyone else?
 
CTD when capturing cities! reported on Github and case closed.. downloaded newest version, reinstalled with latest but still CTD in new game
anyone else?
Reopen the ticket, make sure you're using 4.17.5.
 
OK, so this is a really dumb question, but how do you reopen a ticket? I commented back on the closed issue, but I didn't see any button to reopen. (Some googling suggests this is just how github permissions works)
 
CTD when capturing cities! reported on Github and case closed.. downloaded newest version, reinstalled with latest but still CTD in new game
anyone else?
About to test 4.17.5 Have been crashing with all 4.17.x releases so far.

Edit: Still crashing with 4.17.5
 
Last edited:
OK, so this is a really dumb question, but how do you reopen a ticket? I commented back on the closed issue, but I didn't see any button to reopen. (Some googling suggests this is just how github permissions works)
My bad, I thought you were able to do so yourself. I reopened it.
 
I'm also getting a crash upon capturing a city and eliminating the player. It is repeatable so I'm going to try and get the log file and report it.

EDIT:

Uploaded my log files and dump file. It would not let me upload a save game. Also using 4.17.5.

2nd Edit: An extension to this issue. After making peace instead of eliminating the opponent, another AI declared war 4 turns later. On their turn they easily captured the last remaining weakened city and CTD.
 
Last edited:
i have a mod that had an unbuildable unit, would only generate through other means... its cost was set to -1. Afaik this was the standard way of making a unit unbuildable.

now it is buildable on turn 0 in a single turn. Do i have to flag it differently?
It's weird because I have the mod enabled and I'm not able to build the unit (at game start so far). Checked encyclopedia and the units shows, database.log and lua.log are fine, so everything seems ok on my end..

PS: For the last few games I've played I have been wondering if the spawning mechanism worked though, as I don't believe I've seen the units at all when conquering cities. But that's another (possible) issue.

\Skodkim
 
It's weird because I have the mod enabled and I'm not able to build the unit (at game start so far). Checked encyclopedia and the units shows, database.log and lua.log are fine, so everything seems ok on my end..
Maybe it got ironed out inadvertently with these other fixes, will try this evening

edit: still able to build on turn 0 on my side :(
 
Last edited:
I'm also getting a crash upon capturing a city and eliminating the player. It is repeatable so I'm going to try and get the log file and report it.

EDIT:

Uploaded my log files and dump file. It would not let me upload a save game. Also using 4.17.5.

2nd Edit: An extension to this issue. After making peace instead of eliminating the opponent, another AI declared war 4 turns later. On their turn they easily captured the last remaining weakened city and CTD.
You have to zip the saved game file.
 
Not sure if it's a "bug" with this version only, or something i haven't had a chance to reach - when I accepted a Peace deal during AI's turn, offering me capitulation, and this effectively gave me last capital for a domination win, accepting the deal caused the game to get "stuck" on the leader screen, without any text box. Only after clicking Escape it has moved on to actual victory screen.

Spoiler leader screen :
1734014283239.png
 
I've had this happen on many previous versions. At first I though the game soft-locked as well. Now if you just hit that button like you did it will just go to the victory screen. Kind of weird, but at least not game breaking.
 
AI-technical, in the world congress, is the method of equally spreading your votes around primarily to get on good terms with the AI players proposing them still the most correct strategy? Or is this positive action wasted on civs that already harbor bad feelings towards you (religion, close to borders)
 
AI-technical, in the world congress, is the method of equally spreading your votes around primarily to get on good terms with the AI players proposing them still the most correct strategy? Or is this positive action wasted on civs that already harbor bad feelings towards you (religion, close to borders)
In my experience on immortal/Deity the AI at the point when world congress matters will get angry at you to the point of mass denounciations/ joint wars for trying to win most of the time -unless you disable competition negative modifiers from modfiles- so if you are trying to win just do whatever it takes to advance your game plan.
Avoiding negative modifiers is not worth shooting yourself in the foot
 
AI-technical, in the world congress, is the method of equally spreading your votes around primarily to get on good terms with the AI players proposing them still the most correct strategy? Or is this positive action wasted on civs that already harbor bad feelings towards you (religion, close to borders)
That's a complicated question. After a large rework I did, the Diplomacy AI is considerably smarter than in vanilla BNW when it comes to evaluating others' World Congress voting behavior. Your vote will affect diplomacy with every AI, not just proposers.
Spoiler Complicated Details :

There are up to nine opinion modifiers that can be triggered by your World Congress votes.

1. They liked / disliked our proposal to the World Congress.
Based on your most recent proposal that the AI cared about (desire is not NEUTRAL). A positive modifier will remove any previous negative modifier and vice versa. The AI will not consider proposals that were made while they were dead.

If the proposal is to sanction the AI, the maximum penalty (-60) is applied. If the proposal is to repeal sanctions against the AI, the maximum bonus (+60) is applied.

Otherwise, the AI will score the proposal based on how much it helps or harms its own interests - you can see the values for this by mousing over the proposal with Transparent Diplomacy enabled - and apply the appropriate bonus or penalty.
  • Worse than -2500: OVERWHELMING DISLIKE (-60)
  • -1001 to -2500: STRONG DISLIKE (-45)
  • -251 to -1000: DISLIKE (-30)
  • -51 to -250: WEAK DISLIKE (-15)
  • Between -50 and 50: NEUTRAL (skip)
  • 51 to 250: WEAK LIKE (+15)
  • 251 to 1000: LIKE (+30)
  • 1001 to 2500: STRONG LIKE (+45)
  • Better than 2500: OVERWHELMING LIKE (+60)
The modifier's weight is increased by 34% if the AI's default Primary or Secondary Victory Pursuit is Diplomatic Victory, or if their UA grants them bonuses to diplomacy. It lasts for 50 turns from the turn it was proposed, with the duration modified by up to +/- 50% based on the AI's WorkWithWillingness flavor - if positive - or WorkAgainstWillingness flavor - if negative.


2. We [previously] passed / foiled their proposal to the World Congress.
This one is based on what % of the votes that contributed to the outcome were yours. Any traded votes for the opposite outcome are subtracted. However, the AI will also remember what you did in previous votes (with some time decay), so if you are solely responsible for their previous proposal failing, and then put one vote in favor of their new proposal, you may still have a penalty.

If you vote against a proposal and it passes regardless or vice versa, you won't receive an additional bonus or penalty here, but the voting history modifier will still apply.

"Support Value" ranges between -100 and +100. Each time you help pass or foil one of the AI's proposals, the % of the votes that were yours will be added (if you passed it) or subtracted (if you foiled it) to this value.

If Support Value is positive, you get +10 to start. For each 1 Support Value, you get +1 to Opinion, maxing out at an additional +50 (for 50 Support Value or more). If it is negative, you get -10 to start, and -1 to Opinion for each -1 Support Value (maxing out at -50).

The modifier's weight is increased by 67% if the AI's default Primary or Secondary Victory Pursuit is Diplomatic Victory, or if their UA grants them bonuses to diplomacy.

Where this modifier gets complicated is with regards to duration. Whenever the current value is updated, it will be adjusted for time decay before the update occurs. The modifier lasts for 50 turns after the turn the proposal passes or fails, +/- up to 50% based on WorkWithWillingness or WorkAgainstWillingness.

However, the AI also keeps track of the turn on which you last foiled or last supported their proposal, whichever is more recent. If your most recent action is supporting them, but Support Value is negative, the decay of the negative value will be sped up if the AI's Forgiveness is above 5. Likewise, if your most recent action is opposing them, but Support Value is positive, the decay of the positive value will be sped up if the AI's Neediness is above 5.


3. We helped them become / remain the host of the World Congress.
This functions similarly to supporting the AI's proposals. You get +20 to start, and up to +50 extra based on how many votes in favor of them were from you, with each 1% of the vote giving you +1 Opinion, maxing out at 50.

The modifier's weight is increased by 50% if the AI's default Primary or Secondary Victory Pursuit is Diplomatic Victory, or if their UA grants them bonuses to diplomacy. It lasts for 50 turns from the turn they become the host, with the duration modified by up to +/- 50% based on the AI's WorkWithWillingness flavor.


4. We [tried to place / placed] sanctions on them in the World Congress.
This penalty is applied to the proposer of sanctions against a civ when they make the proposal. At voting time, it is also applied to everyone who voted in favor of the sanctions, and (unless they changed their mind and voted against) the proposer.

One vote in favor is required to apply the penalty, unless you're the proposer in which case one vote against is required to prevent it from being applied again. Traded votes for the opposite outcome are subtracted, as usual.

The modifier is -50. It is doubled if the AI's default Primary or Secondary Victory Pursuit is Diplomatic Victory, or if their UA grants them bonuses to diplomacy. It is halved if the player has never succeeded in sanctioning the AI. These two multipliers stack with each other.

The modifier lasts 50 turns (refreshed every time the penalty is applied again). The duration is modified by up to +/- 50% based on the AI's Meanness (if the player has ever succeeded in sanctioning the AI) or WorkAgainstWillingness if it was unsuccessful.

If the sanction proposal is successful, a permanent diplo penalty marker is applied with this AI to everyone who voted in favor (and the proposer, unless they voted against). This significantly harms relations with that AI. Only capitulation and resurrection remove this penalty, and only for the master's/liberator's team.

All of these penalties are applied in the exact same way if you vote against a repeal proposal aiming to remove the sanctions. Successfully foiling the repeal proposal also applies the permanent penalty.


5. We [tried to free / freed] them from sanctions in the World Congress.
This functions identically to proposals and votes on placing sanctions, with the following exceptions:
  • The modifier is a +50 bonus instead of a penalty.
  • It is not applied to anyone who has the permanent diplo penalty for sanctioning the AI.
  • The duration is modified by up to +/- 50% based on the AI's Loyalty (if the player has ever succeeded in repealing sanctions against the AI) or WorkWithWillingness if it was unsuccessful.
  • A permanent diplo bonus is applied when successfully repealing sanctions, which significantly improves relations with that AI. This bonus is not applied to anyone who has the permanent diplo penalty, and (as of 4.17.6) anyone who receives the permanent penalty has the permanent bonus removed.
  • If you propose to enact sanctions against the AI, and then vote against it, you won't receive a diplo bonus - you just won't get an additional penalty, or the permanent penalty (as of 4.17.6).

6. Your votes supported / opposed their civ's interests in the World Congress.
This one is the most complicated, and also the most impactful. Every vote is considered regardless of whether or not the proposal passes or fails, and there is no time decay for this modifier. Traded votes for the opposite outcome are subtracted, as usual.

The first factor is Desire Multiplier. This is +400 for a proposal to repeal sanctions against the AI, and -400 for a proposal to pass sanctions against the AI. Otherwise, it is determined based on the AI's scoring of the proposal in favor of their own interests.
  • Worse than -2500: OVERWHELMING DISLIKE (-400)
  • -1001 to -2500: STRONG DISLIKE (-300)
  • -251 to -1000: DISLIKE (-200)
  • -51 to -250: WEAK DISLIKE (-100)
  • Between -50 and 50: NEUTRAL (0)
  • 51 to 250: WEAK LIKE (+100)
  • 251 to 1000: LIKE (+200)
  • 1001 to 2500: STRONG LIKE (+300)
  • Better than 2500: OVERWHELMING LIKE (+400)
Exception: If the AI is the proposer and their desire multiplier for their own proposal is negative (the AI has changed their mind, or they proposed something but didn't like any options), Desire Multiplier is set to 0, so no bonus or penalty will be awarded to anyone regardless of how they voted.

The second factor is Percentage of Player Votes (what % of your votes you dedicated to that outcome). If you have only a single vote and dedicate it to helping a favorable proposal pass, that's viewed significantly more favorably than if you have 20 and only dedicate one.

The third factor is Percentage of Outcome Votes (what % of the Aye or Nay votes - whichever outcome you voted more for - were yours). If you were 10 out of 14 Nay votes, that's viewed as a lot more significant than if you only contributed 2 out of 30 Nay votes.

Change to Voting History Score = (Percentage of Player Votes + (2 * Percentage of Outcome Votes)) * Desire Multiplier / 100. The maximum change to score from a single vote is +/- 1200, although a lower value is much more likely.

The Voting History Score is capped between -2400 and 2400. For every 40 Voting History Score, you get +1 to Opinion if positive, or -1 to Opinion if negative, maxing out at +/- 60. The modifier's weight is doubled if the AI's default Primary or Secondary Victory Pursuit is Diplomatic Victory, or if their UA grants them bonuses to diplomacy.

If the Voting History Score is negative, it is reset to 0 upon capitulation or liberation (only for the master's/liberator's team).

Out of all of these, the biggest contributor to diplomacy with the AI is the Voting History Score. For each 240 Voting History Score points, "league alignment" is increased or decreased by 1, for a maximum bonus of +/- 10. Furthermore, the Voting History Score is the primary factor that determines whether the AI will consider you their biggest ally or competitor in the World Congress.

If the AI is going for Diplomatic Victory, however, the biggest factor becomes who has the most votes aside from them. The AI will give you a chance if your vote count isn't too high relative to theirs and they don't otherwise hate you, though.

In addition to their effects on the Opinion score, which acts like a % modifier to the Approach scores, a good "league alignment" directly increases the FRIENDLY Approach and reduces the DECEPTIVE Approach, while a bad "league alignment" increases the WAR, HOSTILE and DECEPTIVE Approaches. A neutral "league alignment" increases the NEUTRAL approach. This boost is moderately significant for all AIs and scales with the AI's WorkWithWillingness (positive), WorkAgainstWillingness (negative) and DiploBalance flavors.

It is multiplied by 3 if the AI is going for Diplo Victory, but in that case the AI will also not apply an Approach bonus at all for their biggest World Congress competitor - which again is usually determined based on vote counts.

If you want to know the "league alignment" calculation, I can tell you that too. There are a lot of other factors besides the Voting History Score, so there may be merit to @SuperNoobCamper's point that the AI may hate you too much for trying to win despite how you vote. If there are suggestions on how to tweak the calculation, I'm open to them. Edit: Ended up making a few tweaks myself, see next post.
Spoiler League Alignment Calculation :

Code:
[Overrides]
- If the player is me, Alignment is SELF.
- If the player is the first player in the player order that is on my team, Alignment is LEADER.
- If the player is on my team but not the leader, Alignment is TEAMMATE.

[Main Calculation]
- Otherwise, Alignment Score starts at 0.
- If we are at war, subtract 1 if it's a "phony war" and 2 otherwise.
- If we have the same ideology, add 2. If we have opposing ideologies and we aren't ignoring that, subtract 2. Multiply this by 2 for the World Ideology. Divide by 2 if we're a vassal, and divide by 2 if they're a vassal.
- If we have the same religion, add 1. If we have opposing religions and we aren't ignoring that, subtract 1. Multiply this by 2 for the World Religion.
- If they helped us become the host, add 2 if the opinion bonus is +40 or better, and 1 otherwise.
- If we liked their most recent proposal strongly or overwhelmingly, add 2. If we liked it less strongly, add 1.
- If we disliked their most recent proposal strongly or overwhelmingly, subtract 2. If we disliked it less strongly, subtract 1.
- If Support Value is positive, add 2 if they didn't foil us recently, and 1 if they did.
- If Support Value is negative, subtract 2 if they didn't support us recently, and 1 if they did.
- If they have the permanent penalty for sanctioning us, subtract 2. Otherwise, if they have the temporary penalty for sanctioning us, subtract 1.
- If they have the permanent bonus for unsanctioning us, add 2. Otherwise, if they have the temporary bonus for unsanctioning us, add 1.
- Add the Voting History Score modifier (up to +/- 10 based on every 240 Voting History Score points).
- If there's a denouncement in either direction, subtract 2.
- If we're friends with them and don't want to end that friendship OR if we want to be friends, add 1 if we've had one previous DoF, 2 for two previous DoFs, and 3 for three or more (as long as they didn't end prematurely and there's been no denouncement or war between us since).
- If we have a Defensive Pact with them and we don't want to end it, add 2.
- If they're our voluntary master: add 4 if Content, 2 if Disagree, 0 if Mistreated, -2 if Unhappy, -4 if Enslaved.
- If they're our capitulated master: add 2 if Content, -1 if Disagree, -2 if Mistreated, -3 if Unhappy, -5 if Enslaved.
- If they previously gave us our independence without asking, add 2. Otherwise, if they gave us our independence when we asked, add 1. If they refused to give us independence, subtract 1.
- Subtract 1 if City-State competition dispute level is Weak, 2 if Strong, 3 if Fierce.
- Subtract 2 if Approach is WAR or HOSTILE, 1 if DECEPTIVE or GUARDED. Add 1 if FRIENDLY.
- Subtract 1 if Warmonger Threat is Minor, 2 if Major, 3 if Severe and 4 if Critical.
- Add "coop war agreement score" to alignment score if it is positive. It increases by 1 each time you agree to a coop war, but refusing subtracts 1, and warning the target/breaking the promise subtracts 2.
- If we see them as untrustworthy, subtract 4.
- If they liberated our capital or Holy City or resurrected us: add 4 if we're not competing for victory and we're not at war and they're not untrustworthy, and 2 otherwise. Note that resurrected civs don't compete for victory by default.
- If we're not at war and they ever liberated any of our cities, add 1 for each liberated city, and also add 1 if they have the diplo bonus for returning our capital or Holy City.
- Subtract the number of cities they've ever captured from us (cleared on capitulation or resurrection)
- Subtract 1 if Victory Dispute/Block Level is Weak, 2 if Strong, 3 if Fierce.

[Final Assessment]
Less than -8: ENEMY
-6 to -8: HATRED
-3 to -5: RIVAL
-2 to 2: NEUTRAL
3 to 5: FRIEND
6 to 8: CONFIDANT
Better than 8: ALLY

Exception: If score is better than -3 and they resurrected us, alignment is LIBERATOR if we're not an AI teammate of a human, and ALLY if we are.

"League alignment" also plays a significant role in whether the AI will vote with or against you in the World Congress, and whether they will propose things that help/harm you.
 
Last edited:
NOTE: The Community Patch Only version of the mod does not work in 4.17 versions.

Version 4.17.6 has been released. Link in OP has been updated.


Changelog:
Code:
- Fixed crashes from failed assertions
     Fixed a crash when building a Landmark in your own territory
     Fixed another crash when eliminating a major civ - hopefully we got them all now
- Fixed missing code for building resource requirements
- Fixed the wrong flavors being used in one section of the opinion modifier code for passing/foiling the AI's World Congress proposals
- Added MINIMUM_TOURISM_MODIFIER global define, which can be used to set the cap on Tourism penalties to a value above -100% (the current value)
- AI now uses the permanent value for # of cities liberated when determining its willingness to denounce a friend
- Small performance improvement
- Tweaked "league alignment" calculation in World Congress AI
    Removed approach factor entirely, since alignment feeds into Approach directly, and Approach feeds into alignment indirectly (reduces that feedback loop)
    Doubled the effect of alignment on Approach
    Removed -2 penalty for the AI denouncing you (kept -2 penalty if you denounced them, but removing this penalty makes the AI more adaptable)
    Replaced victory dispute/block factor with a -2 penalty for the AI's biggest competitor only (AIs who are behind could get pissy at everyone, which doesn't help them, and it's now one less than the -3 for Fierce dispute/block level)
    If you aren't at war, haven't liberated any cities, but do have the bonus for returning the AI's capital or Holy City, a +1 bonus is applied, but no longer stacks with the # of cities ever liberated bonus (previously it would stack but would require at least one city to be liberated)
    Boosted bonus for Content voluntary vassals to +5 from +4
    Boosted bonus for Content capitulated vassals to +3 from +2
    Changed modifier for Disagreeing capitulated vassals to +1 from -1
    Combined, these changes should make it easier to make friends with the AI in the World Congress, especially if they're not going for Diplomatic Victory
    And it should also make it easier for masters and liberators to get favorable relations with an AI, but not to the point of being effortless
    The voting history modifier is less diluted by other modifiers, and the AI is more likely to form blocs with the removal of the penalty to everyone who is a victory competitor
- Other tweaks to World Congress AI
    AI bonus or penalty to proposal score based on alignment with the proposer now scales based on WorkWithWillingness flavor (if positive) or WorkAgainstWillingness flavor (if negative)
    Increased the maximum values slightly as well
    When AI applies the permanent diplo penalty for ever successfully sanctioning them, it now cancels any previous permanent bonus for unsanctioning them
    AI will no longer apply a diplo bonus to players who propose sanctions against them but then change their minds and vote against
    However, voting against will still avoid worse diplo penalties with that AI

Online as of 2:53 PM CDT. Should be savegame compatible with 4.17 versions.
 
Last edited:
Did choping forests change in 4.17?

I don't seem to get the production boost I used to when one of my workers finish it.
 
Status
Not open for further replies.
Top Bottom