Question : What functions as the WareTemplate.txt file in X2 ?

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

exogenesis
Posts: 2718
Joined: Sun, 9. Sep 07, 15:39
x4

Question : What functions as the WareTemplate.txt file in X2 ?

Post by exogenesis »

Question : What functions as the WareTemplate.txt file in X2 ?

I know X3 has the WareTemplate.txt game-file to
e.g. set the product/resources of factories that dont appear in the X3universe.xml file.

But X2 does't have one, and some factories don't appear in the X2universe.xml file.
e.g. I see there's a Hornet Missile factory for sale at the Great Reef shipyard,
but there's no entry in X2universe.xml for any instances of a Boron Hornet Missile factory.
So how does the game know what wares to show for it when you buy & build one?

Probably a simple question, but I hope the answers is not 'its hardcoded'


Thanks for any enlightenment !


{moved to X2 forum - Carlo}
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

The quick answer is:
it IS hardcoded.

But the resources a factory needs can be changed by scripts to a certain extend.

What does your question aim at?
--------------------------------

[ external image ]
exogenesis
Posts: 2718
Joined: Sun, 9. Sep 07, 15:39
x4

Post by exogenesis »

I'm writing a standalone game-guide/util application & want to avoid as much hard coding as possible of game identities.
So I'm reading in the X2_universe.xml file (and X3_ one) to get a fully defined instance of each type of factory.

If wares are hardcoded in X2 then I'll have to hardcode as well.
In X3 the WareTemplate.txt file defines all those types not found in the universe xml,
so I was hoping no hardcoding would be required.

Yes scripts can add & control a factories ware-list, but I was assuming any mod (for X3)
would add any new factory type to WareTemplate, cos it's clearer/easier.

Having said that, Ashley's Fabs (XXL etc) for X3 did it all in scripts,
with only the TFactories.txt having any info about new types,
so maybe I've got to have a hard-coded fall-back in X3 as well for this situation, oh well.

Return to “X²: The Threat - Scripts and Modding”