XML Reference Discussion

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

XML Reference Discussion

Post by Dr Frag » Wed Mar 21, 2007 11:56 pm

Okay dudes, I am working on the XML Reference in the Wiki and I have a question. When you guys are mucking about with the XMLs do you always go back and make sure the Global XML files have the newest date? I remember reading that if the Local XMLs have a newer date than the Global XMLs there could be a problem with how information is loaded. I looked around and found a small utility called Touch that modifies the date of a file so I wrote a batch file and put it in my CustomAssets\XML folder (along with touch.exe) that I can execute anytime I change the Globals. I made the batch file set the file date to Jan 1, 2010 so I should have no trouble for awhile if I continue to muck about with the Local XMLs.

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)

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

Post by snoopy55 » Thu Mar 22, 2007 5:52 am

Unless I'm sadly mistaken, and I guess that is possible, the problem you skeak of only happens if say you save the RRT_Goods.xml (GLOBAL) one day, then later you save, in a map, RRT_Goods.xml. The game will go after the XML in the map first, then the GLOBAL if it can't find what it seeks. If you second file is called say RRT_Goods_England.xml, it will have no ewffect on other maps. This is the reason we got people to stop making non map specific XMLs in their maps and started using the GLOBALS. You map files give minimum information:

Code: Select all

  <Good>
    <szName>Livestock</szName>
  </Good>
A few maps still have full info for new items, which could be fixed, but doesn't cause a problem.

Did I make that clear :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 » Thu Mar 22, 2007 2:59 pm

Snoopy is correct. There is only a problem when there are more than 1 occurance of a global XML file (RRT_Goods.xml for example) in the entire CustomAssets tree. Then the game loads the newest one.

This applies to any file that has 2 occurances. If you have 2 Coal_car.nif files in 2 different directories or FPK files in CustomAssets, the game will use the newest one.

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

Post by snoopy55 » Thu Mar 22, 2007 4:41 pm

I knew there was an easier way to say it :wink:

Another thing that has to be watched for is the same map names in 2 different maps.
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:

Post by Dr Frag » Thu Mar 22, 2007 9:47 pm

So multiple files with the same name are a No-No.
I guess we could use a good find duplicate file names program.

Thanx guys,
DF

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

Post by snoopy55 » Fri Mar 23, 2007 12:58 am

As long as mappers use a name for their XMLs that matches or is close to the map name, you only have to make sure your map name is different, along with your XMLs.
I'm correct 97% of the time..... who cares about the other 4%....

Post Reply