Hi. Long time lurker. I thought I'd post a little Windows - 0.40.24-r3 only plugin/hack for Adventure Mode Region Teleportation.
So basically this is Adventure Mode World/Region map teleportation by site. You can do this without going to the map so can use it while in a site or deep underground.
I missed the discussion on Adventure Mode teleport a couple of weeks ago and decided to find my own way to make this happen. I did this because I sort of got tired of hunting down sites like vaults which showed up in Legends but I had difficulty actually locating. Turns out it seems to be fairly complex operations but with some hacking I found some functions that when called seem to do the correct thing and teleport the adventurer from one map to another without too many consequences that I have found.
I don't know if this is properly generalizable to other platforms or other versions as I'm effectively using functions directly. I did try to make it slightly more generic by using an Array of Bytes (AOB) scan rather than a fixed address to find the functions but those are easily broken by a recompile but at least have chance of working on future releases out of the box.
The source can be pulled from my github repo (advutils branch) if interested.
Release Notice:
https://github.com/figment/dfhack/releases/tag/v1.0Binaries:
https://github.com/figment/dfhack/releases/download/v1.0/dfhack-0.40.24-r3-Windows-adv_teleport-v1.zipUsage:
gui/adv_teleport
The above will present a menu of nearby sites which allow teleportation. Scripting can be done directly via the adv_teleport(world.x,world.y,region.x,region.y) in plugins.advutils. Generically, I added a Sites dialog similar to the Materials dialog based on that code so it could be useful for other things and maybe that could be useful enough to include in the main trunk. The site dialog sorts by distance from current location and gives some basic filter options for finding interesting locations.
It does not support same map teleportation at this time and instead sets you down from orbit on the region of interest as you would coming off the map. I also give an option to offset from the center so that you are not necessarily placed on top of multi-story building and only have the option to climb down. I did use this to quickly escape from vaults and caves after getting lost or not wanting to climb out.
I believe if you are a traveling at night you can still get boogeymen intercepting you so I guess beware. As the same map teleport also seems not currently achievable then I guess some of my next investigations might be there unless someone has a good way to do this now. I've never visited hell in adventure mode so that could be cool for a few moments anyway and presumably that would be the way to do it unless you really work for it.
Also this is using direct function calls and df has so many global variables it sort of scares me so state could be corrupted by using this so save early and save often if you use it. Having said that I've been using it without any observable side effects for some time but would welcome feedback if people found it useful or have issues with it.