Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 175 176 [177] 178 179 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1073435 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2640 on: May 23, 2015, 05:03:29 pm »

I cannot see how that could possibly happen from changing the subtype of a single item. What exactly did you do for the short sword?

lonjil

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2641 on: May 23, 2015, 08:14:04 pm »

Is it possible to use dfhack when running df in text mode?
It runs, but the only way to run commands is with dfhack-run, which is annoying.

Youbo

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2642 on: May 23, 2015, 08:35:22 pm »

I cannot see how that could possibly happen from changing the subtype of a single item. What exactly did you do for the short sword?

I changed weight_fraction and everything in subtype(the entire ''folder'',not the similarly named value inside the folder that seems to be the ID)to exactly match what was on an existing long sword.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2643 on: May 23, 2015, 08:36:06 pm »

Is it possible to use dfhack when running df in text mode?
It runs, but the only way to run commands is with dfhack-run, which is annoying.
Technically speaking, that is using DFHack.
The command-prompt plugin should work, but you'd have to invoke it with dfhack-run as well since DFHack keybindings (bound with the "keybinding" command) rely on SDL. It would be possible to modify the plugin to add a keybinding to the main fortress mode menu (or other screens, although they'd have to be implemented individually) - I'll look at including this in the next release.
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.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2644 on: May 23, 2015, 09:40:34 pm »

Oh I think the short sword thing was kinda like duplicating raws by hand in game, I had the feeling it would mess things up so I didn't fiddle with it.
Logged

StagnantSoul

  • Bay Watcher
  • "Player has withdrawn from society!"
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2645 on: May 24, 2015, 02:05:15 am »

Um, did I miss something? I'm using the newest version of the starter pack, and rb_eval df.gametype = :DWARF_ARENA  no longer works. It says rb_eval is not a recognized command.
Logged
Quote from: Cptn Kaladin Anrizlokum
I threw night creature blood into a night creature's heart and she pulled it out and bled to death.
Quote from: Eric Blank
Places to jibber madly at each other, got it
Quote from: NJW2000
If any of them are made of fire, throw stuff, run, and think non-flammable thoughts.

lonjil

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2646 on: May 24, 2015, 08:45:47 am »

Is it possible to use dfhack when running df in text mode?
It runs, but the only way to run commands is with dfhack-run, which is annoying.
Technically speaking, that is using DFHack.
The command-prompt plugin should work, but you'd have to invoke it with dfhack-run as well since DFHack keybindings (bound with the "keybinding" command) rely on SDL. It would be possible to modify the plugin to add a keybinding to the main fortress mode menu (or other screens, although they'd have to be implemented individually) - I'll look at including this in the next release.
Thanks.
For now I've settled on a bash script that loops dfhack-run. Unfortunaly this doesn't work with interactive commands.
Can the remote interface handle those? Then I might try to make something with it.

Edit: Here's a screengrab
« Last Edit: May 24, 2015, 09:53:48 am by lonjil »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2647 on: May 27, 2015, 04:31:04 am »

Ok I've been looking over the lua api, various dfhack scripts, and screwing around for a while but I'm stumped.

How do you get something to add a new entry with the right tables linked in?

I was trying to do various stuff with df.global.world.artifacts.all, I tried :new(), :insert('#',foo), :assign(foo,bar) and so forth. I know I can open it up with gm-editor and alt+i insert an artifact_record manually but everything I've attempted with a script just leaves it as nil.

What am I derping out on that is super obvious and was probably right in front of my face this whole time?
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2648 on: May 27, 2015, 06:03:40 am »

:insert('#',{new=true,<... other things to set>}) or  :insert('#',{new=df.some_type,<... other things to set>}) IIRC

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2649 on: May 27, 2015, 06:32:36 am »

I would like to mail you a hug but I don't know how.
Logged

Rallor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2650 on: May 27, 2015, 08:18:07 am »

I'm interested in retrieving a dwarf's hairstyles and facial features using dfhack. After looking at the source code of stonesense I am under the impression these values are stored in "unit.appearance.tissue_style". At first I thought the values are in the same order as they appear in the white segment of the character description, but the values of dwarves that have the same styles do not match up. Could someone tell me how these values are matched to what you can read on the character description screen?

Spoiler: Dwarf 1 (click to show/hide)
Spoiler: Dwarf 2 (click to show/hide)
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2651 on: May 27, 2015, 08:51:51 am »

I'm interested in retrieving a dwarf's hairstyles and facial features using dfhack. After looking at the source code of stonesense I am under the impression these values are stored in "unit.appearance.tissue_style". At first I thought the values are in the same order as they appear in the white segment of the character description, but the values of dwarves that have the same styles do not match up. Could someone tell me how these values are matched to what you can read on the character description screen?

Spoiler: Dwarf 1 (click to show/hide)
Spoiler: Dwarf 2 (click to show/hide)
It's weird, I grant you. The values of the properties themselves are visible in the string dump, in order:

(-1: nothing of note)
0: NEATLY_COMBED
1: BRAIDED
2: DOUBLE_BRAIDS
3: PONY_TAILS
4: CLEAN_SHAVEN

But just by looking at those makes my head hurt, even after some personal experimenting:

Bodyparts:
0 and 1: Both are sideburns?? One each for two specific properties? Length and color have their own bins.
2 and 3: Moustache and beard.
6 and 7: Both are hair, again??
Logged

Rallor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2652 on: May 27, 2015, 09:10:15 am »

Thank you. But what did you use, or how did you figure out what was what?
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2653 on: May 27, 2015, 09:32:46 am »

gui/gm-editor is the go-to for quick tweaks, especially when you're an illiterate dong who can't operate lua from the command line like me. K-cursor a dwarf and punch it in, it'll jump straight to the unit vector.

e: Oh and just plain deduction. One's 3 is double-braided and the other's is combed, find the 2 in one and 0 in the other.
« Last Edit: May 27, 2015, 09:35:27 am by scamtank »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2654 on: May 27, 2015, 12:38:48 pm »

I have 2 text files with appearance research... Not sure how much is integrated changed (and am too lazy to even run df and see)
Code: [Select]
unk_4cc - tissue style
unk_4dc - civ_id
unk_4ec -??
unk_4fc -??
unk_50c - lenght?

bp_modifiers->caste.bp_appearance.modifiers[caste.bp_appearance.modifier_idx[k]]
And a script called "find_hair.lua"
Code: [Select]
local race=465
local modifiers={}
local modifiers_idx={}
local caste=df.creature_raw.find(race).caste[1]
local bp=caste.bp_appearance
local unit=dfhack.gui.getSelectedUnit()
for k,v in pairs(bp.modifiers) do
    if v.noun=='hair' then
        print(k,df.appearance_modifier_type[v.type])
        modifiers_idx[k]=true
        table.insert(modifiers,v)
    end   
end
for k,v in pairs(bp.modifier_idx) do
    if modifiers_idx[v] then
        print(k,v)
    end
end
for anyone who cares :P
Pages: 1 ... 175 176 [177] 178 179 ... 360