Global XML Instructions

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:

Post by Dr Frag » Mon Feb 26, 2007 11:08 pm

Slappy, if the person creating the Scenario adds anything new to the game then some things need to be edited by the user because of the way the game works. If the modder just uses standard game stuff (industries, goods, trainis, etc.) then there shouldn't need to be any editing but the modder does need to package it so that it is easy to install in the right place.

As far as the elevation goes it is the way the creator adjusts the brightness of the grayscale HeghtMap that the game uses to layout the land. You can read my tutorial in the Wiki if you want more info but that might just twist your brain all up.

BTW, karsten and I are working on an Australian Scenario that will hopefully include some new stuff.

DF

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

Re: the spain map

Post by snoopy55 » Mon Feb 26, 2007 11:55 pm

Slappy Da Clown wrote:The point of this thread was to get a set way to upload maps so that all ( including those who dont want to edit maps ) could easily put them in the game & play them

In a way you are correct. This thread was really set up so that any map created in a certain way could be loaded using certain instructions. Map makers cannot be forced to make maps in this fashion, and not all are using this set-up, so each map would have to be made-up in two different ways. One way would allow Global XMLs and the other would allow just moving the unused maps to a different folder.
Slappy Da Clown wrote:In my opinion map makers shouldnt put out maps that have files in them that need editing by the players. Not that my opinion means anything its just what I think.
Yes, your opinion does mean something, many of us listen to Clowns, specially those dressed like polititions :lol: I guess along with how to set up a Global XML system and how to make maps set for Global systems, which, while many have viewed, none have commented on, I'll have to look at making a tutorial on how to take a non-Global map and making it Global.
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
Slappy Da Clown
Posts: 143
Joined: Wed Jan 10, 2007 6:10 pm
Location: Michigans Upper Peninsula USA

please dont misunderstand

Post by Slappy Da Clown » Tue Feb 27, 2007 1:11 pm

Im not saying anyone should do anything any certain way. I am saying its unreasonable to think that all people buying a game will be interested in making what amounts to programming changes to be able to play the game. I think that map makers should include detailed instructions in every file. I think that if the global xmls have to be edited for a map to work the maker should edit ( & test ) them & include them in the map file, not include some incomrehensible lines of code to be inserted into them. It just seems sometimes that modders make mods for other modders & not for those of us who would just like to play the game. It seems that snoopy is on the way to a real user friendly way to do this. Henry Ford realized that standardization was the way to go & I think it would help here too. I hope I havent made anyone mad here, Im just trying to give you guys some perspective from a gamers not a modders point of view. This is a gr8 game & you guys make gr8 maps I just wanna be able to play em all.


Yep thats me at the end of the bar
Slappy Da Clown

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

Post by Dr Frag » Tue Feb 27, 2007 6:18 pm

Slappy, do you understand that the Global XMLs will be different on every persons computer depending on what mods they have installed? And that a modder cannot include Global XMLs with their mod because they do not know what other mods a person may have installed? There really isn't a perfect solution other than Firaxis to include a Scenario manager that you would use to install new mods with.

gforce has come up with a simpler solution that works for him but remember; the Easiest Solution, the Best Solution, and the Most Effiecient Solution are usually completely different and may even differ for each person involved.

I really like the idea of the Global XMLs because I think like that and am really into clean file management but it is not an easy solution.

It would be great if we could create a Master Set of Global XMLs that would be updated with every new mod release so that all you'd have to do is download the new Globals and the mod files and put them in the right directories. Unfortunately that would require quite a bit fo work for someone or group to maintain and test them with every mod release.

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)

User avatar
Slappy Da Clown
Posts: 143
Joined: Wed Jan 10, 2007 6:10 pm
Location: Michigans Upper Peninsula USA

globals

Post by Slappy Da Clown » Tue Feb 27, 2007 11:34 pm

NO Doc

I did not understand that. I was under the impression ( I guess from the word global ) that global files were files that were required by all maps no matter what they added to other files in their map. I assumed ( yes I know what that makes me ) that additions to the global files would be something that was good globally. It just seems to me that there should be some kind of master files that work that way or its never gonna be easy for non modders to play the maps & Im sure all you guys have seen no modders on here & other forums get frustrated by the complexity involved in getting mods to work. After following the instructions at the beginning of this thread I now have a list of maps that will work on my machine. I didnt need to do anything but put these maps in the scenarios folder. I guess Im not understanding why the special stuff of each map wouldnt be contained in the xmls specific to that map. I have not yet tried adding other mods besides maps, so I think Im missing something here but Im tryin to understand. Please bear with me. Thanx for your help.


From out in the garden shed under the wheelbarrow
Slappy Da Clown

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

Post by atani » Tue Feb 27, 2007 11:53 pm

I am thinking of developing an extension to NSIS (http://nsis.sf.net) which will help automate the addition of "custom" resources to the "global" files.

I have no ETA for this (yet), I will see if I have time for this addition shortly. Once I create it I will create installers for the existing maps which deal with custom industries, etc.

Mike

User avatar
Slappy Da Clown
Posts: 143
Joined: Wed Jan 10, 2007 6:10 pm
Location: Michigans Upper Peninsula USA

installer

Post by Slappy Da Clown » Wed Feb 28, 2007 12:04 am

wow

cool

It would be a gr8 help to some of us ( specially the clowns ).


from behind that little slot in your medicine chest
Slappy Da Clown

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

Post by snoopy55 » Wed Feb 28, 2007 5:45 am

Slappy, and any others - The first thing I'd like to make VERY clear, the Global XML concept was NOT started by me....Choobacca saw a problem, and as I understand it, implimented it in his system and then decided to share his idea. Mainly choobacca, Dr Frag and I, with input from a few others, worked this out to what you see here. Another way was found, the Global XMLs have been put down(and that's as far as I'll go on that), but I still think they have not only a way to alleviate the problem (one which we all love) of people out there who want to create more for this game and give us all more to enjoy, but it is in reality the SAME system that is used by Firaxis in this very game!

WHAT!!!!!!! :shock:

Let me show you. I'll open up RRT_Goods_France.xml and take a section of it:

<Good>
<szName>Wool</szName>
</Good>
<Good>
<szName>Milk</szName>
</Good>
<Good>
<szName>Grain</szName>
</Good>
<Good>
<szName>Grapes</szName>
</Good>

That is what I refer to as a 'Stripped' file, just needed information.
Now, what can Railroads! do with that JUST AS IT IS? Nothing! Not a thing! Railroads.exe has to go in and open RRT_Goods.xml in \Sid Meier's Railroads!\Assets\XML, the main program folder, not the one in the Documents folder, and search for each of those goods. I'll take the first one, Wool. It finds the following:

<Good>
<szName>Wool</szName>
<szClass>FastFreight</szClass>
<szGTMLIcon>Resource/Railroad/GoodIcons/icon_wool_32.tga</szGTMLIcon>
<BitmapLarge>
<szFile>Assets/Interface/Goods/icon_wool_64.tga</szFile>
</BitmapLarge>
<BitmapSmall>
<szFile>Assets/Interface/Goods/icon_wool_32.tga</szFile>
</BitmapSmall>
<BitmapTiny>
<szFile>Assets/Interface/Goods/icon_wool_16.tga</szFile>
</BitmapTiny>
<BitmapCar>
<szFile>Assets/Interface/Cars/CarIconSideViews.tga</szFile>
<uiX>64</uiX>
<uiY>48</uiY>
<uiWidth>32</uiWidth>
<uiHeight>16</uiHeight>
</BitmapCar>
<BitmapCarEmpty>
<szFile>Assets/Interface/Cars/CarIconSideViewsEmpty.tga</szFile>
<uiX>64</uiX>
<uiY>48</uiY>
<uiWidth>32</uiWidth>
<uiHeight>16</uiHeight>
</BitmapCarEmpty>
<Color>214,195,162</Color>
<MinPrice>10000</MinPrice>
<MaxPrice>20000</MaxPrice>
<szIndustryLeaderTitle>Wooly Magnate</szIndustryLeaderTitle>
<szIndustryPlayerTitle>Sheepherder</szIndustryPlayerTitle>
</Good>


Now it knows what it's playing with. "So, what the H**L does that have to do with Global XMLs?" Those XML files in the main game are its' own 'globals' The full information of each Good is not in each map, and if I had the time, I'd fully load those maps with all the 'full data' and tell you how big that _SCENARIOS_ folder would be. And, more than likely, those maps would be arguing with each other also.

The Globals do this same thing. It was found that if Peter put a RRT_Goods.xml in his map and then next week I put one in my map, Peters would no longer work if mine was missing something his needed, like a Tannery. So, in the RRT_Industries_XXXXX.xml you see:

<RRTIndustry>
<szName>Tannery</szName>
</RRTIndustry>

and in the Global XML RRT_Industries.xml you see:

<RRTIndustry>
<szName>Tannery</szName>
<szModel>ChemicalPlant.kfm</szModel>
<szGrowKFM>ChemicalPlant_BuildUp.kfm</szGrowKFM>
<fScale>1</fScale>
<bIsCoastal>0</bIsCoastal>
<bIsMountainous>0</bIsMountainous>
<bInCity>1</bInCity>
<iCost>500000</iCost>
<Production>
<Resource>
<Input>Livestock</Input>
<Output>Cowhides</Output>
<InputOutputRatio>1.0</InputOutputRatio>
</Resource>
</Production>
<szAuctionImage>Industry_Chemical_Plant.dds</szAuctionImage>
<szReportImage>Report_Industry_Chemical_Plant.dds</szReportImage>
<szIcon>
<szFile>icon_chemicalplant_32.tga</szFile>
</szIcon>
</RRTIndustry>

If you want to make the Tannery cost 750000, you make it look like this:

<RRTIndustry>
<szName>Tannery</szName>
<iCost>750000</iCost>
</RRTIndustry>

and that is what you get IN YOUR MAP, not in any others!

And if a referance sheet is done for mappers and a fully loaded set of 'stripped' XML files, all he has to do is remove what he doesn't need and add any special changes he wants and he's done. He deletes and XMLs he doesn't need, like RRT_Characters.xml (if he made no changes), adjusts the RRT_Scenario XML, edits the Map Requirments, previously know as a ReadMe, ZIPs it and uploads it

The Global XMLs that have been developed will allow anyone to glide thru all the maps they have ever downloaded and look at what they look like. Can you see yourself in a year from now opening this XUserFiles folder and going thru (hopefully) 100 - 200 maps and trying to find that map of the east coast, among 8 others, that you liked so well? And then you have to have a seperate set of files to search thru in another place to find the FPK files to load or the 'how many' folders the maker used for the graphics only to find out that was the wrong map? Or do you keep a full set of any files and folders needed for each of those maps in a folder with each map?

How many maps at this time are using the Tannery? It only has to be loaded once into the Global RRT_Industries.xml. And I asked for any questions or problems, whatever they may be, and I or someone would find an answer. Dr Frag brought up a point, how does a mapper know what mods are or are not installed? If he's a mapper then he should know what mods have been created and are not part of the original game. He has to get the material from somewhere! This is his 'Tool Box' for creativity and every person wanting to make a map should have that and the needed programs to 'Map' And HE doesn't need to know what mod each person does or does not have. He lists and gives the needed information for each mod and the user keeps track of what he already has. There are two easy ways, one which, in a way, is being used, and the other which I, in a way, use.

The first is simply a line for each mod added:

<!-- Mods Added -->
<!-- Tannery -->

Place that starting right after the comments at the top, and you have a running list. IF the Tannery needs to be changed by the mapper, it should be changed in the program or a new name should be created. And you can keep your added mods at the top of the XML or at the bottom.

The second is something like I use to keep track of all the maps in the mapper folders I have, a single rtf file kept in the XML folder which is nothing more that a list of the XMLs and the mods that are already added to them:

RRT_Industries.xml
Tannery

The Master Set of Global XMLs is also a great idea, and is not that much trouble to keep if there was a place to keep them. If you get a volenteer, and I'll use me, the only I can update those files. I'd have to be notified before the map is uploaded so that someone doesn't download the map and it won't work. It would have to be a 'sticky' right off to keep it at the top. If someone doesn't approve of Globals, he may also not want his map messed with. (If we don't use Globals, I'd mess with it anyway for myself) If I go on to other things, we'd have to find another keeper. If we put it in the Wiki, then anyone could make a map that works great on their system, but maybe they had no use for a Tannery, so what they upload doesn't have one. Or it works on their system, but it won't work on others and the research begins. And no Dr Frag, I'm not picking on you, I read all the forum stuff and try my best to figure out and/or explain things. I guess that's why my count is over 500 messages, I give 2 hoots. Ya, I get things wrong at times, sometimes I use that thing called 'Logic' which isn't always used in making games.

If we have mapper who don't want to mess with Global XMLs then someone hopefully will take the time to work out a version that changes nothing in the map except the fact that a version of it can be used with Global XMLs.

He pops two ibuprofen, picks up his soapbox, and quietly walks away.......
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
Slappy Da Clown
Posts: 143
Joined: Wed Jan 10, 2007 6:10 pm
Location: Michigans Upper Peninsula USA

wow

Post by Slappy Da Clown » Wed Feb 28, 2007 12:52 pm

WOW Snoop

The only thing I understood out of that whole thing was I dont understand anything about this game I thought I did. I was trying to help but I guess Ill just stay out of it cause its clearly over my head. I hope you guys can figure out some way we can all play all the maps. Ill be watchin.


From somewhere over the rainbow
Slappy Da Clown

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

Post by choobacca » Wed Feb 28, 2007 3:03 pm

snoopy55,
I commend you for your determination in trying to help people implement the global XML file system, despite some criticism from frustrated gamers.

All your information makes sense to me of course because we share the same view of a solution to a problem Firaxis maybe never envisioned. Sorry I haven't been helping you much at this as time is in short supply these days.

Your last post was dead on. Firaxis started this with their global XML files, and since the game looks for the latest set of global files every time you load a map, knowing (and limiting) which files the game is using for the map just makes playing maps, creating maps, and debugging problems easier.

For all you frustrated gamers, don't lose hope. As long as we have people like snoopy55 and many others offering help, we'll get through it.

User avatar
Slappy Da Clown
Posts: 143
Joined: Wed Jan 10, 2007 6:10 pm
Location: Michigans Upper Peninsula USA

Post by Slappy Da Clown » Wed Feb 28, 2007 4:48 pm

No criticism intended here. I agree with choobacca. Im waiting patiently for you smart guys to figure it out. Till then Ill play the ones that work. Thanx again Snoopy & all you guys who are tryin to make it a better playing game.


Slappy

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

Post by Dr Frag » Wed Feb 28, 2007 5:59 pm

atani wrote:I am thinking of developing an extension to NSIS (http://nsis.sf.net) which will help automate the addition of "custom" resources to the "global" files.
WoW, that would be pretty imipressive if you could do that. The biggest issue I'd imagine will be parsing the Globals to see if the new info is already in them. If you do start this project you might want to make a new thread to discuss the developement as I'm sure there are people that would be interested in participating.

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

Post by gforce » Wed Feb 28, 2007 7:11 pm

Choobacca, :cry:
the idea is ok, i do understand everything,
but the work to do for simple gamers is just asked too much...
You're scaring them away!!! I really don't like that!!!
You should better tell them the alternative by copying to a temp-folder for those that they are not playing...
Please consider this once... i'm really disapointed to the fact you and snoopy don't want to realise this...
Don't say it's simple when people have problems with it, they are not frustrated!!! Don't blame them, blame you!!!
I still have alot of respect for your work, but i'm saying this already so long, i you don't even take the time to think about it, or respond...
No good...
anyway, keep up the good work :!:
and i hope you don't take this hard, but that you take it...
PLZ, PLZ give them the knowledge that copying to another folder is an alternatives

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

Post by atani » Wed Feb 28, 2007 7:59 pm

Dr Frag wrote: WoW, that would be pretty imipressive if you could do that. The biggest issue I'd imagine will be parsing the Globals to see if the new info is already in them. If you do start this project you might want to make a new thread to discuss the developement as I'm sure there are people that would be interested in participating.
So far I have RRT_Goods.xml working and I am working on getting RRT_Industries.xml working now. So far it fails to detect that the Industry has been defined and it adds it again :(

I am going to figure this out and then post it up so others can play with it as well.

Mike

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

Post by choobacca » Wed Feb 28, 2007 9:39 pm

To gforce's exclamations,
This topic started when I pointed out the potential problems "installing" multiple custom maps. I started a system for managing custom maps that works when applied correctly. The problem is that applying it requires know-how that may be beyond the "simple gamer". I like seeing my map library grow and being able to scroll through them in the game, and knowing that any one I select will load without crashing. This is my system and I'm sticking to it. :twisted:

So if another method of maintaining custom maps is needed, it should be developed by the "simple gamer" for the "simple gamer."

Post Reply