Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 29 30 [31] 32 33 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1452881 times)

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #450 on: February 08, 2012, 05:17:21 am »

Thanks for reply, actually i mean a tool in dfusion wich allow item material editing, it says that for example a log lying on the ground has material id=420 (MAPPLE) when i change it to 421 i get log of "unknown frozen material substance". So actually i want an enum number for material.

There isn't any such thing - it's a pair of numbers, and their meaning depends on what is in the raws, and in what order. In particular, 420 just means plant submaterial #2 (counting from 1). MAPLE obviously has only 2 submaterials, so 421 is naturally undefined. Look at MaterialInfo::decode(int16_t type, int32_t index) in the source to see exactly how the numbers work.
« Last Edit: February 08, 2012, 05:29:36 am by ag »
Logged

Steelweaver

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #451 on: February 08, 2012, 11:58:35 am »

Ohoho, is there a simple way to recieve human readable name for item material via dfhack?

Code: [Select]
std::string description;
item->getItemDescription(&description, 0);
c->con.print("0x%x %s (wear %d)",
item,
description.c_str(),
item->getWear()
);

Am i right?
« Last Edit: February 08, 2012, 12:15:43 pm by Steelweaver »
Logged

nomad_delta

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #452 on: February 08, 2012, 01:06:32 pm »

hooray! thank you dfhack devs, I am super excited about this new version!

in particular:

copystock - copies the parameters of the currently selected stockpile to the custom stockpile settings. Copy&paste those stockpiles!

holy crap this is awesome! this is going to be so useful!  one thing I hope DF will eventually integrate is the ability to save custom stockpile settings as templates *permanently* between worlds and forts, sort of like we already can with macros.  I tend to use the same custom stockpile types in every fort, but it's a pain setting them up every time.  This will help hold me over 'til that happens.  :)

dwarfexport - export dwarves to RuneSmith-compatible XML (for use with dwarf guidance counsellor).

I use Dwarven Guidance Counselor pretty extensively, and this will save me so much time!  Way better than having to open RuneSmith, go through the export menu, and select the custom export settings for Race, Attributes, and Traits and specify an export file path every time around.

Thanks!

--nomad_delta



Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.31.25 r9b
« Reply #453 on: February 08, 2012, 01:27:25 pm »

Ohoho, is there a simple way to recieve human readable name for item material via dfhack?

Code: [Select]
std::string description;
item->getItemDescription(&description, 0);
c->con.print("0x%x %s (wear %d)",
item,
description.c_str(),
item->getWear()
);

Am i right?

That code will give you the name of the item itself (e.g. "Plant barrel (acacia)") - if all you want is the material, then do this:
Code: [Select]
MaterialInfo info;
info.decode(item);
c->con.print("Item is made of %s\n", info.toString().c_str());
« Last Edit: February 08, 2012, 01:29:10 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Neowulf

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #454 on: February 08, 2012, 06:09:22 pm »

Just a heads up, I just had a fortress act a bit weird. A new fortress genned yesterday using the my little pony mod and the latest dwarfhack.
Grass/shrubs/trees did not grow in my mined out soil layers until I breached the 3rd cavern, 1 and 2 did nothing (both were overgrown with plant life).
And now I just lost an master lumberjack/herbalist to a failed mood, even though he had every item showmood reported and I had an abundance of all the mood materials leftover (as reported by both showmood and the workshop (q)uery). Mood construction just never started. The workshop he took was a magma forge with a repeat lead bins job workflow had suspended.


BTW, what is the correct item ID for workflow to keep a reserve of large pots?
Logged

Yaotzin

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #455 on: February 08, 2012, 06:25:44 pm »

Quote
prospector tool now works in the embark screen
misunderstood this. It's sweet!

How do the Z levels in the prospector work?
« Last Edit: February 08, 2012, 06:30:31 pm by Yaotzin »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.31.25 r9b
« Reply #456 on: February 08, 2012, 08:24:14 pm »

And now I just lost an master lumberjack/herbalist to a failed mood, even though he had every item showmood reported and I had an abundance of all the mood materials leftover (as reported by both showmood and the workshop (q)uery). Mood construction just never started. The workshop he took was a magma forge with a repeat lead bins job workflow had suspended.
Are you sure that the mysterious construction never started? It has been observed on several occasions that if, after construction has started, you forbid the primary material for the mood (in this case, the metal bars), then the artifact will never be completed and the dwarf will go insane.

BTW, what is the correct item ID for workflow to keep a reserve of large pots?
TOOL:ITEM_TOOL_LARGE_POT
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #457 on: February 09, 2012, 04:05:06 am »

Thanks for reply, actually i mean a tool in dfusion wich allow item material editing, it says that for example a log lying on the ground has material id=420 (MAPPLE) when i change it to 421 i get log of "unknown frozen material substance". So actually i want an enum number for material.

There isn't any such thing - it's a pair of numbers, and their meaning depends on what is in the raws, and in what order. In particular, 420 just means plant submaterial #2 (counting from 1). MAPLE obviously has only 2 submaterials, so 421 is naturally undefined. Look at MaterialInfo::decode(int16_t type, int32_t index) in the source to see exactly how the numbers work.
well I have a series of code for dfusion that searches for a material through name, though I only have it set up for looking up submat2 based items and I haven't tested it on wood.

Code: [Select]
function editMaterial(offset)
mattbl=mattbl or BuildMaterialTable() -- could be slow so if there is a table don't do it again
print("Mat id 0 to 18 is in normal materials (inorganic, amber etc...) after that creature mat (with submat2 being race)")
print("from 219 with submat2=0xffffffff (type not a number) it reads legends id, from 419  submat2 means plant id")
print("Probably submat is not used :? ")
mat=engine.peek(offset,ptr_item.mat)
submat=engine.peek(offset,ptr_item.submat)
submat2=engine.peek(offset,ptr_item.submat2)
lid=engine.peek(offset,ptr_item.legendid)
print(string.format("Now is mat=%d, submat=%d submat2=%d legend id=%d",mat,submat,submat2,lid))
--print("Enter mat:")
print("Enter submat2:")
id=io.stdin:read()
--q=mattbl[id]
--if q==nil then return end
--print("Enter submat:")
--v=mattbl[id]
--if v==nil then v=0xffff end
z=mattbl[id]
if z==nil then z=0xffffffff end
--print("Enter legendid:")
--y=tonumber(io.stdin:read())
--if y==nil then y=0xffffffff end
--engine.poke(offset,ptr_item.mat,q)
--engine.poke(offset,ptr_item.submat,v)
--engine.poke(offset,ptr_item.legendid,y)
engine.poke(offset,ptr_item.submat2,z)
print("Done")
end
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

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #458 on: February 09, 2012, 06:30:43 am »

well I have a series of code for dfusion that searches for a material through name, though I only have it set up for looking up submat2 based items and I haven't tested it on wood.

Hm, there are no universal mat_type/mat_index fields in items either - the only way to read or write them for all items is by calling virtual methods:

https://github.com/angavrilov/df-structures/blob/master/df.items.xml
« Last Edit: February 09, 2012, 06:43:51 am by ag »
Logged

EngineerFromHell

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #459 on: February 09, 2012, 09:28:51 am »

If I use "friendship" option from dfusion or any other allowing non-dwarves to act like dwarves how to get an appropriate armor for them? Will human armorsmith forge *Large* armor pieces?
Logged

Neowulf

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #460 on: February 09, 2012, 11:17:21 am »

Are you sure that the mysterious construction never started? It has been observed on several occasions that if, after construction has started, you forbid the primary material for the mood (in this case, the metal bars), then the artifact will never be completed and the dwarf will go insane.
Yeah, I watched it happen. t over the shop showed he had 2 bars of silver, 1 piece of silk cloth, 1 cut milk quartz, 2 logs, and a marble boulder. Exactly what showmood reported and what the query said was needed (the boulder was the final demand before looping back to metal bars again). None of it was forbidden, and I had extras of all those (about 20 extra silver bars, a lot more metal, atleast 10 more silk, lots of other cloth, a dozen cut gems, and over two thousand extra stone and wood).

TOOL:ITEM_TOOL_LARGE_POT
Odd, I tried that. I'll try again. Thanks.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #461 on: February 09, 2012, 02:40:58 pm »

TOOL:ITEM_TOOL_LARGE_POT
Odd, I tried that. I'll try again. Thanks.

If the report produced by 'workflow' says "(no jobs)" opposite this entry, it might not be able to detect the jobs that produce the pots. Come to think of it, I haven't actually tested it with tools. Although I did test ammo, and it shouldn't be much different.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.31.25 r9b
« Reply #462 on: February 09, 2012, 02:55:23 pm »

I just tested it, and it works fine - I added a job for "Make rock Pot" and set it to repeat, and "job 98: MakeTool [rock]" showed up in the list (and a repeat job for "Make rock Hive" did not show up).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Dwemeral

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #463 on: February 10, 2012, 11:09:51 pm »

I have a queston for the tiletypes function. I have this spot that I want use as my storage place but the problem is that there are rock materials there preventing me from using piles function. How would I go about erasing the rocks and material I dung up there so I can but piles there?

edit: I also want to put some copper ores around.
« Last Edit: February 10, 2012, 11:13:24 pm by Dwemeral »
Logged

junius

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.31.25 r9b
« Reply #464 on: February 11, 2012, 02:18:05 am »

When I type spot clean into the DF Hack I get a message "Could not invoke spotclean: unsuitable UI state".

I'm assuming that in DF game i have the incorrect curser over the area i want to be cleaned. I have tryed "k" look around and "v" view.

So the question is how to I indicate the tile to be cleaned for DFHack?


Alternatively if someone is aware of a crashing issue for "clean map" that can be fixed.

thanks Junius

Logged
Pages: 1 ... 29 30 [31] 32 33 ... 373