How to get a mapsize greater than 16

From Platinum Arts Sandbox Free 3D Game Maker
Jump to: navigation, search
  • Mapsize is limited to between 10 and 16. Why? That's because a map below size 10 is too small to use for nearly anything, and above 16 is too large to use effectively (e.g. travelling the long distance) and large maps are incredibly slow. If, however, you want to go ahead and change the mapsize limit, then go ahead by following this tutorial.
  • First: open up src/engine/world.cpp. Scroll down until you find this line of code:

   resetmap();
setvar("mapscale", scale<10 ? 10 : (scale>16 ? 16 : scale), true, false); setvar("mapsize", 1<<worldscale, true, false);

  • This is the code that defines the limits of maps. The first line, resetmap(), resets all map values. There's no need to change it.
  • The second line is the important one. It defines the variable "mapscale" and limits it to being 10 or more or 16 or less. If you wish to change the minimum or maximum, simply change the numbers to the numbers you want. Once you're done, save and recompile.
  • To use this in Sandbox, open up the console (with the ` button, above TAB) and type in /newmap ##, where ## is replaced by your new mapsize limits. If you want to use the newmap option in the menu (with the slider), then you'd need to edit the menu code to allow the slider to reflect the new limits.
  • Also: I highly recommend you do not make a mapsize past 20, or even at 20. I did so while testing this tutorial, and Sandbox (and my computer) both crashed. So don't do it. Also, seeing as you're messing with C++ source code (and eventually computer memory and such), don't do stupid things like making a mapsize of -1. I don't know what would happen, but it likely wouldn't be a good thing. So don't try it.