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

then you meed a debug file that will tell you what is the error.

I am fix this error (turn never finish).

Which file? I haven't source files, my mod use only 50 players core from HERE.
 
i understand.

well, i hope you fix the problem. its something in your xml :)

Yesterday, when i testing mod, my game are crash.

I am upgrade my units in rifleman and cannons few turns earlier, and when my units come to rival border and when i declare war my game are crash. I am looking for errors now. I hate errors.

Now i will look all tags " ></ " in all xml and fix it, maybe it's that cause, this new error.
 
What mean these tags

<iPopulationThreshold>51</iPopulationThreshold>
<bCityVoting>0</bCityVoting>
<bCivVoting>0</bCivVoting>

in Voteinfo.xml?
 
hi,

<Strategy></Strategy> --> <Strategy>NONE</Strategy> or <Strategy/>
you should do this:
<Strategy>NONE</Strategy> i think, but other ptopns is good also. just not ><.

im sorry i cant help with vote - i dont know it very well.


***
errors are bad - i hate them also :)
i had a lot of error then - i decided to learn how to fix so i read this:
http://forums.civfanatics.com/showthread.php?t=405444

learn how to create a debug dll, when you have an error in game this will say what is wrong.
 
Thank you. I must to do total reconstruction of mod, because i have lots of errors (i am start with poor experience in moding than now), crowded with stupid units, building, etc. I will do reconstruction for one-two day. I will use platy works later. I late with my plans..

My mod is not balanced, and it's now hard to play and do not give gameplay pleasure.
 
i see,

good luck then,

i recommend you build the mod on kmod, it will give you better ai and autoplay to test your game for stability and errors.

build it slow and safe - think about balance as you go, dont just push stuff :) look at other mods how they are built - i use a very stable balanced unit tech tree progress, you can check my mods out.

im sure at the end youll do a great mod.

good luck, im here if you have problems ill try to help as much as i can -im very busy :)
 
i see,

good luck then,

i recommend you build the mod on kmod, it will give you better ai and autoplay to test your game for stability and errors.

build it slow and safe - think about balance as you go, dont just push stuff :) look at other mods how they are built - i use a very stable balanced unit tech tree progress, you can check my mods out.

im sure at the end youll do a great mod.

good luck, im here if you have problems ill try to help as much as i can -im very busy :)

Ok, thank you very much.

But, if I in some script do THIS, can i get errors?
 
i think "NONE" will cause errors - just delete all the lines that contain the feature you don't want.

look in other mods how they deleted or added lines like that in the map generator.

Agreed, no need for that line at all infact, just the stuff you need there.
 
I want to import NUKES from "Rise of Mankind: A New Dawn" no patched version.

This is one file which i found. I really don't know much about python, i know "C" language just, but some codes from files i can understand what mean but i don't know to write yet.

Me interesting what mean something for begin:

1) What mean:

import CvEventInterface
import CvUtil
import Popup as PyPopup
import SdToolKit
import PyHelpers


2) Can someone help me how to make this workable in my mod what i must to do?

This spoiler below is script which i found in Python\Civ Fuehrer\NukeAfterEffects.py

NukeAfterEffects.py:

Spoiler :
PHP:
from CvPythonExtensions import *
import CvEventInterface
import CvUtil
import Popup as PyPopup
import SdToolKit
import PyHelpers

import CvGameUtils
import BugOptions
import BugCore
import BugUtil
import OOSLogger
import PlayerUtil

BugUtil.fixSets(globals())

gc = CyGlobalContext()
localText = CyTranslator()
PyPlayer = PyHelpers.PyPlayer
PyInfo = PyHelpers.PyInfo
PyCity = PyHelpers.PyCity
PyGame = PyHelpers.PyGame

SD_MOD_ID = "RiseOfMankind"

g_modEventManager = None
g_eventMgr = None
g_autolog = None

class NukeAfterEffects:
	def __init__(self, eventManager):

		self.__LOG_IMPROVEMENT =0

		eventManager.addEventHandler("nukeExplosion", self.onNukeExplosion)
		eventManager.addEventHandler("improvementBuilt", self.onImprovementBuilt)

		global g_modEventManager
		g_modEventManager = self
		
		#global g_autolog
		#g_autolog = autolog.autologInstance()
		
		global g_eventMgr
		g_eventMgr = eventManager
		self.eventManager = eventManager

	def onImprovementBuilt(self, argsList):
		'Improvement Built'
		iImprovement, iX, iY = argsList
###AdvancedNukesbegin###
		pPlot = CyMap().plot(iX,iY)
		if (gc.getInfoTypeForStringWithHiddenAssert("IMPROVEMENT_SANITIZE_WATER") > 0):
			if(iImprovement==gc.getInfoTypeForString('IMPROVEMENT_SANITIZE_WATER')):
				pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
				pPlot.setImprovementType(-1)
###AdvancedNukesend###
			if (not self.__LOG_IMPROVEMENT):
				return
			CvUtil.pyPrint('Improvement %s was built at %d, %d'
				%(PyInfo.ImprovementInfo(iImprovement).getDescription(), iX, iY))

	def onNukeExplosion(self, argsList):
		'Nuke Explosion'
		pPlot, pNukeUnit = argsList
###AdvancedNukesbegin###
		if (gc.getInfoTypeForStringWithHiddenAssert("UNIT_TURN") > 0):
			if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_TURN')):
				if (pPlot.isCity()==true):
					iPlayer = pNukeUnit.getOwner()
					pPlayer = gc.getPlayer(iPlayer)
					pCity = pPlot.getPlotCity()
					pPlayer.acquireCity(pCity,false,false)
					iX = pPlot.getX()
					iY = pPlot.getY()
					for iiX in range(iX-1, iX+2, 1):
						for iiY in range(iY-1, iY+2, 1):
							numUnits = pPlot.getNumUnits()
							for e in xrange(numUnits,0,-1):
									pUnit = pPlot.getUnit(e)
									pUnit.kill(false, -1)  
							pNukedPlot = CyMap().plot(iiX,iiY)
							if (pNukedPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FALLOUT')):
								pNukedPlot.setFeatureType(-1, -1)
	###AdvancedNukesend###
			CvUtil.pyPrint('Nuke detonated at %d, %d'
				%(pPlot.getX(), pPlot.getY()))
###AdvancedNukesbegin###
		if (gc.getInfoTypeForStringWithHiddenAssert("UNIT_FUSION_NUKE") > 0):
			if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_FUSION_NUKE')):

							
				iX = pPlot.getX()
				iY = pPlot.getY()

				for iXLoop in range(iX - 0, iX + 1, 1):
					for iYLoop in range(iY - 0, iY + 1, 1):
							pPlot = CyMap().plot(iXLoop, iYLoop)
							if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)):
								pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
							
		if (gc.getInfoTypeForStringWithHiddenAssert("UNIT_FUSION_NOVA") > 0):
			if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_FUSION_NOVA')):

							
				iX = pPlot.getX()
				iY = pPlot.getY()

				for iXLoop in range(iX - 1, iX + 2, 1):
					for iYLoop in range(iY - 1, iY + 2, 1):
							pPlot = CyMap().plot(iXLoop, iYLoop)
							if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)):
								pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
							
		if (gc.getInfoTypeForStringWithHiddenAssert("UNIT_POISON_NUKE") > 0):
			if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_POISON_NUKE')):
				iX = pPlot.getX()
				iY = pPlot.getY()
				for iXLoop in range(iX - 1, iX + 2, 1):
					for iYLoop in range(iY - 1, iY + 2, 1):
							pPlot = CyMap().plot(iXLoop, iYLoop)
							pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_BIOGAS" ), 1)
							if ( pPlot.isWater()==true  ):
								pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_SLIMY_COAST" ), 1, 1)
		
		if (gc.getInfoTypeForStringWithHiddenAssert("UNIT_POISON_NOVA") > 0):
			if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_POISON_NOVA')):
				iX = pPlot.getX()
				iY = pPlot.getY()
				for iXLoop in range(iX - 5, iX + 6, 1):
					for iYLoop in range(iY - 5, iY + 6, 1):
							pPlot = CyMap().plot(iXLoop, iYLoop)
							pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_PLAGUEGAS" ), 1)
							if ( pPlot.isWater()==true  ):
								pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_SLIMY_OCEAN" ), 1, 1)

###AdvancedNukesend###
 
Some parts of the code looks problematic to me though.

Code:
pPlot = CyMap().plot(iXLoop, iYLoop) 
if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)): 
       pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True) 
pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
You are turning a Peak/Hill Plot into a Land Plot
Then you turn it into a Coast Terrain?
100% CTD when there are things there.
 
Some parts of the code looks problematic to me though.

Code:
pPlot = CyMap().plot(iXLoop, iYLoop) 
if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)): 
       pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True) 
pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
You are turning a Peak/Hill Plot into a Land Plot
Then you turn it into a Coast Terrain?
100% CTD when there are things there.

I don't understand this: "100% CTD when there are things there. "

What you advice to me? Only NukeAfterEffects.py have codes for advanced nukes.

Do I copy only this script in my mod, +copy terrain/feature from this mod of course?

I will copy that. And i will post result here, i hope that don't use SDK.
 
In other words, the code has errors and will cause crash to desktop.
Don't import it into your mod.
 
In other words, the code has errors and will cause crash to desktop.
Don't import it into your mod.

I am make backup of my mod, I read late notice, i am import about half component :(

I am found same files HERE.

This mod component is not classic mod components as your?
 
Nope, nothing to do with me.

I am put all from HERE removes some extra tags (tags which not in BTS), but nukes haven't their effects (think on advanced nukes) :dunno: i am import this script below

NukeAfterEffects:
Spoiler :
PHP:
from CvPythonExtensions import *
import CvEventInterface
import CvUtil
import Popup as PyPopup
import SdToolKit
import PyHelpers

import CvGameUtils
import BugOptions
import BugCore
import BugUtil
import OOSLogger
import PlayerUtil

BugUtil.fixSets(globals())

gc = CyGlobalContext()
localText = CyTranslator()
PyPlayer = PyHelpers.PyPlayer
PyInfo = PyHelpers.PyInfo
PyCity = PyHelpers.PyCity
PyGame = PyHelpers.PyGame

SD_MOD_ID = "RiseOfMankind"

g_modEventManager = None
g_eventMgr = None
g_autolog = None

class NukeAfterEffects:
	def __init__(self, eventManager):

		self.__LOG_IMPROVEMENT =0

		eventManager.addEventHandler("nukeExplosion", self.onNukeExplosion)
		eventManager.addEventHandler("improvementBuilt", self.onImprovementBuilt)

		global g_modEventManager
		g_modEventManager = self
		
		#global g_autolog
		#g_autolog = autolog.autologInstance()
		
		global g_eventMgr
		g_eventMgr = eventManager
		self.eventManager = eventManager

	def onImprovementBuilt(self, argsList):
		'Improvement Built'
		iImprovement, iX, iY = argsList
###AdvancedNukesbegin###
		pPlot = CyMap().plot(iX,iY)
		if(iImprovement==gc.getInfoTypeForString('IMPROVEMENT_SANITIZE_WATER')):
			pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
			pPlot.setImprovementType(-1)
###AdvancedNukesend###
		if (not self.__LOG_IMPROVEMENT):
			return
		CvUtil.pyPrint('Improvement %s was built at %d, %d'
			%(PyInfo.ImprovementInfo(iImprovement).getDescription(), iX, iY))

	def onNukeExplosion(self, argsList):
		'Nuke Explosion'
		pPlot, pNukeUnit = argsList
###AdvancedNukesbegin###
		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_TURN')):
			if (pPlot.isCity()==true):
				iPlayer = pNukeUnit.getOwner()
				pPlayer = gc.getPlayer(iPlayer)
				pCity = pPlot.getPlotCity()
				pPlayer.acquireCity(pCity,false,false)
				iX = pPlot.getX()
				iY = pPlot.getY()
				for iiX in range(iX-1, iX+2, 1):
					for iiY in range(iY-1, iY+2, 1):
						numUnits = pPlot.getNumUnits()
						for e in xrange(numUnits,0,-1):
	       						pUnit = pPlot.getUnit(e)
	       						pUnit.kill(false, -1)  
						pNukedPlot = CyMap().plot(iiX,iiY)
						if (pNukedPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FALLOUT')):
							pNukedPlot.setFeatureType(-1, -1)
###AdvancedNukesend###
		CvUtil.pyPrint('Nuke detonated at %d, %d'
			%(pPlot.getX(), pPlot.getY()))
###AdvancedNukesbegin###		
		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_FUSION_NUKE')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 0, iX + 1, 1):
				for iYLoop in range(iY - 0, iY + 1, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)):
							pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
						pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)

		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_FUSION_NOVA')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 1, iX + 2, 1):
				for iYLoop in range(iY - 1, iY + 2, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)):
							pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
						pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)

		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_POISON_NUKE')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 1, iX + 2, 1):
				for iYLoop in range(iY - 1, iY + 2, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_BIOGAS" ), 1)
						if ( pPlot.isWater()==true  ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_SLIMY_COAST" ), 1, 1)

		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_POISON_NOVA')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 5, iX + 6, 1):
				for iYLoop in range(iY - 5, iY + 6, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_PLAGUEGAS" ), 1)
						if ( pPlot.isWater()==true  ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_SLIMY_OCEAN" ), 1, 1)

###AdvancedNukesend###

Maybe to rename this: SD_MOD_ID = "RiseOfMankind" ?
 
I am put all from HERE removes some extra tags (tags which not in BTS), but nukes haven't their effects (think on advanced nukes) :dunno: i am import this script below

NukeAfterEffects:
Spoiler :
PHP:
from CvPythonExtensions import *
import CvEventInterface
import CvUtil
import Popup as PyPopup
import SdToolKit
import PyHelpers

import CvGameUtils
import BugOptions
import BugCore
import BugUtil
import OOSLogger
import PlayerUtil

BugUtil.fixSets(globals())

gc = CyGlobalContext()
localText = CyTranslator()
PyPlayer = PyHelpers.PyPlayer
PyInfo = PyHelpers.PyInfo
PyCity = PyHelpers.PyCity
PyGame = PyHelpers.PyGame

SD_MOD_ID = "RiseOfMankind"

g_modEventManager = None
g_eventMgr = None
g_autolog = None

class NukeAfterEffects:
	def __init__(self, eventManager):

		self.__LOG_IMPROVEMENT =0

		eventManager.addEventHandler("nukeExplosion", self.onNukeExplosion)
		eventManager.addEventHandler("improvementBuilt", self.onImprovementBuilt)

		global g_modEventManager
		g_modEventManager = self
		
		#global g_autolog
		#g_autolog = autolog.autologInstance()
		
		global g_eventMgr
		g_eventMgr = eventManager
		self.eventManager = eventManager

	def onImprovementBuilt(self, argsList):
		'Improvement Built'
		iImprovement, iX, iY = argsList
###AdvancedNukesbegin###
		pPlot = CyMap().plot(iX,iY)
		if(iImprovement==gc.getInfoTypeForString('IMPROVEMENT_SANITIZE_WATER')):
			pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)
			pPlot.setImprovementType(-1)
###AdvancedNukesend###
		if (not self.__LOG_IMPROVEMENT):
			return
		CvUtil.pyPrint('Improvement %s was built at %d, %d'
			%(PyInfo.ImprovementInfo(iImprovement).getDescription(), iX, iY))

	def onNukeExplosion(self, argsList):
		'Nuke Explosion'
		pPlot, pNukeUnit = argsList
###AdvancedNukesbegin###
		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_TURN')):
			if (pPlot.isCity()==true):
				iPlayer = pNukeUnit.getOwner()
				pPlayer = gc.getPlayer(iPlayer)
				pCity = pPlot.getPlotCity()
				pPlayer.acquireCity(pCity,false,false)
				iX = pPlot.getX()
				iY = pPlot.getY()
				for iiX in range(iX-1, iX+2, 1):
					for iiY in range(iY-1, iY+2, 1):
						numUnits = pPlot.getNumUnits()
						for e in xrange(numUnits,0,-1):
	       						pUnit = pPlot.getUnit(e)
	       						pUnit.kill(false, -1)  
						pNukedPlot = CyMap().plot(iiX,iiY)
						if (pNukedPlot.getFeatureType() == gc.getInfoTypeForString('FEATURE_FALLOUT')):
							pNukedPlot.setFeatureType(-1, -1)
###AdvancedNukesend###
		CvUtil.pyPrint('Nuke detonated at %d, %d'
			%(pPlot.getX(), pPlot.getY()))
###AdvancedNukesbegin###		
		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_FUSION_NUKE')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 0, iX + 1, 1):
				for iYLoop in range(iY - 0, iY + 1, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)):
							pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
						pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)

		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_FUSION_NOVA')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 1, iX + 2, 1):
				for iYLoop in range(iY - 1, iY + 2, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						if (( pPlot.isPeak()==true  ) or (pPlot.isHills()==true)):
							pPlot.setPlotType(PlotTypes.PLOT_LAND, True, True)
						pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_COAST" ), 1, 1)

		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_POISON_NUKE')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 1, iX + 2, 1):
				for iYLoop in range(iY - 1, iY + 2, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_BIOGAS" ), 1)
						if ( pPlot.isWater()==true  ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_SLIMY_COAST" ), 1, 1)

		if (pNukeUnit is not None and pNukeUnit.getUnitType() == gc.getInfoTypeForString('UNIT_POISON_NOVA')):

                        
			iX = pPlot.getX()
			iY = pPlot.getY()

			for iXLoop in range(iX - 5, iX + 6, 1):
				for iYLoop in range(iY - 5, iY + 6, 1):
						pPlot = CyMap().plot(iXLoop, iYLoop)
						pPlot.setFeatureType(gc.getInfoTypeForString( "FEATURE_PLAGUEGAS" ), 1)
						if ( pPlot.isWater()==true  ):
							pPlot.setTerrainType(gc.getInfoTypeForString( "TERRAIN_SLIMY_OCEAN" ), 1, 1)

###AdvancedNukesend###

Maybe to rename this: SD_MOD_ID = "RiseOfMankind" ?

Name of the mod is important, but i dont know for sure on this part. Cant hurt.
 
Back
Top Bottom