Figuring Out Building Creation

Not technically a building related question this time!
Does anyone have any pointers on adding a new Civic Category?

I can add/overwrite civics within a category fine. However, I can't seem to add anything to the CivicOptionInfos without causing a crash. The file is very simple; I'm pretty sure it's not just mis-spelling or anything.

Do I have to add the default civic to the CivilisationInfos?
 
Not technically a building related question this time!
Does anyone have any pointers on adding a new Civic Category?

I can add/overwrite civics within a category fine. However, I can't seem to add anything to the CivicOptionInfos without causing a crash. The file is very simple; I'm pretty sure it's not just mis-spelling or anything.

Do I have to add the default civic to the CivilisationInfos?

I'm not sure, as I've never tried to add a new category. However, there are some basic procedural things you can do to try to work out what may be wrong.

1) If you have any suspicions, such as needing the default civic (which is a probable yes to your question), go ahead and do that and see if it sorts out the problem.

2) Run the load sequence through the debug dll. It will often let you know if there's an error in the xml and where.

3) Use grepWin to search through python for anywhere all of the categories may be listed and possibly required to have a new one added to.

By step 3 you'll probably have it sorted out.
 
Does anyone have any pointers on adding a new Civic Category?

I can add/overwrite civics within a category fine. However, I can't seem to add anything to the CivicOptionInfos without causing a crash. The file is very simple; I'm pretty sure it's not just mis-spelling or anything.

Do I have to add the default civic to the CivilizationInfos?

There are a few area's if adding a new or deleting a civic.

If these are the "default" civic, then u need to inform ALL map makers so that they can change the starting defaults also. Coincides with CivInfo below

Then u need to add/change any buildings that need a preq to it.

Of course CivicInfo's and adding the correct TXT to the text folder/

U only need to add it to the CivilizationInfo IF it is a "starting" civic of an area ie : ANARCHISM

i think thats it . .
 
Not technically a building related question this time!
Does anyone have any pointers on adding a new Civic Category?

I can add/overwrite civics within a category fine. However, I can't seem to add anything to the CivicOptionInfos without causing a crash. The file is very simple; I'm pretty sure it's not just mis-spelling or anything.

Do I have to add the default civic to the CivilisationInfos?

There is a file that has the Civic categories listed as 14. This file would need changed to 15 If you are adding a new Category to CivicOptionInfos. ATM I can't remember if it is a GlobalDefine or some other file. I have seen it so I know it exists.

EDIT: Found it. It is in GlobalDefines, this set of lines;
Code:
	<Define>
		<DefineName>MAX_CIVIC_OPTIONS</DefineName>
		<iDefineIntVal>14</iDefineIntVal>
	</Define>
Change the 14 to 15 ( or to total of how many new categories you are adding to the original 14). If using Notepad++ it is lines 342 to 345.

JosEPh
 
There is a file that has the Civic categories listed as 14. This file would need changed to 15 If you are adding a new Category to CivicOptionInfos. ATM I can't remember if it is a GlobalDefine or some other file. I have seen it so I know it exists.

EDIT: Found it. It is in GlobalDefines, this set of lines;
Code:
	<Define>
		<DefineName>MAX_CIVIC_OPTIONS</DefineName>
		<iDefineIntVal>14</iDefineIntVal>
	</Define>
Change the 14 to 15 ( or to total of how many new categories you are adding to the original 14). If using Notepad++ it is lines 342 to 345.

JosEPh
Nice catch!
 
EDIT: Found it. It is in GlobalDefines, this set of lines;
Code:
	<Define>
		<DefineName>MAX_CIVIC_OPTIONS</DefineName>
		<iDefineIntVal>14</iDefineIntVal>
	</Define>
Change the 14 to 15 ( or to total of how many new categories you are adding to the original 14). If using Notepad++ it is lines 342 to 345.

JosEPh

Nice catch!

Going through it now, it has 15, at least thats what CIV4CivicOptionInfos has, so it needs to be changed anyways, right??
 
I think MAX_CIVIC_OPTIONS used to be used by the Python to guess at how big each civic box needed to be to hold all the options for that civic, however I changed the code to be more dynamic and use a size big enough for either the actual number of options or the detail each of the civic options, which ever was biggest.
 
I think MAX_CIVIC_OPTIONS used to be used by the Python to guess at how big each civic box needed to be to hold all the options for that civic, however I changed the code to be more dynamic and use a size big enough for either the actual number of options or the detail each of the civic options, which ever was biggest.

Did you do that recently? When I was working on civics for the space modmod, I found that the boxes adjusted for the detail of the largest option, but not the number of options. I added a few extra features to the Xenosemiotics civic so that all of the language options would be visible.
 
Is this anything in python? DH??

self.USER_ADJUSTMENT = 15 # default 100

It is used in the Civics screen only. No idea what for as I am deep in some other code at the moment.

Did you do that recently? When I was working on civics for the space modmod, I found that the boxes adjusted for the detail of the largest option, but not the number of options. I added a few extra features to the Xenosemiotics civic so that all of the language options would be visible.

No. I did it all a long time ago. What you suggest means that I made a mistake somewhere.
 
Cheers guys, I seem to have fixed the problem by running a debuger and re-adding the Civilisation starting civics. :goodjob:

DH's re-route seems to be working fine; I haven't needed to edit the GlobalDefines (although I'm very impressed with your memory JosEPh_II!)


All going well, I'm probably going to be throwing my hat into the contentious civics ring by the end of next week :cowboy:
 
Your Welcome Squidimp, but....the responses make me wonder if what I found is actually For the Total Civic Categories? But rather for how many line items a specific Civic can have. :hmm:

More mysteries of C2C coding...........:crazyeye: ;)

JosEPh :)
 
I have been trying to pin down the source of Pedia errors that I keep running into when using my Wonders. Strangely, it seems to be affected by the cache. The wonders section of the pedia loads differently depending on whether or not the cache has been cleared. This seems to effect loading regardless of what functions the wonder uses. I have also added new buildings, but the common buildings section is never affected.

Does anyone have any idea what could be causing this?
I have other C2C folders located on the same hard-drive, but not in the same mods folder, - could this interaction be causing the errors? I presume that it can't be Python (although I do need to further verify my Py code at some point), because the Civilopedia shouldn't be able to access that code in any case. What else might vary for cache-based reasons?
 
The Great Wonders section fails to display any Wonders, instead appearing empty. These wonders can still be built in game, and work fine.

If I don't clear the cache, the pedia entries sometimes appear again, usually with a single empty entry at the beginning. If I go back and clear the cache, the Wonders fail to be displayed again.

If I don't have my Wonders installed, this doesn't happen, but it happens regardless of which wonders are installed from the set. If I don't clear the cache weird, inconsistent errors sometimes emerge which seem to go away if I remove particular functions, but the functions seem semi-random. E.g. sometimes Help text causes problems and sometimes ObsoleteSafeCommerce causes problems. There never seems to be a reason for this, and cache changes can change the function giving me errors.

All in all, it's damn confusing
 
I have been trying to pin down the source of Pedia errors that I keep running into when using my Wonders. Strangely, it seems to be affected by the cache. The wonders section of the pedia loads differently depending on whether or not the cache has been cleared. This seems to effect loading regardless of what functions the wonder uses. I have also added new buildings, but the common buildings section is never affected.
A number of XML things can cause this, mostly mismatches somewhere. There are a couple programs AIAndy wrote that can find them something Validate. Sorry I was in hospital last night and the meds are making me a bit vague.
 
A number of XML things can cause this, mostly mismatches somewhere. There are a couple programs AIAndy wrote that can find them something Validate. Sorry I was in hospital last night and the meds are making me a bit vague.
Sounds like you have a better bead on it than I do despite that fact. Hope you're feeling better!

I would advise to run the debug dll. If you have an XML error somewhere causing that, then it should point out where and what line. Just rename the main dll (I add '.core' to the end) then rename the dll ending with .debug by simply removing '.debug' from the name. Then run the game. Make sure to reverse those changes when you are done with the debugger.
 
Thanks for the assistance guys! I'll definitely try the debugger, and try to locate AIAndy's stuff if that doesn't work out :high5:
 
Back
Top Bottom