Creatures in War [CIW] [Mod in the making] [Need some support and ideas]

Skaven Cuirassier (LEFT), Cavalry (DOWN-RIGHT) and WW1 Cavalry (UP-RIGHT)

skaven_mount.png


Image - http://s15.postimg.org/wyzm2jmcp/skaven_mount.png
 
I'm not getting either of the cavalry images to load.
 
It is more about what is written in CvEventManager.
Check line 485 and 828 or whatever is in your onBeginPlayerTurn and onUnitBuilt
 
It is more about what is written in CvEventManager.
Check line 485 and 828 or whatever is in your onBeginPlayerTurn and onUnitBuilt

Yeah you need to provide a begin line and and end line so anyone looking at your problem as above knows what you have there, ALL CvEventManagers are NOT alike, infact in C2C, we dont even use the CvEventManager. ie" (see below Make sure you put it in a code tag also, thx.)

This is JUST an "example" not real

Code:
def configure(logging=None, noLogEvents=None):
	"""Sets the global event manager's logging options."""
	if g_eventManager:
		g_eventManager.setLogging(logging)
		g_eventManager.setNoLogEvents(noLogEvents)
	else:
		BugUtil.error("BugEventManager - BugEventManager not setup before configure()")
 
It is more about what is written in CvEventManager.
Check line 485 and 828 or whatever is in your onBeginPlayerTurn and onUnitBuilt

obsoleteTech = gc.getBuildingInfo(b_Topkapi).getObsoleteTech() <-- LINE 485 in CvEventManager

First Spoiler (478 - 508 lines).
Spoiler :
PHP:
## Topkapi Palace Start ##

		pPlayer = gc.getPlayer(iPlayer)
		iTeam = pPlayer.getTeam()
		pTeam = gc.getTeam(iTeam)

		b_Topkapi = gc.getInfoTypeForString("BUILDING_TOPKAPI_PALACE")
		obsoleteTech = gc.getBuildingInfo(b_Topkapi).getObsoleteTech()

		if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
			for iCity in range(pPlayer.getNumCities()):
				ppCity = pPlayer.getCity(iCity)
				if ppCity.getNumActiveBuilding(b_Topkapi) == true:

					for iPlayer in range(gc.getMAX_PLAYERS()):
						ppPlayer = gc.getPlayer(iPlayer)
						if ( (ppPlayer.isAlive()==true) and (ppPlayer.isBarbarian()==false) ):
							if ( gc.getTeam(ppPlayer.getTeam()).isVassal(iTeam) == true ):

								iGold = ppPlayer.getGold( )
								if ppPlayer.getGold( ) >= 5000:
									ppPlayer.changeGold( 50 )
								if ppPlayer.getGold( ) < 5000:
									if ppPlayer.getGold( ) >= 100:
										ppPlayer.changeGold( iGold//50 )
									else:
										ppPlayer.changeGold( 2 )

								ppPlayer.changeCombatExperience( +1 )
	
## Topkapi Palace End ##

obsoleteTech = gc.getBuildingInfo(b_BUILDING_TOPKAPI).getObsoleteTech() <-- 828 line in CvEventManager

Second Spoiler (820 - 861 lines)
Spoiler :
PHP:
## Topkapi Palace Start ##

		pCity = argsList[0]
		pUnit = argsList[1]
		pPlayer = gc.getPlayer(pUnit.getOwner())
		iUnitType = pUnit.getUnitType()

		b_BUILDING_TOPKAPI = gc.getInfoTypeForString("BUILDING_TOPKAPI_PALACE")
		obsoleteTech = gc.getBuildingInfo(b_BUILDING_TOPKAPI).getObsoleteTech()
		if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
			topkapi = false
			for iCity in range(pPlayer.getNumCities()):
				if topkapi == false:
					ppCity = pPlayer.getCity(iCity)
					if ppCity.getNumActiveBuilding(b_BUILDING_TOPKAPI) == true:
						topkapi = true
			if ( topkapi == true ):
				iTeam = pPlayer.getTeam()
				pTeam = gc.getTeam(iTeam)
				l_vassalUB = []
				for iPlayer in range(gc.getMAX_PLAYERS()):
					ppPlayer = gc.getPlayer(iPlayer)
					if ( (ppPlayer.isAlive()==true) and (ppPlayer.isBarbarian()==false) ):
						if ( gc.getTeam(ppPlayer.getTeam()).isVassal(iTeam) == true ):
							civ_type = gc.getPlayer(iPlayer).getCivilizationType()
							for iUnit in range(gc.getNumUnitClassInfos()):
								iUniqueUnit = gc.getCivilizationInfo(civ_type).getCivilizationUnits(iUnit);
								iDefaultUnit = gc.getUnitClassInfo(iUnit).getDefaultUnitIndex();
								if (iDefaultUnit > -1 and iUniqueUnit > -1 and iDefaultUnit != iUniqueUnit):
									if ( iUnitType == iDefaultUnit ):
										l_vassalUB.append(iUniqueUnit)
				if ( len(l_vassalUB) >= 1 ):
					self.iVassalUUChance = self.getRandomNumber( 4 )
					if self.iVassalUUChance == 0:
						chance = CyGame().getSorenRandNum(len(l_vassalUB), "Random for UB")
						iX = pUnit.getX()
						iY = pUnit.getY()
						pNewUnit = pPlayer.initUnit( l_vassalUB[chance], iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION )
						pNewUnit.convert(pUnit)


## Topkapi Palace End ##

I was copied this, from some python component (I think from here) before few months (i do that in notepad or notepad++, I forgot).

Last, what i worked, its was The_J Civil War, but these codes, i was edited in Microsoft Visual Studio 2010. Before that i worked in Notepad++, and i get errors, which is The_J fix.

Yeah you need to provide a begin line and and end line so anyone looking at your problem as above knows what you have there, ALL CvEventManagers are NOT alike, infact in C2C, we dont even use the CvEventManager. ie" (see below Make sure you put it in a code tag also, thx.)

This is JUST an "example" not real

Code:
def configure(logging=None, noLogEvents=None):
	"""Sets the global event manager's logging options."""
	if g_eventManager:
		g_eventManager.setLogging(logging)
		g_eventManager.setNoLogEvents(noLogEvents)
	else:
		BugUtil.error("BugEventManager - BugEventManager not setup before configure()")

I copied all codes where is problem in First and Second spoiler. Maybe some space or newline real problem here.

Zlatko,

i guess your error has something to do with some building maybe - or some code that have "obseletetech" xml tag - maybe you are missing a "NONE" and you have something like this :
></ instead of >NONE</

I am found 37 " ></ " in my CIV4BuildingInfos.xml and they are next tags:

<Strategy></Strategy>
<ConstructSound></ConstructSound>
<HotKey></HotKey>
<ProductionTraits></ProductionTraits>
<BonusHappinessChanges></BonusHappinessChanges>
<BonusProductionModifiers></BonusProductionModifiers>
<FreePromotion></FreePromotion>
<UnitCombatFreeExperiences></UnitCombatFreeExperiences>
<DomainProductionModifiers></DomainProductionModifiers>
<PrereqBuildingClasses></PrereqBuildingClasses>
<SpecialistCounts></SpecialistCounts>
<SpecialistYieldChanges></SpecialistYieldChanges>
<Help></Help>
<Bonus></Bonus>
<FreeBonus></FreeBonus>

Might as well be that there's a simple check for existence is missing at some point.

Surely something is missing. But what?

I am upload my CvEventManager.py.
 

Attachments

<Strategy></Strategy>
<ConstructSound></ConstructSound>
<HotKey></HotKey>
<ProductionTraits></ProductionTraits>
<BonusHappinessChanges></BonusHappinessChanges>
<BonusProductionModifiers></BonusProductionModifiers>
<FreePromotion></FreePromotion>
<UnitCombatFreeExperiences></UnitCombatFreeExperiences>
<DomainProductionModifiers></DomainProductionModifiers>
<PrereqBuildingClasses></PrereqBuildingClasses>
<SpecialistCounts></SpecialistCounts>
<SpecialistYieldChanges></SpecialistYieldChanges>
<Help></Help>
<Bonus></Bonus>
<FreeBonus></FreeBonus>

you must add proper tags to all of them - compare to other buildings, and fill them all.
its making you have errors for sure.
look for this in more files.
 
you must add proper tags to all of them - compare to other buildings, and fill them all.
its making you have errors for sure.
look for this in more files.

It's always worked with this. Okay, i will change <Strategy></Strategy> to <Strategy/> and etc. Thank you.
 
The first thing you should look at is do you in fact have a building with a Type tag that is exactly BUILDING_TOPKAPI_PALACE?

You can't very well look up the obsolete tech value for a building type that does not exist.
 
The first thing you should look at is do you in fact have a building with a Type tag that is exactly BUILDING_TOPKAPI_PALACE?

You can't very well look up the obsolete tech value for a building type that does not exist.

I did not have TOPKAPI in my XML files.

I put everything again, and its work. I think on Topkapi.

Do you really some buildings which are not in XML, but they are in some .py, can make problem like this?
 
HEY,

the problem you see is only in the xml.

somewhere in you mod , you have a bad xml tag - either something is missing, or written wrongfully.
maybe debug dll code can help you more - either that or you better start removing things one by one till the errors goes away and youll find the problem.

its hard work :(
 
HEY,

the problem you see is only in the xml.

somewhere in you mod , you have a bad xml tag - either something is missing, or written wrongfully.
maybe debug dll code can help you more - either that or you better start removing things one by one till the errors goes away and youll find the problem.

its hard work :(

Thank you for advice. I am fix current error, and all is working. Earlier are happening that, when i go end turn, my turn are never finish.
 
Back
Top Bottom