Single Player bugs and crashes v35 plus (SVN) - After the 18th of August 2014

I found the issue.

Will explain in an edit.

Edit: @Joe.

When you removed some of the crime auto-buildings you probably didn't know that they had attached stats from a different xml; namely Tourism_CIV4BuildingInfos.xml.
This XML puts additional information into buildings that are defined elsewhere. So when you removed for example the BUILDING_CRIME_ROGUEMERCENARIES from SpecialBuildings_CIV4BuildingInfos.xml
it was still defined in the tourism XML like this:
Spoiler :
Code:
	<BuildingInfo>
		<BuildingClass>BUILDINGCLASS_CRIME_ROGUEMERCENARIES</BuildingClass>
		<Type>BUILDING_CRIME_ROGUEMERCENARIES</Type>
			<PropertyManipulators>
			  <PropertySource>
			    <PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
			    <PropertyType>PROPERTY_TOURISM</PropertyType>
			    <iAmountPerTurn>-4</iAmountPerTurn>
			  </PropertySource>
			</PropertyManipulators>
		</BuildingInfo>
	<BuildingInfo>
A building without name, pedia, button art nor requirements. It only has a sole stat of -4 tourism.

Removing the entries of the crimes that you removed from this xml as well would fix SO's problems.

I was just going to post the same thing that SO posted in both posts. And No, I had No idea about the other xml file being related.

A heads up where Tourism_CIV4BuildingInfos.xml is found so I can fix? In the meantime I'll go looking for it.

EDIT: Found the file making changes now. Will commit to SVN shortly.

JosEPh
 
I thought all of Hydro's stuff was in the core now?
It is technically in the Core as it is not located inside the module folder; but this one tourism building xml is an odd one out among the other xmls in the "assets/xml/building" folder as it only adds data to predefined buildings in other xml's and its data should imo be moved into their respective national wonder, regular, and great wonder building XMLs.


Edit:
A heads up where Tourism_CIV4BuildingInfos.xml is found so I can fix?
answer is in this post
 
Found it and working on it now. Thanks!

JosEPh
 
There were 5 Crime buildings (of the 8 that I removed from SpecialBuildings) that were in this Tourism_CIV4BuildingInfos.xml.

Fix Committed to SVN.

This is part of the problem of having so many properties that are entwined. If you didn't build the files how are you supposed to know they have related entries?

Anyway sorry for the mess, still learning and finding out that modding can be tough when you're half blind. :p

JosEPh
 
I found the issue.

Will explain in an edit.

Edit: @Joe.

When you removed some of the crime auto-buildings you probably didn't know that they had attached stats from a different xml; namely Tourism_CIV4BuildingInfos.xml.
This XML puts additional information into buildings that are defined elsewhere. So when you removed for example the BUILDING_CRIME_ROGUEMERCENARIES from SpecialBuildings_CIV4BuildingInfos.xml
it was still defined in the tourism XML like this:
Spoiler :
Code:
	<BuildingInfo>
		<BuildingClass>BUILDINGCLASS_CRIME_ROGUEMERCENARIES</BuildingClass>
		<Type>BUILDING_CRIME_ROGUEMERCENARIES</Type>
			<PropertyManipulators>
			  <PropertySource>
			    <PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
			    <PropertyType>PROPERTY_TOURISM</PropertyType>
			    <iAmountPerTurn>-4</iAmountPerTurn>
			  </PropertySource>
			</PropertyManipulators>
		</BuildingInfo>
	<BuildingInfo>
A building without name, pedia, button art nor requirements. It only has a sole stat of -4 tourism.

Removing the entries of the crimes that you removed from this xml as well would fix SO's problems.

Which is why if you are changing buildings in another area you should use the WoC dependencies. The code should have been

Code:
	<BuildingInfo>
		<Type>BUILDING_CRIME_ROGUEMERCENARIES</Type>
	[B]	<AndDependencyTypes>
                   <DependencyType>BUILDING_CRIME_ROGUEMERCENARIES</DependencyType>
		</AndDependencyTypes>
[/B]		<PropertyManipulators>
			  <PropertySource>
			    <PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
			    <PropertyType>PROPERTY_TOURISM</PropertyType>
			    <iAmountPerTurn>-4</iAmountPerTurn>
			  </PropertySource>
			</PropertyManipulators>
		</BuildingInfo>
	<BuildingInfo>
 
Which is why if you are changing buildings in another area you should use the WoC dependencies. The code should have been

Code:
	<BuildingInfo>
		<Type>BUILDING_CRIME_ROGUEMERCENARIES</Type>
	[B]	<AndDependencyTypes>
                   <DependencyType>BUILDING_CRIME_ROGUEMERCENARIES</DependencyType>
		</AndDependencyTypes>
[/B]		<PropertyManipulators>
			  <PropertySource>
			    <PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
			    <PropertyType>PROPERTY_TOURISM</PropertyType>
			    <iAmountPerTurn>-4</iAmountPerTurn>
			  </PropertySource>
			</PropertyManipulators>
		</BuildingInfo>
	<BuildingInfo>

But what if you Remove the building? I have removed RogueMercs from both SpecialBuildings_CIV4BuildingInfos.xml and Tourism_CIV4BuildingInfos.xml and still the problem SO posted is still there. See Screenshots.

Also if you select (1) from the drop down list for 1st build and then try to double click the City tile to bring up the City screen you get a Hang. With the Hang there is a Failed assert error pop up which reads:
File: CvArtFileMgr.cpp
line: 101
SVN 8737
Expression: false
Message: ArtInfo " was not found

So there is more to this problem, and this is beyond my simple xml skill set. Where do I go now to try to fix this?

EDIT: The 5 Crime_Buildings Removed from both .xml files are:
1. CarChase
2.Flashing
3. PowerStruggles
4. RogueMercenaries
5. TPing

SpecialBuildings also has 3 more removed that were not found in the Tourism xml, they are:
1.Corporatemanslaughter
2. PonziSchemes
3. StockmarketRigging

JosEPh
 
But what if you Remove the building?

If the dependency object (BUILDING_CRIME_ROGUEMERCENARIES) is not there then this transaction will not be processed.

If you remove the building it is not there and so the update in this bit of code is not applied.

I also removed the <BuildingClass> line from the update transaction just in case these updates were being loaded before the actual definitions. for performance reasons.

I have removed RogueMercs from both SpecialBuildings_CIV4BuildingInfos.xml and Tourism_CIV4BuildingInfos.xml and still the problem SO posted is still there. See Screenshots.

Also if you select (1) from the drop down list for 1st build and then try to double click the City tile to bring up the City screen you get a Hang. With the Hang there is a Failed assert error pop up which reads:
File: CvArtFileMgr.cpp
line: 101
SVN 8737
Expression: false
Message: ArtInfo " was not found

So there is more to this problem, and this is beyond my simple xml skill set. Where do I go now to try to fix this?

JosEPh

Do a search on Caveman2Cosmos/Assets using WinGrep or similar for _CRIME_ROGUEMERCENARIES. Either the building or building class are still being used somewhere. It may be yet another update transaction to the building by another module or civic or leader head or something.

edit it is also defined in the Buildings Class file. You need to get rid of the class definitions also. I assume you got rid of the entry in the Property file and text files also. You did not mention those three files only the Special Buildings and Tourism files.
 
If the dependency object (BUILDING_CRIME_ROGUEMERCENARIES) is not there then this transaction will not be processed.

If you remove the building it is not there and so the update in this bit of code is not applied.

I also removed the <BuildingClass> line from the update transaction just in case these updates were being loaded before the actual definitions. for performance reasons.



Do a search on Caveman2Cosmos/Assets using WinGrep or similar for _CRIME_ROGUEMERCENARIES. Either the building or building class are still being used somewhere. It may be yet another update transaction to the building by another module or civic or leader head or something.

edit it is also defined in the Buildings Class file. You need to get rid of the class definitions also. I assume you got rid of the entry in the Property file and text files also. You did not mention those three files only the Special Buildings and Tourism files.

There are 4 other Files that use RogueMercs. So I assume that there are at least 4 other files that will also use the other removed crime buildings.
EDIT: The 5 Crime_Buildings Removed from both .xml files are:
1. CarChase
2. Flashing
3. PowerStruggles
4. RogueMercenaries
5. TPing

And also these other 3.
SpecialBuildings also has 3 more removed that were not found in the Tourism xml, they are:
1.Corporatemanslaughter
2. PonziSchemes
3. StockmarketRigging

Arghhh! :blush::nuke::mad::sad:

JosEPh
 
Assets\XML\Buildings\CIV4BuildingClassInfos.xml
Spoiler :
Code:
		<BuildingClassInfo>
			<Type>BUILDINGCLASS_CRIME_ROGUEMERCENARIES</Type>
			<Description>TXT_KEY_BUILDING_CRIME_ROGUEMERCENARIES</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<iExtraPlayerInstances>0</iExtraPlayerInstances>
			<bNoLimit>0</bNoLimit>
			<bMonument>0</bMonument>
			<DefaultBuilding>BUILDING_CRIME_ROGUEMERCENARIES</DefaultBuilding>
			<VictoryThresholds/>
		</BuildingClassInfo>
Assets\XML\Art\CIV4ArtDefines_Building.xml
Spoiler :
Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_CRIME_ROGUEMERCENARIES</Type>
			<LSystem>LSYSTEM_1x1</LSystem>
			<bAnimated>0</bAnimated>
			<fScale>0</fScale>
			<fInterfaceScale>0</fInterfaceScale>
			<NIF>Art/empty.nif</NIF>
			<KFM/>
			<Button>art/Crime/art/crime.dds</Button>
		</BuildingArtInfo>
Assets\XML\Text\Hydro_CIV4GameText.xml
Spoiler :
Code:
	<TEXT>
		<Tag>TXT_KEY_BUILDING_CRIME_ROGUEMERCENARIES</Tag>
		<English>Crime (Rogue Mercenaries)</English>
		<French>Délit (Mercenaires)</French>
		<Polish>Przestêpstwa (¯o³dacy)</Polish>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_BUILDING_CRIME_ROGUEMERCENARIES_STRATEGY</Tag>
		<English>A type of crime.</English>
		<Polish>Rodzaj przestêpstwa.</Polish>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_BUILDING_CRIME_ROGUEMERCENARIES_PEDIA</Tag>
		<English>A mercenary is a person who takes part in an armed conflict, who is not a national or a party to the conflict and is "motivated to take part in the hostilities by the desire for private gain.</English>
		<Polish>A mercenary is a person who takes part in an armed conflict, who is not a national or a party to the conflict and is "motivated to take part in the hostilities by the desire for private gain.</Polish>
	</TEXT>


Yes, xml modding can be a hassle, especially in the beginning.
 
I believe its right here, you left one too many BuildingInfos in there, i might be wrong?

Also if your going to delete them why not just delete them rather than put <- - - - - - > there?? you can always go back to the SVN if you need them back??

EDIT: Yeah its this one, and there is 1 just below this also, i did it on mine, but i forgot the line # sorry.

EDIT EDIT: everything looks good AFTER these 2 changes that need to be made . . .

EDIT EDIT EDIT: HOLD THE PHONE: I also found this just now????

[334454.593] info type 'BUILDING_CRIME_TPING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_FLASHING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_CARCHASE' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_ROGUEMERCENARIES' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_POWERSTRUGGLES' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_STOCKMARKETRIGGING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_CORPORATEMANSLAUGHTER' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_PONZISCHEMING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
 
Always, always load the game before committing to the SVN. So many problems would be noticed in private if people did this.
 
Always, always load the game before committing to the SVN. So many problems would be noticed in private if people did this.

Arakhor, Really!!!! Thanks buddy. :p If I had known there were 6 associated files to work with for removing 8 Friggin! Crimes then it wouldn't be "Public" now would it.

I'm still a NOOB! at modding. :blush::mad:

JosEPh
 
We all have our moments, but if you can load the game without errors, it makes the bug reporting all the more fun if other people have errors.

On the other hand, if you have errors too, don't commit until you don't. :)
 
<snip>
EDIT EDIT EDIT: HOLD THE PHONE: I also found this just now????

[334454.593] info type 'BUILDING_CRIME_TPING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_FLASHING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_CARCHASE' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_ROGUEMERCENARIES' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_POWERSTRUGGLES' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_STOCKMARKETRIGGING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_CORPORATEMANSLAUGHTER' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml
[334454.593] info type 'BUILDING_CRIME_PONZISCHEMING' not found, Current XML file is: modules\My_Mods\Traditions\Work_Ethic_CIV4BuildingInfos.xml

I can't find anything related to those 8 buildings in this file. None are listed in it. :eek:

I'm wading thru this but my hip waders are leaking!!!!!!!!!! :cry::crazyeye:

JosEPh
 
I can't find anything related to those 8 buildings in this file. None are listed in it. :eek:

I'm wading thru this but my hip waders are leaking!!!!!!!!!! :cry::crazyeye:

JosEPh

Check the Building Class XML file. The error system does not report the missing building until it has gone through all the buildings so it refers to the wrong file.

edit on the latest SVN the building BUILDING_CRIME_ROGUEMERCENARIES is showing up in Civ4BuildingClass.XML and Tourism_Civ4Building.xml
 
We all have our moments, but if you can load the game without errors, it makes the bug reporting all the more fun if other people have errors.

On the other hand, if you have errors too, don't commit until you don't. :)

I didn't have Any errors when Loading a game or Starting a new game. But I did have the 3 screenshots I posted above on the turn I founded my 1st city. SO noticed it too and posted about it right before I did.

Well back to the grindstone.

JosEPh
 
Check the Building Class XML file. The error system does not report the missing building until it has gone through all the buildings so it refers to the wrong file.

I used Grepwin and it came up with 4 extra files that had Rogue Mercs, which also lead me to many of the "other" deleted Crimes.

My eyes are falling out on my cheekbones after visually checking over 25,000+ lines of xml in 6 friggin files! :scan: :nuke: :cry:

JosEPh
 
Back
Top Bottom