• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

BtS problem MODDING

strategyonly

C2C Supreme Commander
Joined
Mar 13, 2006
Messages
21,037
Location
MN
Need to find out what the heck i am doing wrong, BtS to me is ten times harder to MOD???:blush:

All i did was add 2 units, 2 leaderheads and 2 civs, thats it!

Attached is a copy of what i did, what am i doing wrong??:rolleyes:

http://forums.civfanatics.com/uploads/86969/Test.zip

less than 4 MEG's.

Were is the Barebones MOD, like in Warlords????

EDIT: Here's what i did, i deleted all the units in UnitInfo, and just added the 2 units.
Started the MOD, first the UnitArtStyleType showed up, then the Unit_Archer and about fifteen more??, etc. so i just OK'ed ALL of those and it got to the choice of the Civs and then it startedto load and then it went to YOU ARE DEFEATED!!!:mad: :mad:

What the HEY!!!:mad:
 
WOAH, first things first, relax :) all things are solvable, let me have a poke around and see if i can spot something wrong.
 
just realised, i dont need to look to figure out whats up.

You're having problems with the flavoured units for BTS, I don't know the exact code changes but I think just knowing that would point you in the correct direction.

I'm noob, really sorry if this doesn't help, once I figure it out properly I will be able to post a more accurate solution to the problem :)
 
How about using the modular XML loader? That's the best way to make small changes that don't break the whole thing. If you create a CIV4_UnitInfos with just two units, there will be cross-references to now non-existing units (for example the settler), which will invariably lead to problems. I'm pretty sure you have read Kael's guide for BtS. If you want to see an example of a modular mod, check what I have done with the MaxRiga mod. And perhaps you're interested in this script that converts some vanilla XML files to BtS. Even if you have to do some changes manually, it will at least automatize part of your work.
 
How about using the modular XML loader? That's the best way to make small changes that don't break the whole thing. If you create a CIV4_UnitInfos with just two units, there will be cross-references to now non-existing units (for example the settler), which will invariably lead to problems. I'm pretty sure you have read Kael's guide for BtS. If you want to see an example of a modular mod, check what I have done with the MaxRiga mod. And perhaps you're interested in this script that converts some vanilla XML files to BtS. Even if you have to do some changes manually, it will at least automatize part of your work.


I took alook, but wheres this loader thing? ANd how to use? I have two MOD to convert??
 
Open CivilizationIV.ini (the BtS one) and change ModularLoading to 1.

Then have a look at the BtS MaxRiga Mod. You will see that there is a folder called Modules. That's where you put the modular files. If you use the normal XML folder, the original file will be replaced. If you use the Modules folder, they will be 'enhanced'.

2 things are important for modular loading to work.

1. naming convention: all files must be called *_originalname. CIV4UnitClassInfos.xml thus becomes MaxRiga_CIV4UnitClassInfos.xml, for example

2. schemata: the schema file needs to be in the same folder as the module. I also renamed them (CIV4UnitClassInfos.xml becomes MaxRiga_CIV4UnitClassInfos.xml) and modified the information in the first line of MaxRiga_CIV4UnitInfos.xml (have a look at the file to see what I mean).

Kael's guide has a more detailed tutorial that explains how to make your mod modular, but I think looking at the MaxRiga mod as an example is a good illustration.
 
I just started the mod and got this error message (you should turn error messages on when modding: HidePythonExceptions = 0 and LoggingEnabled = 1 in the .ini)

Traceback (most recent call last):

File "CvAppInterface", line 70, in preGameStart

File "CvScreensInterface", line 75, in showTechChooser

File "CvTechChooser", line 124, in interfaceScreen

File "CvTechChooser", line 291, in placeTechs

AttributeError: 'NoneType' object has no attribute 'getButton'
ERR: Python function preGameStart failed, module CvAppInterface


The line that fails looks like this:

Code:
				screen.addDDSGFCAt( szFreeUnitButton, szTechRecord, gc.getUnitInfo(gc.getUnitClassInfo(gc.getTechInfo(i).getFirstFreeUnitClass()).getDefaultUnitIndex()).getButton(), iX + fX, iY + Y_ROW, TEXTURE_SIZE, TEXTURE_SIZE, WidgetTypes.WIDGET_HELP_FREE_UNIT, gc.getUnitClassInfo(gc.getTechInfo(i).getFirstFreeUnitClass()).getDefaultUnitIndex(), i, False )

Apparently, there is a problem with the free units.

What are yours?

Code:
			<FreeUnitClasses>
				<FreeUnitClass>
					<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
					<iFreeUnits>1</iFreeUnits>
				</FreeUnitClass>
			</FreeUnitClasses>

You defined the settler as a free unit, but didn't put them in your CIV4UnitInfos. This also explains why you lose. With no units at the start, your civ is instantly destroyed... :)
 
OK got some of it fixed but still it goes to a screen that says Technology advisor (see pic 1, then to another screen (see pic 2) that says You are Defeated???

now what??

heres what i have now:
http://forums.civfanatics.com/uploads/86969/Copy_of_Test.zip

I have had that exact same problemexcept it was with warlords and my rise of perssia mod. I never solved it because I just couldn't find a solution. I loaded the game and all that appeared was a black screen with the you are defeated and then the tech screen came up uninvited, blank exactly like that, removed the modded techtree and it worked completely fine.
 
Teg_Navanis, thx alot, i finally figured out, you needed the regular units plus artdefines the same, what ever you have listed, DUH!!! Otherwise it crashes to desktop right away!!! I should have known that. Must be that late night stuff, your help has been much appreciated, i am currently working on four different projects. All by myself, can i ask you to assist, when i run into problems again???
 
Well, if I'm able to, I'll be glad to help. But I'm not very experienced with XML files, I was just lucky to have encountered the same problems before.
 
Back
Top Bottom