I Am Totally Lost

Justicex

Prince
Joined
Dec 26, 2007
Messages
332
As the title says, I built myself a nice, little civ that the mod menu recognizes but the game won't play. I think that the first indication is that in the mod menu, even though I can activate it, the rate/hate buttons don't light up. I don't know if I need to put that in the XML code or not.

But anyways, I think I have painted myself into a corner. I now have basically an entire civ done. I added a unit, leader and everything. I modified the XML to include the recent patch glitch but I'm pretty sure it wasn't working before that. So my question is, what is your process when building mods? If you would be willing to go through it step-by-step it would be really helpful :D Something like this:

  1. create the shell of the civ xml
  2. build
  3. test in-game
  4. create basic text
  5. build
  6. test in-game

and so on. I am also thinking of making a Modding for Dummies tutorial and would like to include this (with proper credits of course :D).

Also, along these lines, I need to break my mod down to test it and see what's not working but now the entire thing is built I'm not sure how to chop it back up to test. If anyone has any ideas or some debugging techniques I'd really appreciate those too :D

I've also attatched a zip of my solution file just in case some nice person would honor me with taking a look at it :goodjob:
 

Attachments

  • Prussia.zip
    680.3 KB · Views: 41
I'm not on a machine that I can look at your mod with, but I will offer some advice.

1. Proofread your mod: the simplest problem is usually the least apparent. Check for missing '/' tags, missing <row> or </row> tags, misspelled words, capital letters (important!) and make sure that inter-mod references (text, names, etc.) are uniform. This is the #1 problem with mods.

2. Set your mod's 'actions' - right click on your project, click 'properties,' then click actions. From there, make sure you have typed 'OnModActivated' in the first column, 'UpdateDatabase' in the second column, then 'YourCivFileNameHere.xml' in the last column (replacing YourCivFileNameHere.xml with the name of the file in your mod) - if your .xml is nested inside a folder (or folders) make sure to add those to the final column)

For example, if your Civilizations.xml file is in a Civilizations folder, you would have to made the final column say 'Civilizations/Civilizations.xml'

3. Make incremental changes to your mod. If it isn't working, don't start willy-nilly changing stuff. Change one word, one thing at a time. It is better (though time-consuming) to have each 'part' of a mod (Game text, civs, leaders, etc.) in their own .xml file, that way you can turn them on and off (using #2 above) to see where the problem is.

When I get a chance I'll look at your mod- don't fret! The best way to learn is blindly fumbling through ModBuddy. That's what I did.
G
 
Thank you so much for your help!

It's especially frustrating since at least 90% of it is copypasty from either Kael's guide or the game's xml files.

Yeah, I've been a little lax on the proofreading. But in my arrogance, I assumed that I was copying everything right. When I have a little more patience (read: sleep :D) I'll start going throught it line by line.

That was one thing I realized after-the-fact. I didn't know at first that you actually had to activate the text files as well. Also, the text files don't include the city names :mad: For the most part, I think I followed Kael's guide pretty close to the letter.

Basically, I just kept following the guide, hoping things would work out in the end. So now I have a full, but broken civ with icons, a UU, a UA and no clue what I did wrong.

It has to be something very basic though. I decided to start over with an in-game civ as a template. I only did the text file and civ part of Kael's tutorial and sure enough, nothing. I even copied the in-game civ and only changed the names! I even left the default in-game leader!
 
Do you still have your <Civilopedia> tags in?

If yes, erase them immediately. They do nothing anyway and will prevent your civs from loading. I was stuck for a few days before I was informed that was the reason. Kael's Modding Guide still has the <Civilopedia> tags in its example mod, but the xml files in .62 Civ V do not.

Also, sometimes white space in an xml file can prevent a mod from building. It's hard to describe exactly what I'm referring to in words...

Code:
<Civilization_Start_Region_Avoid>

</Civilization_Start_Region_Avoid>
That blank line can prevent your mod from building. At least it did for mine. Axe it immediately. If it's empty, you can erase the tags without worry.
 
I dl'd what you posted, but it was only the shell of the mod. You need to upload the XML files as well (the 'build' folder), otherwise I can only look at the overview of the project.

On first glance, though, you forgot to activate the XML/GameInfo/CIV5IconTextureAtlases.xml file. That might be a problem. ;)
G


Oh, and on a personal note, Hitler, really? For Prussia? Why not Frederick the Great? Seems like an odd choice. To each his own, I guess.
 
Do you still have your <Civilopedia> tags in?

If yes, erase them immediately. They do nothing anyway and will prevent your civs from loading. I was stuck for a few days before I was informed that was the reason. Kael's Modding Guide still has the <Civilopedia> tags in its example mod, but the xml files in .62 Civ V do not.

Also, sometimes white space in an xml file can prevent a mod from building. It's hard to describe exactly what I'm referring to in words...

Code:
<Civilization_Start_Region_Avoid>

</Civilization_Start_Region_Avoid>
That blank line can prevent your mod from building. At least it did for mine. Axe it immediately. If it's empty, you can erase the tags without worry.

Oh yeah. As soon as Jerk posted that fix, I immediately took those tags out. But that's one of those little things that it's good to remind yourself of constantly.

Hmm. I was wondering about that. Like I said, this is my first time even playing with xml files and such. I know I have a mind for it, but my last real programming experience was in Basic on a PET system back in junior high :blush:

I was curious about those green lines in the xml files. The ones that say "Put your sample Table here" and such. In my latest build, I've been deleting them right out, but on the build I apparently didn't post (Sorry Gaz :blush:) I put my info below those green lines and left them intact. Maybe that's why the game can't read them. I build it with no errors but it won't run.

I dl'd what you posted, but it was only the shell of the mod. You need to upload the XML files as well (the 'build' folder), otherwise I can only look at the overview of the project.

On first glance, though, you forgot to activate the XML/GameInfo/CIV5IconTextureAtlases.xml file. That might be a problem. ;)
G


Oh, and on a personal note, Hitler, really? For Prussia? Why not Frederick the Great? Seems like an odd choice. To each his own, I guess.

I forgot to activate that? Really? I have GOT to stop trying to mod at 3am :lol:

It was more choosing Prussia for Hitler than the other way around. I forget where, but I saw it mentioned on the forums somewhere suggesting that. I originally had Modern Germany, but I didn't want the hassle of dealing with the space. Do you have any other ideas?

The other thing is too, after what happened to EmeraldKnight's mod, I never planned on releasing this mod. This is my "trainee mod". So whenever I want to learn how to do something new, this was the mod that got elected to get beaten up. Then I would take what I learned and apply it to other projects.

I'll get the full file up for ya in a moment. So sorry about that dood! :blush:

Now the Art and XML files have been added. And thanks soo much for taking the time to help me out :D
 
I'm going to concur on the WTF??? Hitler comment.

Frederick the Great or any number of others would be much better. If I recall, Hitler and his party were actually opposed by a number of the old Prussian politicians.... but I don't know enough to really make a valid claim/argument about who stood where during the Nazi party's take over of German politics.
 
I'm going to concur on the WTF??? Hitler comment.

Frederick the Great or any number of others would be much better. If I recall, Hitler and his party were actually opposed by a number of the old Prussian politicians.... but I don't know enough to really make a valid claim/argument about who stood where during the Nazi party's take over of German politics.

Yeah, I was a little confused myself but it seemed like the thing to do at the time. :lol: If you have any other ideas for what I could name my civ, I'm open to anything :goodjob: I'm just afraid of all the headaches of trying to name it Germany. I don't necessarily want to block the in-game one, but it means I can't call mine Germany.

I just did a little research and found this on wiki:

Because of the German Revolution of 1918, William II abdicated as German Emperor and King of Prussia. Prussia was proclaimed a "Free State" (i.e. a republic, German: Freistaat) within the new Weimar Republic and in 1920 received a democratic constitution.

In Prussia, this anti-federalistic policy went even further. From 1934 almost all ministries were merged and only a few departments were able to maintain their independence. Hitler himself became formally the governor of Prussia. His functions were exercised, however, by Hermann Göring, as Prussian prime minister.

So, technically, Hitler did in fact rule Prussia until the lands were split by the allies in 1945.
 
okay, here we go I'll show I'll show your code first then my aditions are in red. Blue means I have a question.

First things first not sure what you are doing with the Panzer but that file is all kinds of messed up and the unit itself is already in game as is so not sure why you have thius file i'd kill it entirely.

Also, I don't do new art so someone else will need to check on your art code.

Going to go file by file
Civ_MGerm.xml
Code:
[COLOR="red"]- <Row>[/COLOR]		<CivilizationType>CIVILIZATION_PRUSSIA</CivilizationType>
		<UnitClassType>UNITCLASS_TANK</UnitClassType>
		<UnitType>UNIT_GERMAN_PANZER_IV</UnitType>
	</Row>
You have a " - " in front of <row>

CIV5Traits.xml
Looks fine

CIV5IconTextureAtlases.xml
Looks fine, but I don't do new art so someone else needs to check this one

CIV5Leader_Hitler.xml
Code:
			<LeaderType>
				[COLOR="red"]LEADER_HITLER/LeaderType>[/COLOR]				<FlavorType>FLAVOR_GOLD</FlavorType>
				<Flavor>3</Flavor>
You missed an " < " there

Code:
<Leader_Traits>
		<Row>
			<LeaderType>LEADER_HITLER</LeaderType>
			<TraitType>TRAIT_IGNORE_TERRAIN_IN_FOREST</TraitType>
		</Row>
	</Leader_Traits>
	<Leader_Traits>
		<Row>
			<LeaderType>LEADER_HITLER</LeaderType>
			<TraitType>TRAIT_BATTLE_FURY</TraitType>
		</Row>
	</Leader_Traits>
You have two traits there and doubled the <Leader_Traits>. I don't THINK it will care but you could clean this one up thus:
Spoiler :
Code:
<Leader_Traits>
		<Row>
			<LeaderType>LEADER_HITLER</LeaderType>
			<TraitType>TRAIT_IGNORE_TERRAIN_IN_FOREST</TraitType>
		</Row>
		<Row>
			<LeaderType>LEADER_HITLER</LeaderType>
			<TraitType>TRAIT_BATTLE_FURY</TraitType>
		</Row>
	</Leader_Traits>

Game_Text.xml
looks fine but I didn't check it against all the other files to make sure you didn't change a spelling.

Prussia.civ5proj (This would be everything in your properties screen)<FileName>XML/Civilizations/CIVTraits.xml</FileName>
you left out the " 5 " int he filename so that ones isn't going to load
you also don't have an action for CIV5IconTextureAtlases.xml that i can see


in ALL your files I recomend getting rid of the <!-- text --> if you don't need it and any blank lines as well.
 
Thanks soo much for taking a quick look, elistor! Okay, taking your points in order.

The Panzer unit I intend to be a UU. I'm curious to know what you think is wrong with it since I copypasty'd it right from the game's xml files. I only added the IV so far. Plan on making more modifications once I get this civ up and running.

There is a couple of places where those dashes appear. Once again, those are instances where I copypasty'd right from the game's xml files and that's how it's set up in there. I tried to delete them but it started wreaking havok with my format so I decided to leave them alone for now. Any tips on how to fix this? Or does it even need to be fixed?

The traits I copypasty'd from Kael's guide and that's why they are set up like that.

Anywho, thanks again and I'm off to implement all those changes you recommended :D
 
The Panzer is missing all of it's placemnt tags. IE <Units>, <Unit_AITypes>, <Unit_Flavors>, <Unit_FreePromotions>, and so on. Here I'll post a working Panzer file.
 

Attachments

  • Panzer_IV.txt
    5.3 KB · Views: 56
The Panzer is missing all of it's placemnt tags. IE <Units>, <Unit_AITypes>, <Unit_Flavors>, <Unit_FreePromotions>, and so on. Here I'll post a working Panzer file.

OMG! That's so hilarious! I was just about to ask about that!

Those little tweaks allowed my mod to work! I just played it for a few minutes :goodjob:

Now I just have to tweak the fact that Combustion now has no pictures underneath the name in the tech tree. Tank is listed in the description but no UUs do. I'm guessing my botched unit entry is to blame for that.

I goofed with the Icons too! The flag appears overtop of the circles! I assumed (we all know that story :lol:) that it didn't matter which layer I put the picture on when using the psd template. So, interesting factoid, it does in fact matter. If you place the layer with your icon on top, the black sections of the template WILL NOT block the rest of the image. I used a flag picture and in-game it appears as a flag overtop the gold circles.

One last thing to double-check. My civ descriptions appear as TXT_KEY_CIV_PRUSSIA_SHORT_DESC. I guess I gotta scour my text files. I think I have this fixed. I forgot to change the text tags in the text document to reflect the change to Prussia.

Oh! And my Dawn of Man picture didn't show :cry:

I almost forgot! Thanks for the working Panzer text! That will be a great help! :D

EDIT: After updating the Panzer Unit file, suddenly when I booted the game, I got an error that says it can't load my DoM image.

I also had a really bizarre thing happen. I have both my civ and the Corsican mod I downloaded. For some strange reason, my icons for Prussia are now on both mods! What did I do?
 
Try just loading one mod at a time. Also, if your DoM pic isn't working, make sure the name you gave it is the same as its name in your civ description. Spelling is quite important in this particular part.

For art, you need to make sure that your icons are white and your backgrounds are clear- the GIMP program works well for doing this.

Thanks elistor for helping him- I've been working all day and meant to help with this sooner.
G
 
It's all good. It's my fault I didn't upload the right files for ya to help with!

Oh I know. I have photoshop but I just was silly in the way I interpreted the way Kael worded that part. I just haven't gotten around to fixing those yet, too busy tweaking other errors.

When I boot the game, I get a "texture load error"when it tries to load the DoM pic. Gonna double-check the spelling like you said.
 
Now I've really gone and done it. I decided since I was messing around, changing names multiple times and even starting over with a similar name, that I would clean up my files. I renamed a folder I think was important to my project, deleted a few that I thought I wasn't using anymore, yadda yadda.

All of a sudden, my mod wouldn't load. After multiple restores, I think I got the riight file; the date and time stamp was right. And, now my civ won't appear in the menu. BUT if I start a game, everything appears in the civilopedia except my leader and my icons are blank. I even made new icons and put them in the Art folder and nothing.

Am I starting over after I finally got a working civ?
 
First off, I would like to apologise for thinking my posts got deleted. It turns out I was looking at the wrong thread the whole time and didn't clue in.

Quick update: I restored my old file and repaired it again so now everything is back up and running. Now I have three not-as-noobish questions.

1) I know this has been asked before, but I couldn't find the thread again. My UU is showing as being buildable by Germany as well as Prussia. It's named Panzer IV so I'm not sure why it's doing this.

2) I've gone over every single line of code 20 times but cannot figure out why my leaderhead is still Elizabeth. I changed it to Bismarck as per Kael's guide, but I still see Elizabeth.

3) The first time I ran my mod after reconstructing it, my DoM image was a black page. Without touching my art files, only touching up some text and fixing my Panzer entry, I started getting "Could not load texture errors". Is there some process to making DoM pics like icons? All I'm doing right now, is slapping a couple of piccies together, saving as .dds, and then importing into Modbuddy.
 
First off, I would like to apologise for thinking my posts got deleted. It turns out I was looking at the wrong thread the whole time and didn't clue in.

Quick update: I restored my old file and repaired it again so now everything is back up and running. Now I have three not-as-noobish questions.

1) I know this has been asked before, but I couldn't find the thread again. My UU is showing as being buildable by Germany as well as Prussia. It's named Panzer IV so I'm not sure why it's doing this.

2) I've gone over every single line of code 20 times but cannot figure out why my leaderhead is still Elizabeth. I changed it to Bismarck as per Kael's guide, but I still see Elizabeth.

3) The first time I ran my mod after reconstructing it, my DoM image was a black page. Without touching my art files, only touching up some text and fixing my Panzer entry, I started getting "Could not load texture errors". Is there some process to making DoM pics like icons? All I'm doing right now, is slapping a couple of piccies together, saving as .dds, and then importing into Modbuddy.


1.) What is your Unitclass for the panzer? If Germany's Unitclass for its panzer is the same the unit class for your Panzer IV it will give it to both of them.

2.) in modbuddy, do a find- search entire solution for ELIZABETH. If you find an instance, replace it with Bismarck. Also helps to 'clean' solution (using button in menu) and then build it fresh.

3.) Is your DoM picture the right size? If not, it won't load. Also, make sure you don't have any alpha layers or stuff- needs to be just one layer.
 
I've only done a basic mod for now, but I think I can point out a few important things:
1. Find mods the same or similar things and learn/copy from it.
2. Type as little as possible. Copy&paste saves you time, but more importantly little typos.
3. Get a basic version of your mod up an running asap, so you can build from there all while play testing constantly.
 
1.) What is your Unitclass for the panzer? If Germany's Unitclass for its panzer is the same the unit class for your Panzer IV it will give it to both of them.

2.) in modbuddy, do a find- search entire solution for ELIZABETH. If you find an instance, replace it with Bismarck. Also helps to 'clean' solution (using button in menu) and then build it fresh.

3.) Is your DoM picture the right size? If not, it won't load. Also, make sure you don't have any alpha layers or stuff- needs to be just one layer.

1) For the Panzer, I copypastied from the in-game Panzer but made the following change:
<Class>UNITCLASS_TANK</Class>
<Type>UNIT_GERMAN_PANZER_IV</Type>

2) I did and it found no instances either. So my new theory is that I'm missing something I didn't know I was supposed to put in. If you would be willing to take a look, my broken mod I uploaded before should work for this since I didn't touch the art or artdefines at all.

3) I sized it to the specifications in Kael's guide. I don't think I merged the layers however. I got a message from Gimp saying that there was a problem with layer sizes or something and a map couldn't be made. After my experiences with icons, I learned to ignore it. I will go back and change that :D

I've only done a basic mod for now, but I think I can point out a few important things:
1. Find mods the same or similar things and learn/copy from it.
2. Type as little as possible. Copy&paste saves you time, but more importantly little typos.
3. Get a basic version of your mod up an running asap, so you can build from there all while play testing constantly.

Thanks for the tips dood! I do all that stuff already, that's how I'm finding all these little errors. I just can't wait until I get this running the way I want so I can create a template and then really get to work :D
 
1) For the Panzer, I copypastied from the in-game Panzer but made the following change:

2) I did and it found no instances either. So my new theory is that I'm missing something I didn't know I was supposed to put in. If you would be willing to take a look, my broken mod I uploaded before should work for this since I didn't touch the art or artdefines at all.

3) I sized it to the specifications in Kael's guide. I don't think I merged the layers however. I got a message from Gimp saying that there was a problem with layer sizes or something and a map couldn't be made. After my experiences with icons, I learned to ignore it. I will go back and change that :D



Thanks for the tips dood! I do all that stuff already, that's how I'm finding all these little errors. I just can't wait until I get this running the way I want so I can create a template and then really get to work :D

Repost your full working file and I'll scour it for problems.
G
 
Top Bottom