Some Map-Making Questions

Discuss maps, trains and other modding topics
KaiserWilhelm
Posts: 10
Joined: Sun Jan 24, 2010 12:47 am

Some Map-Making Questions

Post by KaiserWilhelm » Sat Feb 20, 2010 5:42 am

Hey all,

I'm slowly working on creating a new map. I've designed the basic terrain just fine, and I've now gotten to the part when I place industries.

1) How the heck to do I get fisheries as an option? I see coal mines, lumber mills, oil wells, grain farms and cattle ranches... but there doesn't seem to be a choice to place anything else. What am I missing?

2) I also notice that any cities I place are showing up as European. I don't want this. How do I change them to North American?

3) Eventually, once I get all my cities and industries down, I'm going to want to set up the actual scenario - IE, deliver so many loads of Z product to X town by year Y. I don't see any place to set up these triggers. How is this done?

Thank you.

KaiserWilhelm
Posts: 10
Joined: Sun Jan 24, 2010 12:47 am

Re: Some Map-Making Questions

Post by KaiserWilhelm » Sat Feb 20, 2010 8:09 am

Well, nevermind... I appear to have ruined my map. :? I followed the directions at http://www.hookedgamers.com/forums/view ... =42&t=3378 but appear to have destroyed the map entirely in the process. I imported the various US_Northwest files from Firaxis to my Vancouver Island folder and then renamed them RTT_Cities_Vancouver Island etc... but when I went to open the map... poof, game crash.

So.. I went back and created a new map and then stole the RTT files from them and replaced the ones in the folder with those (since before I started replacing them with the Firaxis ones they were blank anyway)... and now the map opens... as an unedited, fresh file... despite me never having touched the .dds or .tga file.

So.. I guess the map is gone. Wondrous. I suppose that's what I get for getting creative. I had free-hand created the entire map, so it's something of a kick in the teeth to have it destroyed through my own incompetence.

I'd gotten as far as painting the entire thing and planting all the trees. So much for that.

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

Re: Some Map-Making Questions

Post by Warll » Sat Feb 20, 2010 8:33 am

Wait provided you still have the dds and tga then you should still have the map structure and painting.

What you wanted to do was create custom RRT_Industries_MAPNAME.XML and RRT_Scenario_MAPNAME.XML files since those are what control the scenario and industry list.

All you have lost so far are industry placement and city placement, since those were stored in the now overwritten xml files.

I urge you to take a look at the xml for a working map.

Pro tip for non-programmers when de-bugging: If you have done something that causes a crash your first priority is to roll-back to the non-crash state. Then figure out what you did wrong.

If you have not already read it I urge you to read over the Wiki's entrys on custom map making. http://www.smrsimple.com/wiki/index.php?title=Main_Page

PS: I used to live in Port Alberni, I miss the rain.
Image

User avatar
karsten
Posts: 643
Joined: Sun Dec 17, 2006 8:49 pm

Re: Some Map-Making Questions

Post by karsten » Sat Feb 20, 2010 12:46 pm

Hmmmm... :(
The first rule of mapmaking: Save early, save often. One should test and save a new map after every hour of work, giving the saves consecutive numbers. That is how most experienced map makers here work.
Cheer up, we all learnt the hard way. :D

User avatar
Jancsika
Posts: 921
Joined: Thu Nov 02, 2006 3:40 pm
Location: Maryland

Re: Some Map-Making Questions

Post by Jancsika » Sat Feb 20, 2010 4:45 pm

The problem is that you are trying to do too many things, all at once. You have to build a map slowly step by step and (as was pointed out) save often.
I assume that you know how to edit an XML file and have decent XML editor (Notepad++ is free)
From your remarks above I also assume that it is a SAM type map.
1. Set up a basic SAM structure. Start with just one industry. That means that delete all industries except, passengers, mail, grainfarm ,food plant.
Also delete the connected goods, depots and traincars. Check your RRT_Cities_MAPNAME.XML that your cities can receive Food, add these lines to your cities in RRT_Cities_MAPNAME.xml file if needed.
<Resource>
<Input>Food</Input>
<Output>None</Output>
<InputOutputRatio>0.000000</InputOutputRatio>
<MaxStorage>0.000000</MaxStorage>
</Resource>
2. At this point test. If it’s working save the whole C:\Users\User\Documents\My Games\Sid Meier's Railroads! folder. This will be your starting backup that you can always come back to.
3. Now you can add 1 industry. Remember that an industry needs the following entries:
a. starting Industry ……………….Coal Mine - RRT_Industries_MAPNAME.XML
b. Depot to load the coal………Coal Mine Annex – RRT_Depots_MAPNAME.XML
c. a Good..…………………………….Coal – RRT_Goods.XML
d. TrainCar…………………………….Coal Car – RRT_Traincars_MAPNAME.XML
e. ending industry…………………Power Plant – RRT_Industries_MAPNAME.XML

At this point you test and save a backup.

This is a slow process but it is safe.

I also suggest that you place the map decorations, trees etc. at the end of the process. This way you will have cler view of your map.
…….and if you have any more questions or problems, just ask. Will be glad to help.
Jancsika
PS. I've just seen your Vancouver island map. Will check it and let you know. :wink:

KaiserWilhelm
Posts: 10
Joined: Sun Jan 24, 2010 12:47 am

Re: Some Map-Making Questions

Post by KaiserWilhelm » Sat Feb 20, 2010 10:23 pm

Alright, I managed to restore the map to functionality by removing the .tga and the .dds from the folder, deleting everything in user maps, creating a new map named Vancouver Island, and then replacing those files with the ones I preserved. Things are back and functional - thank you to those of you who helped.

Janc, I'll now attempts to follow those directions and see if I can't get things humming again.

KaiserWilhelm
Posts: 10
Joined: Sun Jan 24, 2010 12:47 am

Re: Some Map-Making Questions

Post by KaiserWilhelm » Sat Feb 20, 2010 10:40 pm

Jan, do I need to place my cities before I go to work on industries? Right now I have a map that's structurally correct, is painted, and has trees. Is the next step to place the cities (even though they're the European cities, which I don't want) and then begin working on the industries, or are the industries first?

I noticed in your directions that you wrote:
Jancsika wrote:1. Set up a basic SAM structure. Start with just one industry. That means that delete all industries except, passengers, mail, grainfarm ,food plant.
Also delete the connected goods, depots and traincars. Check your RRT_Cities_MAPNAME.XML that your cities can receive Food, add these lines to your cities in RRT_Cities_MAPNAME.xml file if needed.
<Resource>
<Input>Food</Input>
<Output>None</Output>
<InputOutputRatio>0.000000</InputOutputRatio>
<MaxStorage>0.000000</MaxStorage>
</Resource>
So does that mean that the cities need to be placed on the map before I start working on RRT_Cities_MAPNAME.xml, etc?

I am sorry I am so green at this. I'm used to working on things like the Warcraft III map editor which is really intuitive... you just plop things down on a created map and then begin writing triggers.

User avatar
Jancsika
Posts: 921
Joined: Thu Nov 02, 2006 3:40 pm
Location: Maryland

Re: Some Map-Making Questions

Post by Jancsika » Sun Feb 21, 2010 1:41 am

Are you using the Terrain Editor? If you are then you can place the cities with the editor, and when saving it will write the Cities.XML and Names.XML files.
Since this is a basic stock map you don’t have to follow the SAM rules. It will work just fine as you are planning to set it up. You might want to use the map I uploaded in the Maps thread. It has all the industries, plus the Fishery. By the way if you are using the Fishery, you also have to have Cannery that will turn fish into food.
Place the Cities first with the games Terrain Editor. You don’t have to place all of them, just enough to make some sense of the map. You can always move,delete or add to them. Also make all of them a “Start Location” that way it will show as a blue dot in the editor map. It is easier to find them. Later you can change that too.
Terrain Editor.jpg
Next you have to decide about the industries. You have two choices. 1= to have all the industries placed randomly by the AI. This will make each game different. Or 2= you place all the industries manually where you want them.
Be careful here, because just by placing one industry manually the AI will not place any more.
As for the European buildings: open the RRT_Cities_MAPNAME.xml and delete the European models:
<Model>
<szNifName>BuildingEURO_1x1x3b2.nif</szNifName>
</Model>
Are you planning to have “Scenario”?? like”Haul 1000 passengers from Seattle to Vancouver”, or anything similar. Those are done in the Scenario.xml file.
You have to edit the file and add “Victory Conditions”. Also can change the starting and ending date.
This should be done last, when everything else is working

<Era>
<iEraBeginMonth>12</iEraBeginMonth>
<iEraBeginYear>1850</iEraBeginYear>
<iEraEndMonth>12</iEraEndMonth>
<iEraEndYear>1900</iEraEndYear>
<szEraVictoryBlurb>Congratulations! You're the last railroad standing!</szEraVictoryBlurb>
<szEraFailureBlurb>Unfortunately, you were eliminated!</szEraFailureBlurb>
<VictoryConditions>
<Condition>
<szType>OwnStock</szType>
<bRequired>1</bRequired>
<szStockTarget>ALL_STOCK_BUT_SELF</szStockTarget>
<iPercentage>100</iPercentage>
<szDescription>Be the last railroad standing.</szDescription>
</Condition>
<Condition>
HERE ADD MORE CONDITIONS.
</Condition>
</VictoryConditions>
</Era>

KaiserWilhelm
Posts: 10
Joined: Sun Jan 24, 2010 12:47 am

Re: Some Map-Making Questions

Post by KaiserWilhelm » Sun Feb 21, 2010 5:25 am

How do I turn this (my cities XML):

Image

Into this (someone else's cities XML):

Image

The default one seems to be all collapsed in on itself. I'm using Notepad++, but have absolutely zero experience working with XML files, and have no idea where to begin in disassembling this long line of text.

Also... is there anywhere that has a step-by-step 'how to make a basic SMRR XML FAQ for newbies' so I can stop pestering you with these minor questions? The SMRR Wiki seems to jump right in assuming that everyone has basic training in XML. I have a master's in history - we write papers, not files. I have no idea what I'm doing.

Thanks for any and all help.

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

Re: Some 図-Making Questions

Post by Warll » Sun Feb 21, 2010 6:45 am

This program should be able to stylise the file: http://tidy.sourceforge.net/

As to learning the XML, the only hard part is knowing what is required and what you can leave out. It might be easiest to read the XML for some other maps and try changing things and see what happens.

Jancsika likely knows more.
Image

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

Re: Some 図-Making Questions

Post by Warll » Sun Feb 21, 2010 6:45 am

Oh better yet the notepad++ menu bar has an option: TextFX -> TextFX HTML Tidy -> a ton of options.
Image

KaiserWilhelm
Posts: 10
Joined: Sun Jan 24, 2010 12:47 am

Re: Some Map-Making Questions

Post by KaiserWilhelm » Sun Feb 21, 2010 8:22 am

Notebook++'s Tidy option appears not to work. The only option in the Tidy dropdown window that does anything is Tidy (Most Recent HTMLTIDY.CFG) which causes a popup to come up that says something to the effect of "HTMLTIDY not found. I'll pick whatever headers I want!" (it actually says that), and then the XML becomes a kind of jumbled mess.

Which of the multiple files on that website was I supposed to download?

User avatar
Jancsika
Posts: 921
Joined: Thu Nov 02, 2006 3:40 pm
Location: Maryland

Re: Some Map-Making Questions

Post by Jancsika » Sun Feb 21, 2010 2:55 pm

Notebook++'s Tidy option appears not to work.
Oh! For Pete’s sake. :roll:
Use the next button.
Pretty print (XLM only with line break)
I suppose you have downloaded and using the XML plugin!!!!
Oh better yet the notepad++ menu bar has an option: TextFX -> TextFX HTML Tidy -> a ton of options.
That will not work on XML!!!!!
Which of the multiple files on that website was I supposed to download?
.
The one I posted (second post)
http://www.hookedgamers.com/forums/view ... =42&t=3998
…….and turn that “Terrain Editor” on.
It is much easier than typing all those lines!!!!!
I see you all are having fun :lol: :lol: :lol:
Jancsika

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

Re: Some 図-Making Questions

Post by Warll » Sun Feb 21, 2010 8:52 pm

HTML and XML are closely related, in fact XHTML is XML. But if he got to work then good.
Image

KaiserWilhelm
Posts: 10
Joined: Sun Jan 24, 2010 12:47 am

Re: Some Map-Making Questions

Post by KaiserWilhelm » Fri Feb 26, 2010 6:31 am

Alright, so after dealing with some schoolwork I am back to trying to edit this maps.

I placed all my cities, and have begun tentatively poking around in the Industries.XML. My goal is to at least place the industries I want, including a gold mine, smelter, fishery and cannery.

I edited the XML file simply to include these four additional industries, seen here:

Image

When I went to edit the map it opened just fine, and the new industries were listed under the place industries tool. However, when I went to select one of the new industries - either the fishery or the gold mine - the game crashed a split second after the industry appeared in my cursor for placement on the map.

This crash happens every time. What am I doing wrong here? Is there some reason you can't manually place the fishery or the gold mine?

*Edit*

Ah, nevermind, I figured it out. I had forgotten to add goods and train cars. Doing so has allowed me to place these industries. Unfortunately, when I attempt to run the map (as in, play it) it crashes. I haven't placed the industries yet, of course, but before I messed with any of the files, the map was playable, as the game (I guess) in the absence of industries auto-placed them. Now it just crashed when I attempt to start it in this way. Is this because there are no industries placed?

*Edit 2*

That appears to have been the problem. However, another has developed. For some reason, placing several industries appears to cause the game to crash. I count Auto, Steel Mill, Grain Farm, Cattle Farm, and Stock Yard so far as those that cause the game to auto-crash. I'm going to include the industries, cars and goods files so you guys can take a look and see what I've missed, because obviously I overlooked something.
Attachments
VancouverTesting.zip
(1.64 KiB) Downloaded 611 times

Post Reply