Page 1 of 1

Please help with map 'randomness'...

Posted: Thu Jun 28, 2007 2:51 pm
by DePol Haulage
Situation:

1. Im a 'tard so dont slap me please :oops:
2. Im experimenting with very simple map containing 4 cities and one resource (grain)
3. when loading map, I do not randmise it.

Why is it that when I load lets say original UK map without randomising it, the placement of resources is different from previous map loads and cities contain different industries, but this not happen when I load my own map.
Even when choosing to randomise my map, while cities and landscape changes, resource do not move and I end up with farm in a lake. City industries do not change either.
I had a look at various XML file in attempt to understand this problem but to no avail.
I downloaded 2 custom maps, RandomMap and Australia. When loading RandomMap wihtout actually randomisisng it, the placement of resources and industries changes with each reload. This dooes not happen with Australia map - resources appear in the same spot each time.

What caues it and how do I introduce this 'randmoness' into my own map? Thanx.

Posted: Thu Jun 28, 2007 6:35 pm
by Dr Frag
I believe the RRT_Industries_<scenarioname>.xml file holds the key to that one.

If you just list the industries like this the game will place them for you.

Code: Select all

 <RRTIndustry>
   <szName>Cattle Ranch</szName>
 </RRTIndustry>
 <RRTIndustry>
   <szName>Refinery</szName>
 </RRTIndustry>
 <RRTIndustry>
   <szName>Oil Well</szName>
 </RRTIndustry>
But in maps where they don't move you will see actual locations in the RRT_Industries_<scenarioname>.xml file.

Code: Select all

<RRTIndustry>
   <szName>Cattle Ranch</szName>
   <szSoundScape>TerrainMap_CattleRanch.tga</szSoundScape>
   <Locations>
     <Location>
       <StartX>566</StartX>
       <StartY>87</StartY>
       <Rotation>0.000000</Rotation>
       <Size>0</Size>
       <InCity/>
     </Location>
     <Location>
       <StartX>343</StartX>
       <StartY>558</StartY>
       <Rotation>0.000000</Rotation>
       <Size>1</Size>
       <InCity/>
     </Location>
     <Location>
       <StartX>319</StartX>
       <StartY>447</StartY>
       <Rotation>0.000000</Rotation>
       <Size>0</Size>
       <InCity/>
     </Location>
   </Locations>
 </RRTIndustry>
Correct me if I'm wrong here guys.

Posted: Fri Jun 29, 2007 2:53 am
by snoopy55
No, you're correct.The main drawback with the random placement by the map is that the number of Annexes/Industries is also random, from 1 to 4 (I'm not sure if 0 happens, but with this game, it has probally happened :twisted: ) With placement, you can have any number of Annexes/Industries. If you want a map with placed Annexes/Industries to be random every time, just go in and remove everything from <Locations> to </Locations> on all of them and you'll have it. Just remember, it's either all or nothing, you can't decide that you want to place some and have the rest random. :evil:

Posted: Fri Jun 29, 2007 4:18 am
by DePol Haulage
Thanx guys for explaining this to me.
Im gonna give it a try when I get back home.
I think I will also change the Australia map so it places industry randomly. Maybe I will end up hauling fish from Hobart to cannery in Darwin. Now that would be a trip! :D

Being in Western Australia means that I post when you sleep, and you post when I sleep so it took me long time to reply (I assume youre in USA)