Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 239 240 [241] 242 243

Author Topic: DFHack 50.13-r2  (Read 819080 times)

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3600 on: November 29, 2023, 09:52:59 pm »

EventManager received some restructuring in 0.47.05-r5, which may have broken something. 0.47.05-r4 would likely work for you.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 50.11-r4
« Reply #3601 on: December 10, 2023, 01:18:56 am »

ok realize I been testing this script for some time now and uhh here's two scripts that reveal the world map of hidden sites and adds an embark note marker to them to show where they are when you zoom in,
Code: ('revealsites.lua') [Select]
for k,v in pairs(df.global.world.world_data.sites) do
if v.type~=0 then
v.flags[0]=false
end
if v.type==2 or v.type==6 or v.type==7 or v.type==9 or v.type==10 then
Mum=df.global.world.world_data.embark_notes
Mum:insert("#",{new=true,tile=32, fg_color=12, bg_color=2, name=dfhack.TranslateName(v.name),left=v.rgn_min_x,right=v.rgn_max_x,top=v.rgn_min_y,bottom=v.rgn_max_y})
local clu2=Mum[#Mum-1]
clu2.pos.x=v.pos.x
clu2.pos.y=v.pos.y
end
end

and another for mapping out the realization buildings on big pre-gen sites which requires one to embark on top of the site first to scan the large site for realizations... it's mostly a voidfort assistant script. also this will hide the site as the embark notes seem to be under the normal site rectangle I guess in premium the visual is like transparent so this is probably not necessary but shrugs.
Code: ('map-a-site2.lua') [Select]
for k,v in pairs(df.global.world.world_data.sites) do
if v.type==1 or v.type==3 or v.type==4 or v.type==5 or v.type==10 then
if v.realization==nil then else
v.flags[0]=true

for ok,oe in pairs(v.realization.buildings) do
local regionx=math.floor(oe.min_x/47)
local regionx2=math.floor(oe.max_x/47)
local regiony=math.floor(oe.min_y/47)
local regiony2=math.floor(oe.max_y/47)
local regionmath1=math.floor((v.global_min_x+regionx)/16)
local regionmath2=math.floor((v.global_max_x+regionx2)/16)
local regionmath3=math.floor((v.global_min_y+regiony)/16)
local regionmath4=math.floor((v.global_max_y+regiony2)/16)
local globalmath1=math.floor((v.global_min_x+regionx)-(regionmath1*16))
local globalmath2=math.floor((v.global_max_x+regionx2)-(regionmath2*16))
local globalmath3=math.floor((v.global_min_y+regiony)-(regionmath3*16))
local globalmath4=math.floor((v.global_max_y+regiony2)-(regionmath4*16))
function embarknote(oe,v,regionmath1,regionmath3,globalmath1,globalmath2,globalmath3,globalmath4)
local buildcolor=oe.type
Mum=df.global.world.world_data.embark_notes
Mum:insert("#",{new=true,tile=buildcolor, fg_color=10, bg_color=5, name=dfhack.TranslateName(v.name),
left=globalmath1,
right=globalmath2,
top=globalmath3,
bottom=globalmath4})
local clu2=Mum[#Mum-1]

clu2.pos.x=regionmath1
clu2.pos.y=regionmath3

end
print (oe.type)
if oe.type~=16 then
embarknote(oe,v,regionmath1,regionmath3,globalmath1,globalmath2,globalmath3,globalmath4)
end

end
end
end
end



I have been working on an revise of the armview script where it just points at the army on march so one could embark on top of your squad... but I feel like if the player didn't set the calendar timer to 0 ticks this will just end up not working for them on top of that the squad will just march out of the new embark so you got a small window of time to mess with them.



Code: ('build-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.all) do
if oe.name == 'Target' 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())

edit 12/28/2023 : here's a version of the wagon store script that now just stuff items into buildings if you select them with the cursor... probably if you don't have the keyboard cursor script the mining one.
this here mess could say let you stuff things that normally can't be traded into the trade depot if you name the trade depot Target.

« Last Edit: December 28, 2023, 12:16:38 am by Rumrusher »
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

darkhog

  • Bay Watcher
  • JAGIELSKI is PERFECTION
    • View Profile
    • Jagielski Gaming YT channel
Re: DFHack 50.11-r4
« Reply #3602 on: December 31, 2023, 09:13:37 pm »

IMO you should add a command that would destroy all non-immediately useful items (such as corpses, broken items, etc.) that aren't in stockpiles, because I've had several large sieges and now my FPS is very low, with too many corpses, skeletons and other garbage items being a likely culprit (tested by atom smashing some of them which brought in a brief increase in FPS).

Basically a radical, last resort FPS command when all other ways to increase FPS fail.
Logged
I am a dwarf and I'm digging a hole. Diggy Diggy hole, diggy diggy hole.

If I say something funny, don't ask if you can sig it. Just do it (though credit me).

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3603 on: January 01, 2024, 12:08:13 am »

(tested by atom smashing some of them which brought in a brief increase in FPS).
If the increase was only brief/temporary and your FPS dropped back down, there is probably a different underlying cause.

Anyway, I suspect something along these lines may already be possible with "autodump" plus some filtering tool (extended stocks screen?), so that would probably be our recommendation. If there are filters missing that you think would be useful, we're open to suggestions. Generally, for this sort of thing, I'd prefer to extend existing commands over creating new single-purpose ones.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

darkhog

  • Bay Watcher
  • JAGIELSKI is PERFECTION
    • View Profile
    • Jagielski Gaming YT channel
Re: DFHack 50.11-r4
« Reply #3604 on: January 01, 2024, 11:01:01 am »

(tested by atom smashing some of them which brought in a brief increase in FPS).
If the increase was only brief/temporary and your FPS dropped back down, there is probably a different underlying cause.

Anyway, I suspect something along these lines may already be possible with "autodump" plus some filtering tool (extended stocks screen?), so that would probably be our recommendation. If there are filters missing that you think would be useful, we're open to suggestions. Generally, for this sort of thing, I'd prefer to extend existing commands over creating new single-purpose ones.

The thing is, I was fighting a massive invasion at the time, so the bodies kept pilling up. It's definitely that as the FPS stabilized after it was over. And yes, this is definitely possible with the autodump (used it to teleport bodies to the bridge for atom smashing), but marking all the bodies and other trash for dumping is a hassle, even with rectangle mass marking feature.
« Last Edit: January 01, 2024, 11:03:47 am by darkhog »
Logged
I am a dwarf and I'm digging a hole. Diggy Diggy hole, diggy diggy hole.

If I say something funny, don't ask if you can sig it. Just do it (though credit me).

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3605 on: January 01, 2024, 02:24:19 pm »

Note that with the newer gui/autodump, you don't actually have to mark anything for dumping first. If you area select with the mouse, it will act on the selected items instead of those marked for dumping.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DFHack 50.11-r4
« Reply #3606 on: January 02, 2024, 11:15:02 am »

Sounds like you want something similar to cleanowned that also handles non-butcherable, non-buriable corpses? autodump destroy can be called after this for immediate destruction instead of dumping.
« Last Edit: January 02, 2024, 11:20:58 am by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3607 on: January 02, 2024, 03:30:50 pm »

we're working on an "items" tool that can filter by properties and make specific changes (like mark for dumping). this sounds like it might be useful to specify filters for in that tool
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3608 on: January 03, 2024, 11:25:07 pm »

we're working on an "items" tool that can filter by properties and make specific changes (like mark for dumping). this sounds like it might be useful to specify filters for in that tool
FWIW, this is similar to the set of features I had in mind when I was referring to the extended stocks screen (https://docs.dfhack.org/en/stable/docs/tools/stocks.html).

The thing is, I was fighting a massive invasion at the time, so the bodies kept pilling up. It's definitely that as the FPS stabilized after it was over. And yes, this is definitely possible with the autodump (used it to teleport bodies to the bridge for atom smashing), but marking all the bodies and other trash for dumping is a hassle, even with rectangle mass marking feature.
Right - my point was that the "stocks" plugin allows (well, allowed) you to search by criteria other than location. e.g. you could select all items with "corpse" in their name and mark them for dumping, then use autodump if you wanted.

I realize now that that "stocks" plugin hasn't been ported to v50 yet, and the "items" tool sounds like a likely replacement for it. So my advice was only really useful for any 0.47 players.
« Last Edit: January 03, 2024, 11:26:52 pm by lethosor »
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3609 on: January 05, 2024, 06:15:34 am »

DFHack 50.11-r5rc1 (beta) released!

Highlights: gui/control-panel, gui/autobutcher, confirm, uniform-unstick, gui/mass-remove

Get it from:

Full installation instructions: https://docs.dfhack.org/en/stable/docs/Installing.html
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3610 on: January 14, 2024, 06:11:35 am »

DFHack 50.11-r5rc2 (beta) released!

Highlights: gui/control-panel, gui/autobutcher, confirm, uniform-unstick, gui/mass-remove, gui/reveal, gui/biomes, gui/teleport

Get it from:

Full installation instructions: https://docs.dfhack.org/en/stable/docs/Installing.html
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3611 on: January 19, 2024, 05:21:49 pm »

DFHack 50.11-r5rc3 (beta) released!

Highlights: gui/embark-anywhere, item bulk management, difficulty settings and standing orders auto-restore, retire unused locations

Get it from:

Full installation instructions: https://docs.dfhack.org/en/stable/docs/Installing.html
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3612 on: January 25, 2024, 03:50:10 pm »

DFHack 50.11-r5 released!

Highlights: gui/embark-anywhere, bulk item and building management, squad equipment fixer, gui/biomes, auto-restore difficulty settings and standing orders, and lots more!

Get it from:

Full installation instructions: https://docs.dfhack.org/en/stable/docs/Installing.html
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r4
« Reply #3613 on: February 02, 2024, 06:17:22 pm »

DFHack 50.11-r6 and 50.12-beta released!

Get it from:

Full installation instructions: https://docs.dfhack.org/en/stable/docs/Installing.html

50.12-beta is available on Steam for subscribers to the 50.12-beta branch.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack 50.11-r5
« Reply #3614 on: February 04, 2024, 06:20:30 pm »

Button recently created a suggestion to have DF allow custom work details to be saved/restored to/from disk.  In the meantime, would it be possible to extend DFHack with this ability while we wait for Toady One to implement the suggestion?



Also, would it be possible to create a fix that makes egg-layers that are assigned to a pen/pasture only claim nestboxes that are within that pen/pasture?
Logged
Really hoping somebody puts this in their signature.
Pages: 1 ... 239 240 [241] 242 243