Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 77 78 [79] 80 81 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 893411 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1170 on: June 11, 2018, 06:31:35 pm »

It's almost certainly possible - DFHack can access pretty much anything that DF stores in memory, which includes unit positions. And if it ever was possible, it wouldn't have been removed. The exact strategy depends on what you're looking for. Are you looking for a unit on the fortress mode map (i.e. can you select it with u or v)? Or is it something on the world map? Or the local adventure mode map?
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.

Markrath

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1171 on: June 12, 2018, 03:27:10 am »

It's almost certainly possible - DFHack can access pretty much anything that DF stores in memory, which includes unit positions. And if it ever was possible, it wouldn't have been removed. The exact strategy depends on what you're looking for. Are you looking for a unit on the fortress mode map (i.e. can you select it with u or v)? Or is it something on the world map? Or the local adventure mode map?
There was this Roc who is most certainly alive (it doesn't show him dying in legends mode), and apparently he's in a fortress called Treatymyths, but I've explored the whole place and I can't quite find anything. So I guess he could be anywhere on the world map

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1172 on: June 12, 2018, 04:08:37 am »

If your adventurer is in the fortress and the roc is hiding somewhere in it, the roc should be in df.global.world.units.active and once located the pos(ition) field should give the coordinates. However, I don't know how to locate off site creatures.
Logged

Markrath

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1173 on: June 12, 2018, 06:46:24 am »

df.global.world.units.active
Where can I find that?

Oafsalot

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1174 on: June 12, 2018, 07:20:08 am »

Yeah, they basically are suspended jobs. Were you using autounsuspend before you reclaimed?

Maybe there's a way for autounsuspend to detect buildingplan jobs, but I'm not sure. Checking for "unknown material" might do it.

I thought I was, but I spun up a new fortress and I can't have been. I must have had it off while I was building the initial fortress.
Logged
If you like this game why not head over to https://www.patreon.com/bay12games/posts and make a small contribution?!

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1175 on: June 12, 2018, 08:54:47 am »

df.global.world.units.active
Where can I find that?
That's the DFHack location of one of the unit vectors inside of DF which can be accessed with scripts (which you'd probably have to write yourself to get exactly what you want) or the DFHack gui/gm-editor.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1176 on: June 12, 2018, 09:33:40 am »

Yeah, they basically are suspended jobs. Were you using autounsuspend before you reclaimed?

Maybe there's a way for autounsuspend to detect buildingplan jobs, but I'm not sure. Checking for "unknown material" might do it.

I thought I was, but I spun up a new fortress and I can't have been. I must have had it off while I was building the initial fortress.
The "resume" plugin draws over planned buildings (which are suspended) with a green X, and other suspended buildings with a yellow X. I've found what it uses to do that, so I think I can get it to work with autounsuspend too.
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.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1177 on: June 12, 2018, 12:03:59 pm »

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.

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1178 on: June 12, 2018, 12:52:17 pm »

I really really really need help.. I didnt embark with enough food but i have no idea how to spawn in more...  createitem CHEASE:COW 200 isnt working...
DF Hack is my only chance at fixing this.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1179 on: June 12, 2018, 01:11:14 pm »

I really really really need help.. I didnt embark with enough food but i have no idea how to spawn in more...  createitem CHEASE:COW 200 isnt working...
DF Hack is my only chance at fixing this.
Ok, for one thing, you spelled "cheese" wrong. And for another thing, you can't just guess syntax for commands and expect it to work. createitem takes an item type, then a space, then a material (then optionally a number). You gave it just one argument before the number, and it's unclear if it's supposed to be the item type or material, so it won't work like that.

Here is a page on the DF wiki about createitem: http://dwarffortresswiki.org/Utility:DFHack/createitem
I searched for "cheese" and found "CHEESE" listed under Materials -> Body parts. The example syntax given is:
Code: [Select]
item CREATURE_MAT:creature:material
where "material" should be replaced with "CHEESE", "creature" with the creature you want (e.g. "COW"), and "item" with the item type.

That same page links to http://dwarffortresswiki.org/index.php/DF2014:Item_token for a list of valid item types. I searched for "cheese" and found "CHEESE" listed, so replace "item" with "CHEESE".

I'll test it in a moment, but I think that should do it. You can add a number at the end if you want, of course.

Edit: yeah, that works.

You could also try gui/create-item if you prefer GUIs. See dfhack.readthedocs.io for help - it takes an argument that lets it create multiple items at once.
« Last Edit: June 12, 2018, 01:14:36 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.

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1180 on: June 12, 2018, 01:25:07 pm »

I really really really need help.. I didnt embark with enough food but i have no idea how to spawn in more...  createitem CHEASE:COW 200 isnt working...
DF Hack is my only chance at fixing this.
Ok, for one thing, you spelled "cheese" wrong. And for another thing, you can't just guess syntax for commands and expect it to work. createitem takes an item type, then a space, then a material (then optionally a number). You gave it just one argument before the number, and it's unclear if it's supposed to be the item type or material, so it won't work like that.

Here is a page on the DF wiki about createitem: http://dwarffortresswiki.org/Utility:DFHack/createitem
I searched for "cheese" and found "CHEESE" listed under Materials -> Body parts. The example syntax given is:
Code: [Select]
item CREATURE_MAT:creature:material
where "material" should be replaced with "CHEESE", "creature" with the creature you want (e.g. "COW"), and "item" with the item type.

That same page links to http://dwarffortresswiki.org/index.php/DF2014:Item_token for a list of valid item types. I searched for "cheese" and found "CHEESE" listed, so replace "item" with "CHEESE".

I'll test it in a moment, but I think that should do it. You can add a number at the end if you want, of course.

Edit: yeah, that works.

You could also try gui/create-item if you prefer GUIs. See dfhack.readthedocs.io for help - it takes an argument that lets it create multiple items at once.

I get overwhelmed easily.. Could you show me what the full command would look like?
Logged

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1181 on: June 12, 2018, 01:28:03 pm »

createitem CREATURE_MAT:COW:CHEESE didnt work.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1182 on: June 12, 2018, 02:24:59 pm »

Yeah, that was unclear, sorry. You need the item type and material. You're still only giving it one. ("item" above is an argument to "createitem", not equivalent to "createitem", so you need "createitem" followed by the item type, then the material.)
Try
Code: [Select]
createitem CHEESE CREATURE_MAT:COW:CHEESE
or
Code: [Select]
createitem CHEESE CREATURE_MAT:COW:CHEESE 200
etc.

Did you try gui/create-item? I found that it worked pretty well here.
« Last Edit: June 12, 2018, 02:29:12 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.

DizzyCrash

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1183 on: June 12, 2018, 02:54:01 pm »

When i type in gui/create-item nothing happens... also I used createitem CHEESE CREATURE_MAT:COW:CHEESE 200 that you just posted and nothing happened.. it just said no unit selected
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.10-r1
« Reply #1184 on: June 12, 2018, 03:24:17 pm »

When i type in gui/create-item nothing happens... also I used createitem CHEESE CREATURE_MAT:COW:CHEESE 200 that you just posted and nothing happened.. it just said no unit selected
gui/create-item opens a screen in the DF window. Did you check there?

Also, what version of DFHack are you using? If createitem says "no unit selected", you need to select a unit for it to work (in game, with u, v, k, or pretty much anything else that can select a unit), but that shouldn't be necessary in recent DFHack versions. Running "help" should give you the DFHack version near the end.
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 ... 77 78 [79] 80 81 ... 244