Page 1 of 1

Goods XML

Posted: Sun Feb 18, 2007 8:50 pm
by willie g
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

Posted: Sun Feb 18, 2007 10:31 pm
by gforce
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:

Posted: Sun Feb 18, 2007 11:20 pm
by snoopy55
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.

Re: Goods XML

Posted: Tue Feb 20, 2007 6:40 pm
by choobacca
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.

Posted: Tue Feb 20, 2007 6:46 pm
by willie g
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