My mod doesn't work!

screwtype

Warlord
Joined
Jul 23, 2004
Messages
291
What am I doing wrong?

First of all I created a new mod folder, then reproduced the game's directory tree inside of that, so I ended up with a Mods/My Mod/Assets/XML/Units tree. Inside the Units folder, I put my modded Civ4Unitinfos file.

My mod appears in the game's mod lists, when I try to run it is says the game needs to restart, but when it restarts there is no sign of my mod and no way to get into it.

I edited the unitinfos file with notepad, someone told me that will do the job as an XML editor, apart from that I don't know what could have gone wrong. Can anyone assist?
 
have you modded all the files nexessary to create a unit?? namely Civ4UnitClassInfos.xml and Civ4artdefines_Unit.xml as well as your Unitinfos.xml file. Ontop of that you need to make sure you have all your edited artwork converted to dds format and listed in your artdefines file. Hope that was some help;)
 
When it restarts, it restarts with your mod loaded. So if all you changed was unitinfos, then you wouldn't see anything different except the changed unit. BUt you'll need to have changed the text files too.

What did you change, exactly?
 
I'm not trying to create a new unit. All I wanted to do to start with is lower the unit build costs, so I should only need to edit the unitinfos file. I've tried using the CustomAssets folder as well, but my new unit build costs just don't show up.
 
Wyz, all I did was change the unit build costs in the unitinfos file. But whether I put the altered unitinfos file in CustomAssets or in the MyMod/Assets/XML/Units folder, the changes aren't showing up.
 
upload what you have so far so we can see whats wrong, most likly theirs a small error in the directory heirachy you used and Civ isn't finding the modified UnitInfos document.

Tip: try using someone else mod (which you know already works), remove their UnitInfos document (and all the other stuff that you dont want) slip in yours and rename. Now you can be shure their arn't any directory hicups.
 
Just out of interest, I notice that notepad has a default savefile of type .txt. Could this be the problem, that it's appending .txt to the end of the file? Should I save it as "All files" instead?

Also, should I save the file as default ANSI, or as Unicode, Unicode big endian, or UTF-8?
 
Okay folks, I got it to work :) Thanks for your help.

The problem was that notepad saves the file as default .txt and the file type has to be .xml. The file didn't load because I used the "save as" menuitem to save the file which saves it as default .txt.

The solution is to just use the "Save" menuitem instead.

All the same, once you've saved the file like this, you can't use IE to open the xml file anymore, so notepad must be screwing something up. I guess the best thing to do is track down a dedicated xml editor (hopefully a free one)...

Thanks once again for your help ppl.
 
No the problem is that IE cant find the Schema because your Mod dosnt have the Schema. Copy the Schema out of the original game and drop it into your mod, now IE should be able to check for formating. Wasn't it giving you an Error message "Cannot view XML input using XSL style sheet. Please correct the error" basicaly that means no schema. Also note that if your going to upload your mod you can ditch the schmeas to save file size as its all redundent, if your just running this mod on your own computer it dosen't realy matter.
 
Oh, okay, yes that's the error message I was getting, thanks for clarifying that for me Impaler.

I did have a look around for an XML editor, I found a freebie called Cooktop but the font was too small and, quite frankly, it didn't look much better than Notepad.

Anyhow I've already knocked out a quickie mod for the game and it seems to work pretty well, but I need to play a game right through to test it out properly.
 
Back
Top Bottom