Map script question

hr_oskar

Deity
Joined
Jun 21, 2002
Messages
624
Location
Iceland
How do I write a map script to always make the same map? I understand this is possible, or at least I believe I read that somewhere (somewhere I don't find anymore). Furthermore, how would I make options to leave some aspects of the map random (e.g. resources, features)?

Basically I'm making a European mod so I always want the same map but I don't want to use scenarios all the time.

I posted this earlier on the map script forum but that got deleted so I suppose this is the right place to ask, if anybody can answer this...
 
Anyway, the answer is fairly straightforward.

A map script can basically override any of 7 functions, which are responsible for the following:

1) choose map size (width, height)
2) lay out base plot types (ocean,land,hill,mountain)
3) add terrain (add desert to land, or grass to hills etc)
4) add features (forests on top of grass on top of hills etc)
5) add bonuses
6) add goody huts
7) place players

So you will need to replace step 2 at least, to place the land in the europe shape every time.

You might need to replace step 1, if you are only allowing one size of europe map (or less than the 6 usual sizes).

You might need to replace step 3 if you want the terrain to match Europe more precisely, and maybe even step 4 if you want historical forests.

Presumably 5,6,7 you can leave alone, assuming you just want to allow resources wherever, and you don't care about historical placement of civilizations.

It's somewhat more complicated than you probably want, but SmartMap has examples of each of the seven steps. You can search for 'step 1' or 'step 2' in the code to see how it is done there. SmartMap also has a Europe map generator, so you can look at how that works, it may be helpful.
 
Thanks surt :)

Ok... well this is a start. I will need to take a good look at this, hopefully studying your SmartMap code will help.

I might not do this anyway, since I found out WBS is not as limited as I thought.
 
Back
Top Bottom