Bug Reports and Discussion

Could you make it so that a spell with <iDelay> is cancelled (so that its effects to not occur and the caster is no longer immobilized or prevented from casting something else) once its prerequisites are no longer valid?


For example, in my modmod the various lair exploration abilities work on a delay. Between the time that the spell is cast and its results occur, the unit could be ejected from the lair's tile due to a rival's borders expanding, and then finish its exploration of the lair far from the lair itself. In an even worse case, an immortal caster could be killed and then finish the spell in its owner's capital city. The way I re-wrote the code that generates barbarian units forces the caster's units off of "the lair's" tile to place the barbarians there. If the caster was transported to the capital in the meantime, this means that the capital gets automatically captured.


I also made it so that the Bloom spell can be cast on Burnt Forests, but that becomes a bit of a waste if the burnt forest grows into a new forest on its own the turn after the spell is begun.
 
Not sure if this is a bug, but it doesn't look right to me.

I have two lizardmen hunters in a square, both are carrying hawks.
An enemy spectre attacks the square on the AI turn, it of course has the fear ability.
Pretty much regardless of the result of the combat (win/lose and 2nd hunter stands/lose and 2nd hunter flees), it seems both my hawks disappear.
My best guess is that the hawks are affected by fear, try to move and don't end on a square they could rebase to. So are deleted?

Are hawks affected by fear?
If so, should they be?
It seems sensible that they can be affected by fear and would fly off. But from a gameplay point of view, the fear check on the carrying hunter should be sufficient with the hawk being carried to the new square if the hunter runs. If the hunter fails and runs but the hawk succeeded and didn't - logically the hawk would still be lost as he's now on a square that he can't be based on?

I've attached the save game to demonstrate, an enemy spectre will attack on pressing enter.
 

Attachments

Could you make it so that a spell with <iDelay> is cancelled (so that its effects to not occur and the caster is no longer immobilized or prevented from casting something else) once its prerequisites are no longer valid

That's not really a bug. Added it to the Feature Request list.

Are hawks affected by fear?
If so, should they be?

Thanks for the report. Ill make a fix for the next release so that units that are cargo don't make do a fear check.
 
It seems that the Held promotion does not prevent a unit (in a city or superfort) from being loaded into a ship and moved elsewhere. (In my modmod this can be for infinite free elementals from the Tower of the Elements, which could guard every costal city or even every city if you have Kuriotate Airships.)

<bHeld>1 should probably block a unit from loading into a transport.
 
omg, at last the tower of elements is useful. I will need to start abusing this.
 
You can move the Elemental with the Trojan Horse, how good is that!

Surely this is not a bug but a great tactic for clever players (even if the player only found it by reading this forum, cough, cough).
 
Can you provide a savegame from right before he vanishes?

Sure...See attached File.
He is last seen just outside of Seroe Vakas.

I'm unable to load this savegame. What version are you using?

It seems that the Held promotion does not prevent a unit (in a city or superfort) from being loaded into a ship and moved elsewhere.

OK. Will be fixed in 2.5. Thanks for the report!
 
In <this> post last year, I stated that the revolution watch screen wasn't correct on a new install.

I figured out why :
Back in the <original 2.0 beta post> you attached a "BUG MOD ini files.zip". That zip file contains 2 directories -
* CustomDomAdv (4 files)
* CustomRevAdv (1 file)

Inside these are the layouts for the screens. These MUST go inside the "My Documents\My Games\Beyond the Sword\FFH - More Naval AI\Settings" folder.
They are currently not installed by default when doing a fresh install as they are missing from the installer.

Part of the problem in that MNAI requires Admin rights to install. This will then install any user files into the Admin accounts "My Documents" directory. The problem is that
some people (like me) install Civ IV into a different directory and under a standard user account. So any user files will not go into the users "My Documents" directory but instead into the Admins directory.

To work around this - I notice that all the BUG .ini files are created when first running the mod. So the mod should also create the CustomDomAdv and CustomRevAdv directories and files as well upon first running.

Could you please add them to the version 2.6? This will save much hassles.

Otherwise, the mod is looking good :goodjob:

Thanks

--
Edit:
Note that the default locations of these files can be changed by altering
CvCustomizableDomesticAdvisor.py and
RevolutionWatchAdvisor.py
under "Mods\Fall from Heaven 2\Assets\python\Screens\".
Search for "BugPath.findIniFile" in those files.
 
I think that you made some mistake in implementing new <bUpgradeOutsideBorders> tag. It does not seem to actually do anything.

I gave that tag to 3 promotions in my modmod (Adventurer, Angel, and Scavenger, the Doviello racial trait), but none of them allowed a unit to be upgraded where it normally could not be.

Edit: When I tried making my Share Maps Overcouncil Resolution work through the changeStolenVisibilityTimer function which you claim to have exposed, I'm getting this:

Traceback (most recent call last):
File "BugEventManager", line 361, in _handleDefaultEvent
File "CvEventManager", line 709, in onBeginPlayerTurn
AttributeError: 'CyTeam' object has no attribute 'changeStolenVisibilityTimer'

Edit2: I just realized that I accidentally copied the previous DLL over the new one during the merge. I have not had time to test it yet, but that will probably fix those concerns.

Edit3: the problem with changeStolenVisibilityTimer is still occurring though.
 
I started at classical era.....I imagine ...barbs conquered this city and....unexpected...and never seen somthing like this before...

Spoiler :
qwu3.jpg
 
I started at classical era.....I imagine ...barbs conquered this city and....unexpected...and never seen somthing like this before...

Spoiler :
qwu3.jpg

Is this from Magister Modmod rather than base MNAI v2.5?

It looks like an issue I encountered in my last game with my modmod, and addressed in the second half of this post.
 
what's the issue exactly? it's not uncommon for the barbs to create acheron in a captured city, but I checked with 2.5 and Acheron seemed to sit still in his city.
 
So the mod should also create the CustomDomAdv and CustomRevAdv directories and files as well upon first running.

Have a bug entered about this issue, but I dont know how to fix it. I borrowed the auto-create code from K-mod. I'll add the info you've provided to the bug report.

I think that you made some mistake in implementing new <bUpgradeOutsideBorders> tag.

I guess you figured out that it still has to meet other requirements, including any building requirements. I did find a bug where it only checks the nearest city. I'll fix it in 2.51 where it will check for any city.

Edit3: the problem with changeStolenVisibilityTimer is still occurring though.

OK. I missed adding it to the CyTeamInterface file. Will be fixed for 2.51
 
More Naval AI v2.2

Upgrade to the latest version and see if you're still having the same issues.

I started at classical era.....I imagine ...barbs conquered this city and....unexpected...and never seen somthing like this before...[/SPOILER]

What is the issue that this screenshot is trying to convey?
 
I've had a several unexplained crashes when using worldbuilder, none of which left a trace in any log file. I believe all of them were caused by trying to change some value (like research points towards a certain technology in the World Builder Edit Control Player Data) by typing in a new number rather than using the up or down arrows. The first time it happened I was trying to give a player extra gold, but I confused the Gold category that controls the treasury with the one that controls how commerce is allocated. Making this value more than 100% seemed to be the problem. I did this again later though, and found the game just reduced it back to 100 and continued without incident. This kind of problem is often but not constantly reproducible.

Edit: Ok, I think I've discovered the difference between the case when it crashes and the case where everything is fine. If I type in a number and then press enter, then everything is fine. If I type in a number and then click somewhere outside the box without pressing enter first, then the game crashes.



I also noticed that when I go to Map Mode -> Standard Mode and try to change terrain types using any brush size other than 1x1, it does not seem to do anything.


(This is not exactly a bug, but I would like to complain about how Worldbuilder's Edit City Mode no longer lets you select buildings based on their icons. This is confusing in my modmod, as there are multiple different wonders called Wyrmhold which can be distinguished by art by not by name. I love having the ability to edit cities the new way, I just wish you had kept the old way of changing buildings too. You did after all keep the old way of changing a unit's promotions despite adding a new way.)


bAlwaysHostile units can still enter rival cities peacefully and keep the owner's own units from entering their cities without declaring war (unless I block it in python). Having such a unit in a rival AI's city seems to cause the AI to get stuck in an infinite look.


It seems like summons are now incapable of attacking enemy superforts. Is this intended behavior?

It also seems like this code that I added to CvGameUtils.py's def unitCannotMoveInto(self,argsList): in order to prevent bAlwaysHostile units from capturing superforts without stopped working with the new DLL, and I don't understand why.
Code:
			if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_TACTICS):
				if gc.getUnitInfo(pUnit.getUnitType()).isAlwaysHostile():
					iImp = pPlot.getImprovementType()
					if iImp != -1:
						if gc.getImprovementInfo(iImp).isActsAsCity():
							if pPlot.isOwned():
								if not gc.getTeam(pPlot.getTeam()).isAtWar(pUnit.getTeam()):
									return True

(Incidentally, I think it would be quite helpful if there was a pPlot.isSuperFort() function, similar to pPlot.isCity(), so that I would not have to so often use python to check whether the plot has an improvement and then check the improvement's improvement info.)


Edit: It seems that both of those problems are related. Apparently pPlot.isEnemyCity() was changed to count enemy superforts too.


bool CvPlot::isCity(bool bCheckImprovement, TeamTypes eForTeam) const now has parameters for checking suprforts, and these are used in isEnemyCity, but the python exposed bool CyPlot::isCity() has no such parameters.


My Ring of Warding code was applying to superforts. For some reason I do not understand, pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_RING_OF_WARDING')) seems to return true for cities that are not actually cities and thus cannot have any buildings.

I fixed both issues by changing the code to this:
Spoiler :

Code:
	def unitCannotMoveInto(self,argsList):
		ePlayer = argsList[0]
		pPlayer = gc.getPlayer(ePlayer)
		iUnitId = argsList[1]
		pUnit = pPlayer.getUnit(iUnitId)
		pPlot = CyMap().plot(argsList[2], argsList[3])

		if pPlot.getTeam() != pUnit.getTeam():

			#The compact requires that the gods' prevent their greater servants from directly harming those whose souls they don't already own
			if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_BOUND_BY_COMPACT')):#Balors and the avatar units of each Infernal leader
				if gc.getTerrainInfo(pPlot.getTerrainType()).getTerrainDown() == -1:#i.e., is not Hell terrain
					return True


			if pPlot.isCity():

				if pPlot.isEnemyCity(pUnit):#The plot has a city whose owner is at war with unit's owner
					pCity = pPlot.getPlotCity()
					if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_RING_OF_WARDING')):#The Ring of Warding spell-building prevents hostile summons from entering/attacking the city
						if not pUnit.isImmuneToMagic(): #Runewyns are immune
							if pUnit.getSummoner() != -1:#quickest way to be sure a unit is a summon is to find its summoner
								return True
							if pUnit.getDuration() > 0 and not pUnit.isAlive():#Temporary summons who have lost their summoners
								return True

					if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_SHRINE_OF_ARAWN')):
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_UNDEAD')):
							return True

		 		elif gc.getUnitInfo(pUnit.getUnitType()).isAlwaysHostile():
					return True


			elif gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_TACTICS):
				if gc.getUnitInfo(pUnit.getUnitType()).isAlwaysHostile():
					iImp = pPlot.getImprovementType()
					if iImp != -1:
						if gc.getImprovementInfo(iImp).isActsAsCity():
							if pPlot.isOwned():
								if not gc.getTeam(pPlot.getTeam()).isAtWar(pUnit.getTeam()):
									return True

		return False



I guess you figured out that it still has to meet other requirements, including any building requirements.
I knew that before I reported the bug. What I did not realize yet was that I had accidentally overwritten the new DLL with the old DLL when I merged your mod with mine. I has assumed it was right because the game still ran after changing all the schema files, and even included new features like the worldbuilder improvements.
I did find a bug where it only checks the nearest city. I'll fix it in 2.51 where it will check for any city.


OK. I missed adding it to the CyTeamInterface file. Will be fixed for 2.51
Thanks.

Any ETA for 2.51?

Yesterday's release of Magister Modmod contained a few bugs that were my own fault. I would like to know whether I should release a corrected version before or after moving to 2.51.
 
Noticed a bug with 2.5. I researched Righteousness and automatically received Malovolent Designs as well. I thought it was odd Flauros had Righteousness before that, but it makes sense now since he probably researched MD and gained R for free.

Also, don't know if this is a bug or not, but at 30 AC I lost almost all my open borders no matter the alignment(I have advanced tactics ON), though I was able over time to gain them back. It seems now open borders are alot more hit and miss(they are canceled apparently for no reason), and often times it takes only 1 gold per turn to get them back (somewhat regardless of alignment it seems). Plus, once the open borders are canceled the 1 gold per turn is not removed, and I have to manually remove them.

Also, forts seem to be better. However, the AI still builds them inbetween my cities placement without giving up, but my culture should overtake them. Not sure about forts inhibiting the AI from building cities around them after creation, but this seems to be the case.

Overall, the AI does seem better about creating cities in unclaimed territory. Oh, do you know if the Challenge AI no minimum levels is fixed? Before, stacks of mages were the result.
 
Noticed a bug with 2.5. I researched Righteousness and automatically received Malovolent Designs as well. I thought it was odd Flauros had Righteousness before that, but it makes sense now since he probably researched MD and gained R for free.

I tried to replicate this but couldn't. maybe an issue with advanced tactics?
 
Back
Top Bottom