Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Rumrusher

Pages: 1 2 [3] 4 5 ... 411
31
DF General Discussion / Re: Fan art competition! *Moving sound*
« on: June 11, 2023, 06:36:52 am »

I think in the 6+ months since the last time I post, most of the DF related fanart I drew was mod focused.
So here's a at least in 47.05 confirmed doable by vanilla means doodle of a civil bogeyman, hanging out with a fairy.

32
DF Modding / Re: What's going on in your modding?
« on: June 11, 2023, 02:59:20 am »
so last time I was working on a nomadic playstyle which I had hit the point of writing it as a script. Though the process of shunting your entire fort into the void is still a thing it's at least more manageable with burrows and dfhack's citizen's alert features.
Really hit the stress testing phase hard with realizing it's possible to build a boat that will sink if you don't void fort connect it to a different site,
then realize you could nomad build a boat then secure the bottom of it to land (when the water's freezes) to have it work with the nomad set up and just have a constructed platform on sea.
after which had a fun nautical adventure with this custom angel civ
after which I learn the nomad playstyle hinges on the wagon staying intact which converted the nomad+void fort ship run to just a void fort ship run.

though to back up to the moment where I realize the nomad system would really work was the session I had previous to the boat run which was a journey to cross the ocean to a remote island.
the plan started out building a bridge to the island but I quickly remember how cave ins system work and decided to abandon that plan for traveling through the caverns. Which was interesting as it revealed staying too long in the caverns while traveling will attract agitated cavern dwellers. I think the mining and foraging induce agitation might persist between nomad travels.

During that cavern trek session had inspired the idea of maybe I could try that constructions above water plan again, as I saw my quickly halted attempt of a constructed floor bridge still stand for a few minutes before collapsing I think I also saw some dingoes walking on the bridge also. I remember reaching the island then starting a new fort with the goal of building a boat which leads back to the story above.

so flash forward to now where I realize I could be storing items on to the wagon via the keyboard cursor and not some extremely complicated and crash heavy set up. which means I might have the means to just scavenge and gather resources from sites and just pack up and move to a new location with lil to no major crash risk. I could even deconstruct a workshop and pack up the building material to rebuild it when I need to.
raw modding wise been testing some old entity mods with the nomad stuff and poking around with raw ripped angel creature used for a custom entity.
quickly re-learn why having a civ with every creature is a fps killer when you visit the generated site in df50.
overall having fun playing out a roaming band of nomadic group that live off a wagon building and or scuttle trying.

33
Utilities and 3rd Party Applications / Re: DFHack 50.08-r3
« on: June 07, 2023, 01:16:36 am »
Code: ("AnimalTokenCivPatch6.lua") [Select]
--old old script made to update the hist_fig_less migrants and second citizens gain from messing with animal entity tokens
--this script uses code from dfhack's spawn unit code mostly the histfig data stuff and I guess the nemesis record stuff looking at it now.
-- this is a run to patch citizens script and not automated
-- uhh stability warning on what it does to histfigs and any future issues that comes from it down the line.



ui=df.global.plotinfo

local function allocateNewChunk(hist_entity)
  hist_entity.save_file_id = df.global.unit_chunk_next_id
  df.global.unit_chunk_next_id = df.global.unit_chunk_next_id+1
  hist_entity.next_member_idx = 0
  print("allocating chunk:",hist_entity.save_file_id)
end

local function allocateIds(nemesis_record,hist_entity)
  if hist_entity.next_member_idx == 100 then
    allocateNewChunk(hist_entity)
  end
  nemesis_record.save_file_id = hist_entity.save_file_id
  nemesis_record.member_idx = hist_entity.next_member_idx
  hist_entity.next_member_idx = hist_entity.next_member_idx+1
end

function createFigure(unit,he,he_group)
  local hf = df.historical_figure:new()
  hf.id = df.global.hist_figure_next_id
  df.global.hist_figure_next_id = df.global.hist_figure_next_id+1

  hf.unit_id = unit.id
  hf.nemesis_id = -1
  hf.race = unit.race
  hf.caste = unit.caste
  hf.profession = unit.profession
  hf.sex = unit.sex
  hf.name:assign(unit.name)

  hf.appeared_year = df.global.cur_year
  hf.born_year = unit.birth_year
  hf.born_seconds = unit.birth_time
  hf.curse_year = unit.curse_year
  hf.curse_seconds = unit.curse_time
  hf.birth_year_bias = unit.birth_year_bias
  hf.birth_time_bias = unit.birth_time_bias
  hf.old_year = unit.old_year
  hf.old_seconds = unit.old_time
  hf.died_year = -1
  hf.died_seconds = -1

  hf.civ_id = unit.civ_id
  hf.population_id = unit.population_id
  hf.breed_id = -1
  hf.cultural_identity = unit.cultural_identity
  hf.family_head_id = -1

  df.global.world.history.figures:insert("#", hf)

  hf.info = df.historical_figure_info:new()
  hf.info.whereabouts = df.historical_figure_info.T_whereabouts:new()
  hf.info.whereabouts.death_condition_parameter_1 = -1
  hf.info.whereabouts.death_condition_parameter_2 = -1
  -- set values that seem related to state and do event
  --change_state(hf, dfg.plotinfo.site_id, region_pos)


  --let's skip skills for now
  --local skills = df.historical_figure_info.T_skills:new() -- skills snap shot
  -- ...
  -- note that innate skills are automaticaly set by DF
  hf.info.skills = {new=true}

  if he then
    he.histfig_ids:insert('#', hf.id)
    he.hist_figures:insert('#', hf)
    hf.entity_links:insert("#",{new=df.histfig_entity_link_memberst,entity_id=unit.civ_id,link_strength=100})

    --add entity event
    local hf_event_id = df.global.hist_event_next_id
    df.global.hist_event_next_id = df.global.hist_event_next_id+1
    df.global.world.history.events:insert("#",{new=df.history_event_add_hf_entity_linkst,year=unit.birth_year,
    seconds=unit.birth_time,id=hf_event_id,civ=hf.civ_id,histfig=hf.id,link_type=0})
  end

  if he_group and he_group ~= he then
    he_group.histfig_ids:insert('#', hf.id)
    he_group.hist_figures:insert('#', hf)
    hf.entity_links:insert("#",{new=df.histfig_entity_link_memberst,entity_id=he_group.id,link_strength=100})
  end

  local soul = unit.status.current_soul
  if soul then
    hf.orientation_flags:assign(soul.orientation_flags)
  end

  unit.flags1.important_historical_figure = true
  unit.flags2.important_historical_figure = true
  unit.hist_figure_id = hf.id
  unit.hist_figure_id2 = hf.id

  return hf
end

function createNemesis(unit,civ_id,group_id)
  local id = df.global.nemesis_next_id
  local nem = df.nemesis_record:new()

  nem.id = id
  nem.unit_id = unit.id
  nem.unit = unit
  nem.flags:resize(31)
  nem.unk10 = -1
  nem.unk11 = -1
  nem.unk12 = -1
  df.global.world.nemesis.all:insert("#",nem)
  df.global.nemesis_next_id = id+1
  unit.general_refs:insert("#",{new = df.general_ref_is_nemesisst, nemesis_id = id})

  nem.save_file_id = -1

  local he
  if civ_id and civ_id ~= -1 then
    he = df.historical_entity.find(civ_id)
    he.nemesis_ids:insert("#",id)
    he.nemesis:insert("#",nem)
    allocateIds(nem,he)
  end
  local he_group
  if group_id and group_id ~= -1 then
    he_group = df.historical_entity.find(group_id)
  end
  if he_group then
    he_group.nemesis_ids:insert("#",id)
    he_group.nemesis:insert("#",nem)
  end
  nem.figure = unit.hist_figure_id ~= -1 and df.historical_figure.find(unit.hist_figure_id) or createFigure(unit,he,he_group) -- the histfig check is there just in case this function is called by another script to create nemesis data for a historical figure which somehow lacks it
  nem.figure.nemesis_id = id
  return nem
end
function sigh()
for k,v in pairs(df.global.world.units.active) do
local HF=df.global.world.history.figures
local HO=df.global.plotinfo.civ_id
local EN=df.global.world.entities.all[HO]
local HP=df.global.plotinfo.group_id
if v.hist_figure_id==-1 and v.civ_id==df.global.plotinfo.civ_id then
createNemesis(v,HO,HP)
--createFigure(v,EN,HP)
print(k)
end
end
end

for k,v in pairs(df.global.world.units.active) do
local HFN=df.global.world.history.figures
local HN=df.global.plotinfo.civ_id
sigh()
if v.hist_figure_id==-1 then break else
for c,q in pairs(HFN[v.hist_figure_id].entity_links) do
if q.entity_id==df.global.plotinfo.civ_id and v.population_id==-1 and q.entity_id~=df.global.plotinfo.group_id then
print(v.hist_figure_id)
HFN[v.hist_figure_id].entity_links:insert("#",{new=df.histfig_entity_link_memberst})
HFN[v.hist_figure_id].entity_links[c].entity_id=df.global.plotinfo.group_id
HFN[v.hist_figure_id].entity_links[c].link_strength=100
end
end
end
end

ok so this script is an update to the 3 year old version that probably doesn't work well in DF50 due to the ui to plotinfo change said script also been updated to include uhh 3 year old spawn unit coding for making histfigs and nemesis records as that's a good source to draw from.
this is mostly a modder tool to help with sapient historical-figureless citizen scenario that animal entity tokens do with multi-cultural forts. This script for df50 mostly gives them noble access and means to join squads as I think df50 already gives them labor access.

should note this will not help the 'oops main civ is cats and now no one a noble' issue that one would require a separate custom script for appointing a civ unit to a noble position.


Code: ("wagon-unretire2.lua") [Select]
local contain={}
function unretirewagon(curx,cury,curz)

for de,oe in pairs(df.global.world.buildings.other.WAGON) do
if oe.name == 'Nomad' then


local vector=df.global.world.items.all -- load all items
for i = 0, #vector-1 do -- look into all items offsets
local curpos=vector[i].pos --get its coordinates
local cx=curpos.x
local cy=curpos.y
local cz=curpos.z
if cx==oe.centerx and cy==oe.centery and cz==oe.z then --compare them
dfhack.items.moveToBuilding(vector[i],oe) --return index
end
end

end
end
end

unretirewagon()


here's another wagon script that stores items directly in the center of the wagon back into the wagon for events of retiring and unretiring while nomading, it works with void forts and normal stationary forts ... as so long you name the wagon 'Nomad' ... or delete the if line of code checking if a wagon is named nomad.

34
Utilities and 3rd Party Applications / Re: DFHack 50.08-r2
« on: June 05, 2023, 01:59:05 pm »
ok so finished a big test on nomad and cut down on most of the crashes.


mostly found what usually make the game crash and plan to avoid it.
like I mostly think new civ zones might need to be cleared before leaving and also stockpiles but shrugs if that was tied to a different thing that align with me doing those two things.
edit: oh yeah you do need to rename the wagon to "Nomad" for these scripts to work to stop potential accidents from nomading onto other player forts that kept their wagon
Code: ("wagonmove3.lua") [Select]
function getxyz() -- this will return pointers x,y and z coordinates.
local x=df.global.cursor.x
local y=df.global.cursor.y
local z=df.global.cursor.z
return x,y,z -- return the coords
end
function movewagon(curx,cury,curz)
for de,oe in pairs(df.global.world.buildings.other.WAGON) do
if oe.name == 'Nomad' then
oe.centerx=curx
oe.x1=curx-1
oe.x2=curx+1
oe.centery=cury
oe.y1=cury-1
oe.y2=cury+1
oe.z=curz

for Del,ete in pairs(oe.contained_items) do
ete.item.pos.x=oe.centerx
ete.item.pos.y=oe.centery
ete.item.pos.z=oe.z
end
end
end
end

movewagon(getxyz())
this script requires the mining cursor to function and this new version of the wagon move will now update the positions of the items store on the wagon.
which I guess opens the research path on figuring out what causes the contents of items to spill out on unretire.

another script that's still currently in the works is this one Wagon store which copies and stores the contents of workshops(and now furnaces ) on to the wagon then attempts to remove said contents from the workshop and furnace.
this would take a few multiple attempts at emptying out the workshops and furnaces and I'm not sure this is perfectly save as it's mostly stable, if you craft way too much stuff it will take awhile to load it all onto the wagon and might look like a soft lock.
Code: ("wagon-store2.lua") [Select]
local contain={}
function stuffwagon(curx,cury,curz)
for k,v in pairs(df.global.world.buildings.other.WORKSHOP_ANY) do
for con,tain in pairs(v.contained_items) do
for de,oe in pairs(df.global.world.buildings.other.WAGON) do
if oe.name == 'Nomad' then
if tain.use_mode==0 then
oe.contained_items:insert("#",{new=true,item=v.contained_items[con].item,use_mode=0})
clearitems(oe,tain,v.contained_items)
end
end
end
end
end
for k,v in pairs(df.global.world.buildings.other.FURNACE_ANY) do
for con,tain in pairs(v.contained_items) do
for de,oe in pairs(df.global.world.buildings.other.WAGON) do
if oe.name == 'Nomad' then
if tain.use_mode==0 then
oe.contained_items:insert("#",{new=true,item=v.contained_items[con].item,use_mode=0})
clearitems(oe,tain,v.contained_items)
end
end
end
end
end

end
function clearitems(oe,tain,Vcon)
for Del,ete in pairs(oe.contained_items) do
for De2,ee in pairs(Vcon) do
if ete.item.id== ee.item.id then
Vcon:erase(De2)
end
end
end
end


stuffwagon()

Code: ("wagon-store-C.lua") [Select]
--this script uses old dfhack code to store items on to the wagon via keyboard cursors.
--probably more stable than the other scripts that store items onto the wagon but requires it to be on the floor.
local contain={}
 function getxyz() -- this will return pointers x,y and z coordinates.
local x=df.global.cursor.x
local y=df.global.cursor.y
local z=df.global.cursor.z
return x,y,z -- return the coords
end

function stuffwagon(curx,cury,curz)

for de,oe in pairs(df.global.world.buildings.other.WAGON) do
if oe.name == 'Nomad' then


local vector=df.global.world.items.all -- load all items
for i = 0, #vector-1 do -- look into all items offsets
local curpos=vector[i].pos --get its coordinates
local cx=curpos.x
local cy=curpos.y
local cz=curpos.z
if cx==curx and cy==cury and cz==curz then --compare them
dfhack.items.moveToBuilding(vector[i],oe) --return index
end
end

end
end
end

stuffwagon(getxyz())

the test I done was seeing if I could cross the ocean to settle on an remote island and uhh going through the caverns in DF50 is adventurous one could say as you're at the mercy of the agitation system and if you say stay too long and or dig up too much stuff down in the cavern layer you might get swarmed by the other residents of the area and possibly make the trip harder.

edit: realize I already made a wagonmove2 so updated lua file name for consistency.

edit: ok so uhh made a cursor version of the wagon store script so now one could scoop up random items on the field to store back on the wagon. it probably more stable than the previous ones given it uses dfhack for the item placement but user be ware.
edit: it's also a modification of the wagon un-retire script after realizing moving the wagon over an item to scoop the item into itself was a bit silly to do.

35
Utilities and 3rd Party Applications / Re: DFHack 50.08-r1
« on: May 25, 2023, 02:55:05 pm »
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.
Code: ("nomad.lua") [Select]
--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.
Code: [Select]
: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
Code: [Select]
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?

36
Utilities and 3rd Party Applications / Re: DFHack 50.08-r1
« on: May 15, 2023, 07:18:20 am »
so far in my nomad runs the contents in the wagon stayed when loading and unloading chunks of the map.
though if you unretire the most of the contents would be out of the wagon so moving it would just be moving the main standing idle location.

Is there any way to make it so that you don’t need to name the wagon?
usually I have it like that as a sanity check for the code to not scoop up any other wagons if I move to a location that has one.
You could take out the' if wagon building name is nomad' line of code so one could just grab the wagon on site.
like so:

Code: ("movewagon2.lua") [Select]
function getxyz() -- this will return pointers x,y and z coordinates.
local x=df.global.cursor.x
local y=df.global.cursor.y
local z=df.global.cursor.z
return x,y,z -- return the coords
end
function movewagon(curx,cury,curz)
for de,oe in pairs(df.global.world.buildings.other.WAGON) do
oe.centerx=curx
oe.x1=curx-1
oe.x2=curx+1
oe.centery=cury
oe.y1=cury-1
oe.y2=cury+1
oe.z=curz
end
end


movewagon(getxyz())

37
Utilities and 3rd Party Applications / Re: DFHack 50.08-r1
« on: May 14, 2023, 05:30:20 am »
so far in my nomad runs the contents in the wagon stayed when loading and unloading chunks of the map.
though if you unretire the most of the contents would be out of the wagon so moving it would just be moving the main standing idle location.

38
Utilities and 3rd Party Applications / Re: DFHack 50.08-r1
« on: May 13, 2023, 10:24:59 pm »
I’ve been thinking…

I’ve alway’s though that it’s be nice if the dwarves could move the embark wagon after they embark.  I know that this would require several new systems that are not in the game right now.

In the meantime, however, is there a DFHack command that will teleport the embark wagon (and it’s contents) to a chosen position on the map?  It’d make things a lot faster if my dwarves didn’t have to walk so long when transferring items from the wagon to the initial stockpile.

so like this?
currently working on a series of nomad focus scripts that converts the wagon as the main building for storing items and moving around the map as having it be stationary would lead to it being lost when I unload the map chunk that has it.


Code: ("wagonmove.lua") [Select]
function getxyz() -- this will return pointers x,y and z coordinates.
local x=df.global.cursor.x
local y=df.global.cursor.y
local z=df.global.cursor.z
return x,y,z -- return the coords
end
function movewagon(curx,cury,curz)
for de,oe in pairs(df.global.world.buildings.other.WAGON) do
if oe.name == 'Nomad' then
oe.centerx=curx
oe.x1=curx-1
oe.x2=curx+1
oe.centery=cury
oe.y1=cury-1
oe.y2=cury+1
oe.z=curz
end
end
end

movewagon(getxyz())
this script requires you to name the wagon Nomad and use the keyboard cursor for it to work

39
DF Modding / Re: What's going on in your modding?
« on: May 13, 2023, 04:51:59 am »
ok since the last time I was messing with void forts and was thinking about playing with a total world conversion mod, well I spent all of april doing that with squamous mod which was interesting on a shuttle connecting to other locations in a sci-fi setting though during the break from that I stumble upon the old adv mode loading map chunks but for fort mode by messing with the player fort's global position coords in the site data.
as doing so causes the game to adjust and load in the missing parts for the fort.
which combine with void forts means I could move around the world then load in a chunk of the map under it with out needing to double embark.
I dub this method of loading mapchunks nomad mode as you could load and unload the original starting position and slowly move around the world map digging up stuff building a constantly rebuilt stockpile of goods and trail of workshops.
oh and potential chance of losing citizens if they are in the section of the map that set to be unloaded.
I haven't figure out How this work I feel like it might be either timing based or terraforming based but what ever it is it slow enough to make sending squads of military folks a rough one unless I stretch the site out long enough to get the military squad to assault them or I void fort park the destination closer.

I also haven't reach the 'I could turn this finding into a script' phase as it's also possible to shunt your entire fort into the void or starve your fort out trying to preserve a stash of drinks offsite that some how works.



here's a gif showing off the nomad effect in action.
Spoiler: "old showcase" (click to show/hide)


ended up with mixing void fort knowledge and this nomad one to land a fort site near a dark fortress spire and just load in the spire and scoop up the prisoner children... and the master and I think safely leave.

40


Code: ("ann.lua") [Select]
--proof of concept of an announcement menu.

local dlg=require("gui.dialogs")

local JUNK={}
local Dang=df.global.world.status.announcements

  for ultimate,checked_Ann in pairs(Dang) do
local mono=checked_Ann.text

      table.insert(JUNK,{mono,search_key = mono:lower()})
end
 
 dlg.showListPrompt("Announcement list","scroll through the list of Announced alerts",COLOR_WHITE,JUNK,nil,nil,nil,nil,true)

ok so out of boredom I decided to write up a script that grabs all the alerts/reports and shoves them into a list... there was a previous version of this script that grab every report but some folks don't want to sift through combat logs so I made this instead. there was an attempt at adding a filter on it but shrugs.

41
Yes I know that dwarf fortress doesn't have a specific goal, but since the community gave some ways to "Complete" fortress mode I just had a thought. Its nothing more than a thought
With adv mode it's constantly shifting world generations and layouts of the world being different for each major world update often leads to the 'complete' process is just what's the newest hidden/not hidden thing that got added and just do that then maybe someone finds some interesting stories to tell from playing that version of DF adv mode.
It's almost like checking back in on a mmo to see the new expansion.

though I do feel like one person's end game completion is another person's step 2 with DF adv mode.

that all said I pretty much felt I completed a life time goal with adv mode that I started 12ish years ago and completed it when 47.04 rolled out, which was the civil bogeymen project.
and the run where I first attempt it almost botch when I forgot to get the bogeyman to become military commander of the fort so I had to wait + 2 in game years in fort mode telling migrants to leave just so that true_wing could reveal that they could in fact talk and letting me finish the challenge with getting a military commander to talk them into joining the fort's militia and then sending them off on a mission so they could come back as a full citizen.

the second attempt at this went a lot more smoother and less bloodshed so it went from challenge to a neat trick you could do... or a step for some future project.

42
I've played dwarf fortress for a while, both free and steam version, and I had an question, is it possible to complete adventure mode?
I know this topic was touched at some point  but I had an idea which u would like to consider.
In my opinion to complete adventure mode you have to die of old age, if that's possible (im not sure myself), well in any case it's just an idea of my -bald head-
that probably impossible for certain creatures given goblins and elves exist and they don't have an max age, and necromancy exist which also prevents dying of old age or undoing someone who died.
but the answer to that question about 'complete adv mode' well DF didn't really have a winning condition or a final goal for you to pursuit.
it's a make your own fun set your own path set up, and if you succeed or not is up  to you.
the new premium one tosses in a tutorial guide for doing stuff in the world generation simulator that has multiple game modes that you could interact with it.
for adv mode it's usually prompts the player go ask friends and peers and folks in game about stuff to do or if you start in an besieged location the game will tell you 'hey wanna stop this looming threat from ruining lives go here.' and just mark it on the map.

over the years adv mode players mostly look for the next 'late game addition' to pursuit. Before the necromancers introduction adventurers had 'the explore the caverns and go through an underground fortress gauntlet to get some cool weapon and go deeper.' late game thing to do
now it's more locate some hidden location explore that to read a name then go through a dark fortress to confront the leader of the dark fortress... then maybe go all the way down the spire and go deeper.

not many folks do the dark fortress route as you get massive slowdown visiting high populated sites and dark fortresses are pretty much that.
and there potential optional unlocks depending on how you tackle the hidden location as you could intermix fort mode and possibly unlock a new species to play in adv mode.


43
DF Modding / Re: What's going on in your modding?
« on: March 22, 2023, 10:15:34 am »
ended up working on my infurn civ mod( normal cats that domesticated 40 different fiends civ) to the point where I got a decent df50 workable fort going.

then I got access to dfhack again and now I'm playing this goblin faction(off shoot of the infurn civ) that currently moving around the world map and connecting to sites.

the process of connecting to a different site is mostly using like 3 different scripts and one of them which suppose to just let one unretire any site had proven to crash on use normally, except when used with this other script that lets me jump back into the 'choose your own game mode menu' and embark a second time, the third script is the one that moves the player fort around the world map as I learn when you embark two sites the game tries to align them to the coordinates of where they are on the world/region map.
so my current experience is piloting a mobile 'void' pirate ship that raids and plunders smaller sites(bigger ones end up killing my fps and pc on ram usage and would require more research on tackling those in smaller chunks)
then gather enough gems, coal and platinum to smelt into goods to trade with the intent purpose of buying more crew members to go on raiding missions and dig.
the feeling of exploring another site with a team of miners carving out a tunnel into the unallocated space between the two sites and possible chances to swipe rare furniture pieces that usually get generated in pre-gen sites is fun.
also the added bonus of oddities of doing this like micro explosions on the 'void ship', crew members getting stuck in the ground, flooding, the dangers of mixing different biomes together and other unseen events that could pop up.

oh and retiring in this state causes anyone not on the main site(so this is the site you recently embark/unretire/reclaim with) to be left behind so there's an urgency to making sure everyone is back on the 'ship' before lifting of or just treating the folks on the other site as a lost cause for anything that stuck on there.
this also lets me dump trash on someone's lawn and not have to worry about it.

so now after a few rounds of testing and stealing ladles and querns from lairs I'm starting to wonder if there's a fun total conversion mod(for df50 classic) to go with this dfhack'd playstyle?

44

Code: ("7start.lua") [Select]
local MapCure=df.global.gview.view.child.child

local options = {}

local argparse = require('argparse')
local commands = argparse.processArgsGetopt({...}, {
    {'d', 'dead', handler=function() options.dead = true end}
})


--this script uses my old campboat set up to make a gui list for the starting 7
--and a list for the creatures you would be converting them into.

local dlg=require("gui.dialogs")

function teleportboatnames2()
local Ark={}
for k,v in pairs(MapCure.s_unit) do
BoaName=dfhack.TranslateName(v.name)
table.insert (Ark,{dfhack.TranslateName(v.name).." "..v.name.nickname,nil,v,search_key = BoaName:lower()})
end
local f=function(Name,C)
unretire_all(C[3])
end
dlg.showListPrompt("list of units","Select starting unit to settle here",COLOR_WHITE,Ark,f,nil,nil,true)
end

function unretire_all(unit2)
Ark2={}
for num,se in pairs(df.global.world.raws.creatures.all) do
CreatureName=se.creature_id
table.insert (Ark2,{se.creature_id.." "..se.name[0],nil,num,search_key = CreatureName:lower()})
end
local f=function(Name,C2)
unit2.name.nickname=df.global.world.raws.creatures.all[C2[3]].name[0]
unit2.enemy.normal_race=C2[3]
for cas,cast in pairs(df.global.world.raws.creatures.all[C2[3]].caste) do
if unit2.enemy.normal_caste > cas then
unit2.enemy.normal_caste=cas
end
end
end
dlg.showListPrompt("list of creatures","Select creature to change here",COLOR_WHITE,Ark2,f,nil,nil,true)
end

if df.global.gview.view.child==nil then
print("this script requires you to be in the raid menu to work")
else
teleportboatnames2()
end

this has to be done on the prepare carefully embark screen, and this wouldn't save the profile to these creature ids.


edit: ok having now test this script on embark it might need some time testing. highly likely to crash currently working on the caste issue.


edit 2: ok so got the embark crash issue fixed now it should transform the dwarves(or citizens if you play modded) into the forms you set them... and for player experience made it so you can tell which citizen is going to turn into.
also the caste issue is also set.

45
Code: ("force-petition.lua") [Select]
--this script is made as means to petition folks to join a fort manually requires mining cursor to work
--doesn't work on folks who don't have a historical figure so watch out.
--this script re-uses warmist and other folks in the dfhack community functions to get access to the cursor
local ui=plotinfo
function getxyz() -- this will return pointers x,y and z coordinates.
local x=df.global.cursor.x
local y=df.global.cursor.y
local z=df.global.cursor.z
return x,y,z -- return the coords
end
function getCreatureAtPos(x,y,z) -- gets the creature index @ x,y,z coord
--local x,y,z=getxyz() --get 'X' coords
local vector=df.global.world.units.all -- load all creatures
for i = 0, #vector-1 do -- look into all creatures offsets
local curpos=vector[i].pos --get its coordinates
local cx=curpos.x
local cy=curpos.y
local cz=curpos.z
if cx==x and cy==y and cz==z then --compare them
return vector[i] --return index
end
end
return nil

end

function petition()
local ui=plotinfo

local Shell=getCreatureAtPos(getxyz())
local Agree=df.global.world.agreements.all
Agree:insert("#",{new=true,id='-10',next_party_id=2,next_details_id=1})
local dd=Agree[#Agree - 1]
print('oh no')
dd.id = df.global.agreement_next_id
df.global.agreement_next_id = df.global.agreement_next_id + 1
dd.details:insert("#",{new=true,type=3})
dd.parties:insert("#",{new=true})
dd.parties:insert("#",{new=true})
dd.details[0].data.Citizenship=df.agreement_details_data_citizenship:new()
dd.details[0].data.Citizenship.applicant=0
dd.details[0].data.Citizenship.government=1
dd.details[0].data.Citizenship.site=df.global.plotinfo.site_id
dd.parties[0].histfig_ids:insert("#",0)
dd.parties[0].histfig_ids[0]=Shell.hist_figure_id
dd.parties[1].id=1
dd.parties[1].entity_ids:insert("#",0)
dd.parties[1].entity_ids[0]=df.global.plotinfo.group_id
df.global.plotinfo.petitions:insert("#",dd.id)

end
function petition2()
local ui=plotinfo

local Shell=getCreatureAtPos(getxyz())
local Agree=df.global.world.agreements.all
Agree:insert("#",{new=true,id='-10',next_party_id=2,next_details_id=1})
local dd=Agree[#Agree - 1]
print('oh no')
dd.id = df.global.agreement_next_id
df.global.agreement_next_id = df.global.agreement_next_id + 1
dd.details:insert("#",{new=true,type=2})
dd.parties:insert("#",{new=true})
dd.parties:insert("#",{new=true})
dd.details[0].data.Residency=df.agreement_details_data_residency:new()
dd.details[0].data.Residency.reason=3
dd.details[0].data.Residency.applicant=0
dd.details[0].data.Residency.government=1
dd.details[0].data.Residency.site=df.global.plotinfo.site_id
dd.parties[0].histfig_ids:insert("#",0)
dd.parties[0].histfig_ids[0]=Shell.hist_figure_id
dd.parties[1].id=1
dd.parties[1].entity_ids:insert("#",0)
dd.parties[1].entity_ids[0]=df.global.plotinfo.group_id
df.global.plotinfo.petitions:insert("#",dd.id)

end
petition2()
petition()

well here's a revised DF50 version of the force petition script I made some time ago.

it uses the mining cursor to function and mostly works on folks with a historical figure so non-hist figs might not join.


Pages: 1 2 [3] 4 5 ... 411