Author Topic: Multiple Area Maps  (Read 390 times)

Lost in Nowhere

  • Full Member
  • ***
  • Posts: 244
Multiple Area Maps
« on: January 20, 2018, 02:51:02 am »
Here's something interesting I've developed over the last few days: using CRPL to replace a map with another one! The prototype of this was Map #5315, if you need a better idea of what that means. Since I've heard of other people having some interest in doing this, I decided to clean up the script and post it.

(click to show/hide)

Anyways, how to use this in a map:
  • You need the data for each of the maps except the starting one. Although you could type it out, I'd recommend using the ReadMapData.crpl script on an already-created map. This script reads all data about the terrain levels, digitalis, presence of walls, and units. Note that it prints this to the game log.
  • Put the SwitchMaster.crpl script in the map that you want the map to change after completion.
  • In the same map, put as many copies of the mapheader.crpl script as you have alternate maps; put each of the maps' data into one of these scripts.
  • In the SwitchMaster.crpl script, in the :PrepareMapList function, put the name of each of the scripts from (3) in the order you want them to occur.
And then you should be good to go!

Some more in-depth explanations:
(click to show/hide)
(click to show/hide)
(click to show/hide)
« Last Edit: January 20, 2018, 03:14:53 am by Lost in Nowhere »
Don't die! :)

Lost in Nowhere

  • Full Member
  • ***
  • Posts: 244
Re: Multiple Area Maps
« Reply #1 on: January 20, 2018, 02:52:01 am »
Reserved, since I might need it eventually.
Don't die! :)

Famous5000

  • Newbie
  • *
  • Posts: 1
Re: Multiple Area Maps
« Reply #2 on: November 06, 2018, 01:22:33 am »
Really nice work! I'll be using this quite a bit, since I know I'll be needing it.