Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Walking over rivers on fast travel  (Read 1522 times)

Kars

  • Bay Watcher
  • registered flex offender
    • View Profile
Walking over rivers on fast travel
« on: February 19, 2017, 12:31:05 am »

Is there really no way to enable this? No files to edit? No dfhack script? I've been looking everywhere, but I can't find anything. Despite being a legendary swimmer necromancer (so my zombies don't even need to swim, they can't drown regardless) I can't walk over the rivers on fast travel. This is a completely needless waste of time once you're past even novice swimming. Hell, even dabbling swimmers can just sprint and jump over most rivers. I don't care if I have to cheat to enable this, it makes traveling around the world a pain in the ass.
Logged
🇮🇹 dall'italia con amore🇮🇹

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Walking over rivers on fast travel
« Reply #1 on: February 19, 2017, 02:46:24 am »

Code: (questport.lua) [Select]
local qmap=dfhack.gui.getCurViewscreen()
local qx=qmap.cursor_x*48
local qy=qmap.cursor_y*48
local rx=qmap.player_region_x*48
local ry=qmap.player_region_y*48
  local qarm=df.global.world.armies.all
for k,v in ipairs(qarm) do
if v.flags[0] then
local my_arm=df.global.world.armies.all[k].pos
if rx~=qx then do
my_arm.x=qx
my_arm.y=qy
qmap.player_region_x=qmap.cursor_x
qmap.player_region_y=qmap.cursor_y
end
end
end
end
In travel mode, pull up your quest log, move the cursor (diagonally, I used a crappy hack so it doesn't pick up if you just move it horizontal or vertical), run the script, you're there.
Logged

Kars

  • Bay Watcher
  • registered flex offender
    • View Profile
Re: Walking over rivers on fast travel
« Reply #2 on: February 19, 2017, 02:59:20 am »

Disregard this, I figured it out. Thank you
« Last Edit: February 19, 2017, 03:07:56 am by Kars »
Logged
🇮🇹 dall'italia con amore🇮🇹

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Walking over rivers on fast travel
« Reply #3 on: February 19, 2017, 03:09:14 am »

Oh, do you have a terminal which you run dfhack commands through? You can type questport in there and it'll shoomp you over to where the cursor is, or you can go into dfhack.init and add it as a keybind which is much more convenient, and you could set it so when you hit alt+q or something it'll run the script.

Assuming the script is in df/hack/scripts it's in the right place.


Cool cool, it's not as ideal for just popping across a river, I use a hacked up gm-editor tweak for that, but you can drop yourself on the next world map tile or just go where you want to be if the travel is boring, which it is, which is why I made the script!
« Last Edit: February 19, 2017, 03:11:04 am by Max™ »
Logged

Kars

  • Bay Watcher
  • registered flex offender
    • View Profile
Re: Walking over rivers on fast travel
« Reply #4 on: February 19, 2017, 03:11:15 am »

Yeah, my problem is that I had it set up in a notepad file, not a lua file. I wonder if I could somehow make it able to pick up vertical and horizontal movements, but I imagine that's a bit out of my league as of now
Logged
🇮🇹 dall'italia con amore🇮🇹

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Walking over rivers on fast travel
« Reply #5 on: February 19, 2017, 03:21:29 am »

It will work for horizontal/vertical after you run it once, it's just the initial time you use it the script that it doesn't seem to pick up the horizontal/vertical only changes.

I tried to get it to push you into travel mode even if you weren't, just as long as you were in quest mode but it doesn't work, drops you in the northwest corner of the map.
Logged