Quick Modding Questions Thread

Cheers

#include <boost/python/enum.hpp>

does this track from some other file... because the bts version and my version look the same now, and still a problem, so I am thinking that this include is connecting to or from another file that I must have broken some how.. I just do not know which file would be connected to it..

in CyEnumsInterface.cpp, the 5th line reads
Code:
# include <boost/python/enum.hpp>

Just thinking out loud...
 
I have some problems, i am upload images.

First image: i get this, when open Tech Adv (F6)

Second image: i get this error during game, i am remove all BTS civs and add my civs.

Third image: i get this error during loading mod.

How to fix this?
 

Attachments

  • tech_nova_error.JPG
    tech_nova_error.JPG
    39.2 KB · Views: 87
  • zulu_err.JPG
    zulu_err.JPG
    15.3 KB · Views: 56
  • error_some.JPG
    error_some.JPG
    23.9 KB · Views: 73
For problem 2: You removed the default civs, but somewhere there is something linking to them. Are you using a custom map?

I can't solve problems 1 or 3.
 
I have some problems, i am upload images.

First image: i get this, when open Tech Adv (F6)

Second image: i get this error during game, i am remove all BTS civs and add my civs.

Third image: i get this error during loading mod.

How to fix this?

1) These are python errors but may have to do with bad or rather, conflicting, xml. Make sure your techs are not sharing the same x and y positions. That's one possibility. I'm terrible at debugging python so perhaps someone who can read the python error logs you should've gotten from that 'event' could be more helpful.

2) You're still referring to the original civs elsewhere in your xml files. I would use grepwin to search your assets for the references they're giving you that aren't being 'found'. We know why they aren't being found - because you removed them from the file set - what we don't know from this report is where we've still got an expectation they should be there. You may (and probably will) find that there's a whole portion of the xml that commonly calls for civilization references that you'll want to update to the new civilizations you've put into your file set so this is just a growing pain and it's been kind enough to guide you towards the fix.

3) The dll is making a call for a sound file that is at this point apparently missing. I'd hunt down where it was but I warn that there may be some odd things about loading sound files I'm not fully aware of. This may demand that you either specify a different sound byte to call there or recover the original file it was in. You MIGHT be able to move that sound file to a new folder location within the mod without trouble - not sure though.
 
Nothing to do with the xml.
It is simply as it states.
Trying to get information from something non existent
 
I am forget to post this error messages, sorry.

Code:
Assert Failed

File:  CvGlobals.cpp
Line:  4226
Expression:  strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  info type CIVILIZATION_AMERICA not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml

----------------------------------------------------------

For problem 2: You removed the default civs, but somewhere there is something linking to them. Are you using a custom map?

I can't solve problems 1 or 3.

Yes, i am remove and add new, and again get error, i haven't any map folder in my mod.

1) These are python errors but may have to do with bad or rather, conflicting, xml. Make sure your techs are not sharing the same x and y positions. That's one possibility. I'm terrible at debugging python so perhaps someone who can read the python error logs you should've gotten from that 'event' could be more helpful.

2) You're still referring to the original civs elsewhere in your xml files. I would use grepwin to search your assets for the references they're giving you that aren't being 'found'. We know why they aren't being found - because you removed them from the file set - what we don't know from this report is where we've still got an expectation they should be there. You may (and probably will) find that there's a whole portion of the xml that commonly calls for civilization references that you'll want to update to the new civilizations you've put into your file set so this is just a growing pain and it's been kind enough to guide you towards the fix.

3) The dll is making a call for a sound file that is at this point apparently missing. I'd hunt down where it was but I warn that there may be some odd things about loading sound files I'm not fully aware of. This may demand that you either specify a different sound byte to call there or recover the original file it was in. You MIGHT be able to move that sound file to a new folder location within the mod without trouble - not sure though.

1) Solved, full answered to Platy, below.

2) I can't find any bts civ in my folder i have only art file of that civs but that don't cause problem (tested already).

3) I do that, this sound is from Civilization 4 no expansion (no BTS) + i am copy file from Civ4 to my sound folder and i again get debug error, please look:

Audio2Dscripts:
Spoiler :
Code:
	<Script2DSound>
		<ScriptID>AS2D_CLOUDWIND</ScriptID>
		<SoundID>SND_CLOUDWIND</SoundID>
		<SoundType>GAME_AMBIENCE</SoundType>
		<iMinVolume>35</iMinVolume>
		<iMaxVolume>35</iMaxVolume>
		<iPitchChangeDown>0</iPitchChangeDown>
		<iPitchChangeUp>0</iPitchChangeUp>
		<iMinLeftPan>-1</iMinLeftPan>
		<iMaxLeftPan>-1</iMaxLeftPan>
		<iMinRightPan>-1</iMinRightPan>
		<iMaxRightPan>-1</iMaxRightPan>
		<bLooping>1</bLooping>
		<iMinTimeDelay>0</iMinTimeDelay>
		<iMaxTimeDelay>0</iMaxTimeDelay>
		<bTaperForSoundtracks>0</bTaperForSoundtracks>
		<iLengthOfSound>0</iLengthOfSound>
		<fMinDryLevel>1.0</fMinDryLevel>
		<fMaxDryLevel>1.0</fMaxDryLevel>
		<fMinWetLevel>0.0</fMinWetLevel>
		<fMaxWetLevel>0.0</fMaxWetLevel>
		<iNotPlayPercent>0</iNotPlayPercent>
	</Script2DSound>

AudioDefines:
Spoiler :
Code:
		<SoundData>
			<SoundID>SND_CLOUDWIND</SoundID>
			<Filename>Sounds/Ambient/BedClouds</Filename>
			<LoadType>STREAMED</LoadType>
			<bIsCompressed>1</bIsCompressed>
			<bInGeneric>1</bInGeneric>
		</SoundData>

Some my fantasy features use this sound:
Spoiler :
Code:
		<FeatureInfo>
			<Type>FEATURE_CARBONICE</Type>
			<Description>Carbon Ice</Description>
			<Civilopedia>TXT_KEY_FEATURE_SUN_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_FEATURE_ICE</ArtDefineTag>
			<YieldChanges>
				<iYieldChange>1</iYieldChange>
				<iYieldChange>0</iYieldChange>
				<iYieldChange>0</iYieldChange>
			</YieldChanges>
			<RiverYieldChange>
				<iYield>0</iYield>
				<iYield>0</iYield>
				<iYield>0</iYield>
			</RiverYieldChange>
			<HillsYieldChange/>
			<iMovement>1</iMovement>
			<iSeeThrough>0</iSeeThrough>
			<iHealthPercent>0</iHealthPercent>
			<iDefense>0</iDefense>
			<iAppearance>100</iAppearance>
			<iDisappearance>200</iDisappearance>
			<iGrowth>200</iGrowth>
			<iTurnDamage>0</iTurnDamage>
			<iWarmingDefense>1</iWarmingDefense><!-- GWMod new XML field M.A. -->
			<bNoCoast>0</bNoCoast>
			<bNoRiver>0</bNoRiver>
			<bNoAdjacent>0</bNoAdjacent>
			<bRequiresFlatlands>0</bRequiresFlatlands>
			<bRequiresRiver>0</bRequiresRiver>
			<bAddsFreshWater>1</bAddsFreshWater>
			<bImpassable>0</bImpassable>
			<bNoCity>0</bNoCity>
			<bNoImprovement>0</bNoImprovement>
			<bVisibleAlways>0</bVisibleAlways>
			<bNukeImmune>0</bNukeImmune>
			<OnUnitChangeTo/>
			<TerrainBooleans>
				<TerrainBoolean>
					<TerrainType>TERRAIN_MARS</TerrainType>
					<bTerrain>1</bTerrain>
				</TerrainBoolean>
				<TerrainBoolean>
					<TerrainType>TERRAIN_TITAN</TerrainType>
					<bTerrain>1</bTerrain>
				</TerrainBoolean>
				<TerrainBoolean>
					<TerrainType>TERRAIN_ICEMOON</TerrainType>
					<bTerrain>1</bTerrain>
				</TerrainBoolean>
			</TerrainBooleans>
			<FootstepSounds>
				<FootstepSound>
					<FootstepAudioType>FOOTSTEP_AUDIO_HUMAN</FootstepAudioType>
					<FootstepAudioScript>AS3D_UN_FOOT_UNIT_MUD</FootstepAudioScript>
				</FootstepSound>
				<FootstepSound>
					<FootstepAudioType>FOOTSTEP_AUDIO_HUMAN_LOW</FootstepAudioType>
					<FootstepAudioScript>AS3D_UN_FOOT_UNIT_LOW_MUD</FootstepAudioScript>
				</FootstepSound>
				<FootstepSound>
					<FootstepAudioType>FOOTSTEP_AUDIO_ANIMAL</FootstepAudioType>
					<FootstepAudioScript>AS3D_UN_ANIMAL_FOOT_LARGE_MUD</FootstepAudioScript>
				</FootstepSound>
				<FootstepSound>
					<FootstepAudioType>FOOTSTEP_AUDIO_ANIMAL_LOW</FootstepAudioType>
					<FootstepAudioScript>AS3D_UN_ANIMAL_FOOT_LARGE_LOW_MUD</FootstepAudioScript>
				</FootstepSound>
				<FootstepSound>
					<FootstepAudioType>AS2D_CLOUDWIND</FootstepAudioType>
					<FootstepAudioScript/>
				</FootstepSound>
			</FootstepSounds>
			<EffectType>NONE</EffectType>
			<iEffectProbability>0</iEffectProbability>
			<iAdvancedStartRemoveCost>0</iAdvancedStartRemoveCost>
		</FeatureInfo>

Nothing to do with the xml.
It is simply as it states.
Trying to get information from something non existent

You don't believe me what was a problem with F6 (Tech Advistor)
I had one dummy tech which cause problem:

Spoiler :
<TechInfo>
<Type>TECH_NEVER</Type>
<Description>Never</Description>
<Civilopedia>Dummy Tech - Never</Civilopedia>
<Help/>
<Strategy>Dummy Tech - Never</Strategy>
<Advisor>ADVISOR_SCIENCE</Advisor>
<iAIWeight>0</iAIWeight>
<iAITradeModifier>0</iAITradeModifier>
<iCost>1</iCost>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<Era/>
<FirstFreeUnitClass>NONE</FirstFreeUnitClass>
<iFeatureProductionModifier>0</iFeatureProductionModifier>
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
<iTradeRoutes>0</iTradeRoutes>
<iHealth>0</iHealth>
<iHappiness>0</iHappiness>
<iFirstFreeTechs>0</iFirstFreeTechs>
<iAsset>0</iAsset>
<iPower>0</iPower>
<bRepeat>0</bRepeat>
<bTrade>0</bTrade>
<bDisable>1</bDisable>
<bGoodyTech>0</bGoodyTech>
<bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
<bMapCentering>0</bMapCentering>
<bMapVisible>0</bMapVisible>
<bMapTrading>0</bMapTrading>
<bTechTrading>0</bTechTrading>
<bGoldTrading>0</bGoldTrading>
<bOpenBordersTrading>0</bOpenBordersTrading>
<bDefensivePactTrading>0</bDefensivePactTrading>
<bPermanentAllianceTrading>0</bPermanentAllianceTrading>
<bVassalTrading>0</bVassalTrading>
<bBridgeBuilding>0</bBridgeBuilding>
<bIrrigation>0</bIrrigation>
<bIgnoreIrrigation>0</bIgnoreIrrigation>
<bWaterWork>0</bWaterWork>
<iGridX>51</iGridX>
<iGridY>1</iGridY>
<DomainExtraMoves/>
<CommerceFlexible/>
<TerrainTrades/>
<bRiverTrade>0</bRiverTrade>
<Flavors/>
<OrPreReqs/>
<AndPreReqs/>
<Quote>TXT_KEY_TECH_FUTURE_TECH_QUOTE</Quote>
<Sound>AS2D_TECH_FUTURE</Sound>
<SoundMP>AS2D_TECH_MP_FUTURE</SoundMP>
<Button>Art/Interface/Buttons/never.dds</Button>
</TechInfo>



This tech don't belong to ANY ERA! In BUG 4.4 all your techs must belong to some ERA!
And in Assets\Config\Not Just Another Game Clock.xml you must add your eras.
 
Code:
Assert Failed

File:  CvGlobals.cpp
Line:  4226
Expression:  strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  info type CIVILIZATION_AMERICA not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml

----------------------------------------------------------
CIV4EspionageMissionInfo.xml is the last file to load after a save game load. It's a message that could be misleading as probably, there is nothing wrong with this file, it's just the last file loaded.

Last time it happened to me, the tag was still in a Python file. Unfortunately, an advanced IE search in the content of all files does not seem to work properly. You have to open every Python file where this could be stored and search for it. Might be in a BUG file somewhere.
 
CIV4EspionageMissionInfo.xml is the last file to load after a save game load. It's a message that could be misleading as probably, there is nothing wrong with this file, it's just the last file loaded.

Last time it happened to me, the tag was still in a Python file. Unfortunately, an advanced IE search in the content of all files does not seem to work properly. You have to open every Python file where this could be stored and search for it. Might be in a BUG file somewhere.

Which tag, what to search?
 
I want to make units take damage if they move further than a certain distance from their nearest city. I added this to CvUnit::doTurn and it compiles and loads but the game crashes on the 2nd turn. anyone know what I'm doing wrong? my additions are in red.


Spoiler :
Code:
void CvUnit::doTurn()
{
	PROFILE("CvUnit::doTurn()")

	FAssertMsg(!isDead(), "isDead did not return false as expected");
	FAssertMsg(getGroup() != NULL, "getGroup() is not expected to be equal with NULL");
	
	[COLOR="Red"]
	// srpt distant supply mod
	CvCity* pNearestCity;
	pNearestCity = GC.getMapINLINE().findCity(getX_INLINE(), getY_INLINE(), getOwnerINLINE());
	int iDistance;
	
	// srpt end[/COLOR]

	testPromotionReady();

	if (isBlockading())
	{
		collectBlockadeGold();
	}

	if (isSpy() && isIntruding() && !isCargo())
	{
		TeamTypes eTeam = plot()->getTeam();
		if (NO_TEAM != eTeam)
		{
			if (GET_TEAM(getTeam()).isOpenBorders(eTeam))
			{
				testSpyIntercepted(plot()->getOwnerINLINE(), GC.getDefineINT("ESPIONAGE_SPY_NO_INTRUDE_INTERCEPT_MOD"));
			}
			else
			{
				testSpyIntercepted(plot()->getOwnerINLINE(), GC.getDefineINT("ESPIONAGE_SPY_INTERCEPT_MOD"));
			}
		}
	}

	if (baseCombatStr() > 0)
	{
		FeatureTypes eFeature = plot()->getFeatureType();
		if (NO_FEATURE != eFeature)
		{
			if (0 != GC.getFeatureInfo(eFeature).getTurnDamage())
			{
				changeDamage(GC.getFeatureInfo(eFeature).getTurnDamage(), NO_PLAYER);
			}
		}
		[COLOR="Red"]// srpt distant supply mod
		if (getDomainType() == DOMAIN_LAND)
		{
			iDistance = plotDistance(getX_INLINE(), getY_INLINE(), pNearestCity->getX_INLINE(), pNearestCity->getY_INLINE());
			if (iDistance > 10)
			{
				changeDamage(10, NO_PLAYER);
			}
		}
		// srpt end[/COLOR]
	}
 
CIVILIZATION_AMERICA of course ("info type CIVILIZATION_AMERICA not found").

Assets\Python\Contrib\RandomNameUtils.py

and

Assets\Python\Revolution\RebelTypes.py

Found and Solved !

Thanks! :)
 
I want to make units take damage if they move further than a certain distance from their nearest city. I added this to CvUnit::doTurn and it compiles and loads but the game crashes on the 2nd turn. anyone know what I'm doing wrong? my additions are in red.

Have you considered what happens if there is no city?

I have not looked to see if this is the actual problem, but "what if what I'm looking for does not exist" is always something you should consider when writing your code.
 
thanks, I should have thought of that. it works now.

I'd like to replace the distance factor from a tile count to a path count but I'm not really understanding ow to get the generatePath function to give me an integer.
 
Code:
Assert Failed

File:  CvGlobals.cpp
Line:  3887
Expression:  strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  type FLAVOR_MILITARY 10 not found

----------------------------------------------------------

I can't found this in my files, and what mean this in my .ini file?
Code:
; Custom Art from user folder is not loaded
NoCustomArt = 1

; Custom XML and Python from user folder are not loaded
NoCustomAssets = 1

and one question for members which played LoR, can your Inquisitor purge non-state religion? I haven't button for purge.
 
thanks, I should have thought of that. it works now.

I'd like to replace the distance factor from a tile count to a path count but I'm not really understanding ow to get the generatePath function to give me an integer.

I would not bother calling generatePath directy. The map has a "calculatePathDistance" function which you can use like this:
Code:
iDist = GC.getMapINLINE().calculatePathDistance(pStartPlot, pEndPlot);
If you really want to see how it works with the path generator, look that function up in CvMap.cpp.
 
Code:
Assert Failed

File:  CvGlobals.cpp
Line:  3887
Expression:  strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  type FLAVOR_MILITARY 10 not found

----------------------------------------------------------
That looks lie somewhere in one of your files you used the text "FLAVOR_MILITARY 10" instead of "FLAVOR_MILITARY".

I can't found this in my files, and what mean this in my .ini file?
Code:
; Custom Art from user folder is not loaded
NoCustomArt = 1

; Custom XML and Python from user folder are not loaded
NoCustomAssets = 1
The first blocks art in the Custom Assets from loading. The second prevents the mod from loading XML and Python from the custom assets folder. You often need to do this if the mod relies on custom Python since BUG can be installed in Custom Assets and it is incompatible with a lot of mods (and that use custom Python have a very good chance of being incompatible with that sort of BUG install).
 
I haven't unit sound when select my units (Speech) and haven't sound effect during battle.

I have other sound and game effects except this. How to fix this and what can cause this problem?

EDIT: FIXED ! Audio3DScripts.xml make this problem i am add some new sound here, replaced with BTS Audio3DScripts.xml and solved problem, also removed in AudioDefines.xml sounds which have relation with this.
 
I successfully enabled the building of Fishing Boats and Offshore Platforms without resources, however the AI won't build Workboats for that use even though I set the default AI of them to UNIT_AI_WORKER rather than UNIT_AI_WORKER_SEA. FWIW it does use them as intended if I manually give them a workboat via Worldbuilder. :dunno:
 
Back
Top Bottom