Goods XML

Discuss maps, trains and other modding topics
Post Reply
User avatar
willie g
Posts: 24
Joined: Tue Feb 06, 2007 7:08 pm

Goods XML

Post by willie g » Sun Feb 18, 2007 8:50 pm

I see that some Custom maps include both a RRT_Goods.XML AND a RRT_Goods_'Custom'.XML file.
Others only contain the 'Custom' file.
Why do you need both in some cases and only the one in others?

I am trying to create a scenario which does contain 'custom' goods.
Can I not just take an existing good and modify it?
Or must I add it to the RRT_Goods XML file also?
Help me through this,
thanks,
-willie g

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Sun Feb 18, 2007 10:31 pm

The best is that you make a copy in the xml of an excisting good, so every parameter is included, rename it to your good, as long as you don't have some new icons made, just use those of the copied good
Do this in the global xml file, in your map_xml file you just reference to this good, and that should made it work
if you've got a problem, do ask... and have a look at some examples fe footballs from the superbowl express
:wink:

snoopy55
Posts: 1962
Joined: Mon Nov 06, 2006 5:13 am
Location: Centralia, Ill, USA

Post by snoopy55 » Sun Feb 18, 2007 11:20 pm

willie g - between work on the Global files set-up I'm working on a mappers set-up for the global files. It gives info on creating your own Goods and such. If my dogs don't drive me crazy with competing as to which can bark first and longest and loudest at every noise that sounds like a car door, I should have it in a day or two. (They are all 3 female, and it's that time of the year for 2 of them :wink:

The dogs stayed quiet.(they look cute up on that shelf :twisted: ) and the post can be found in Railroads! Technical Issues.
I'm correct 97% of the time..... who cares about the other 4%....

choobacca
Posts: 190
Joined: Wed Jan 24, 2007 7:46 pm

Re: Goods XML

Post by choobacca » Tue Feb 20, 2007 6:40 pm

willie g wrote:I see that some Custom maps include both a RRT_Goods.XML AND a RRT_Goods_'Custom'.XML file.
Others only contain the 'Custom' file.
Why do you need both in some cases and only the one in others?

I am trying to create a scenario which does contain 'custom' goods.
Can I not just take an existing good and modify it?
Or must I add it to the RRT_Goods XML file also?
Help me through this,
thanks,
-willie g
Willie g,
To answer your question, goods that appear in the RRT_Goods.xml file have all the parameters that define the default good. If you want to include this good in your map with all defaults, then you only need to add 3 lines to your RRT_Goods_Custom.xml file:
<Good>
<szName>Footballs</szName>
</Good>

or one line if you format it this way:
<Good><szName>Footballs</szName></Good>

If you do not want to use the default settings for this good, you can add more parameters in your RRT_Goods_Custom.xml that will override the defaults.
<Good>
<szName>Footballs</szName>
<MinPrice>10000</MinPrice>
<MaxPrice>20000</MaxPrice>
</Good>

So if you are creating custom goods, all the default parameters MUST be in the global RRT_Goods.xml file, and you MUST refer to the good from your RRT_Goods_Custom.xml file. Otherwise the map will not load.

User avatar
willie g
Posts: 24
Joined: Tue Feb 06, 2007 7:08 pm

Post by willie g » Tue Feb 20, 2007 6:46 pm

thanks guys, between your inputs and my futzing around I was pretty sure it was something like that - but it's good to see that 'overrides' in writing.
-willie g

Post Reply