Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 86 87 [88] 89 90 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1458166 times)

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1305 on: April 19, 2012, 10:22:56 am »

if only we could teleport a unit, imagine the number of hair pulling cases we could solve, legit cases like a stupid dorf that build something the wrong side of a wall. Is it legit? Sure you can say it is part of the fun, but having to fall back to trick like suspending work etc. to make it work the right side seems more to me like fighting the interface, don't you think?

Others examples include your most precious armorsmith that decides to pasture an animal (you can't disable this behavior, any dwarf can do that) and get killed, unless you teleport him back 10 tiles away. Cheating again? No, fixing a miserable loophole in DF.

I can go a long way in how useful teleporting a creature would be. Liaison stuck, etc. But you get the idea. I think this will be a great feature to have that would save tons of hours for many players.
Well warping folks is easy, getting them to not horribly clutter the area with knee high invisible blocks is hard. good thing old dfusion warp isn't that hard to port over.

Code: [Select]
function tools.warp(unit)
print("Self or at position? (s or anything else):");
local r=getline()
local unit
if r=="s" or r=="S" then
unit=df.global.world.units.other[0][0]
else
if unit==nil then
unit=getCreatureAtPos(getxyz())
end
end
local sx,sy,sz
sx=unit.pos.x
sy=unit.pos.y
sz=unit.pos.z
print("Current coords:"..sx.." "..sy.." "..sz)
print("Jump where (coordinates in form 'dx dy dz' or 'c' for cursor):")
r=getline()
local tx,ty,tz
if r=="c" then
tx,ty,tz=getxyz()
else
lp=string.gmatch(r,"%-?%d+")
--local d
--d=lp()
tx=sx+tonumber(lp())
ty=sy+tonumber(lp())
tz=sz+tonumber(lp())
end
print("Warp to coords:"..tx.." "..ty.." "..tz)
unit.pos.x=tx
unit.pos.y=ty
unit.pos.z=tz
end
tools.menu:add("warp",tools.warp)

edit: here's the codes for a warp, this works both in adventure mode and fort mode, you need to have the pointer on top of the unit you want... and also to make sure the unit not sharing the same tile as someone else.
« Last Edit: April 19, 2012, 01:46:43 pm 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

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1306 on: April 19, 2012, 01:17:44 pm »

EDIT: This is also the first time I decided to leave most of the shaft the exact size of the plug, instead of channeling out a space around it the entire way down. As a result, it came into contact with a sandy loam layer on the way down, is this my culprit?

I don't think so.  I think the dirt-type changes each time dirt tiles fall into a dirt layer, and sandy loam happened to be the lowest one in that biome.

I can't answer the editing question, sorry.
Logged

rtg593

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1307 on: April 19, 2012, 02:37:27 pm »

EDIT: This is also the first time I decided to leave most of the shaft the exact size of the plug, instead of channeling out a space around it the entire way down. As a result, it came into contact with a sandy loam layer on the way down, is this my culprit?

I don't think so.  I think the dirt-type changes each time dirt tiles fall into a dirt layer, and sandy loam happened to be the lowest one in that biome.

I can't answer the editing question, sorry.

Hmm. Well rats, guess I lucked out on other embarks. Well, just for some science, I'll try it the way I normally do, where it won't touch the s loam on the way down. But ya, I think the sand I wanted was the lowest layer on my other embarks... Drat :p

Thanks anyway!
Logged
Is it because light travels faster than sound,
that people appear bright until you hear them speak?

Morwaul

  • Bay Watcher
  • ..............boo
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1308 on: April 19, 2012, 09:40:54 pm »

Is there any way to do with DFHack what we used to do with Runesmith?  Mainly change attributes and moods?
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1309 on: April 19, 2012, 09:48:32 pm »

Yeah, you can do lua scripting that'll do the same stuff.
Logged

Morwaul

  • Bay Watcher
  • ..............boo
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1310 on: April 19, 2012, 09:59:08 pm »

Hmm, I know nothing of Lua.  Could you give me an example of what I would type into the DFHack Console?  Or, is that not what you mean?
Logged

the_game_hunt

  • Bay Watcher
  • [NO_MERCY]
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1311 on: April 19, 2012, 10:18:21 pm »

Hmm, I know nothing of Lua.  Could you give me an example of what I would type into the DFHack Console?  Or, is that not what you mean?

Youll be helping 2 persons  :P
Logged
Quote
The spinning (silk shoe) strikes the Baron in the left upper arm, bruising the skin!
The Baron has been shot and killed.

WARNING! I'm not responsible for damaging/destroying your post!

ab9rf

  • Bay Watcher
    • View Profile
    • ab9rf@github
Re: DFHack 0.34.07 r2
« Reply #1312 on: April 20, 2012, 12:11:57 am »

So I tried the new autolabor plugin.  I like it.

But it won't chop trees.  I have 2 axes and 2 picks and 4 worker dwarfs.  And it turns mining on for all 4, so 2 go dig and the other 2 have a tea party.

It would be nice if there was a way to exclude dwarfs from the autolabor.  Till then, not useful.  Unless you dont need to chop trees.

Edit: Now that I think about it more.  Not including the "uniform" labors, mining, woodcutting, hunting, in autolabor would be nice.  Since those all will mess up civilian armor as well.
You can exclude specific labors or set the maximum number of dwarfs to assign to any particular labor.
Logged

vorpal+5

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1313 on: April 20, 2012, 12:56:28 am »

Well warping folks is easy, getting them to not horribly clutter the area with knee high invisible blocks is hard. good thing old dfusion warp isn't that hard to port over.

Code: [Select]
function tools.warp(unit)
print("Self or at position? (s or anything else):");
local r=getline()
local unit
if r=="s" or r=="S" then
unit=df.global.world.units.other[0][0]
else
if unit==nil then
unit=getCreatureAtPos(getxyz())
end
end
local sx,sy,sz
sx=unit.pos.x
sy=unit.pos.y
sz=unit.pos.z
print("Current coords:"..sx.." "..sy.." "..sz)
print("Jump where (coordinates in form 'dx dy dz' or 'c' for cursor):")
r=getline()
local tx,ty,tz
if r=="c" then
tx,ty,tz=getxyz()
else
lp=string.gmatch(r,"%-?%d+")
--local d
--d=lp()
tx=sx+tonumber(lp())
ty=sy+tonumber(lp())
tz=sz+tonumber(lp())
end
print("Warp to coords:"..tx.." "..ty.." "..tz)
unit.pos.x=tx
unit.pos.y=ty
unit.pos.z=tz
end
tools.menu:add("warp",tools.warp)

edit: here's the codes for a warp, this works both in adventure mode and fort mode, you need to have the pointer on top of the unit you want... and also to make sure the unit not sharing the same tile as someone else.

thanks!
where do I plug this code exactly?
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1314 on: April 20, 2012, 01:20:24 am »

I don't think so.  I think the dirt-type changes each time dirt tiles fall into a dirt layer, and sandy loam happened to be the lowest one in that biome.

Yesterday we spent some time investigating what exactly happens if there is a soil tile in a stone layer, or vice versa. It turned out that for soil it takes the material of the lowest soil layer of the biome, and for stone the topmost stone one - irrespective of the actual location of the tile in question. If there are no such layers at all, it leads to the 'disco soil' flashing effect bug.
Logged

kingubu

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1315 on: April 20, 2012, 01:21:41 am »

You can exclude specific labors or set the maximum number of dwarfs to assign to any particular labor.

Woo! Thanks.  I was typing "autolabor help" for extended help text and the command is "help autolabor" for some reason.

Hmm, looking at the readme page some more.  It says 'command help' under "Using DFHack", and 'help <command-name>' under "Commands" a few paragraphs later.
Logged

robertheinrich

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1316 on: April 20, 2012, 04:27:57 am »

You can exclude specific labors or set the maximum number of dwarfs to assign to any particular labor.

Woo! Thanks.  I was typing "autolabor help" for extended help text and the command is "help autolabor" for some reason.

Hmm, looking at the readme page some more.  It says 'command help' under "Using DFHack", and 'help <command-name>' under "Commands" a few paragraphs later.

Writing dfhack plugins is a tad inconvenient when it comes to the help function(s). 'plugin help' and 'help plugin' need to be taken care of at two seperate places, so it's easy to forget about one or the other or even both. And a third place is the external readme file. If this were a commercial project it would probably have one guy responsible for keeping these three locations up-to-date all the time, but since it isn't you can't really blame anybody who spent his free time to do stuff and forgot/didn't bother with pasting the same text to three locations...
« Last Edit: April 20, 2012, 05:03:01 am by robertheinrich »
Logged

kingubu

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1317 on: April 20, 2012, 09:39:08 am »

I appreciate the work you guys do on this.  I was just confused about what the "right" way to invoke help was.
Logged

simonthedwarf

  • Bay Watcher
  • ¤Death¤
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1318 on: April 20, 2012, 10:23:13 am »

May I suggest that you incorporate a way to teleport entities from one tile to another? Like if I wanted a whale teleported? :D
Logged
Quote from: Syndic
Sentry towers, manned by orang-utangs./quote]

khearn

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.07 r2
« Reply #1319 on: April 20, 2012, 10:32:26 am »

Writing dfhack plugins is a tad inconvenient when it comes to the help function(s). 'plugin help' and 'help plugin' need to be taken care of at two seperate places, so it's easy to forget about one or the other or even both. And a third place is the external readme file. If this were a commercial project it would probably have one guy responsible for keeping these three locations up-to-date all the time, but since it isn't you can't really blame anybody who spent his free time to do stuff and forgot/didn't bother with pasting the same text to three locations...

One thing that could be done is to have one place just point to the other. So "help foo" could just print out "See 'foo help' for usage information." Then you never need to touch it again and just have to keep "foo help" and the readme up to date.
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.
Pages: 1 ... 86 87 [88] 89 90 ... 373