Trouble loading maps??? Read this.

Trouble getting the game to run? Ask here!
choobacca
Posts: 190
Joined: Wed Jan 24, 2007 7:46 pm

Trouble loading maps??? Read this.

Post by choobacca » Tue Feb 06, 2007 6:22 pm

I figured I would start a topic on this since people are having more and more trouble loading maps. I think I have a solution that has been working so far for me. I have never had to reload Railroads since the day I installed it because I understand what is going on with the XML and have seen my share of problems with maps and have corrected them.

So here is the system I use:

Almost all problems related to a map that CTDs before it loads is related to the XML files in your CustomAssets\XML directory tree. Of course you also need access to the .nif, .kfm, .tga, etc. files that the XML references.

I have all kinds of maps "installed" in my CustomAssets\XML\_SCENARIOS_ directory, and they all load fine as long as I stick to the following file structure:

CustomAssets directory
<necessary .FPK files>
  • XML (directory contains global xml files)
    • RRT_Trains.xml (contains all trains for all maps)
      RRT_TrainCars.xml (contains all cars for all maps)
      RRT_Goods.xml (contains all goods for all maps)
      ...
    • _SCENARIOS_ directory
      • CustomMap1 (directory contains map-specific xml files only)
        • map_CustomMap1.tga
          map_CustomMap1_thumbnail.dds
          RRT_Goods_CustomMap1.xml
          RRT_Trains_CustomMap1.xml
          RRT_TrainCars_CustomMap1.xml
          ...
        CustomMap2 (directory contains map-specific xml files only)
        • map_CustomMap2.tga
          map_CustomMap2_thumbnail.dds
          RRT_Goods_CustomMap2.xml
          RRT_Trains_CustomMap2.xml
          RRT_TrainCars_CustomMap2.xml
          ...
        ...
The global XML files contain the game elements for all maps you want to work together. For example, the RRT_Trains.xml must contain all the trains from the base game + RRT_Trains_CustomMap1.xml + RRT_Trains_CustomMap2.xml + ....
Likewise, the RRT_Goods.xml must contain all the goods from the base game + RRT_Goods_CustomMap1.xml + RRT_Goods_CustomMap2.xml + ....

So when you download a map that has new trains or train cars, or goods that are not in the base game, these new trains, train cars, and goods must be added to your global XML files, or the map will not load.

Another rule to this is that no global files can appear in the individual scenario directories. So RRT_Trains.xml should only be in your XML directory, and not found in any of the individual scenario directories. So I removed the RRT_Goods.xml and RRT_Trains.xml files from the Santa directory, but copied the new goods (Rocking Horses, Toy Soldiers, Teddy Bears, etc.) to my global RRT_Goods.xml file, and the Holiday train to my global RRT_Trains.xml file before removing these files from Santa. Not doing this may cause another map to not load.

So now I am able to load all maps just fine.
I have this structure set up for you to download for the ChicagoToTheRockies and SuperBowlExpress maps since I ran into this when creating these maps. These maps work fine with Santa and Scrooge because the global XML files contain all the elements from all four maps (and all the base maps of course).
This update is on page 2 of the ChicagoToTheRockies topic if you want to download and take a look.

Keep in mind that settings in the global XML files are what is used if nothing is specified in the map-specific XML files. Therefore, setting the prices of bridges and tunnels in the global XML file will affect all maps that do not set their own prices. The solution to this is to leave the global settings alone, but modify the prices in the map-specific XML files.

Please let me know if you have problems with this solution with a specific map or maps and I can look into these maps.
Also let me know if implementing this solution has or has not solved your problems, and which maps you have in your _SCENARIOS_ directory.

Hopefully we can all be playing all kinds of maps without frustrating loading troubles.

choobacca

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Tue Feb 06, 2007 6:59 pm

Excellent information and it totallly makes sense. Not the easiest way for the user but game developers don't always make things easy for the modding community.

Thanx for your efforts. I had been hesitent on adding map mods till I had finished more of the game but if others try this and have success then I will take the plunge.

DF

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

Post by snoopy55 » Tue Feb 06, 2007 10:57 pm

Choobaca - so basicly what can be done is copy all the XML files from \Sid Meier's Railroads!\Assets\XML into CustomAssets/XML. Does this mean that in using the Cowhides and Footballs in the Super Bowl Express that you need to add these items to the Goods XML file and any other nessesary parts to other files? This would cut down on the download size and the space used by the programs.
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

What About The UserMaps Folder?

Post by Dr Frag » Tue Feb 06, 2007 11:44 pm

Oh Hey, does this mean that you don't have anything in the UserMaps folder??

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

Post by choobacca » Wed Feb 07, 2007 1:31 am

snoopy55 wrote:Choobaca - so basicly what can be done is copy all the XML files from \Sid Meier's Railroads!\Assets\XML into CustomAssets/XML. Does this mean that in using the Cowhides and Footballs in the Super Bowl Express that you need to add these items to the Goods XML file and any other nessesary parts to other files? This would cut down on the download size and the space used by the programs.
The XML files under \Assets\XML provide the elements of the base game. These are the files I used to start with. Then I added the elements from the Santa map, and then ChicagoToTheRockies (Taconite), and the SuperBowlExpress (Cowhides and Footballs). So my RRT_Goods.xml file contains all the goods from all these maps. Then I can use any of these goods in any of my maps.
My RRT_Trains.xml contains all the base trains, plus Holiday train and GP7. Then I can use the GP7 in any of my maps.

Get it? When I download new maps, I check for new goods and trains and add them to my global XML files. That way I can use any of these goods/trains in my future maps and not have to hunt for the map that used them later.

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

Re: What About The UserMaps Folder?

Post by choobacca » Wed Feb 07, 2007 1:35 am

Dr Frag wrote:Oh Hey, does this mean that you don't have anything in the UserMaps folder??
My UserMaps folder is empty. I have all my maps in the _SCENARIOS_ directory. But I believe the UserMaps directory would work too. Everyone refers to the _SCENARIOS_ directory though since this is where the Santa map installed. I just kept all the maps together there.

You can create any folders you want under CustomAssets and the game will find the files. I have all the decals in CustomAssets\Decals and all new train cars in CustomAssets\TrainCars and all new trains in CustomAssets\Trains, etc.

User avatar
CeeBee51
Posts: 141
Joined: Sun Dec 17, 2006 9:58 pm
Location: Chase BC Canada
Contact:

Post by CeeBee51 » Wed Feb 07, 2007 1:38 am

Choobacca, you're a GENIUS!!! :):):) After following your advice I now have the Chicago, Superbowl, Santa and Scrooge map working :)
I also had to use Snoopy's fix for the nameless cities on the Santa map so thanks there as well. Too bad Firaxis made it so difficult and then to boot never gave us the scoop but I'm sure glad we have guys here who can figure this stuff out for the rest of us. Thanks again and keep on making those cool maps :)

User avatar
klemc
Posts: 14
Joined: Wed Jan 10, 2007 2:02 pm
Location: Slovenia

Post by klemc » Wed Feb 07, 2007 3:33 pm

Choobacca

I installed the holiday scenario (file from firaxsis homepage)!
It installed it in a directory named santa in my CustomAssets/XML/_SCENARIOS_/Santa but in the game I can not see the map.

Then I copied whole santa directory and pasted it in
My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML\_SCENARIOS_\santa

I also changed RRT_Trains and RRT_goods in my Assets/XML directory like you suggested.

The files NewTenders.FPK, SuperBowlExpress.FPK, TrainLiveryPack1.FPK and SDSmods.FPK are present in my CustomAssets directory.

Now the map is visible but i get CTD as soon i try to load the map :cry:
All of the other maps are working fine.

Help an old fool 'couse the force is strong in you I feel, like master Yoda would say.

THX

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

Post by choobacca » Wed Feb 07, 2007 5:41 pm

klemc wrote:I installed the holiday scenario (file from firaxsis homepage)!
It installed it in a directory named santa in my CustomAssets/XML/_SCENARIOS_/Santa but in the game I can not see the map.

Then I copied whole santa directory and pasted it in
My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML\_SCENARIOS_\santa
...
Now the map is visible but i get CTD as soon i try to load the map :cry:
All of the other maps are working fine.
Klemc,
The Holiday scenario installer should have installed to "My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML\_SCENARIOS_\Santa". If so, the game should have seen and loaded it fine.
Or are you saying the installer put it in "C:\CustomAssets\XML\_SCENARIOS_\Santa"??? If this is the case, did you specify to the installer to put it here? If so, you can uninstall the Holiday Scenario and reinstall to "My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML\_SCENARIOS_\Santa".

The scenario installs resource files too, so simply copying the Santa xml files will not work because it can't find the resource files.

FYI: When people refer to the "CustomAssets" directory, they mean "My Documents\My Games\Sid Meier's Railroads!\CustomAssets".

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Wed Feb 07, 2007 6:31 pm

I think he means C:\ :P
Gigabyte GA-EX58-UD3R mobo - Core i7 920
G.SKILL 3x1GB PC3 10666
MSI 8800GT Graphics Card
WD 150GB Raptor System Drive
WinXP Pro SP2 (LANfest Old Gamer Prize)

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

Post by snoopy55 » Wed Feb 07, 2007 7:56 pm

This is why I was trying to figure out why the game required say, RRT_Goods.xml with the newly created goods along with RRT_Goods_NewMap.xml. First, it sucks alot of memory from that C drive (I only use C for Windows and a few other things, everything else is in a different drive). Second, if you have two programs with new Goods, they don't seem to work because they're confused by duplicit files (RRT_Goods.xml).
So what is needed is instructions included in Maps with new items is the part of the XML that needs to be added to these XML files that are in the XML folder. We need instructions written to be used in each map like that so these things can be put into these XML files. These instructions also need to be written for someone who knows nothing about making these changes.
New Trains, Train Cars, Goods, Industries, even Quayle need to have the XML files added. If I have DogWorld in _Scenarios_, I get the dog in every Map. Just to do my mapping on Hill Valley Steaks I had to empty my _SCENARIOS_ folder because of interference.
Doing this will allow map creaters to only put in needed programming in the maps, such as, instead of:

<Good>
<szName>Footballs</szName>
<szClass>FastFreight</szClass>
<szGTMLIcon>Assets/Interface/Goods/icon_Football_32.tga</szGTMLIcon>
<BitmapLarge>
<szFile>Assets/Interface/Goods/icon_Football_64.tga</szFile>
</BitmapLarge>
<BitmapSmall>
<szFile>Assets/Interface/Goods/icon_Football_32.tga</szFile>
</BitmapSmall>
<BitmapTiny>
<szFile>Assets/Interface/Goods/icon_Football_16.tga</szFile>
</BitmapTiny>
<BitmapCar>
<szFile>Assets/Interface/Cars/Footballgoods.tga</szFile>
<uiX>0</uiX>
<uiY>0</uiY>
<uiWidth>32</uiWidth>
<uiHeight>16</uiHeight>
</BitmapCar>
<BitmapCarEmpty>
<szFile>Assets/Interface/Cars/FootballgoodsEmpty.tga</szFile>
<uiX>0</uiX>
<uiY>0</uiY>
<uiWidth>32</uiWidth>
<uiHeight>16</uiHeight>
</BitmapCarEmpty>
<Color>193,178,125</Color>
<MinPrice>15000</MinPrice>
<MaxPrice>25000</MaxPrice>
<szIndustryLeaderTitle>Quarterback</szIndustryLeaderTitle>
<szIndustryPlayerTitle>Ball Boy</szIndustryPlayerTitle>
</Good>

in the file they need only put:

<Good>
<szName>Footballs</szName>
</Good>

as long as the first part is put into the RRT_Goods.xml that is stored in the XML folder.

Dr Frag - The UserMaps is used by the Editor, but maps can be put there also.

CeeBee51 - I don't think they really expected anyone to start creating things like this.

This can be translated by anyone who can understand it. :shock:
I'm correct 97% of the time..... who cares about the other 4%....

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

Post by choobacca » Wed Feb 07, 2007 10:04 pm

snoopy55 wrote:This is why I was trying to figure out why the game required say, RRT_Goods.xml with the newly created goods along with RRT_Goods_NewMap.xml.
snoopy55,
I think you are right about this point. You probably don't need the new good in the RRT_Goods.xml AND RRT_Goods_NewMap.xml, but just in the NewMap one. But if you only have it in the NewMap one, it must spell out every parameter. (More XML)
This makes sense. Which leads me to believe the game loads the RRT_Goods.xml first and the map's xml second and adds xml nodes if they don't exist, but overwrites node elements if they do. (if you don't understand that last scentence, don't worry about it.)
I will test this again to make sure.

One thing is for sure, you should never have these global XML files (RRT_Goods.xml, RRT_Trains.xml, etc.) in the scenario directories or they will not run with other maps, namely Santa since Santa used their own RRT_Goods.xml and RRT_Trains.xml. Now anyone else who creates their own will interfere with Santa, and nobody wants to get on Santa's naughty list. :)

The idea is to make new maps easy to download and run that don't interfere with other maps. Modifying XML files is not easy and is also risky.

Thanks snoopy55, now I will probably have to redesign my system. :wink:
To be continued...

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

Post by snoopy55 » Wed Feb 07, 2007 11:04 pm

choobaca - I removed the 'Cowhides' from RRT_Goods.xml in Hill Valley Steaks and the map wouldn't load. I put it back, it ran. Moved all the "Plain" XMLs to the XML folder and the map ran. In this case it was RRT_Goods, RRT_Industries and RRT_TrainCars. I then cut the 'discription' from Cowhides, everything but the name, and it ran.

So, within the Map, all can be cut to bare minimum, unless you are putting in special things like location or input/output. The RRTxxxxx.xml files in XML must have all the info for the new stuff. This could also be stored in the original XML files, but it's best to stay out of there.

As I mentioned elsewhere, the ins and outs of this needs to be put into Map posts to cut down on CTDs due to new things in new Maps.
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
klemc
Posts: 14
Joined: Wed Jan 10, 2007 2:02 pm
Location: Slovenia

Post by klemc » Wed Feb 07, 2007 11:18 pm

Whoa guys, let's slow the pace down..... :?

1.) The holiday scenario that i picked up from the homepage actually installed the santa directory to E:\Games\Sid Meier's Railroads!\CustomAssets\XML\_SCENARIOS_\Santa which is my directory for games only and where I installed the game (has nothing to do with C:\)

2.) I am aware that all user maps that I download are put in C:\Documents and Settings\Klemc\My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML\_SCENARIOS_

3.) All the *.FPK files are in C:\Documents and Settings\Klemc\My Documents\My Games\Sid Meier's Railroads!\CustomAssets

4.) I will try to uninstall the holiday patch and install it again to the right location and see if I can fix the problem.

THX for the help!

Live & Prosper

User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

Post by Dr Frag » Wed Feb 07, 2007 11:36 pm

I'm thinking that mods should not contain Global XML files. If a mod needs information to be added to a Gloabal XML file then the XML snippets should be added to the ReadMe.txt file with instructions on how to insert them.

That being said maybe a ReadMe.txt template can be drawn up with consise instructions on how to add XML snippets to the Global XML files and then modders can just add their snippets to the ReadMe when they release it.

Or you can just slap me silly and I'll shut up. :wink:
Last edited by Dr Frag on Wed Feb 07, 2007 11:38 pm, edited 1 time in total.

Post Reply