[PYTHONCOMP] Civ4lerts: Alert messages about in game events

jonpfl said:
How do I get it to work with multi player?

I don't know. I wasn't aware of any problems with multiplayer, but I only do single player, so it might just be something I've never encountered. If you can turn on logging and post an error message here, that might help figure out the problem.

  • Set "LoggingEnabled = 1" in your CivilizationIV.ini file (typically C:\Documents and Settings\User\My Documents\My Games\Sid Meier's Civilization 4\CivilizationIV.ini")
  • Run the game long enough to be sure an alert should have appeared (ex. play until a city grows)
  • Look at Logs\PythonErr.log and Logs\PythonErr2.log in the same place you found CivilizationIV.ini and see if there's anything that looks like an exception or error message.
 
Dr Elmer Jiggle said:
I don't know. I wasn't aware of any problems with multiplayer, but I only do single player, so it might just be something I've never encountered. If you can turn on logging and post an error message here, that might help figure out the problem.

  • Set "LoggingEnabled = 1" in your CivilizationIV.ini file (typically C:\Documents and Settings\User\My Documents\My Games\Sid Meier's Civilization 4\CivilizationIV.ini")
  • Run the game long enough to be sure an alert should have appeared (ex. play until a city grows)
  • Look at Logs\PythonErr.log and Logs\PythonErr2.log in the same place you found CivilizationIV.ini and see if there's anything that looks like an exception or error message.

Here you go. I had to cut some of it since it was too long.

warning: to-Python converter for class CyPythonMgr already registered; second conversion method ignored.
warning: to-Python converter for enum GameStateTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PopupStates already registered; second conversion method ignored.
warning: to-Python converter for enum CameraLookAtTypes already registered; second conversion method ignored.
warning: to-Python converter for enum CameraMovementSpeeds already registered; second conversion method ignored.
warning: to-Python converter for enum ZoomLevelTypes already registered; second conversion method ignored.
warning: to-Python converter for enum DirectionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum CardinalDirectionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ColorTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PlayerColorTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PlotStyles already registered; second conversion method ignored.
warning: to-Python converter for enum PlotLandscapeLayers already registered; second conversion method ignored.
warning: to-Python converter for enum InterfaceModeTypes already registered; second conversion method ignored.
warning: to-Python converter for enum InterfaceMessageTypes already registered; second conversion method ignored.
warning: to-Python converter for enum MinimapModeTypes already registered; second conversion method ignored.
warning: to-Python converter for enum EngineDirtyBits already registered; second conversion method ignored.
warning: to-Python converter for enum InterfaceDirtyBits already registered; second conversion method ignored.
warning: to-Python converter for enum CityTabTypes already registered; second conversion method ignored.
warning: to-Python converter for enum WidgetTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ButtonPopupTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ClimateTypes already registered; second conversion method ignored.
warning: to-Python converter for enum SeaLevelTypes already registered; second conversion method ignored.
warning: to-Python converter for enum CustomMapOptionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum WorldSizeTypes already registered; second conversion method ignored.
warning: to-Python converter for enum TerrainTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PlotTypes already registered; second conversion method ignored.
warning: to-Python converter for enum YieldTypes already registered; second conversion method ignored.
warning: to-Python converter for enum CommerceTypes already registered; second conversion method ignored.
warning: to-Python converter for enum AdvisorTypes already registered; second conversion method ignored.
warning: to-Python converter for enum FlavorTypes already registered; second conversion method ignored.
warning: to-Python converter for enum EmphasizeTypes already registered; second conversion method ignored.
warning: to-Python converter for enum GameOptionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum MultiplayerOptionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum SpecialOptionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PlayerOptionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum GraphicOptionTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ForceControlTypes already registered; second conversion method ignored.
warning: to-Python converter for enum VictoryTypes already registered; second conversion method ignored.
warning: to-Python converter for enum FeatureTypes already registered; second conversion method ignored.
warning: to-Python converter for enum BonusTypes already registered; second conversion method ignored.
warning: to-Python converter for enum BonusClassTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ImprovementTypes already registered; second conversion method ignored.
warning: to-Python converter for enum RouteTypes already registered; second conversion method ignored.
warning: to-Python converter for enum RiverTypes already registered; second conversion method ignored.
warning: to-Python converter for enum GoodyTypes already registered; second conversion method ignored.
warning: to-Python converter for enum BuildTypes already registered; second conversion method ignored.
warning: to-Python converter for enum SymbolTypes already registered; second conversion method ignored.
warning: to-Python converter for enum FontSymbols already registered; second conversion method ignored.
warning: to-Python converter for enum HandicapTypes already registered; second conversion method ignored.
warning: to-Python converter for enum GameSpeedTypes already registered; second conversion method ignored.
warning: to-Python converter for enum TurnTimerTypes already registered; second conversion method ignored.
warning: to-Python converter for enum EraTypes already registered; second conversion method ignored.
warning: to-Python converter for enum CivilizationTypes already registered; second conversion method ignored.
warning: to-Python converter for enum LeaderHeadTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ArtStyleTypes already registered; second conversion method ignored.
warning: to-Python converter for enum CitySizeTypes already registered; second conversion method ignored.
warning: to-Python converter for enum FootstepAudioTypes already registered; second conversion method ignored.
warning: to-Python converter for enum FootstepAudioTags already registered; second conversion method ignored.
warning: to-Python converter for enum ChatTargetTypes already registered; second conversion method ignored.
warning: to-Python converter for enum VoiceTargetTypes already registered; second conversion method ignored.
warning: to-Python converter for enum TeamTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PlayerTypes already registered; second conversion method ignored.
warning: to-Python converter for enum TraitTypes already registered; second conversion method ignored.
warning: to-Python converter for enum OrderTypes already registered; second conversion method ignored.
warning: to-Python converter for enum TaskTypes already registered; second conversion method ignored.
warning: to-Python converter for enum BuildingClassTypes already registered; second conversion method ignored.
warning: to-Python converter for enum BuildingTypes already registered; second conversion method ignored.
warning: to-Python converter for enum SpecialBuildingTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ProjectTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ProcessTypes already registered; second conversion method ignored.
warning: to-Python converter for enum VoteTypes already registered; second conversion method ignored.
warning: to-Python converter for enum InfoBarTypes already registered; second conversion method ignored.
warning: to-Python converter for enum HealthBarTypes already registered; second conversion method ignored.
warning: to-Python converter for enum MemoryTypes already registered; second conversion method ignored.
warning: to-Python converter for enum AttitudeTypes already registered; second conversion method ignored.
warning: to-Python converter for enum LeaderheadAction already registered; second conversion method ignored.
warning: to-Python converter for enum DiplomacyPowerTypes already registered; second conversion method ignored.
warning: to-Python converter for enum FeatTypes already registered; second conversion method ignored.
warning: to-Python converter for enum SaveGameTypes already registered; second conversion method ignored.
warning: to-Python converter for enum GameType already registered; second conversion method ignored.
warning: to-Python converter for enum GameMode already registered; second conversion method ignored.
warning: to-Python converter for enum InterfaceVisibility already registered; second conversion method ignored.
warning: to-Python converter for enum GenericButtonSizes already registered; second conversion method ignored.
warning: to-Python converter for enum WorldBuilderPopupTypes already registered; second conversion method ignored.
warning: to-Python converter for enum EventType already registered; second conversion method ignored.
warning: to-Python converter for enum LoadType already registered; second conversion method ignored.
warning: to-Python converter for enum FontTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PanelStyles already registered; second conversion method ignored.
warning: to-Python converter for enum ButtonStyles already registered; second conversion method ignored.
warning: to-Python converter for enum TableStyles already registered; second conversion method ignored.
warning: to-Python converter for enum EventContextTypes already registered; second conversion method ignored.
warning: to-Python converter for enum TabGroupTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ReplayMessageTypes already registered; second conversion method ignored.
warning: to-Python converter for enum AudioTag already registered; second conversion method ignored.
warning: to-Python converter for enum CivilopediaPageTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ActionSubTypes already registered; second conversion method ignored.
warning: to-Python converter for enum GameMessageTypes already registered; second conversion method ignored.
warning: to-Python converter for enum PopupControlLayout already registered; second conversion method ignored.
warning: to-Python converter for enum JustificationTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ToolTipAlignTypes already registered; second conversion method ignored.
warning: to-Python converter for enum ActivationTypes already registered; second conversion method ignored.
warning: to-Python converter for enum HitTestTypes already registered; second conversion method ignored.
warning: to-Python converter for enum GraphicLevelTypes already registered; second conversion method ignored.
warning: to-Python converter for class CyGame already registered; second conversion method ignored.
warning: to-Python converter for class CvSpecialUnitInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvCivicOptionInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvCivicInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvUnitClassInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvBuildingInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvSpecialBuildingInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvBuildingClassInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvRouteModelInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvCivilizationInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvVictoryInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvHurryInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvHandicapInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvGameSpeedInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvTurnTimerInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvBuildInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvGoodyInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvRouteInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvImprovementBonusInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvImprovementInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvBonusClassInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvBonusInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvFeatureInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvCommerceInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvYieldInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvTerrainInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvLeaderHeadInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvProcessInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvVoteInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvProjectInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvReligionInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvTraitInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvWorldInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvClimateInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvSeaLevelInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvAssetInfoBase already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoAsset already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoScalableAsset already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoInterface already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoMovie already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoMisc already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoUnit already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoBuilding already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoCivilization already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoLeaderhead already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoBonus already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoImprovement already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoTerrain already registered; second conversion method ignored.
warning: to-Python converter for class CvArtInfoFeature already registered; second conversion method ignored.
warning: to-Python converter for class CvEmphasizeInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvUpkeepInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvCultureLevelInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvEraInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvColorInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvPlayerColorInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvGameText already registered; second conversion method ignored.
warning: to-Python converter for class CvDiplomacyTextInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvDiplomacyInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvEffectInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvControlInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvQuestInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvTutorialMessage already registered; second conversion method ignored.
warning: to-Python converter for class CvTutorialInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvAutomateInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvCommandInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvGameOptionInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvMPOptionInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvForceControlInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvPlayerOptionInfo already registered; second conversion method ignored.
warning: to-Python converter for class CvGraphicOptionInfo already registered; second conversion method ignored.
warning: to-Python converter for class CyReplayInfo already registered; second conversion method ignored.
warning: to-Python converter for class CyHallOfFameInfo already registered; second conversion method ignored.
warning: to-Python converter for class CyCity already registered; second conversion method ignored.
warning: to-Python converter for class CyPlayer already registered; second conversion method ignored.
warning: to-Python converter for class CyUnit already registered; second conversion method ignored.
warning: to-Python converter for class CyPlot already registered; second conversion method ignored.
warning: to-Python converter for class CyGlobalContext already registered; second conversion method ignored.
warning: to-Python converter for class CyPopupReturn already registered; second conversion method ignored.
warning: to-Python converter for class CyPopupInfo already registered; second conversion method ignored.
warning: to-Python converter for class CyPopup already registered; second conversion method ignored.
warning: to-Python converter for class CyFractal already registered; second conversion method ignored.
warning: to-Python converter for enum CvFractal::FracVals already registered; second conversion method ignored.
warning: to-Python converter for enum FInputDevice::InputType already registered; second conversion method ignored.
warning: to-Python converter for enum MOUSE_FLAGS already registered; second conversion method ignored.
warning: to-Python converter for enum FxCheckBox::CheckBoxState already registered; second conversion method ignored.
warning: to-Python converter for class NiMatrix3 already registered; second conversion method ignored.
warning: to-Python converter for enum NotifyCode already registered; second conversion method ignored.
warning: to-Python converter for enum WidgetAnim already registered; second conversion method ignored.
warning: to-Python converter for class CyEngine already registered; second conversion method ignored.
warning: to-Python converter for class CySign already registered; second conversion method ignored.
warning: to-Python converter for class CyCamera already registered; second conversion method ignored.
warning: to-Python converter for class CyDiplomacy already registered; second conversion method ignored.
warning: to-Python converter for class CyUnitEntity already registered; second conversion method ignored.
warning: to-Python converter for class CyUnitSubEntity already registered; second conversion method ignored.
warning: to-Python converter for class CyInterfaceScreen already registered; second conversion method ignored.
warning: to-Python converter for class CyGInterfaceScreen already registered; second conversion method ignored.
warning: to-Python converter for class CyMessageControl already registered; second conversion method ignored.
warning: to-Python converter for class CyInterface already registered; second conversion method ignored.
warning: to-Python converter for class CyUserProfile already registered; second conversion method ignored.
warning: to-Python converter for class CyAudioGame already registered; second conversion method ignored.
warning: to-Python converter for class CyVariableSystem already registered; second conversion method ignored.
warning: to-Python converter for class CyTranslator already registered; second conversion method ignored.
warning: to-Python converter for class CyGTabCtrl already registered; second conversion method ignored.
warning: to-Python converter for class CyGFlyoutMenu already registered; second conversion method ignored.
warning: to-Python converter for class CyGlobeLayer already registered; second conversion method ignored.
warning: to-Python converter for class CyGlobeLayerManager already registered; second conversion method ignored.
warning: to-Python converter for class CyStatistics already registered; second conversion method ignored.
sys.path = ['ASSETS\\PYTHON\\SYSTEM\\email', 'ASSETS\\PYTHON\\SYSTEM\\encodings', 'ASSETS\\PYTHON\\SYSTEM\\wx', 'ASSETS\\PYTHON\\SYSTEM\\wx\\build', 'ASSETS\\PYTHON\\SYSTEM\\wx\\lib', 'ASSETS\\PYTHON\\SYSTEM\\wx\\py', 'ASSETS\\PYTHON\\SYSTEM\\wx\\tools', 'ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\colourchooser', 'ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\editor', 'ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\floatcanvas', 'ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\masked', 'ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\mixins', 'ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\ogl', 'ASSETS\\PYTHON\\SYSTEM\\wx\\py\\tests', 'ASSETS\\PYTHON\\SYSTEM\\wx\\tools\\XRCed', 'ASSETS\\PYTHON\\SYSTEM']

sys.modules = {'zipimport': <module 'zipimport' (built-in)>, 'signal': <module 'signal' (built-in)>, '__builtin__': <module '__builtin__' (built-in)>, 'sys': <module 'sys' (built-in)>, '__main__': <module '__main__' (built-in)>, 'exceptions': <module 'exceptions' (built-in)>, 'CvPythonExtensions': <module 'CvPythonExtensions' (built-in)>}

sys.builtin_module_names = ('CvPythonExtensions', 'CvPythonExtensions', '__builtin__', '__main__', '_bisect', '_codecs', '_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', '_codecs_tw', '_csv', '_heapq', '_hotshot', '_locale', '_multibytecodec', '_random', '_sre', '_subprocess', '_symtable', '_weakref', '_winreg', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'md5', 'mmap', 'msvcrt', 'nt', 'operator', 'parser', 'regex', 'rgbimg', 'sha', 'signal', 'strop', 'struct', 'sys', 'thread', 'time', 'xxsubtype', 'zipimport')
load_module CvEventInterface
load_module CvUtil
load_module traceback
load_module CvEventManager
load_module CvScreensInterface
load_module CvMainInterface
load_module ScreenInput
load_module CvScreenEnums
load_module time
load_module CvDomesticAdvisor
load_module PyHelpers
load_module CvTechChooser
load_module CvForeignAdvisor
load_module math
load_module CvMilitaryAdvisor
load_module re
load_module CvFinanceAdvisor
load_module CvReligionScreen
load_module CvCivicsScreen
load_module string
load_module CvVictoryScreen
load_module CvOptionsScreen
load_module CvReplayScreen
load_module CvHallOfFameScreen
load_module CvDanQuayle
load_module CvGameUtils
load_module CvUnVictoryScreen
load_module CvDawnOfMan
load_module CvTechSplashScreen
load_module CvTopCivs
load_module random
load_module CvInfoScreen
load_module CvIntroMovieScreen
load_module CvVictoryMovieScreen
load_module CvWonderMovieScreen
load_module CvEraMovieScreen
load_module CvPediaMain
load_module CvPediaScreen
load_module CvScreen
load_module CvPediaTech
load_module CvPediaUnit
load_module CvPediaBuilding
load_module CvPediaPromotion
load_module CvPediaUnitChart
load_module CvPediaBonus
load_module CvPediaTerrain
load_module CvPediaFeature
load_module CvPediaImprovement
load_module CvPediaCivic
load_module CvPediaCivilization
load_module CvPediaLeader
load_module CvPediaSpecialist
load_module CvPediaHistory
load_module CvPediaProject
load_module CvPediaReligion
load_module CvWorldBuilderScreen
load_module Popup
load_module CvWorldBuilderDiplomacyScreen
load_module CvDebugTools
load_module CvDebugInfoScreen
load_module CvMapGeneratorUtil
load_module CvGFCScreen
load_module CvPopupInterface
load_module CvScreenUtilsInterface
load_module CvScreenUtils
load_module CvWBPopups
load_module CvCameraControls
load_module CvAdvisorUtils
PY:OnInit
load_module CvAppInterface
 
jonpfl said:
Here you go. I had to cut some of it since it was too long.

That all looks normal and/or unrelated to the alerts. I don't know what all that stuff is about enum conversions, but it's not anything I did.

Do any mods work in multiplayer? I'm thinking the game might automatically ignore customizations as an anti-cheating measure. Of course, I don't think an alert about city growth is actually cheating, but the game doesn't know that. I just sees a custom Python module.

I'm thinking that's the problem. Looking through that list of loaded modules, I don't see any of the modules for my mod. None of them. It looks like they're completely ignored.
 
D*mn

Your mod is so helpful. I guess they don't allow stuff like this to work.

Any other ideas what I might be missing? It works fine in single player. I am just clicking the icon on my desktop to start it.

Does anyone else use this mod for mplayer????
 
Dr Elmer Jiggle said:
...Do any mods work in multiplayer? I'm thinking the game might automatically ignore customizations as an anti-cheating measure. Of course, I don't think an alert about city growth is actually cheating, but the game doesn't know that. I just sees a custom Python module...


In my limited experience, mods and MP dont go too well... unless it is a simple mod...

let me explain....

the biggest issues that I see is AI and python...

I find any mod that modifies python and/or AI actions doesnt work well in MP

it will work in MP for maybe like 20-40 turns then you will get Out Of Sync errors...

and then it becomes unplayable

(NOTE: MP will use the custom mods... but it doesnt last long)

the few times where mods work in MP is where the Python files are not altered... alot...

for example I am using the CivMore Mod:

http://forums.civfanatics.com/showthread.php?t=163596

Fitchn's CivMore Mod specfically does not mess with pythons extensively (however he does add more civics... that require changes in those python files) and therefore I have no MP issues...

he advises that OOS errors occur with Python modifications

and due to my limited search on the OOS problem... I happen to agree with him

however when I tried to merge some AI altering codes like:

Snaitf 's Allegiance Mod (allows for some enemy units to be converted to your /other civs by %)
Snaitf 's Contact Mod (allows for you to meet all civs that your first contact civ met)

I get OOS errors

yet I was able to merge

Snaitf 's Show Attitude Mod with CivMore Mod w/o any errors thus far...

I also used the Exavier Composite Mod but would get OOS errors (it uses alot of the "Snaitf" type python mods) However before the errors all the custom aspects of the mod seems to work


So I think when there are certain Python coding... it doesnt work...

**Also I am using the Snaitf's demolition mod (city razing whenever you want on your own cities/not only capture) but havent used it extensively in MP to see the effects (however thread information suggest it may cause OOS errors later on)




I am still using the 1.52 patch though.... dont know about the new patch


I am not a good coder/modder so I can not say that this for certain that is the reason mods

I can just tell you my experience... and since me and my bro like to play MP on LAN, but dont like the "vanilla" verson, it can be frustrating! :mad:

(also many people havent tested/or dont use mods in MP is a pain too)

I know that any XML additions (buildings/wonders/units) that I made works fine in MP as well as SP games... (as long as all my coding/moding is correct)

my conclusion

XML Modding in MP = good
PYTHON Modding in MP = bad


Note: I have had problems with the ALPHA Channel dds with MP...
I try to avoid using Alpha Channel (unless it is already used by the "vanilla" version) when customizing pics...

...however I made two custom/unique civilizations (for me and my bro) and you can not create a flag/banner without ALPHA Channel dds files

(it is too early to see if this causes problems in my MP games... but I can keep you posted if you wish...)


Another Note: I think this mod is a great idea... but for some reason I can not get it to work....in SP or MP ... so I will have to wait till some one can merge it with CivMore :blush:

well that's my thoughts ...hope it helps...


** Just tried to use the Demolition Mod in MP (1.52 patch) and it didnt work either :mad:
 
I guess this is the place to post this message as the event handling was part of the alert package. Let me know if I should move it.

I have been looking at CvCustomEventManager in the latest HOF mod. My brain is a bit fried :twitch:, but I think I understand most of it. Here are some questions.

1.
Code:
class CvCustomEventManager(CvEventManager.CvEventManager, object):
Does CvCustomEventmanager have two supers? If so, what does it inherit from "object"?

2.
Code:
def __init__(self, *args, **kwargs):
args and kwargs look like a pointer and a handle.. but thats a different language. Sorry new to Python, could someone explain the * and the ** please?

3.
Code:
def handleEvent(self, argsList):
        """Handles events by calling all installed handlers."""
        self.origArgsList = argsList
        flagsIndex = len(argsList) - 6
        self.bDbg, self.bMultiPlayer, self.bAlt, self.bCtrl, self.bShift, self.bAllowCheats = argsList[flagsIndex:]
        eventType = argsList[0]
        return {
            "kbdEvent": self._handleConsumableEvent,
            "mouseEvent": self._handleConsumableEvent,
            "OnSave": self._handleOnSaveEvent,
            "OnLoad": self._handleOnLoadEvent
        }.get(eventType, self._handleDefaultEvent)(eventType, argsList[1:])
I must have stared at this for hours. I finally figured out that you were handling a case where there is more than one function to handle each event. The value in the EventHandlerMap had been changed from a function to a list of functions. And sure enough up top in the comment area that is what you say, but that just didn't get into my skull when I read it. If I understand this right, then the following is true:

a. If you want to replace (override) all other handlers for an event then you use setEventHandler().

b. If you want to add your handling to an already installed event, then you use addEventHandler().

c. keyboard and mouse events are different in that if there are multiple handlers, after the first successfull handling of the event, the event gets dropped. The other handlers are not called.

d. no order is guarenteed to the handler calls.

Is my understanding correct?

4. I can't figure out what you are trying to do with Save and Load. They don't seem to complement each other.

5. Comparing your event handler with the standard it seems you are missing:
Code:
bDummy = false
I have no idea what bDummy does. Can you enlighten me at all?

By the way, :thanx: for this code, my brain just isn't quite up to speed yet.
 
I basically learned Python for this mod, so a lot of this stuff is picked up, borrowed, stolen from various examples I found. As a result, my use of the techniques and more importantly my explanations may not be entirely right, but here's my best attempt.

pholtz said:
Does CvCustomEventmanager have two supers? If so, what does it inherit from "object"?

Yes, it has two supers. Inheriting from object makes it a "new style" Python class, which enables the use of super as shown below.

Code:
        super(CvCustomEventManager, self).__init__(*args, **kwargs)

Without inheriting from object, you need to do all kinds of other crazy stuff to call the superclass method. You'll see examples in some of the event managers in other mods. They do stuff like "self.parent = CvEventManager", which isn't going to work very well if someone tries to derive from their subclass (because then the subclass will reset parent to something else). Anyway, this seemed like a much safer way to deal with calling the superclass method.

2.
Code:
def __init__(self, *args, **kwargs):
args and kwargs look like a pointer and a handle.. but thats a different language. Sorry new to Python, could someone explain the * and the ** please?

*args basically gets any extra arguments after the declared ones (like ... in C). **kwargs is for keyword arguments. I read something somewhere that said if you use super to call the superclass method, you should always include *args and **kwargs in your methods. They gave an example of why, but I can't remember what it was.

3.
Code:
def handleEvent(self, argsList):
        """Handles events by calling all installed handlers."""
        self.origArgsList = argsList
        flagsIndex = len(argsList) - 6
        self.bDbg, self.bMultiPlayer, self.bAlt, self.bCtrl, self.bShift, self.bAllowCheats = argsList[flagsIndex:]
        eventType = argsList[0]
        return {
            "kbdEvent": self._handleConsumableEvent,
            "mouseEvent": self._handleConsumableEvent,
            "OnSave": self._handleOnSaveEvent,
            "OnLoad": self._handleOnLoadEvent
        }.get(eventType, self._handleDefaultEvent)(eventType, argsList[1:])
I must have stared at this for hours. I finally figured out that you were handling a case where there is more than one function to handle each event. The value in the EventHandlerMap had been changed from a function to a list of functions. And sure enough up top in the comment area that is what you say, but that just didn't get into my skull when I read it. If I understand this right, then the following is true:

It makes a little more sense if you break it down into several lines. Normally I would have done that myself, but this is supposedly a fairly standard Python idiom. It does this:

Code:
    handlerFunctionMap = {
            "kbdEvent": self._handleConsumableEvent,
            "mouseEvent": self._handleConsumableEvent,
            "OnSave": self._handleOnSaveEvent,
            "OnLoad": self._handleOnLoadEvent
        }
    handlerFunction = handlerFunctionMap.get(eventType)
    if (handlerFunction == null):
        handlerFunction = self._handleDefaultEvent
    return handlerFunction(eventType, argsList[1:])

It looks up the appropriate handler function from a dictionary / map. If nothing is found, it uses a default function. That function is then called with the eventType string and any additional arguments that are passed in by the game engine (like city where it occurred, player, etc.).

a. If you want to replace (override) all other handlers for an event then you use setEventHandler().

b. If you want to add your handling to an already installed event, then you use addEventHandler().

c. keyboard and mouse events are different in that if there are multiple handlers, after the first successfull handling of the event, the event gets dropped. The other handlers are not called.

d. no order is guarenteed to the handler calls.

Is my understanding correct?

Yes, all correct. There is actually an order guarantee in the current implementation, since new handlers are appended to an ordered list, but I didn't want to make that promise.

4. I can't figure out what you are trying to do with Save and Load. They don't seem to complement each other.

I can't figure it out either. If anyone can tell me what is supposed to happen when the save and load events are fired, I'll fix the handler functions. ;) Save returns a string. According to the comments in the game code, it's "The string to be saved." I don't know how the load event is supposed to do anything with that string, because it isn't passed as part of the event. Therefore, as you noticed, my load handler doesn't do anything with it.

5. Comparing your event handler with the standard it seems you are missing:
Code:
bDummy = false
I have no idea what bDummy does. Can you enlighten me at all?

bDummy is renamed in my code to bMultiPlayer. I forget where I got that from, but someone seems to have decided that's what it means, so I figured I'd use the more informative name. I'm not actually 100% certain that the new name is more correct. It might just be that I copied someone else's mistake.
 
goodyhut said:
As I posted in the main Creation & customization forum, I wish to add this mod with the sdksixmapsizes mod (http://www.civfanatics.net/uploads11/sdksixmapsizes.zip) and the civmore mod (http://download.filefront.com/50530...5306046efb1599a19702e641378bf8e8059120a3cb82). Could somebody please explain in detail what I need to do to merge these?

I was able to successfully merge this mod into CivMore! Civ4lerts will be included in my next release of CivMore!

@Dr Elmer Jiggle: I must say, I am quite impressed! Merging your mod was about as simple as they come! Move a couple files, check a few potential conflicts (of which all checked out), and it was up and running! Beautiful! Keep up the good work!
 
fitchn said:
I was able to successfully merge this mod into CivMore! Civ4lerts will be included in my next release of CivMore!

@Dr Elmer Jiggle: I must say, I am quite impressed! Merging your mod was about as simple as they come! Move a couple files, check a few potential conflicts (of which all checked out), and it was up and running! Beautiful! Keep up the good work!

Awesome! You rock man!
 
I am probably over analyzing this thing but I am looking at bDummy. In the original file it is a local variable. Seemingly used as a placeholder only. (at least as far as I can tell). For some reason they set it to false before using it.. as follows:

Code:
bDummy = false
self.bDbg, bDummy, self.bAlt, self.bCtrl, self.bShift, self.bAllowCheats = argsList[idx:]

Does anyone know if deleteing the bDummy = false line would have any negative effect on the code? The variable goes out of scope quickly and is never used again. The only thing I can think of is that since the argument list is variable it helps somehow to make bDummy a boolean explicitly.

Now in Alerts, you changed bDummy to self.bMultiPlayer. I think that makes it a data attribute, so now it is part of the class instance. Also it was not initialized to anything in __init__ as is the standard for data attributes.

So, since it doesn't seem to be used, I think it is best to leave it as a dummy and also not make it a data atribute. I am a python noob, probably making a mountain out of a molehill.
 
pholtz said:
So, since it doesn't seem to be used, I think it is best to leave it as a dummy and also not make it a data atribute. I am a python noob, probably making a mountain out of a molehill.

It isn't used directly by the event manager, but it can be used by event handlers (assuming someone actually knows what it means). I can't remember where I got the bMultiPlayer name, but I know I didn't make it up myself, so that means somebody somewhere is using it for something.

As far as initializing it, it obviously wouldn't hurt, but I don't think it's necessary. All of those variables only make sense in the context of handling an event, and since all events go through the handleEvent function first, the variables will be initialized before they're used.

Initializing them first in the constructor is probably good general practice, but it's really redundant in this case. I have no idea why they set bDummy to false. That just looks stupid. ;) I mean, it's essentially identical to:

Code:
x = 2
x = y * 3
 
I am currently playing HoF-Mod and I don't know if I am doing something wrong or if I just trapped somewhere but after one of my cities reached "legendary" status I got the message "<cities> cultural borders will expand next round" each turn. What must I do?

(... and thanks for the nice mod :))
 
HolyHandGrenade said:
I am currently playing HoF-Mod and I don't know if I am doing something wrong or if I just trapped somewhere but after one of my cities reached "legendary" status I got the message "<cities> cultural borders will expand next round" each turn. What must I do?

The cultural border expansion warning is something they added in the HoF mod. I didn't write that code myself, so I'm not sure exactly what would cause it. I've noticed a similar problem with the city growth warnings when you have "stagnate growth" turned on, but I doubt that's related.

One simple workaround might be to just go to the options screen and turn off that warning for a while.

You should probably report this in the HoF mod thread. It does sound like a bug.
 
Dr Elmer Jiggle said:
The cultural border expansion warning is something they added in the HoF mod. I didn't write that code myself, so I'm not sure exactly what would cause it. I've noticed a similar problem with the city growth warnings when you have "stagnate growth" turned on, but I doubt that's related.

I noticed this behaviour too.:(

Dr Elmer Jiggle said:
One simple workaround might be to just go to the options screen and turn off that warning for a while.

Nice idea, but I normally don't play OCC - so switching off this message means switching it off for ALL citites - not only the one causing the problem.

Dr Elmer Jiggle said:
You should probably report this in the HoF mod thread. It does sound like a bug.

Ok - I will do this - thx
 
I just wanted to post further on the MP issues..

I got this to work in SP but of course in MP it doesnt work

when I tried to use it in MP in Fitchn's CivMore Mod version .40

http://forums.civfanatics.com/showthread.php?t=163596

Any non-host human player would get no interface


I also tried to merge this with Fitchn's earlier version .30

and got slightly better results (but still not working correctly)


Any non-host human player would not get the "Dawn of Man" pop up at the start of the game... and could not name/rename cities created..


dont know if your working on this anymore... but I figured I'd provide more info on it...


...and possibly get any suggestions to fix this problem? :mischief:

I really like this mod component... but since I play almost all my games in MP... I cant use it :sad:


NOTE: This mod works fine in SP.... :rolleyes:
 
If someone comes up with a fix for multiplayer, I would merge that in with my source code, but since I only do single player myself, a) there's not much likelihood that I'll be able to figure it out on my own and b) it's not very high on my priority list. Theoretically, I'd like to get it working just for the personal satisfaction of being able to say that it works, but in practice it's not something that really affects me enough to do much about it.

FWIW, the Hall of Fame mod has an improved version of this mod, but I doubt any of the changes they made would have any impact on multiplayer use.
 
There is a good thread here about causing and avoiding OOS errors when coding with python in Civ4.

Its a good read and it wouldn't hurt any python modder to read through it. :)
 
Okay, I am trying to add a half dozen componants to my mod, and I just can't get this one to work. I have checked and rechecked the additions of files, but since I am NOT a python programmer, I am not sure if some other mod is conflicting with this one to cancel it out.

What are some conflicts (as mentioned earlier) of lines that I should pay attention to?

Thanks for any feedback.
 
What sort of problems are you having? If you give a little specific info I'm sure someone can help you.
 
Back
Top Bottom