Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 21 22 [23] 24 25 ... 243

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

Burneddi

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #330 on: September 26, 2017, 12:30:20 pm »

How would we know if you're using an outdated version?
Possibly by being familiar with the bug and knowing that it has been recently fixed, for instance. Site building being glitched sounds like the kind of bug people would notice fairly easily if it affected them. Here's a video of the site creation bug: https://gfycat.com/SpanishVigorousInexpectatumpleco

Either way, I'm using DFHack 0.43.05-r2 with TWBT 5.86 (although I just tried updating to 6.21 and it still had the bug) with the Spacefox tileset (although it seems to occur with any other tileset all the same). This is all launched through PE's LNP.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #331 on: September 26, 2017, 12:31:48 pm »

Sadly twbt doesn't play nicely with adventure mode.
Logged

Burneddi

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #332 on: September 26, 2017, 12:54:53 pm »

Sadly twbt doesn't play nicely with adventure mode.
I've used it in adventure mode for a good bit, and this is the only major issue I've encountered. The other problem is that the yellow descriptive text in the bottom left corner (when looking at things) flows off screen with TWBT, but it's usually not too important.
Logged

KittyTac

  • Bay Watcher
  • Impending Catsplosion. [PREFSTRING:aloofness]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #333 on: September 27, 2017, 04:30:04 am »

Any way to raise the temperature of a loaded region to, say, 60000U?
Logged
Don't trust this toaster that much, it could be a villain in disguise.
Mostly phone-posting, sorry for any typos or autocorrect hijinks.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #334 on: September 27, 2017, 03:29:11 pm »

diving into adv mode building and wonder if it possible to say shrink the build timer to 1 hour for projects that ask for say 3000 hours to complete?
I know it possible to cut the time down with companions but kinda figure there's a more dfhacky solution.

edit: hmm it seems messing with the display timer does cut the timer down, but it doesn't speed up the building process so I guess I need to see if Companion number inflation can shorten the time needed to build large advmode constructions
« Last Edit: September 28, 2017, 04:31:37 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

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #335 on: September 28, 2017, 03:29:24 am »

Never got that one working, btw, what was the flag you found to toggle the "can build here" state?
Sadly twbt doesn't play nicely with adventure mode.
I've used it in adventure mode for a good bit, and this is the only major issue I've encountered. The other problem is that the yellow descriptive text in the bottom left corner (when looking at things) flows off screen with TWBT, but it's usually not too important.
Go into travel mode and approach a site until the map zooms in a bit, particularly the first thing you do after loading a save, if it doesn't crash when the map zoom happens, it'll usually do it if you leave travel mode there, or upon re-entering it.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #336 on: September 29, 2017, 10:51:05 am »

So I know that it is possible to add a skill to a unit using a skill_id that doesn't exist (e.g. BOOKBINDING is skill_id 134, 135 doesn't have a skill associated with it, but I can use utils.insert_or_update() to add an entry in unit.status.current_soul.skills with a skill_id of 135). My questions are, if I have a couple dozen custom skills that I want to track, will adding them in this way cause any issues further down the line that I am not seeing? (currently I use persistent tables to store these custom skills, but having them all in the same place would be very nice). And is there any way to add a visual representation of these skills? (i.e. when 'V'isualizing a unit you can see Novice Wood Cutter, could I set it up to display my custom skills somehow?

As a bonus question, can this same method (utils.insert_or_update) be used to store custom attributes and traits? And will information stored like this be lost in save/reload?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #337 on: September 29, 2017, 08:31:27 pm »

My questions are, if I have a couple dozen custom skills that I want to track, will adding them in this way cause any issues further down the line that I am not seeing?
Yes. When (not if) Toady adds more skills, you won't be able to distinguish yours from the new ones. Maybe negative numbers would work, but I'm not sure.

Quote
And is there any way to add a visual representation of these skills? (i.e. when 'V'isualizing a unit you can see Novice Wood Cutter, could I set it up to display my custom skills somehow?
I'm not sure how DF displays skill names. If it uses a function, we probably wouldn't be able to patch that, and depending on how it works, using invalid (to DF) skill IDs could crash.

Quote
As a bonus question, can this same method (utils.insert_or_update) be used to store custom attributes and traits? And will information stored like this be lost in save/reload?
insert_or_update isn't that special - if the way in which attributes and traits are stored is similar to skills, you could probably use it. I'm guessing it would be saved, but maybe not.
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.

KittyTac

  • Bay Watcher
  • Impending Catsplosion. [PREFSTRING:aloofness]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #338 on: September 30, 2017, 06:52:31 am »

Is there a way to do a bodyswap?
Logged
Don't trust this toaster that much, it could be a villain in disguise.
Mostly phone-posting, sorry for any typos or autocorrect hijinks.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #339 on: September 30, 2017, 08:04:01 am »

Is there a way to do a bodyswap?
If by "bodyswap" you mean to change a creature into something else, I think there's a script to do that (and it may have some issues, so I'd make sure to have a backup before trying). If you mean swapping the bodies between two creatures I assume you could convert them one at a time, but if you wanted it done completely you'd probably have to record all the features of them and apply adjustment of them to the other one afterwards (things like the shape of the nose, hair color, weight, etc).
Logged

KittyTac

  • Bay Watcher
  • Impending Catsplosion. [PREFSTRING:aloofness]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #340 on: September 30, 2017, 09:47:04 am »

Is there a way to do a bodyswap?
If by "bodyswap" you mean to change a creature into something else, I think there's a script to do that (and it may have some issues, so I'd make sure to have a backup before trying). If you mean swapping the bodies between two creatures I assume you could convert them one at a time, but if you wanted it done completely you'd probably have to record all the features of them and apply adjustment of them to the other one afterwards (things like the shape of the nose, hair color, weight, etc).

I meant swapping the bodies of a decoy adventurer and a megabeast, as a hacky way of playing an actual worldgen megabeast.
Logged
Don't trust this toaster that much, it could be a villain in disguise.
Mostly phone-posting, sorry for any typos or autocorrect hijinks.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #341 on: October 01, 2017, 01:40:48 am »

Is there a way to do a bodyswap?
If by "bodyswap" you mean to change a creature into something else, I think there's a script to do that (and it may have some issues, so I'd make sure to have a backup before trying). If you mean swapping the bodies between two creatures I assume you could convert them one at a time, but if you wanted it done completely you'd probably have to record all the features of them and apply adjustment of them to the other one afterwards (things like the shape of the nose, hair color, weight, etc).

I meant swapping the bodies of a decoy adventurer and a megabeast, as a hacky way of playing an actual worldgen megabeast.
there should be an Adv-bodyswap script left over from uhh one of the dfhack folks remaking warmist scripts but if that got lost in the recent updates of dfhack then uhh uh oh shoot I don't know which one to port, my copy is a tad rigged for my tastes and I know there's a bodyswap script that allows for switching back to your original body that's some where in dfhack's old versions... or in dfusion.

edit : uhh oh wow there is no adv-bodyswap lua file or plugin at all in the files, there is an adv-fort but no adv-bodyswap.
« Last Edit: October 01, 2017, 02:08:19 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

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #342 on: October 01, 2017, 02:03:07 pm »

My questions are, if I have a couple dozen custom skills that I want to track, will adding them in this way cause any issues further down the line that I am not seeing?
Yes. When (not if) Toady adds more skills, you won't be able to distinguish yours from the new ones. Maybe negative numbers would work, but I'm not sure.

I would write a small script that would always assign custom skills above whichever is the highest game skill. That way SPELL_CASTING could be 135 or 146, it would just always be tracked as #skills+1.

As for the other stuff, I guess I will just have to play around with it a little bit and see what's possible, and, more importantly, what causes crashes.

EDIT: It looks like I can use df.job_skill._last_item + X to reference a custom skill X, and that the skill will be stored nicely and remain active between save/reload. There isn't anything written in the 'V'iew screen, but I am working on a custom gui anyway so that isn't a big issue. It's really nice to be able to use the same code to handle custom skills as basic skills. You can even add entries onto df.job_skill so that code will properly understand what you are looking for (that gets rewritten every time, but that's easy enough to add to a on-load.init).

I can't figure out how to add custom attributes and traits and such (if it's even possible). Whenever I attempt to insert a new attribute into unit.body.physical_attrs or unit.status.current_soul.mental_attrs I get an error, so adding them there may not be a possibility.
« Last Edit: October 01, 2017, 04:38:55 pm by Roses »
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #343 on: October 01, 2017, 05:03:46 pm »

I would write a small script that would always assign custom skills above whichever is the highest game skill. That way SPELL_CASTING could be 135 or 146, it would just always be tracked as #skills+1.
Wouldn't that break save compatibility each time the number of skills changes? You'd be better off using arbitrarily large numbers, or moving backwards from the highest possible value.
« Last Edit: October 01, 2017, 05:06:58 pm 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)?

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #344 on: October 02, 2017, 02:26:51 am »

Is there a way to do a bodyswap?
If by "bodyswap" you mean to change a creature into something else, I think there's a script to do that (and it may have some issues, so I'd make sure to have a backup before trying). If you mean swapping the bodies between two creatures I assume you could convert them one at a time, but if you wanted it done completely you'd probably have to record all the features of them and apply adjustment of them to the other one afterwards (things like the shape of the nose, hair color, weight, etc).

I meant swapping the bodies of a decoy adventurer and a megabeast, as a hacky way of playing an actual worldgen megabeast.
there should be an Adv-bodyswap script left over from uhh one of the dfhack folks remaking warmist scripts but if that got lost in the recent updates of dfhack then uhh uh oh shoot I don't know which one to port, my copy is a tad rigged for my tastes and I know there's a bodyswap script that allows for switching back to your original body that's some where in dfhack's old versions... or in dfusion.

edit : uhh oh wow there is no adv-bodyswap lua file or plugin at all in the files, there is an adv-fort but no adv-bodyswap.
I was toying around trying to get this fixed so it shows a list of retired adventurer flag=true units to swap back to if targeted on yourself:
Code: (assumecontrol.lua) [Select]
--Assume Direct Control of the unit you're viewing. This Can Hurt You.
--[====[
assumecontrol
=============
Allows you to temporarily or permanently swap bodies with another unit.
Animals and other non-historical figures can be glitchy if you travel as one, be careful!
]====]
local utils = require 'gui'
local dialog = require 'gui.dialogs'

function assumeControl(new,old)
local actold
for i,j in ipairs(df.global.world.units.all) do
    if j.id==df.global.world.units.active[0].id then
        actold=j.id
        break
    end
end
local active=df.global.world.units.active
local old
old=df.unit.find(actold)
local new
new=dfhack.gui.getSelectedUnit(true)
if new==nil then
    qerror("Unable to Assume Control!")
end
local actnew
for k,v in pairs(active) do
    if v==new then
        actnew=k
        break
    end
end
if actnew==nil then
    qerror("Attempt to Assume Control has failed?")
end
if dfhack.gui.getSelectedUnit(true)==active[0] then
    local choices={}
    for k,v in pairs(active) do
        if dfhack.units.getNemesis(active[k]).flags.RETIRED_ADVENTURER==true then
            local nems=active[k]
            table.insert(choices,{text=nems.name.first_name,nems=k})
        end
        dialog.showListPrompt("Unit choice", "Choose unit to return to:", COLOR_WHITE,choices,
            function (idx,choice)
              dfhack.units.getNemesis(choice).flags.ACTIVE_ADVENTURER=true
              dfhack.units.getNemesis(choice).flags.ADVENTURER=true
              dfhack.units.getNemesis(choice).flags.RETIRED_ADVENTURER=false
              choice.status.current_soul.personality.flags[1]=true
              dfhack.units.getNemesis(old).flags.ACTIVE_ADVENTURER=false
              dfhack.units.getNemesis(old).flags.RETIRED_ADVENTURER=true
              old.status.current_soul.personality.flags[1]=false
              return
            end)
    end
end
active[actnew]=active[0]
active[0]=new
local target = dfhack.units.getNemesis(new)
    if target then
    local nwnem=dfhack.units.getNemesis(new)
    local olnem=dfhack.units.getNemesis(old)
    if olnem then
        olnem.flags.ACTIVE_ADVENTURER=false
        olnem.flags.RETIRED_ADVENTURER=true
        olnem.unit.status.current_soul.personality.flags[1]=false
        olnem.unit.idle_area.x=olnem.unit.pos.x
        olnem.unit.idle_area.y=olnem.unit.pos.y
        olnem.unit.idle_area.z=olnem.unit.pos.z
    end
    if nwnem then
        nwnem.flags.ACTIVE_ADVENTURER=true
        nwnem.flags.RETIRED_ADVENTURER=false
        nwnem.flags.ADVENTURER=true
        nwnem.unit.status.current_soul.personality.flags[1]=true
        for k,v in pairs(df.global.world.nemesis.all) do
            if v.id==nwnem.id then
                df.global.ui_advmode.player_id=k
                end
            end
        end
    else
        qerror("Assuming Direct Control! Current target may not last long!")
    end
end
assumeControl(new,old)

Commenting out those lines makes it work just fine, though it just spits an error when you dismiss the box atm, my lua mojo ran out.
Logged
Pages: 1 ... 21 22 [23] 24 25 ... 243