Page 1 of 1

Adding Trains in XML Questions

Posted: Sat Apr 28, 2007 2:32 am
by HisAlterEgo
New user here and been playing around with adding trains to new maps. Got the AC4400 Dual added to a map and works great however the dummy engine is a different color, NO big deal as it give a real world effect of different engines paired. At any rate, trying to add engines from the 9 Diesel Pack and having no luck. I downloaded one of the Florida maps and I noticed that there is no RRT_Trains <mapname> XML in that scenarios assets folder. I thought I read somewhere that if there wasn't an XML for it then it would use the trains listed in the global XML as default. Well, it is using trains but not every one listed in the global. How does it know which ones to use? If this is the case, couldn't I delete the RRT_Trains <mapname> XML from each scenario and it would theoretically use them all by grabbing them from the global XML?

Posted: Sat Apr 28, 2007 3:07 am
by dwax
There was one Florida map that never had the Trains XML. Can't think witch one, but I added mine with all the duals and then made reference to it in the SenerioXML and the all showed up. I think if there are no Map trainsXML it has to show reference to the TrainsXML in the C:\Documents and Settings\Owner\My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML

Posted: Sat Apr 28, 2007 4:06 am
by HisAlterEgo
Thnx for the reply. It just makes me wonder if there is no RRT_Trains<mapname>.xml in the scenario and it is grabbing the engines from the global xml, how does it know which ones to use?

Also, on the Australia map, I added the AC4400 Dual information to the RRT_Trains<mapname>.xml but saw no dummy engine in game. Even though it's said in the forums that you don't need to add the dummy information to the RRT_Traincars<mapname>.xml to get it, the dummy engine only appears in the map if I do put it in the RRT_Traincars<mapname>.xml.

Just trying to understand what all this means. Thanks for the help.

Posted: Sat Apr 28, 2007 5:26 am
by snoopy55
As to the Florida map. If the line is <TrainsXMLFile/> then it uses the GLOBALS. The Florida, (not the FloridaTestBuild) has this line:
<TrainsXMLFile>RRT_Trains_US_East.xml</TrainsXMLFile>
which sends it to the Original US East maps Trains file. FloridaTestBuild has a set of trains to use. The 9 Pak was mine and I'd have to look it over to see what I had set up. Us old people have memory problem....I think... :wink:

Posted: Sat Apr 28, 2007 7:42 am
by Dr Frag
To add to snoopy's post the XMLs that get used are defined in the RRT_Scenario_User_<scenarioname>.xml file and like snoopy said it is probably pointing to a different RRT_Trains_<scenarioname>.xml file.

Make the line read
<TrainsXMLFile>RRT_Trains.xml</TrainsXMLFile>
or like snoopy said use
<TrainsXMLFile />
but I like to explicitly reference the XML just to be sure and if I want to change it later it's less typing. :P