Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 202 203 [204] 205 206 ... 360

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

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3045 on: September 03, 2015, 05:59:49 pm »

Am I supposed to type that into the lua in DFhack? When I do it, it just gives me a bunch of errors. For hist fig id 2082, what would be the correct prompt?

Sorry for the bother, I never knew doing a simple gender-swap would be so hard.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3046 on: September 03, 2015, 06:40:29 pm »

it might not be historical_figure, that one always trips me up

also, "bunch of errors" is very non-specific

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3047 on: September 03, 2015, 06:59:34 pm »

Wait, I don't need to find what the hist fig id is, I already know it. Can I do it through gm-editor? I know my way around that, at least.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3048 on: September 03, 2015, 07:10:52 pm »

df.historical_figure.find(2082) works for me - it returns the historical figure with ID 2082. "gui/gm-editor df.historical_figure.find(2082)" should open it in gm-editor.
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.

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3049 on: September 03, 2015, 07:26:10 pm »

Two things: One, I was opening it in lua when I should have done it in the regular screen, and two I shouldn't change the caste, only the gender. Thanks! We'll see if it's a functional female soon.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3050 on: September 03, 2015, 07:52:38 pm »

I would usually do gui/gm-editor df.historical_figure.find(2082) myself if I didn't just poke around through df.global with gm-editor to find it.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3051 on: September 03, 2015, 11:30:13 pm »

FYI, the add-attack script doesn't start a fight as far as the attacker is concerned.  The defender might, if they aren't knocked out.  This means after a one-shot knockout the attacker just wanders off.  I'll try using that anon_1 counter to encourage them to gnaw on the victim's helm for a while.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3052 on: September 04, 2015, 02:11:52 am »

I think Rumrusher did something that got fights started, or was it Roses?
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3053 on: September 04, 2015, 04:51:36 pm »

oh yeah what I did to get fights to start in the old versions was getting both attacker and defender to target each other.
which usually cause them to continue on now that they took some damage.
usually when you set it to 1 person there's a chance the character cancels the attack because why provoke an attack on someone you know isn't aiming to hurt you.
but getting this to work for companions or optimize it for say adventure mode tomfoolery was a pain.
Code: [Select]
Target={}
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
--print("Creature not found!")
return nil

end

if unit==nil then
adv=df.global.world.units.active[0]
for k,v in pairs(df.global.world.units.active) do
if v.relations.group_leader_id==adv.id then
if v== nil then
error("Invalid creature")
end
--entry=dfhack.lineedit()
targ=getCreatureAtPos(getxyz())

v.opponent.unit_id=targ.id
v.opponent.unit_pos.x=getxyz()
v.opponent.unit_pos.y=getxyz()
v.opponent.unit_pos.z=getxyz()
targ.job.hunt_target=v
end
end
end

this was kinda the jist of it but the bottom part is the stuff you want to poke around the opponent unit_position and unit_id get both of those working and you got a fight.
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

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3054 on: September 04, 2015, 05:28:56 pm »

Thanks, I'll let you know what happens when I get a chance to test it.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3055 on: September 05, 2015, 07:22:47 pm »

there another case where all this does is cause the person to run to the spot where that unit was but not start the fight.
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

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3056 on: September 06, 2015, 02:10:52 pm »

Where is the egg-laying counter in gm-editor?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3057 on: September 06, 2015, 02:28:05 pm »

I don't see anything with a relevant name in df-structures, so it's possible that it's not identified yet.
(By the way, the names you see in gm-editor are used everywhere in DFHack - they're not specific to gm-editor.)
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.

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3058 on: September 06, 2015, 03:26:48 pm »

I asked to save myself some poking around. I actually did find it, under 'status.misc_traits' inside the creature. It's actually one of several possible counters listed there.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3059 on: September 06, 2015, 03:42:27 pm »

Ah, one with an ID of EggSpent? I must have only been searching for "egg", then (case-sensitive).
Note that a unit_misc_trait with that ID won't exist for all creatures, although it should exist for all egg-laying (and mature?) creatures.
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.
Pages: 1 ... 202 203 [204] 205 206 ... 360