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
Do the Malakim not explore with their lightbringer (I'm playing a MNAI game not my scenario)?
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!).
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 have included all the files that have been changed since the release of MNAI v2.61,
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.)
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.
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.Sure. Any suggestion on what text should be displayed?So now that I know it exists /sheepish grin, how difficult do you think it would be to have iCultureGarrison actually shown ingame somehow?
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.
#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.
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)
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
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.
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.
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.)
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.
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.
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()));
}