Creating Custom Stats - How do we add Stats to Enumeration?

I'm making a custom race and want to use a custom stat to go along with it. However, whenever I try to start the game, I get the following error...

D:\___'s Documents\My Games\GalCiv3\Mods\Veluszhi\Game\TechDefs_Veluszhi.xml(2136,48): error:
value 'AdaptiveMutation' not in enumeration

Adding a /Schema/Enums/StatTypes_Veluszhi.xsd with the stat declared did nothing. Does that mean we can't add custom Enums? If so, I'll abandon my custom stat and attempt a workaround. If not, how do we do that?

21,387 views 6 replies
Reply #1 Top

I agree, we should be able to change those.

Does changing the main game files, in this case XSD, help? In that it works without errors? If yes, then Stardock should seriously consider allowing modifications to XSD file too.

Reply #2 Top

The point of the schema is to restrict the XML files to only those options the game implements in code. Modifying the correct types in the core schemas would (if anything) just let it get past validation, but it would still not work.

+1 Loading…
Reply #3 Top

Quoting kryo, reply 2

The point of the schema is to restrict the XML files to only those options the game implements in code. Modifying the correct types in the core schemas would (if anything) just let it get past validation, but it would still not work.

Does this mean we can't add custom stats at all?

Reply #4 Top

When I was trying to create a new hull design, I had to edit the enum files directly in the game directory. Not sure if this helps or not.

Reply #5 Top

Quoting Vidszhite, reply 3
Does this mean we can't add custom stats at all?

Any case involving enums tied to behaviors, assume no, since that's the way most of them are and those require code support.

Cases where the enum doesn't really have any special meaning (like hull types) may work, depending on how they're implemented in the game.

+2 Loading…
Reply #6 Top

Quoting kryo, reply 5


Quoting Vidszhite,
Does this mean we can't add custom stats at all?



Any case involving enums tied to behaviors, assume no, since that's the way most of them are and those require code support.

Cases where the enum doesn't really have any special meaning (like hull types) may work, depending on how they're implemented in the game.

I was afraid of that. Thanks.