Version 2.41 release

Tholal

Emperor
Joined
May 19, 2009
Messages
1,676
Version 2.41 Official Release (compatible with previous saves from version 2.4)

Download link

Bugfixes
  • Illusions can no longer pickup or take equipment; they also cannot be added to Flesh Golems or Wolf Packs
  • Animals will no longer have a chance to be assigned a Religion when built
  • Players will no longer receive double units when capturing a unit with the <Capture> tag (ie Workers and Settlers for example) due to Slavery or promotions that allow the converting of units (ie, Command promotions)
  • Hidden Nationality units will no longer be able to gate into Vassal cities
  • Fix for potential crash when automating a workboat
  • Players created via InitNewEmpire() will no longer receive techs that are unable to ever research (Seafaring for example) (fix by Terkhen and Magister Cultuum)
  • Rebel civs will no longer receive techs that they can never research (code by Magister Cultuum)
  • Permanent terrain changes will now remove any temporary terrain counters on the affected plot(s) - fix for Bug #3599496
  • Advanced Tactics: Summons and Hidden Nationality units can no longer be gifted
  • Advanced Tactics: Super Forts can no longer be captured by units flagged as noCapture() (includes Hidden Nationality units and units with the <bNoCapture> tag
  • Advanced Tactics: In order to count as a defender for Super Fort upgrading purposes, the unit must be able to pass the canDefend() function call

AI
  • AI will now upgrade its Freaks again
  • When valuing a new unit, the AI will now take into consideration the free promotions that unit receives
  • AI should use Great Bards for Great Works less often

User Interface
  • Unit help info displayed in mouseovers now includes the Defense Combat info for the unit if it's different from the combat strength
  • Many updates to Spanish translations (and a few others) (code by Terkhen)
  • Updates to DynamicCivNames (base code by lgfr - modified by Tholal)
  • Implementation of the EmphasizeAvoidUnhealthyCitizens and EmphasizeAvoidAngryCitizens buttons (code from WildMana, adapted by lgfr)

Misc
  • Addition of Dead Player Culture mod (code by Chronis - adaption for FFH by lfgr) (note: this should only affect gameplay when the Revolutions option is enabled)

Code
  • Added the scenario files to the codebase for MNAI (really this time!)
  • New code and debugging info for RevCivUtils (code by lfgr)
  • Removed a reference to an event that doesn't exist in FFH2 (TheVedicAryans)
  • Removed several unused text files
  • Moved some text for Puppet States, Revolutions and Advanced Tactics into the appropriate files
  • Fix for potential assert error when a unit tries to move after using a spell/ability that uses up their movement points
 
And as promised, here's the test DLL.

The only change in this DLL is that the code where the AI gives extra value to starting wars against weak neighbors is now restricted to the Aggressive AI setting only.

I'd be interested in hearing how it plays on various difficulty levels.
 

Attachments

  • MNAI 2_42 beta CvGameCoreDLL.zip
    1.8 MB · Views: 97
Are you sure you don't want the culture of dead players appear in the city screen (I noticed that you didn't merge the python file)?
IMO it makes more sense to see it in the city screen than in the plot help popup, since it only affects revolutions.

Err.. what file am I missing? Everything looks merged to me.
 
Your new Scenario files seem to have broken all of the Scenarios. They look for the "FFH2MNA" mod instead of "Fall from Heaven 2", then try to load in base BTS when that fails. I got them to work by changing the Mod path (including Lord of the Balors, yay!).
 
Err.. what file am I missing? Everything looks merged to me.

My fault, I forgot to upload it :D

Replace line 4326 in CvMainInterface with:
Code:
				# DEAD_PLAYER_CULTURE: commented out
				#	if ( gc.getPlayer(h).isAlive() ):
				# DEAD_PLAYER_CULTURE end
				# DEAD_PLAYER_CULTURE: indention changed
					iPercent = pHeadSelectedCity.plot().calculateCulturePercent(h)
					if ( iPercent > 0 ):
						screen.setStackedBarColorsRGB( "NationalityBar", iWhichBar, gc.getPlayer(h).getPlayerTextColorR(), gc.getPlayer(h).getPlayerTextColorG(), gc.getPlayer(h).getPlayerTextColorB(), gc.getPlayer(h).getPlayerTextColorA() )
						if ( iRemainder <= 0):
							screen.setBarPercentage( "NationalityBar", iWhichBar, 0.0 )
						else:
							screen.setBarPercentage( "NationalityBar", iWhichBar, float(iPercent) / iRemainder)
						iRemainder -= iPercent
						iWhichBar += 1
				# DEAD_PLAYER_CULTURE end

Otherwise the city bar looks like this:


(If you already have this, don't mind... I'm currently merging my modcomps with your new version and I'm a bit confused about all the file versions)

EDIT:
And as promised, here's the test DLL.

The only change in this DLL is that the code where the AI gives extra value to starting wars against weak neighbors is now restricted to the Aggressive AI setting only.

I'd be interested in hearing how it plays on various difficulty levels.
Great. Could you please post the source code?
 

Attachments

  • missing_orange_culture_bar.png
    missing_orange_culture_bar.png
    18.4 KB · Views: 474
Your new Scenario files seem to have broken all of the Scenarios. They look for the "FFH2MNA" mod instead of "Fall from Heaven 2", then try to load in base BTS when that fails. I got them to work by changing the Mod path (including Lord of the Balors, yay!).

Hightower--can you explain how to change the mod path?
 
Hightower--can you explain how to change the mod path?

Find the Worldbuilder file for the scenario you want. (Should be in Beyond the Sword/Mods/Fall from Heaven 2/Assets/XML/Scenarios.) Open it in Notepad or some other text editing program. Change "ModPath=Mods\FFH2MNA" to "ModPath=Mods\Fall from Heaven 2". (It should be near the top of the long text file.) Save it, making sure to save it as a ".CivBeyondSwordWBSave" and not a ".txt" file. Then open the WB save; it should work.
 
Illusions can no longer pickup or take equipment;

This is a rather big nerf to svartalfar - unless you've changed it for normal summons too?
 
Another bug I just discovered, though this may not be from MNAI in particular... If you set Autoplay and the original human player dies during Autoplay, there's a neat feature that allows you to choose a new civ from those surviving when Autoplay ends. Unfortunately, that feature doesn't work, at least on pre-made scenarios. You can select the new civilization, and it will tell you you've selected them and give you their minimap, but it will then prompt you to choose a new civilization again and never let you actually play. If you Ctrl-S to save and then reload, it will give you a defeat message immediately on reload. This is a tough bug to find since it requires the AI to be killed during Autoplay, but it should be easy to replicate (load up a game, use Worldbuilder to put a few barbs near your city, delete your starting troops, set Autoplay for 10 turns). I don't know enough to be able to figure out what's actually wrong in the code.

(Note: Not using Advanced Tactics, if that makes a difference.)
 
Another bug I just discovered, though this may not be from MNAI in particular... If you set Autoplay and the original human player dies during Autoplay, there's a neat feature that allows you to choose a new civ from those surviving when Autoplay ends. Unfortunately, that feature doesn't work, at least on pre-made scenarios. You can select the new civilization, and it will tell you you've selected them and give you their minimap, but it will then prompt you to choose a new civilization again and never let you actually play. If you Ctrl-S to save and then reload, it will give you a defeat message immediately on reload. This is a tough bug to find since it requires the AI to be killed during Autoplay, but it should be easy to replicate (load up a game, use Worldbuilder to put a few barbs near your city, delete your starting troops, set Autoplay for 10 turns). I don't know enough to be able to figure out what's actually wrong in the code.

(Note: Not using Advanced Tactics, if that makes a difference.)

This might be a problem with AI autoplay in general, i did some testing for AND a while back and remember autoplay to be rather buggy when the player civ dies.
 
I don't think that AIAutoplay should be intended for general usage, in my opinion it should be used for testing only. What is the point of playing if the computer plays for you? :)

Opinions aside, there are other bugs with AIAutoplay. It is nearly impossible to cancel it when the game is busy enough. The civilization defeated popups do not go away and start staking until AIAutoplay stops and you can close them manually, and so on. I don't consider that AIAutoplay should be a priority so I never got bothered with those problems.
 
I don't think that AIAutoplay should be intended for general usage, in my opinion it should be used for testing only. What is the point of playing if the computer plays for you? :)

Opinions aside, there are other bugs with AIAutoplay. It is nearly impossible to cancel it when the game is busy enough. The civilization defeated popups do not go away and start staking until AIAutoplay stops and you can close them manually, and so on. I don't consider that AIAutoplay should be a priority so I never got bothered with those problems.

Fair. I only use it for testing, so it's not a huge issue, and I agree it shouldn't be a priority. Just reporting bugs as I find them. :)
 
Your new Scenario files seem to have broken all of the Scenarios. They look for the "FFH2MNA" mod instead of "Fall from Heaven 2", then try to load in base BTS when that fails. I got them to work by changing the Mod path (including Lord of the Balors, yay!).

OK. I'll fix it for release 2.42. Thanks for the report!

My fault, I forgot to upload it :D

Got it. Thanks!

Great. Could you please post the source code?

Code to remove the 'Psychotic AI' war declarations can be found on line 1333 of CvTeamAI.cpp

Code:
if (iEnemyPowerPercent < 75)
	{
		/*
		if (GC.getGameINLINE().getCurrentPeriod() <= 2 ||
			AI_isAnyMemberDoVictoryStrategy(AI_VICTORY_CONQUEST1) ||
			GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI))
			*/
		if (GC.getGameINLINE().isOption(GAMEOPTION_AGGRESSIVE_AI))
		{
			int iModValue = 0;

			// extra value for targeting neighbors
			if (AI_calculateAdjacentLandPlots(eTeam) > (getNumCities() * 2))
			{
				iModValue += 2;
			}

			iModValue += ((iEnemyPowerPercent < 50) ? 8 : 5);
			iModValue *= GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIDeclareWarProb();
			iModValue /= 100;

			iValue *= iModValue;
		}
	}

there's a neat feature that allows you to choose a new civ from those surviving when Autoplay ends. Unfortunately, that feature doesn't work, at least on pre-made scenarios. You can select the new civilization, and it will tell you you've selected them and give you their minimap, but it will then prompt you to choose a new civilization again and never let you actually play.

I've seen this as well. I think it's related to bug #3528134. The function they're using to switch players isn't working properly. I probably should try and switch it to use the same code that FFH uses for switching to the summoned civs, but that's an area of code that I haven't messed with so it would require a lot of poking around to figure it out. Thanks for the report, though!
 
And as promised, here's the test DLL.

The only change in this DLL is that the code where the AI gives extra value to starting wars against weak neighbors is now restricted to the Aggressive AI setting only.

I'd be interested in hearing how it plays on various difficulty levels.

on immortal WITHOUT this DLL AI DoW on me, regardless of the fact: sharing the same religions and at power ratings we were equal ( I had holy city, added GP via WB, just for testing )

With 2.42 DLL AI behaved as expected(reloaded and replaced DLL)...did not ruin good diplo relations...
 
Another bug I just discovered, though this may not be from MNAI in particular... If you set Autoplay and the original human player dies during Autoplay, there's a neat feature that allows you to choose a new civ from those surviving when Autoplay ends. Unfortunately, that feature doesn't work, at least on pre-made scenarios. You can select the new civilization, and it will tell you you've selected them and give you their minimap, but it will then prompt you to choose a new civilization again and never let you actually play. If you Ctrl-S to save and then reload, it will give you a defeat message immediately on reload. This is a tough bug to find since it requires the AI to be killed during Autoplay, but it should be easy to replicate (load up a game, use Worldbuilder to put a few barbs near your city, delete your starting troops, set Autoplay for 10 turns). I don't know enough to be able to figure out what's actually wrong in the code.

(Note: Not using Advanced Tactics, if that makes a difference.)

In my experience (with base FFH2, haven't done it with MNAI) the initial civ doesn't die - I know this is different from base BTS.
 
Why wasn't there a mention in the main More Naval AI thread that a new version had been released?

I've been checking that thread frequently but neglected to look in the rest of the sub-forum, and did not notice the fact until now.

I could have released an update of Magister Modmod yesterday, instead of having people wait for tomorrow.

Your new Scenario files seem to have broken all of the Scenarios. They look for the "FFH2MNA" mod instead of "Fall from Heaven 2", then try to load in base BTS when that fails. I got them to work by changing the Mod path (including Lord of the Balors, yay!).

I still think Tholal ought to switch to having his installer work like mine does. Instead of overwriting the clean copy of Fall from Heaven II, it would be better for the installer to copy everything into a new directory (perhaps called FFH2MNA) and have the scenarios ect point to that.
 
Top Bottom