Status Update for Version 2.6

Tholal

Emperor
Joined
May 19, 2009
Messages
1,676
Hey all. Apologies for the lack of attention from me around these forums, but I recently started a new full-time job and between that and the kids (now nearly 2 1/2 years old!), I find myself with little time to work on this mod.

Nonetheless, it is not dead. My goal is to get a 2.6 version out by the end of October, though it will not have nearly as many features as I had hoped to add.

As always, I am more than willing to accept help from anyone who wants to contribute some coding time. You can see both the full bug list and a requested feature list on Sourceforge. I have a number of things flagged for 2.6, but I'm willing to accept any code that is offered.

Here is a list of already completed changes that will be included with version 2.6.

Bugfixes
  • Fix for a potential crash related to the Taunt spell
  • Units with the Loyalty promotion will now be killed rather than captured via the Domination spell (fix for [bugs:#242]); text messages for Domination spell will now include the unit's name
  • Fix for players not receiving Disciple units when discovering religions
  • Fix for potential crash in the Revolutions code (bug find and fix by MC)
  • Gifting units with the FreePromotionPick tag will no longer give the units extra promotions (fix by flgr)
  • Fix for cities with UnhappyProduction ending up with negative production (fix by fe79 and Terkhen)
  • Fix for Bonuses from the Stigmata promotion not appearing in the combat odds
  • Fix for Terraformers not using Vitalize or Sanctify

Game Tweaks
  • Rebels have an increased chance of capturing buildings when they take cities from players they are rebelling against
  • Rebase range has been increased to airRange() * 3

AI
  • Patrol units will no longer start wars
  • Added some python code to help the AI build Temples of the Hand
  • Increased the Power rating of Hyborem and Basium
  • Tweaks to how the AI values wars; AI less likely to start warplanes with players with whom they have good relations (unless the Aggressive AI option is selected)
  • Tweaks to how the AI values ending a war
  • Removed some restrictions that were artificially forcing the AI to separate their cities
  • AI now has a better understanding of when cities need Culture buildings
  • Tweaks to how the AI values Religions
  • Minor improvements to the Terraforming code
  • AI cities more likely to build units if there is danger nearby

Code / UI
  • Tech details will now display into about any bonuses unlocked
  • Added a pythonHelp tag to SpellInfos (code by lfgr)
  • Enabled the isDisallowsInquisitions tag for CivicInfos
  • Exposed getSanctuaryTimer to python
  • Three new functions
    • CvPlayer::countNumOwnedHills()
    • CvPlayer::countNumOwnedRiverSide()
    • CvPlayer::countNumAvailablePlotsForImprovement(ImprovementTypes eImprovement)
 
Looking forward to it!!

Just played my first MNAI game and it's amazing how many little and not so little things MNAI improves on an already awesome mod. Will never again play without MNAI.
 
Looks good.

May we also assume that MNAI v2.6 will include the worldbuilder update I just uploaded I just posted another worldbuilder update here?
 
Regarding AI war declarations, I found this piece of code in CvTeamAI::AI_noWarAttitudeProb(AttitudeTypes)

Code:
/************************************************************************************************/
/* Afforess	                  Start		 02/19/10                                               */
/* Ruthless AI: Friends are just enemies we haven't made yet.                                   */
/************************************************************************************************/
	//if (GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI))
		iProb /= 10;
/************************************************************************************************/
/* Afforess	                     END                                                            */
/************************************************************************************************/

The ruthless AI code causes that the AI will only reconsider 10% of war declarations against friends.
Without this code (provided this function is always checked properly), an AI will never attack friends (It seems even in FfH AIs have NoWarAttitudeProb for ATTITUDE_FRIENDLY at 100), except "In final stages of militaristic victory".
I think the best solution would be to add a <NoWarAttitudeProbFactor> tag to HandicapInfo which replaces the code above; difficulties up to noble would start at 1.0 for default behavior, higher difficulties would go down to 0 (I'd volunteer to code that). Lowering the factor with aggressive AI enabled (as probably originally intended with the code above) sounds reasonable, too. What do you think?
If you don't want to disallow war declarations against friends, it's probably best to edit the <NoWarAttitudeProb> values of the leaders directly.
 
Regarding AI war declarations, I found this piece of code in CvTeamAI::AI_noWarAttitudeProb(AttitudeTypes)

The ruthless AI code causes that the AI will only reconsider 10% of war declarations against friends.

Good catch! That is probably the prime source of the overly-aggressive AI complaints.

Without this code (provided this function is always checked properly), an AI will never attack friends (It seems even in FfH AIs have NoWarAttitudeProb for ATTITUDE_FRIENDLY at 100), except "In final stages of militaristic victory".
I think the best solution would be to add a <NoWarAttitudeProbFactor> tag to HandicapInfo which replaces the code above; difficulties up to noble would start at 1.0 for default behavior, higher difficulties would go down to 0 (I'd volunteer to code that). Lowering the factor with aggressive AI enabled (as probably originally intended with the code above) sounds reasonable, too. What do you think?
If you don't want to disallow war declarations against friends, it's probably best to edit the <NoWarAttitudeProb> values of the leaders directly.

I think that commenting out the offending code or maybe re-enabling it for Aggressive AI only along with adding some more conditions to the calculations above it should be sufficient. Let me at least try it a few things out before adding another XML tag.
 
Awesome! Thank you for your work. :)

I see that you already committed most of the stuff I contributed at the trackers and that was postponed for 2.6 release. I see one missing, though; are you planning to include my suggested fix for the following bug?

http://sourceforge.net/p/tholalsffhaimod/bugs/250/
 
I'm sorry about posting patches well beyond the estimated release date, but I have added two entries to the MNAI repository today. The first one fixes the OOS caused when a human player casts Hyborem Whisper. The second one is a suggested fix for the following issue; when someone gets a religion before you, you get a disciple of that religion instead of founding the religion. That disciple can fail in spreading the religion, which renders the effort in researching the technology useless. I think that this second patch needs more discussion (other solutions could be considered too) so maybe it should be considered for future versions.
 
Thanks Terkhen! I'll add the OOS fix to 2.6

Hope to have the new release out this week. I made the mistake of adding in a couple of changes last week (since the release was delayed anyway), and that has just resulted in further delay. :(
 
The second one is a suggested fix for the following issue; when someone gets a religion before you, you get a disciple of that religion instead of founding the religion. That disciple can fail in spreading the religion, which renders the effort in researching the technology useless. I think that this second patch needs more discussion (other solutions could be considered too) so maybe it should be considered for future versions.

I actually edited my personal modmod to gift a priest instead of a disciple so you had a guaranteed chance for the religion to get spread via the build temple spell, this however does provide a fairly huge advantage to combat if the priest is kept for a while and allowed to level up, especially if you kept the OO one.
 
Top Bottom