Author Topic: Load large section of map without revealing it.  (Read 391 times)

Offline Pandromidal

  • NPC
  • **
  • Posts: 193
    • View Profile
Load large section of map without revealing it.
« on: October 29, 2017, 08:25:12 AM »
I'm sharing a new save with a friend so we can play parallel universe characters. Is it possible to force the map to generate so that more of the world will have the same items, etc.?

The only thing I can think of is to start a second character and use debug to load in the area around the first character, then get rid of that character.

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3839
    • View Profile
Re: Load large section of map without revealing it.
« Reply #1 on: October 29, 2017, 08:46:07 AM »
Currently no good way, but it might be possible to do it with a lua script. The script would need to create a tinymap (not sure if lua can do it), place it where it is needed, try to load a location, change position, load new segment and so on until entire area is covered.

I think there was a request to allow mapgen seed mechanics, but it's nowhere near doable yet due to how tightly coupled mapgen mechanics are with map mechanics.

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5588
  • I code dead people.
    • View Profile
Re: Load large section of map without revealing it.
« Reply #2 on: October 29, 2017, 02:41:16 PM »
Map seeds roughly require reimplimenting all of mapgen, I don't expect it to ever happen.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline Zhilkin

  • NPC
  • **
  • Posts: 218
    • View Profile
Re: Load large section of map without revealing it.
« Reply #3 on: October 29, 2017, 03:24:23 PM »
Currently no good way, but it might be possible to do it with a lua script. The script would need to create a tinymap (not sure if lua can do it), place it where it is needed, try to load a location, change position, load new segment and so on until entire area is covered.

Jumping overmap to generate it, then saving - something like this:

Code: [Select]
for x=0,200,1 do

y = 0
z = 0
player:setpos(tripoint(x,y,z))

end

g:save()

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3839
    • View Profile
Re: Load large section of map without revealing it.
« Reply #4 on: October 29, 2017, 04:50:08 PM »
Map seeds roughly require reimplimenting all of mapgen, I don't expect it to ever happen.

There is a simpler way.
By giving each overmap tile its own sub-seed and setting that before mapgen of this specific overmap coordinate, there would be no need to ensure identical order of generation.
Then it's just a search+replace over a large number of rng calls.

Offline Mantar

  • NPC
  • **
  • Posts: 120
  • NOMAD
    • View Profile
Re: Load large section of map without revealing it.
« Reply #5 on: October 29, 2017, 07:55:59 PM »
I'm sharing a new save with a friend so we can play parallel universe characters. Is it possible to force the map to generate so that more of the world will have the same items, etc.?

Put the save folder on a shared drive, mount it locally, and coordinate to ensure you aren't playing at the same time? Alternately, keep it stored remotely and download a local copy before play, then upload afterwards. More of a hassle that way, though.
 Another option would be to have one of you set up a server and the other play remotely.

Offline Pandromidal

  • NPC
  • **
  • Posts: 193
    • View Profile
Re: Load large section of map without revealing it.
« Reply #6 on: October 29, 2017, 08:41:29 PM »
Does anyone know how many tiles worth of data are loaded in each direction? I'm just teleporting a debug character around.

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5588
  • I code dead people.
    • View Profile
Re: Load large section of map without revealing it.
« Reply #7 on: October 30, 2017, 03:20:23 AM »
Each teleport is going to load at least a 5x5 square of overmap squares centered on your teleport target.
So teleport 5 overmap tiles in a particular direction and you'll have no gap.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline jacob.exe

  • Zombie Food
  • *
  • Posts: 32
  • My intuition does not prevent me from eating rocks
    • View Profile
Re: Load large section of map without revealing it.
« Reply #8 on: November 01, 2017, 12:23:11 AM »
I'm sharing a new save with a friend so we can play parallel universe characters. Is it possible to force the map to generate so that more of the world will have the same items, etc.?

Put the save folder on a shared drive, mount it locally, and coordinate to ensure you aren't playing at the same time? Alternately, keep it stored remotely and download a local copy before play, then upload afterwards. More of a hassle that way, though.
 Another option would be to have one of you set up a server and the other play remotely.

I did this with my friend: we had the map saved to the local drop box folder in each of our machines, which would then update any changes made on an identical map stored on a drop box server. Any changes I made to my local map (when saved) would be reflected on the one hosted by drop box and then subsequently to my friend's locally saved map, effectively allowing us to play on the same world at the same time.

For visual aid, a change would look like this, starting with a change to my map:
Game(me)  >  LocalMap(me)  >  SharedMap(dropbox)  >  LocalMap(friend)  >  Game(friend)

All we had to do was not cross reality bubbles and auto-save semi-frequently to insure an identical map. This allowed us to visit places where the previous person was not too long ago, including player bases.