Nomad Script or hey this loads map chunks like how adv mode does it script for traveling the world... in fort mode.

old recording of the script as I realize the script probably doesn't need FTgo's surface and cavern fast travel adv mode functions

and here's the end result ... from a different fort as this process takes a bit too long to fully capture.
--script using warmist spellbook code to make a cheap gui for expanding and contracting a player fort.
-- this script is pretty dangerous in that it reveals the expanded map chunk, and when contracting it culls anyone in that map chunk.
-- so far probably best to use this with the void fort scripts as it allows one to expand and explore the world while keeping your site.
--oh warning if you're about to collapse a map chunk make sure to clear any stockpiles and civ zones you made in that map chunk.
--oh and don't retire unless you're back to the original fort embark size or the game will corrupt that fort and or crash.
--also it will take a while for any results to happen. I have no idea on speeding up the process.
--if you use this for some nomad playstyle best learn how to haul goods across map and burrowing folks.
--as you might lose folks while traveling.
local dlg=require("gui.dialogs")
function GoN()
local Site=df.global.plotinfo.main.fortress_site
local Nor=Site.global_min_y-1
Site.global_min_y=Nor
end
function NoN()
local Site=df.global.plotinfo.main.fortress_site
local Nor=Site.global_min_y+1
Site.global_min_y=Nor
end
function GoS()
local Site=df.global.plotinfo.main.fortress_site
local Sor=Site.global_max_y+1
Site.global_max_y=Sor
end
function NoS()
local Site=df.global.plotinfo.main.fortress_site
local Sor=Site.global_max_y-1
Site.global_max_y=Sor
end
function GoE()
local Site=df.global.plotinfo.main.fortress_site
local Eor=Site.global_max_x+1
Site.global_max_x=Eor
end
function NoE()
local Site=df.global.plotinfo.main.fortress_site
local Eor=Site.global_max_x-1
Site.global_max_x=Eor
end
function GoW()
local Site=df.global.plotinfo.main.fortress_site
local Wor=Site.global_min_x-1
Site.global_min_x=Wor
end
function NoW()
local Site=df.global.plotinfo.main.fortress_site
local Wor=Site.global_min_x+1
Site.global_min_x=Wor
end
function Go()
for k,v in pairs(df.global.world.armies.all) do
if v.flags[0]== true then
local Nor=v.pos.y-1
v.pos.y=Nor
end
end
end
function doNothing()
print("doing nothing real good but here have a site")
--require("plugins.dfusion.adv_tools").addSite(nil,nil,nil,nil,nil,nil,df.global.world.units.active[0].civ_id)
end
function doNothing2()
dlg.showMessage("Travel-Hack","Bypassing Message to access FastTravel")
df.global.ui_advmode.message=""
--require("plugins.dfusion.adv_tools").addSite(nil,nil,nil,nil,nil,nil,df.global.world.units.active[0].civ_id)
end
function greetAndStuff()
dlg.showMessage("Greetings", "Seasons greatings and lols")
end
MOVEMENT_KEYS = {
A_CARE_MOVE_N = { 0, -1, 0 }, A_CARE_MOVE_S = { 0, 1, 0 },
A_CARE_MOVE_W = { -1, 0, 0 }, A_CARE_MOVE_E = { 1, 0, 0 },
A_CARE_MOVE_NW = { -1, -1, 0 }, A_CARE_MOVE_NE = { 1, -1, 0 },
A_CARE_MOVE_SW = { -1, 1, 0 }, A_CARE_MOVE_SE = { 1, 1, 0 },
--[[A_MOVE_N = { 0, -1, 0 }, A_MOVE_S = { 0, 1, 0 },
A_MOVE_W = { -1, 0, 0 }, A_MOVE_E = { 1, 0, 0 },
A_MOVE_NW = { -1, -1, 0 }, A_MOVE_NE = { 1, -1, 0 },
A_MOVE_SW = { -1, 1, 0 }, A_MOVE_SE = { 1, 1, 0 },--]]
A_CUSTOM_CTRL_D = { 0, 0, -1 },
A_CUSTOM_CTRL_E = { 0, 0, 1 },
CURSOR_UP_Z_AUX = { 0, 0, 1 }, CURSOR_DOWN_Z_AUX = { 0, 0, -1 },
A_MOVE_SAME_SQUARE={0,0,0},
SELECT={0,0,0},
}
ALLOWED_KEYS={
A_MOVE_N=true,A_MOVE_S=true,A_MOVE_W=true,A_MOVE_E=true,A_MOVE_NW=true,
A_MOVE_NE=true,A_MOVE_SW=true,A_MOVE_SE=true,A_STANCE=true,SELECT=true,A_MOVE_DOWN_AUX=true,
A_MOVE_UP_AUX=true,A_LOOK=true,CURSOR_DOWN=true,CURSOR_UP=true,CURSOR_LEFT=true,CURSOR_RIGHT=true,
CURSOR_UPLEFT=true,CURSOR_UPRIGHT=true,CURSOR_DOWNLEFT=true,CURSOR_DOWNRIGHT=true,A_CLEAR_ANNOUNCEMENTS=true,
CURSOR_UP_Z=true,CURSOR_DOWN_Z=true,
}
listofspells={
{text="nothing", spell=doNothing,icon='*'},
{text="expand: North+", spell=GoN,key="CUSTOM_W"},
{text="expand: South+", spell=GoS,key="CUSTOM_S"},
{text="expand: East+", spell=GoE,key="CUSTOM_D"},
{text="expand: West+", spell=GoW,key="CUSTOM_A"},
{text="Contract: North-", spell=NoN,key="CUSTOM_W"},
{text="Contract: South-", spell=NoS,key="CUSTOM_S"},
{text="Contract: East-", spell=NoE,key="CUSTOM_D"},
{text="Contract: West-", spell=NoW,key="CUSTOM_A"},
}
dlg.showListPrompt("Directions","Choze Direct",nil, listofspells,function(index,choice) choice.spell() end)
so here's the nomad script for the dfhack required nomad playstyle and probably adding another way to play with void forts as this cuts down embarking twice and allows void forts to interact with larger pre-generated sites like towns and forest retreats although you're probably be a bit lost figuring out where the structures would be or where everyone is currently at.
big warning the game might reveal chunks of the map and one might require to deal with the DF50's new special map feature pop ups.
I been using this lua command for most part to clear them as depending on how big you expand the fort you might end up with like 50 to 300+ of these warnings.
:lua df.global.world.status.popups:resize(0)
hmm I guess one could write a lua script that turns off the announcement pop up for that so you can ignore them
oh yeah one probably want to use revflood if they want to hide the expanded map chunks
now I normally just use gm-editor to do this via going into
gui/gm-editor df.global.plotinfo.main.fortress_site
then messing with the global min/max x and y coords
another big warning with using this is you can store drinks and items offsite and they won't spill over if you unload the map chunk containing them and retire... then unretire the fort.
you do need to expand into the location you store the drinks or you will end up forcing your fort to go with out drinks until the game finally expand into the drink storage.
oh and you could unload the entire fort and send everyone into the void which will cause the game to consider that a "fort end" so probably best remember to kill the process if that ever happens to revert back to a previous save.
well anyway this is pretty fun if you want to explore the world you generated and possibly harvest said world for resources and units and gear and crafts to build a large empire.
it's also possible to say with returning to the right embark size with retiring, one could take over other spots in the world map and with void fort move around the world map with the map chunk you stole.
so if you like the hills in a hilltop you could swipe that and build your fort there, or you had plans on an ocean fort this could help, wanna do an Oregon trail like fort session where you stop at some destination? would take some getting use to constantly moving and you might need to figure out how to keep your tools and gear with you but yeah that's possible.
oh yeah another big warning probably backup your saves before and after using this, and I don't know if this let you do raids?