"Free" units problem

Allein

Warlord
Supporter
Joined
Mar 3, 2004
Messages
168
Location
Quebec
Hello everyone !

I'm working on a World war II modification and all is going pretty well except for one thing that I don't understand. Every new unitclasses that I've create is in game "free" of cost but in the XML files units, my cost are there. But if I create only a new unit with an existing classes my unit show the right cost. Is there something I forgot to do ?
 
Can you post both your units and the unitclasses xmls?
 
I'm not sure what it is you're looking for... What exactly are you trying to do here?

No prod cost for your new units? No prod cost for all units? reduced prod cost? What exactly?

remember that the cost tag in the units is the _base_ production cost, it's modified by all kinds factors in game... So depending on what it is you want to do will depend on what you need to modify.

Explain a little clearer please..?
 
He's trying to say that he's having a problem with units being "Free" when they're supposed to have a unit cost.

The problem has happened to me a few times, and it is usually the result of incorrect classes.

Let me check out the files and I'll let you know.

I got it! Your UnitClasses.xml isn't enclosed in tags.

It should be:

Code:
<GameData>
	<UnitClasses>
          .....
	</UnitClasses>
</GameData>

Basically, you're missing the UnitClasses tag surrounding all of your classes.

Insert these and your file will be able to be read, and your units will be fine.
 
Eh, really? Damn, I thought that would do it.

It's getting late, so I'm not going to parse through the files again today.

But, in the meantime:

1) check for any syntax errors in your Classes.xml. That's most likely the problem is.
2) make sure it's actioned correctly
3) are the units showing up on the tech tree (if they're not, but they're in the pedia, it's another class issue)
4) ???
5) In the event any of the above do not work, bash your head into your keyboard multiple times and then throw your PC out of the window

Have a good night!
 
I found it !!!
It was as you said in the unit classes xml file

Mine was <iMaxGlobalInstances>-1</iMaxGlobalInstances>

The actual is <MaxGlobalInstances>-1</MaxGlobalInstances>

This is all because I reuse some point of the Civ IV xml. But thanks for pointing out which file.
 
Great! Glad it works!
 
Back
Top Bottom