UserMaps vs CustomAssets Folder??

Discuss maps, trains and other modding topics
User avatar
Dr Frag
Posts: 348
Joined: Thu Feb 01, 2007 1:06 am
Location: Southern California
Contact:

UserMaps vs CustomAssets Folder??

Post by Dr Frag » Wed Mar 07, 2007 6:10 pm

As G3mInI pointed out in this thread comment it might be better to place the Scenario folder inside UserMaps and not CustomAssets\XML\_SCENARIOS_ because it might cause conflicts.

I hope this doesn't rub anybody the wrong way but I think it is worth investigating. If anyone has any insight into this or wants to start experimenting (I will try to do some) please post your experiences.

DF
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)

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

Post by choobacca » Wed Mar 07, 2007 6:44 pm

Dr Frag,
I didn't think this would make a difference. We need to test this to make sure.

Is there a Firaxian out there who can confirm how the CustomAssets folder is used vs. the UserMaps?
Are they treated differently or one in the same when it comes time to loading XML files and game assets?

If they are treated the same, then it doesn't matter where maps, XMLs, and FPKs go.
If they are treated differently, then we need to investigate the advantages and disadvantages of moving files around.

User avatar
atani
Posts: 293
Joined: Tue Dec 19, 2006 5:01 pm
Contact:

Post by atani » Wed Mar 07, 2007 7:14 pm

choobacca wrote:Dr Frag,
I didn't think this would make a difference. We need to test this to make sure.
I am thinking that the only difference is that if we modify "global" XMLs and place them under UserMaps/<Map> then it might be local to only that Map. Having it in the "CustomAssets" tree will make it global to all maps. This is one area which needs to be confirmed, but based on threads on this board this seems to be the behavior people are seeing.

One other advantage to having them under UserMaps is that if people provide a SMR_Scenario file we can open the maps with the in-game terrain editor.

I am fine with updating the various installers I have produced to install to UserMaps instead of CustomAssets if this turns out to be a better placement for them. I would still suggest putting the FPK and non-scenario XML files (industries, goods, etc) into the CustomAssets folder so that there is less duplication and wasted disk space to store these files in each map that wants them.

Mike

User avatar
G3mInI
Posts: 16
Joined: Thu Feb 15, 2007 3:10 am

Post by G3mInI » Wed Mar 07, 2007 8:28 pm

Thank you Dr. Frag for bringing this topic to another thread. I sure did not intentionally mean to hijack Karstens thread with this. As with you, I do think this needs further discussing.

I think atani is right on track (hah! no pun intended!). From my personal observations certain xml files make global changes (all maps) while others don't. As stated above, further testing will be needed to determine which does what. With that said, I think it would be just safer if all custom maps went into the UserMaps folder.

If a player wants changes to be global to all maps (such as a new train, a new industry, or even global economy changes) then the CustomAssets folder is the place to be.

As a start to this testing, I have placed the Arizona map in my UserMaps folder. Tunnels are extremely expensive, yet this only pertains to the Arizona map. All other maps, the cost of tunnels is normal. This is the desired result of karsten I do believe.

G3mInI

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

Post by choobacca » Thu Mar 08, 2007 3:44 am

After some testing, I concluded that the global XML file system is still needed if the maps are in the UserMaps directory. In other words, it makes no difference if the maps are in the CustomAssets\XML\_SCENARIOS_ directory or the UserMaps directory.

My tests were as follows:
I emptied my CustomAssets\XML and UserMaps directories.
I installed ChicagoToTheRockies map into UserMaps and put the generated global XML files into its map directory.
I installed SuperBowlExpress map into UserMaps and put the generated global XML files into this map directory.

Results: ChicagoToTheRockies wouldn't load, but SuperBowlExpress loaded fine because the game loaded the global XML files from the SuperBowlExpress map each time.

Then I made the global XML files in the ChicagoToTheRockies map directory newer by saving them giving them a new time stamp.

Results: ChicagoToTheRockies loaded fine, but SuperBowlExpress would not load, for the same reason as before.

Other tests:
I put the Arizona Gold map in the UserMaps directory. As you know, this map has a global RRT_Tunnels.xml file that sets the price of tunnels very high. I saw this infect all my maps in the UserMaps directory.

So, the lesson is that global XML files affect every map no matter where they are located. Therefore we still need to make every effort to keep globals out of map directories and in a central location as Atani's installers have been doing.

If anyone has tests that can prove me wrong, I would like to hear specifics.

User avatar
atani
Posts: 293
Joined: Tue Dec 19, 2006 5:01 pm
Contact:

Post by atani » Thu Mar 08, 2007 4:39 am

choobacca wrote:After some testing, I concluded that the global XML file system is still needed if the maps are in the UserMaps directory. In other words, it makes no difference if the maps are in the CustomAssets\XML\_SCENARIOS_ directory or the UserMaps directory.
Based on this information, I think that there is a bug in the game whereas it does not read the RRT_Tunnels_<scenario>.xml for anything but the szName fields. All other XML files appear to read the scenario specific files fully (like in Hill Valley Steaks has all trains enabled from 1850 by defining szName and year fields).

Mike

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

Post by snoopy55 » Thu Mar 08, 2007 5:47 am

Thr RRT_Tunnels XML is a bad baby. I tried to make a RRT_Tunnels file so that there were 2 of them with different names, RRT_Tunnels.XML and RRT_Tun_High.xml. My system let out a nasty static noise ANYTIME sound was used, even outside of the game! I had to restart my system to get rid of it. Now this would be an XML that we need Firaxis to re-adjust for us to play around with.

As to placement of files, CustomAssets is just a 'Custom' place to put the 'Assets' that are in the main game. UserMaps is just a place to store maps that you create or experiment on. Does anyone remember when this folder was created? Which upgrade?
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 » Thu Mar 08, 2007 5:51 am

atani wrote:Based on this information, I think that there is a bug in the game whereas it does not read the RRT_Tunnels_<scenario>.xml for anything but the szName fields. All other XML files appear to read the scenario specific files fully (like in Hill Valley Steaks has all trains enabled from 1850 by defining szName and year fields).

Mike
Mike,
I saw the same thing. So people are going to have to choose if they want expensive tunnels or not for all their maps, or put the global RRT_Tunnels.xml in the game when they do. Kind of a pain, but just another problem we have to work around the best we can.
I like expensive bridges and tunnels, so I'll just keep these globals for all maps I have installed.

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

Post by snoopy55 » Thu Mar 08, 2007 6:01 am

Hey guys, thought just hit me, Tunnels cannot be changed, but Bridges can :wink: .....can the XML programming from Tunnels be added onto Bridges and manuvered from there????? :twisted:
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 » Thu Mar 08, 2007 6:26 am

More testing shows that even if I installed Arizona Gold in UserMaps by itself, and I had other maps in CustomAssets, the global RRT_Tunnels.xml in UserMaps affected my maps in CustomAssets. So these GLOBAL XML files really do have GLOBAL influence.

User avatar
G3mInI
Posts: 16
Joined: Thu Feb 15, 2007 3:10 am

Post by G3mInI » Thu Mar 08, 2007 1:24 pm

RRT_Tunnels_AnyName.xml = global for all maps regardless of placement.

Are there any other of these global xml files that we know of?
We need a working list of which files are global and which are local.

All I know thus far is that RRT_Bridges_AnyName.xml is local. I have been working with that file for a while now.

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

Post by choobacca » Thu Mar 08, 2007 4:32 pm

G3mInI wrote:RRT_Tunnels_AnyName.xml = global for all maps regardless of placement.

Are there any other of these global xml files that we know of?
We need a working list of which files are global and which are local.

All I know thus far is that RRT_Bridges_AnyName.xml is local. I have been working with that file for a while now.
G3mInI,
The only files that are "global" (files that affect all maps) are those that do NOT have the map name in them. So RRT_Trains.xml IS global, but RRT_Trains_mymap.xml is not. RRT_Tunnels.xml IS global, but RRT_Tunnels_AnyName.xml is not.
In other words, RRT_Trains_mymap.xml will not be used by another map no matter where this file is placed (unless of course another map's RRT_Scenario_mymap2.xml points to RRT_Trains_mymap.xml). But RRT_Trains.xml could be loaded by ANY map that needs more info than what the map's Trains XML file contains.

If your map's Trains XML file only contains lines like:
<Train>
<szName>TAG_NAME_F_SERIES</szName>
</Train>
<Train>
<szName>TAG_NAME_GOLDEN_STATE</szName>
</Train>
<Train>
<szName>TAG_NAME_GP_SERIES</szName>
</Train>

as many maps do, this isn't enough for the game to load these trains, so the game finds the "global" RRT_Trains.xml file with the latest time stamp and loads this to fill in the details for these trains (model files, speed, sounds, etc.).

The problem comes when you don't know how many RRT_Trains.xml files you have in your map directories and which is the newest. This is why we have been using a single copy of these global XML files so we know which one the game will load -- only the one we make available.

User avatar
G3mInI
Posts: 16
Joined: Thu Feb 15, 2007 3:10 am

Post by G3mInI » Thu Mar 08, 2007 5:17 pm

As far as the Arizona map is concerned...

I renamed RRT_Tunnels.xml to RRT_Tunnels_Arizona.xml and changed the relevant info in the scenario.xml file to point to this file and yes it did work, but it also made tunnels expensive in all maps. I figured by putting the _Arizona at the end would make it custom to that map only, but alas that did not work. It still took on a global impact in the game.

I am getting confused on what is global and what is not.

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

Post by choobacca » Thu Mar 08, 2007 5:40 pm

G3mInI wrote:As far as the Arizona map is concerned...

I renamed RRT_Tunnels.xml to RRT_Tunnels_Arizona.xml and changed the relevant info in the scenario.xml file to point to this file and yes it did work, but it also made tunnels expensive in all maps. I figured by putting the _Arizona at the end would make it custom to that map only, but alas that did not work. It still took on a global impact in the game.

I am getting confused on what is global and what is not.
That is funny because I saw the opposite. I did the same name change and scenario.xml file update, and then the tunnels in Arizona were not expensive. Are you sure you don't have another RRT_Tunnels.xml somewhere else in your maps folders that is trumping all your local ones?

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

Post by snoopy55 » Thu Mar 08, 2007 10:40 pm

OK, I've found that the only 'GLOBAL' of RRT_Tunnels.xml that exists is the one in the game folder.

LG stands for Lama's Germany.

In LG I changed the tunnel cost to 300000. playing it, I only paid the 3000 price. I went into the Games Tunnel XML or Master, and gave them a 300000 price. I paid the high price. So I went into LG and set it for 30. Still paid the high price. I copied the RRT_Tunnels_Germany.xml from LG into C:\Documents and Settings\me\My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML and removed the '_Germany'. At this point I was paying the 30 price.

The game for some reason seems to see the RRT_Tunnel.xml file as absolute and doesn't seem to see a RRT_Tunnels XML with a map name in it.

G3mInI - what has come to be known as 'GLOBAL' is a set of XML files placed in C:\Documents and Settings\me\My Documents\My Games\Sid Meier's Railroads!\CustomAssets\XML in which changed or newly created items are put. You made the staement "From my personal observations certain xml files make global changes (all maps) while others don't." and in a way, you were correct. This is why the GLOBALS were created.

All the maps use the original game file RRT_TrainCars.xml. When choobacca (and I'm not picking on him) created Chicago to the Rockies, he added 2 new cars. To do this he took the original RRT_TrainCars.xml and added 2 cars to it and included it in his map ZIP. This in no way affected the existing maps as they used all the cars in it. The GAME now accessed his RRT_TrainCars.xml all the time and not the original. When he created Super Bowl Express, he again created 2 new cars and again copied the original and added the new cars. So now there was a 3rd RRT_TrainCars.xml in the system which the GAME now accessed all the time. If you played Chicago to the Rockies, it would crash because it couldn't see it's 2 new cars.

Problem. :o

The solution came from choobacca in the way he was handling it by making a single RRT_TrainCars.xml and ADDING anything new to it. In this way all the Maps would use that file and anyone could use new cars in their maps.

So you see (I hope) the last XML that is not named for a specific map will become a Global and take over control of data. This is why the GLOBALS was started and is used. There are other ways used, but that's for someone else to explain.

If I've confused you, I'm sorry. Just send a letter with 5 copies in 5 colors stating your problem and I'll get back to you sometime......... :twisted:
I'm correct 97% of the time..... who cares about the other 4%....

Post Reply