Using new industry in editor

Discuss maps, trains and other modding topics
Post Reply
User avatar
TheWizardKs
Posts: 27
Joined: Tue Jul 31, 2007 7:27 am

Using new industry in editor

Post by TheWizardKs » Thu Aug 09, 2007 11:37 pm

I have been trying to place a custom iron mine into the game using the map editor (I've put the appropriate entry into industries.xml in the map folder and the custom assets xml folder) and yet when I try to actually left click to place it in the editor, immediate CTD. Ideas please? Links to info even?

Thanks ;)

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

Post by snoopy55 » Fri Aug 10, 2007 3:47 am

This one has me a bit stumped. If you want to add industries and other material to your Editer, you really need to go into \Sid Meier's Railroads!\Assets\XML\_SCENARIOS_\NewMapBase and go into each XML and add the minimum data needed such as:

<RRTIndustry>
<szName>Coffee Plant</szName>
</RRTIndustry>

You then have to go into the GLOBALS and add the full Indusrty data such as:

<RRTIndustry>
<szName>Coffee Plant</szName>
<szModel>Factory.kfm</szModel>
<szSecondModel />
<szGrowKFM>Factory_Build_Up.kfm</szGrowKFM>
<szTerrainmap />
<fScale>1.0</fScale>
<bIsCoastal>0</bIsCoastal>
<bIsMountainous>0</bIsMountainous>
<bInCity>1</bInCity>
<bInForests>0</bInForests>
<iCost>500000</iCost>
<Production>
<Resource>
<Input>Coffee Beans</Input>
<Output>Coffee</Output>
<InputOutputRatio>1.0</InputOutputRatio>
</Resource>
</Production>
<szAuctionImage />
<szReportImage />
<szIcon>
<szFile>icon_coffee_32.tga</szFile>
</szIcon>
</RRTIndustry>

Of course you should have the full data for the Goods, Cars and Depot installed also. What got me was that I inserted your Iron Mine 2 into the Industries_Blank and placed it on a new map, and I didn't CTD, I got a Red Blob. :roll:
Zip and upload all the data for your Iron Mine 2 and I or another will look at it. Without seeing what you are working with it's hard to deduce the problem. :twisted:
I'm correct 97% of the time..... who cares about the other 4%....

User avatar
TheWizardKs
Posts: 27
Joined: Tue Jul 31, 2007 7:27 am

Post by TheWizardKs » Sun Aug 12, 2007 3:41 am

Thanks for the help Snoopy, I got it to work finally (although at this moment the details of why escape me LOL) I'm not the most patient person in the world and tend to make wholesale changes when trying to fix something. One of my changes (or more) fixed it.

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

Post by snoopy55 » Sun Aug 12, 2007 5:44 am

That's one of the first lessons to learn and remember when messing with this stuff, make 1 change at a time. This doesn't mean put in an industry that uses a good and not put the good in. It means figure what you need to get from the good to the industry and add that. Then, if it works, go on to the next step and then to the next set. When I edit maps to remove all the unused material, I have a set of printed pages in plastic sleeves that I use an erasable marker on to check everything out, THEN I edit.
Works for me :twisted:
Hope to hear from you soon on the new map. :twisted:
I'm correct 97% of the time..... who cares about the other 4%....

Post Reply