The Ghosts of XML past

Discuss maps, trains and other modding topics
User avatar
CeeBee51
Posts: 141
Joined: Sun Dec 17, 2006 9:58 pm
Location: Chase BC Canada
Contact:

The Ghosts of XML past

Post by CeeBee51 » Wed Apr 11, 2007 2:02 am

Something weird seems to be going on and it isn't me.... I don't think :roll:
First a question. Have any of you had a map that was working, maybe one you played a while ago and for old time sake of some other reason you tried to play it again and it did nothing but CTD?
Well, that's what has happened to me, at least as far as I can tell. The map is my BC Gold map and it worked just fine though I hadn't played it in a month or more as I had a modern version I was fooling around with plus all the other maps that were coming online like the Arizona map, Basins & Ranges, etc. Well, over Easter I decided to play the BC Gold map and it did nothing but CTD. Usually just after I had built a couple of stations and got a train or 2 purchased and started. I went through the xml's that I thought could be the problem.... the traincar.xml, trains.xml and the scenerio xml. I even went through the events.xml and removed all the stuff that wasnt needed but nothing helped. Well, finally I got fed up and decidied since the Modern version I have was working, and since the only difference was the scenerio and the trains xml's that I would try and replace one xml at a time, load SMR and try to run the BC gold map. Well, on a whim I tried the goods.xml first, mostly because the CTD's seemed to happen as soon as a train started loading. Surprise , surprise, BC Gold worked as soon as I swapped the goods xml file so I closed things out and opened both files in notepad++. As far as I can see there is nothing different between the files other than some of the formatting in the file that didn't work was different. There were no errors in the code but just some spaces which caused the <goods> or </goods> to not line up withe each other as I scrolled down through the file. Now IMO that really shouldn't make a difference but I'm certainly no expert. What I'm wondering is how the file that quit working got buggered up as I have not opened or edited either file since I copied them to create the new version of the map. Both worked just fine for a long time after anyway so what the heck caused the changes to one. It was the least used and had not caused any problems in the past that I recall. Does a game CTD with one map running cause a problem in some other maps xml on occasion? Am I imagining things or is this just another goofy goofup like the blue smurfy engine problem that I and a few others have? Anybody have any ideas?

gforce
Posts: 234
Joined: Thu Nov 09, 2006 3:24 am
Location: Belgium, Brussels

Post by gforce » Wed Apr 11, 2007 2:37 am

i've had also some major problems with the goods file, (sometimes editing the global goods file by deleting one helped me etc...)
i've already posted so many posts about that, asking about maybe some timestamps problems etc... but there was really no way to find any logic in this, but i never had any answer to this,
samething about the events file that causes all the time problems...
and yes, i've got still those smurfs running around...
the problem will come from the global files because those are the only ones you're sharing with other maps... OR maybe a fpk file (tender car?)
if you've got a crash at loading cars the problem is in traincars...
if you really want to have a good backup of a usermap, just get all the files that this map is using into 1 folder (those 'global' files included)
and have this stored somewhere, want to bring back the backup, just copy it again and be sure you don't have other global files in the custom assets... (i never have more then 1 usermap in usermaps)
no, you're not imagining things, you're just playing a game of firaxis... and you're using the global-files-idea....

Pete
Posts: 97
Joined: Fri Nov 03, 2006 7:06 pm
Location: British Columbia

Post by Pete » Wed Apr 11, 2007 4:09 pm

Same sort of thing happened to me.
Most scenerios were running well for me (the odd CTD) until I loaded the double CN GP38.
After that nothing would load. CTD every time.
Did a reinstall yesterday. Just starting to put things back in.

I really thank you guys for trying to mod this thing, but it seems only scenerios with standard items are safe.

Pete

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

Post by choobacca » Wed Apr 11, 2007 4:40 pm

Maps are independent from one another and do not affect any other. The new installers makes sure of this while it maintains a global XML file system for all maps to share.

If you know a map WAS working, but now is broken, search your CustomAssets and UserMaps directories for global XML files:
RRT_Trains.xml
RRT_TrainCars.xml
RRT_Goods.xml
RRT_Industries.xml
RRT_Depots.xml
RRT_Events.xml

You should only have AT MOST one of each of these files in your CustomAssets\XML directory. If these files appear in any map folder, this map should be removed and re-installed using Atani's installer.

If you don't have extra global XML files, then you can try removing maps from CustomAssets\XML\_SCENARIOS_ and UserMaps and see if this fixes the problem. If you are left with that one "working" map and the global XMLs, then the map is broken and should be reinstalled.

Now with Atani's installers, it is so quick and easy to start over by cleaning out your CustomAssets and UserMaps directories and reinstall maps. I simply keep all the map installers in a directory, and will just run the installers for the maps I want to play. They should all run fine together unless the map-maker simply forgot something in the map. But then wait for an updated installer which usually comes right after the problem is found.

I love how far we have come in making maps and mods and how easy it is getting to install them. It isn't perfect...yet, but we are getting there.

Remember, we are doing the best we can with what Firaxis has given us to work with. I just wish they had put more "hooks" into modding the game if they knew they were going to release such a problematic game.

//EDIT: Mods do need a better installer as it is not always easy to install new engines or to double-head them. This requires editing existing map xml files which Atani needs to add to the installer scripts to make installing mods XML-edit free!

Pete
Posts: 97
Joined: Fri Nov 03, 2006 7:06 pm
Location: British Columbia

Post by Pete » Wed Apr 11, 2007 5:11 pm

Choobacca;
Believe me.......you guys get no criticism from me for all the work you have done.
It's just so damn frustrating, to be running along good, and then have to reinstall again.
I'm trying to use the installer for every load.

Thanks
Pete

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

Post by choobacca » Wed Apr 11, 2007 5:31 pm

Pete wrote:Choobacca;
Believe me.......you guys get no criticism from me for all the work you have done.
It's just so damn frustrating, to be running along good, and then have to reinstall again.
I'm trying to use the installer for every load.
Thanks Pete. You are right. You shouldn't have to reinstall a map once it is working. Could you give us some specifics about which maps you are talking about? Perhaps there is a problem with one of the maps that needs correcting.

Pete
Posts: 97
Joined: Fri Nov 03, 2006 7:06 pm
Location: British Columbia

Post by Pete » Wed Apr 11, 2007 6:36 pm

Since I did the reinstall, the only thing I have put in is the tender car mod and the UK2 map.
I was just playing it minutes ago. All of a sudden I got strange pauses, and then it crashed, got the MS message, and the computer locked up.
I rebooted, and as soon as I did, Norton updated my virus definitions.
The pauses are something Norton does every time it updates, so I have a feeling that may have been the problem. Thats the first crash since I reinstalled.

I'm going to start a log of each time I start a scenerio; time run;and end result.

I notice that UK2 has the timeline adjustment added.
Some have thought that this may be a problem, though not proven.

Let me keep a log for a while and see what happens.

Pete

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

Post by choobacca » Wed Apr 11, 2007 7:03 pm

Pete,
Antivirus or Windows updates or anything running in the background will wreak havoc on Railroads.

You should also enable logging in the game by editing the CustomAssets\settings.ini file and finding the line "Logging = 0". Make this "Logging = 1". Then log files will be created in the CustomAssets\Logs directory. When the game crashes, these files may give an indication as to the reason for the crash.

Pete
Posts: 97
Joined: Fri Nov 03, 2006 7:06 pm
Location: British Columbia

Post by Pete » Wed Apr 11, 2007 7:16 pm

I know what you mean about stuff running in the background.
Set up the logging.

I'll keep a record of what crashes when, and see where we go.

Thanks
Pete

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

Post by snoopy55 » Wed Apr 11, 2007 10:50 pm

CeeBee51 - what kind of structure did you use for the new version.

What I mean is - I loaded BC_GOLD and ran it a short time. Then I thought of something and opened the ZIP download and removed the Foof from Goods. Added a 2 to the end on the Scenario name and to the name in the scenario. Now I had 2 maps to choose from. I started with BC_GOLD, the first one. It crashed before it even opened. The problem runs right back to the GLOBALS problem....BC_GOLD2 was created last, so BC_GOLD went to use its files instead of its own.

Are the XML names in your modern version the same as the older version? This game seems to search the master files then ALL the CustomAssets to find the latest files it needs, not just the files within the folder the game is in. And it uses the newest XML it finds with the same name in the _SCENARIOS_ folder.
I'm correct 97% of the time..... who cares about the other 4%....

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

Post by CeeBee51 » Thu Apr 12, 2007 1:14 am

All the xml's used in the BC modern version are BC_GOLD_Modern while all the xml's used in the original are BC_GOLD. I've been pulling my hair out trying to figure it out. I've re-installed SMR, patched it up to 1.10 and still get CTD's with only the BC Gold map in the usermaps folder. Then I tried cloning the BC Gold modern map which was working. I renamed all the xml's to BC gold and swapped in the BC Gold scenerio and yet within a few minutes it CTD'd. The scenerio folder is the original working version so I'm really stumped. I have not installed any mods so far or any other maps and have removed all Trains.xml references to custom loco's. I'm really getting frustrated with this game and if I wasn't such a railroad nut I'd have used it for a frisbee long ago :(
EDIT: oh ya.... At this point I don't have any globals installed at all so that can't be the problem either.

User avatar
Warll
Posts: 928
Joined: Fri Oct 27, 2006 10:31 pm
Location: Tokyo, Japan
Contact:

Post by Warll » Thu Apr 12, 2007 1:50 am

Din't snoopy have some thing like this happen to him? In his case all he did to fix it was remove a HDD filled with pictures of his grandchildren. Although in your case you may have to reformat.
Image

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

Post by CeeBee51 » Thu Apr 12, 2007 2:19 am

but I don't have any grandkids.... yet :roll: :lol:

User avatar
Warll
Posts: 928
Joined: Fri Oct 27, 2006 10:31 pm
Location: Tokyo, Japan
Contact:

Post by Warll » Thu Apr 12, 2007 3:18 am

Do you more then one HDD? If not or even if so you may have to reformat just to make sure theres nothing conflicting with SMR.
Image

User avatar
Lowell
Posts: 653
Joined: Sat Mar 24, 2007 2:14 am
Location: Georgia
Contact:

Post by Lowell » Thu Apr 12, 2007 4:23 am

When I am writing the scripts for my Darwinia Mod called The_Particles_Within {part two under construction now}...if there are any spaces between the action lines the game will CTD. At the very end of each script you have to hit return twice and leave at least "one" blank line at the end of each or the game would CTD.
It may be possible that the "blank line" you noted...
C33B3351 wrote:There were no errors in the code but just some spaces which caused the <goods> or </goods> to not line up with each other
was the cause of your crash.

Also if you have a map that keeps wanting to crash...move the maps file folder into your user maps file. See if that makes it run.

Post Reply