Feature Requests and Discussion

AI (in general) is often slow to explore in the early game (because they are obligated to keep units at home). What difficulty were you on/what turn was it?
 
The AI had noble difficulty, I had prince difficulty. The other AI had scouts and used them to explore but the Malakim only explored later when they built a scout. I can't remember what turn but it was the early game because they were my closest neighbour.
 
I said I wasn't sure that I wanted to release a new WorldBuilder before you fixed the exposure of pPlot.getRealTerrainType(), but I changed my mind.

The way I was trying to format it before that discovery wasn't working well, but I started over and made things better.

I added a new button next to the one which controls whether or not to ignore prerequisites when placing things on tiles. When this is selected this puts you in "Real" mode.

When in Real mode controls appear that allow you to adjust the temporary timers on Features, Routes, Terrain, Bonuses, and Improvements.

The boxes for those items switch to control the Real version instead.

You may adjust Real versions of map items by area of for the whole map, with or without paying attention to their prerequisites, just as you may when in the normal mode.

Adjusting Temporary Timers, however, only works for the single tile selected.

(Note that reducing a Temporary Timer to 0 in python does not make a map item revert to its Real version or set the real version to 0 like having the timer run out on its own would. I considered making it work like that, but it would be more of a hassle to code and could be annoying if a user presses the button my mistake.)

The Upgrade Timer for Improvements (like cottages and forts) is hidden when in Real Mode, as there is not a temporary equivalent of an upgrade timer and using the regular one may result in python errors.

"None" appears in the Terrain box only when in Real mode.

The Terrain box cannot currently be used to adjust anything in real mode.

I included all the python code which should allow it to function fully, but commented out some lines and added a pass statement to prevent python errors.

Once Tholal makes sure that pPlot.getRealTerrainType() and pPlot.setRealTerrainType() are exposed and working properly, he can uncomment lines 579 and 841-852 (and remove the pass statement in line 839) in order to make it function properly in MNAIv2.62 without needing to wait on me to release a new Worldbuilder update first.


Now that I have gotten the hang of it, it shouldn't be hard for me to let this screen edit temporary timers and real versions of rivers or plot types if Tholal exposes the code for them too.


Edit: I just remembered that I had intended to update Assets\python\pyWB\CvWBDesc.py so that World Builder saves/scenarios can include information about temporary map items, and have not done it yet. I'm about to start on it now. You might not want to merge it in just now, as another update should be released within a couple days (or hours if we're lucky).

Edit2: It actually didn't take very long to get this working. Since there were no downloads so far, I'll just remove the first version and replace it here.

When you get those functions exposed, you can uncomment lines 1839, 1917-1918, 2137-2140, and 2251-2253.



I did notice that when testing the worldbuilder save change with base MNAI, I got this error which I think was caused by initializing a unit on a tile with a blizzard.
Spoiler :
Code:
Traceback (most recent call last):

  File "CvSpellInterface", line 51, in onMoveFeature

  File "<string>", line 0, in ?

  File "CvSpellInterface", line 3930, in onMoveBlizzard

RuntimeError: unidentifiable C++ exception
ERR: Python function onMoveFeature failed, module CvSpellInterface
 
So now that I know it exists /sheepish grin, how difficult do you think it would be to have iCultureGarrison actually shown ingame somehow?
 
I'd really like to be able to add a button in WorldBuilder to end a player's turn (mostly to bypass WoC issues without having to track issues down to specific units)). Is there function that does that already exposed? If not, I would like there to be.
 
Perhaps in response to my last request, Platyping released another update which gives the "Unit + Cities" screen a skip command for both individual units and for all units, to deal with Waiting for other Civilization issues without needing to kill any units. The Skip All Units should effectively end the player's turn.

Here is the MNAI version.

Since I still wanted to make it clear which units/city on the table is selected but cannot use color coding since Platyping now uses it to distinguish units which have/have not/will not move, I switched to identifying the selected item by making its font bold. It looks better this that way anyway.

This time I went ahead and left in place Platyping's way of going to the City or Unit data screens by clicking on the items name at the top of the screen, while still including my (slightly reorganized) shortcuts to those and all associated pages in the menu at the bottom right.


I have included all the files that have been changed since the release of MNAI v2.61, although half of them have not been touched since my last update. WBPlayerUnits.py is the only file with significant changes, as CvGameUtils.py was altered only to update the mod version tool tip. (Those wanting this functionality in MagisterModmod without waiting for a more substantive update may copy the former file only, as overwriting the later would impair my modmod's functionality.)
 
Sometimes I would like to prevent a unit from getting a free promotion pick. (I'm mostly thinking about units with the Adventurer or Changeling promotions, which might otherwise accumulate many free promotions from upgrades.)

It seems like I should be able to use pUnit.changeFreePromotionPick(-1), and that does seem ok when the unit actually had free promotion picks.

However, using that when the unit does not have free promotion picks is resulting in infinite free promotions.

It does not seem that the function to determine how many free promotion picks a unit has is exposed to python, so I cannot add a check to prevent that bug.

I think I'd like it if you could both prevent the infinite free promotions from that function and expose the function to let me know when a unit has free picks.


It would be really useful, but perhaps too much to ask, to expose a function in CvEventManager.py that could be triggered after a unit is upgraded or converted, after the old unit's data is already passed on to the new one.


-----

Although I think that permanently addressing the issue of temporary timers being set to 0 when the regular map items are changed would be better, you can fix the issue of Blizzards removing Flood Plains by adding this line in Blizzards.py after each time that a plot's improvements are changed:


if pPlot.getRealFeatureType() != -1 and pPlot.getTempFeatureTimer() == 0: pPlot.changeTempFeatureTimer(pPlot.getTempTerrainTimer())#Magister

(In one or two places pPlot should be newPlot instead.)
 
Do the Malakim not explore with their lightbringer (I'm playing a MNAI game not my scenario)?

Units that players start the game with are given their default AI, which for Lightbringers, is not UNITAI_EXPLORE.

I have advanced tactics on and the Malakim AI built forts on gold and incence, which was a good idea for them. However I just pillaged one road which connected them back to the Malakim empire and the AI didn't try to fix the route (or get annoyed at me for that!).

They should try to reconnect the road. It would be difficult and resource intensive to try and check if roads in neutral territory mattered to each civ, so the pillaging without consequence issue will remain.

When you get those functions exposed, you can uncomment lines 1839, 1917-1918, 2137-2140, and 2251-2253.

Excellent. Thanks!

I did notice that when testing the worldbuilder save change with base MNAI, I got this error which I think was caused by initializing a unit on a tile with a blizzard.
Spoiler :
Code:
Traceback (most recent call last):

  File "CvSpellInterface", line 51, in onMoveFeature

  File "<string>", line 0, in ?

  File "CvSpellInterface", line 3930, in onMoveBlizzard

RuntimeError: unidentifiable C++ exception
ERR: Python function onMoveFeature failed, module CvSpellInterface

I'll check this out

So now that I know it exists /sheepish grin, how difficult do you think it would be to have iCultureGarrison actually shown ingame somehow?

Sure. Any suggestion on what text should be displayed?

I have included all the files that have been changed since the release of MNAI v2.61,

Thanks again!

It seems like I should be able to use pUnit.changeFreePromotionPick(-1), and that does seem ok when the unit actually had free promotion picks.

However, using that when the unit does not have free promotion picks is resulting in infinite free promotions.

It does not seem that the function to determine how many free promotion picks a unit has is exposed to python, so I cannot add a check to prevent that bug.

I think I'd like it if you could both prevent the infinite free promotions from that function and expose the function to let me know when a unit has free picks.

I'll look into these issues.

It would be really useful, but perhaps too much to ask, to expose a function in CvEventManager.py that could be triggered after a unit is upgraded or converted, after the old unit's data is already passed on to the new one.

I'll add it to the feature list but to be honest, it likely won't ever get done.

Although I think that permanently addressing the issue of temporary timers being set to 0 when the regular map items are changed would be better

It's done that way so that permanent changes to map items (terraforming for example) will override any temporary replacements. Blizzards are a problem child because they sort of act like temporary features but they also move around causing issues with triggering the functions correctly.

you can fix the issue of Blizzards removing Flood Plains by adding this line in Blizzards.py after each time that a plot's improvements are changed:


if pPlot.getRealFeatureType() != -1 and pPlot.getTempFeatureTimer() == 0: pPlot.changeTempFeatureTimer(pPlot.getTempTerrainTimer())#Magister

(In one or two places pPlot should be newPlot instead.)

I dont have the code in front of me but I'll try out your solution. Thanks!
 
It's done that way so that permanent changes to map items (terraforming for example) will override any temporary replacements. Blizzards are a problem child because they sort of act like temporary features but they also move around causing issues with triggering the functions correctly.

Personally, I would very much prefer it if the permanent changes like terraforming spells changed both the normal and real versions of the map items.

For example, if there is a tile which is Snow but has a real type of Plains and you use Scorch on it, it would turn the plot type to Tundra and the real plot type to Desert.


On the other hand, I wonder whether an adept level spell should even be strong enough to cause a permanent change in terrain or it it would be better to make such changes temporary, perhaps with a timer duration based on the unit's level and tier.


-----
I am not a fan of the text which is displayed whenever a temporary map item reverts to its real type. Particularly in scenarios, such changes may have nothing to do with the End of Winter option and a warming climate.
 
Since Tholal reported having trouble uncompressing my last update, I'm posting it again in a .zip instead of .7z.
 
So now that I know it exists /sheepish grin, how difficult do you think it would be to have iCultureGarrison actually shown ingame somehow?
Sure. Any suggestion on what text should be displayed?
I guess that depends on where it would end up getting displayed at. As far as an ingame name for the value I'd suggest "culture strength". If you could have it listed in the civilopedia either on each unit's entry or by adding a column under the unit categories section of the civilopedia (the section where it lists all units of a particular category and has the sortable columns with strength, moves, and hammers) that would be great. Both would be nice but I think if you could only pick one then under unit categories would be nicer as it would give a much quicker view of the value difference between the different units. I could probably scare up a pic of the culture icon and the strength icon smashed together thou I have no idea how to add the pics to a mod nor what format they must be in.
 
Another WorldBuilder update is ready, incorporating Platyping's latest changes:

Version 4.12

1) Fix error in Units and Promotions page for sorting via All/Owner/Team

2) City Data I, II and Buildings
Able to see cities based on
A) All/Owner/Team
B) All/Area Plots
City Data II layout rearranged to make space.
Shifted Ownership in City Data I away as it is misleading if left there

3) City Data I Commands
A) Move City
B) Duplicate City
C) Move City + Units (Own only)
D) Duplicate City + Units (Own only)
E) Raze City

Notes:
It is impossible to move/duplicate a city exactly so there will be minor changes such as:
1) changeBuildingHappiness and Health are problematic codes in BTS, so those won't copy over
2) City ID. It is a brand new city.
3) Buildings
Buildings built date. Wonders creation date will be wrong. Buildings which culture will double after 1000 years are also reset. Buildings which have python onBuildingBuilt effects will not trigger.

Duplicating City:
1) Palace will not be copied.
2) Holy City/Headquarter status will not be copied.
3) Does not bother to check building requisites, so you may end up with a lighthouse in non coastal city.

I added the city's Revolution Index and Civilization Type to the lost of things copied when when cities are moved or duplicated.

I made it so that the Hide Inactive option conceals the Civilization type drop down box in the City Data I screen, except when the city's owner has the Tolerant trait. I also made it so that the civ icon next to the city in the list on the side of the screen is updated immediately when the civ type of a Tolerant trait player's city is changed.
 
Would it be possible to add a tag to Events which would prevent certain event option from being displayed when they cannot be chosen?

The civ specific options I added to the witch burning event look a little verbose considering most players could never choose them. The way that mercenaries work in my modmod would also look more elegant if only those ready for hire show up too. I think it could be a lot of fun to surprise players with some new hidden options in certain rare instances.
 
Here is another WorldBuilder update. It adds square brackets around the name of the player whose turn it current is, which makes tracking down the source of Waiting for Other Civilization issues much easier. It also adds player icons to the city tables, which causes less confusion than only having the civ icons when there are multiple players of the same civ or when a player with the Tolerant trait has cities which stick with other civ types. It adds "Kill" and "Skip Turn" mouseovers in the Units + Cities screen, rather than using + and -, and rearranges the Kill/Skip all commands to be right above the per unit commands.
 
Here is yet another update, based on what Platyping released after seeing my changes in the last one.

It adds a sortable Waiting/Fortifying/Done column in the Units + Cities screen, making it easier to identify which units could be causing loops. It changes the color scheme to be like on other pages, where green is selected and red is not. It makes all the pages use a All/Team/Player format instead of All/Owner/Team, and add leader icons to more pages too.


(I also made a few minor changes to the way CvGameUtils.py is written. The only part that could change gameplay at all is that the AI code which pushes Unique Buildings takes into account the city's civ type rather than the player's civ type, so tolerant trait leaders should try to build the UBs actually available in their city. The other changes just make things look a bit neater, more like I coded things in my version so future merges should be slightly easier on me.)
 
The civilopedia ought to be updated so that it lists all prerequisites.

In particular I am thinking of how it displays promotions. It currently gives no indication of level prerequisites, which I think it should whenever that level is more than 1.

It also only shows the state religion prerequisite of promotions, ignoring any unit religion prerequisites.
 
Could you please expose these functions to python for me?

gc.getGame().decrementUnitClassCreatedCount(iUnitClassType)
gc.getGame().decrementUnitCreatedCount(iUnitType)

gc.getGame().incrementUnitCreatedCount(iUnitType)


The first of those is the most important. You'll probably want to use it too, in the Mirror and the Hall of Mirrors illusion effect.

When a player changes his state religion and has a religious hero abandon him, it is supposed to make it possible for other players (or the same player later on) who do meet the requirements to train the hero again. It does this by calling decrementUnitClassCreatedCount and decrementUnitCreatedCount so that the world limit has no longer been met. The prior creation of illusionary duplicates, however, increments those counts so that reducing them by one when the unit abandons its owner is not enough.

My modmod has many more ways in which the counts could get incremented superfluously, but your mod still has at least those two.


--------

Now that the required function is exposed, I think that the Main Interface screen should be modified so that it displays how much longer the Sanctuary timer will last without needing to check on it in worldbuilder.

When I was adding it to my version I noticed an issue with other goal tags not updating in games where I was using my Control Whole Teams game option. It kept displaying information from one player when I moved on to the next. I imagine that such problems could happen in Hotseat games too.

You can add the new feature and fix those issues by replacing lines 5384 through 5473 of Assets\python\Screens\CvMainInterface.py with this
Spoiler :
Code:
#FfH Global Counter: Added by Kael 08/12/2007
				pPlayer = gc.getPlayer(gc.getGame().getActivePlayer())
				iCountSpecial = 0
				szName = "DifficultyTag"
				if (gc.getGame().isOption(GameOptionTypes.GAMEOPTION_CHALLENGE_INCREASING_DIFFICULTY) or gc.getGame().isOption(GameOptionTypes.GAMEOPTION_FLEXIBLE_DIFFICULTY)):
					iCountSpecial += 1
					szBuffer = u"<font=2>"
					szBuffer += localText.getColorText("TXT_KEY_MESSAGE_DIFFICULTY", (gc.getHandicapInfo(pPlayer.getHandicapType()).getDescription(), ()), gc.getInfoTypeForString("COLOR_RED"))
					szBuffer += "</font>"
					screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 26+ ((iCount + iCountSpecial) * iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
					screen.show(szName)
				else:
					screen.hide(szName)

				szName = "CutLosersTag"
				if (gc.getGame().isOption(GameOptionTypes.GAMEOPTION_CHALLENGE_CUT_LOSERS) or gc.getGame().isOption(GameOptionTypes.GAMEOPTION_WB_BARBARIAN_ASSAULT)):
					if gc.getGame().countCivPlayersAlive() > 5:
						iCountSpecial += 1
						szBuffer = u"<font=2>"
						szBuffer += localText.getColorText("TXT_KEY_MESSAGE_CUT_LOSERS", (gc.getGame().getCutLosersCounter(), ()), gc.getInfoTypeForString("COLOR_RED"))
						szBuffer += "</font>"
						screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 100+ ((iCount + iCountSpecial) * iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
						screen.show(szName)
					else:
						screen.hide(szName)
				else:
					screen.hide(szName)

				szName = "HighToLowTag"
				if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_CHALLENGE_HIGH_TO_LOW):
					iCountSpecial += 1
					szBuffer = u"<font=2>"
					if gc.getGame().getHighToLowCounter() == 0:
						szBuffer += localText.getColorText("TXT_KEY_MESSAGE_HIGH_TO_LOW_GOAL_0", (), gc.getInfoTypeForString("COLOR_RED"))
					if gc.getGame().getHighToLowCounter() == 1:
						szBuffer += localText.getColorText("TXT_KEY_MESSAGE_HIGH_TO_LOW_GOAL_1", (), gc.getInfoTypeForString("COLOR_RED"))
					if gc.getGame().getHighToLowCounter() > 1:
						szBuffer += localText.getColorText("TXT_KEY_MESSAGE_HIGH_TO_LOW_GOAL_2", (), gc.getInfoTypeForString("COLOR_RED"))
					szBuffer += "</font>"
					screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 100+ ((iCount + iCountSpecial) * iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
					screen.show(szName)
				else:
					screen.hide(szName)

				szName = "GoalTag"
				if CyGame().getWBMapScript():
					iCountSpecial += 1
					szBuffer= sf.getGoalTag(pPlayer)
					screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 100+ ((iCount + iCountSpecial) * iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
					screen.show(szName)
				else:
					screen.hide(szName)

				iCountSpecial += 1

				szName = "DisableProductionTag"
				if pPlayer.getDisableProduction() > 0:
					iCountSpecial += 1
					szBuffer = u"<font=2>"
					szBuffer += localText.getColorText("TXT_KEY_MESSAGE_DISABLE_PRODUCTION", (pPlayer.getDisableProduction(), ()), gc.getInfoTypeForString("COLOR_RED"))
					szBuffer += "</font>"
					screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 100+(iCountSpecial*iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
					screen.show(szName)
				else:
					screen.hide(szName)

				szName = "DisableResearchTag"
				if pPlayer.getDisableResearch() > 0:
					iCountSpecial += 1
					szBuffer = u"<font=2>"
					szBuffer += localText.getColorText("TXT_KEY_MESSAGE_DISABLE_RESEARCH", (pPlayer.getDisableResearch(), ()), gc.getInfoTypeForString("COLOR_RED"))
					szBuffer += "</font>"
					screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 100+(iCountSpecial*iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
					screen.show(szName)
				else:
					screen.hide(szName)

				szName = "DisableSpellcastingTag"
				if pPlayer.getDisableSpellcasting() > 0:
					iCountSpecial += 1
					szBuffer = u"<font=2>"
					szBuffer += localText.getColorText("TXT_KEY_MESSAGE_DISABLE_SPELLCASTING", (pPlayer.getDisableSpellcasting(), ()), gc.getInfoTypeForString("COLOR_RED"))
					szBuffer += "</font>"
					screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 100+(iCountSpecial*iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
					screen.show(szName)
				else:
					screen.hide(szName)


				szName = "SanctuaryTimerTag"
				if pPlayer.getSanctuaryTimer() > 0:
					iCountSpecial += 1
					szBuffer = u"<font=2>"
					szBuffer += localText.getColorText("TXT_KEY_SANCTUARY_TIMER",(pPlayer.getSanctuaryTimer(), ()), gc.getInfoTypeForString("COLOR_RED"))
					szBuffer += "</font>"
					screen.setText( szName, "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, xResolution - 12, 100+(iCountSpecial*iBtnHeight), -0.3, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
					screen.show(szName)
				else:
					screen.hide(szName)

#FfH: End Add
 
Here is yet another update, based on what Platyping released after seeing my changes in the last one.

Thanks! I will try to incorporate this today hopefully.


The civilopedia ought to be updated so that it lists all prerequisites.

In particular I am thinking of how it displays promotions. It currently gives no indication of level prerequisites, which I think it should whenever that level is more than 1.

It also only shows the state religion prerequisite of promotions, ignoring any unit religion prerequisites.

OK. I'll see what I can do.

Could you please expose these functions to python for me?

gc.getGame().decrementUnitClassCreatedCount(iUnitClassType)
gc.getGame().decrementUnitCreatedCount(iUnitType)

gc.getGame().incrementUnitCreatedCount(iUnitType)

Yes, I can, though I'm not sure how that would help. I've added some code to the kill function in the DLL that should alleviate this issue.


I think that the Main Interface screen should be modified so that it displays how much longer the Sanctuary timer will last without needing to check on it in worldbuilder.

Already coded and checked into the repository.

When I was adding it to my version I noticed an issue with other goal tags not updating in games where I was using my Control Whole Teams game option. It kept displaying information from one player when I moved on to the next. I imagine that such problems could happen in Hotseat games too.

You can add the new feature and fix those issues by replacing lines 5384 through 5473 of Assets\python\Screens\CvMainInterface.py with this

Thanks! I'll take a look at your code when I get a chance.
 
Yes, I can, though I'm not sure how that would help. I've added some code to the kill function in the DLL that should alleviate this issue.

You aren't doing to decrement the count whenever a unit is killed, as you? I believe that would cause some issues for the Shrine of the Champion and Resurrection spells.
 
Once Tholal makes sure that pPlot.getRealTerrainType() and pPlot.setRealTerrainType() are exposed and working properly, he can uncomment lines 579 and 841-852 (and remove the pass statement in line 839) in order to make it function properly in MNAIv2.62 without needing to wait on me to release a new Worldbuilder update first.

I see calls to RealTerrainType in both CvWBDesc and WBPlotScreen. Should all of these be uncommented?


you can fix the issue of Blizzards removing Flood Plains by adding this line in Blizzards.py after each time that a plot's improvements are changed:


if pPlot.getRealFeatureType() != -1 and pPlot.getTempFeatureTimer() == 0: pPlot.changeTempFeatureTimer(pPlot.getTempTerrainTimer())#Magister

(In one or two places pPlot should be newPlot instead.)

I dont think this code will work. It assumes that TempTerrainTimers are tied to Temp Features, which they are not. And you can't access the TempFeatureTimer for a number because it has already been set to 0 at this point.

For a quick short-term fix, I've simply made it so that Blizzards wont move onto plots with temporary features (note: Call Blizzard still ignores all these checks for the moment)

Personally, I would very much prefer it if the permanent changes like terraforming spells changed both the normal and real versions of the map items.

For example, if there is a tile which is Snow but has a real type of Plains and you use Scorch on it, it would turn the plot type to Tundra and the real plot type to Desert.

On the other hand, I wonder whether an adept level spell should even be strong enough to cause a permanent change in terrain or it it would be better to make such changes temporary, perhaps with a timer duration based on the unit's level and tier.

That's something that modders could add to but I won't be doing it for MNAI. The player gets no insight as to what the "real" versions might be.

MNAI will be sticking with the philosophy that permanent terrain changes always override temporary changes.

You aren't doing to decrement the count whenever a unit is killed, as you? I believe that would cause some issues for the Shrine of the Champion and Resurrection spells.

Here is the code I added to the Unit kill function

Code:
	if (bIllusion) // Make sure that we properly adjust the stats when an Illusionary unit is removed from the game
	{
		GC.getGameINLINE().decrementUnitCreatedCount(getUnitType());
		GC.getGameINLINE().decrementUnitClassCreatedCount((UnitClassTypes)(m_pUnitInfo->getUnitClassType()));
	}


In regards to your changes to CvGameUtils, I don't think that you really want tolerant civs building Temples of the Hand and Demons Altar (or maybe you do). I edited those two parts for MNAI.
 
Back
Top Bottom