Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Having trouble with DFHack createitem command.  (Read 2949 times)

Naptune

  • Bay Watcher
    • View Profile
Having trouble with DFHack createitem command.
« on: December 24, 2017, 11:41:20 pm »

I'm playing Masterwork and got a strange mood. After a while I noticed that the dwarf had not picked up any of the items, even though I had most of them (He asked for rough gems, metal bars, bones, and raw green glass, I had plenty of green glass and rough gems.)

I eventually found out he would not continue until he got his stupid gems, so I went to his preferences and found out he wanted hidden shell opals, a gem introduced in Masterwork that I did not have on my map and that would almost certainly never be traded, at least in rough form. So, I decided to cheat a little and spawn it in using DFHack.

I went to the raws for it, and did a bit of searching til I came together with createitem ROUGH INORGANIC:HIDDEN SHELL OPAL. This did not work, I tried many variations of it but it either just said the info for the command or said invalid material. I tried with regular shell opal to no avail as well. Tried targeting both units and the floor.

Here's the raw for hidden shell opal:
[INORGANIC:HIDDEN SHELL OPAL]
   Appears randomly in shale.
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[MATERIAL_VALUE:40]
[REACTION_CLASS:GEM] For compatibility with Masterwork
[IS_GEM:hidden shell opal:STP:OVERWRITE_SOLID]
[TILE_COLOR:0:7:1]
[TILE:'*']
[BUILD_COLOR:7:7:1]
[BASIC_COLOR:7:0]
[SOLID_DENSITY:2115]
[STATE_COLOR:ALL_SOLID:IVORY]

I'm hopeless on figuring out what the command is. If anyone could help, please do.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Having trouble with DFHack createitem command.
« Reply #1 on: December 25, 2017, 12:14:49 am »

Put quotes around anything with spaces, or DFHack (like other command prompts) will treat them as separate arguments, so it'll search for a material named "INORGANIC:HIDDEN".

Code: [Select]
createitem ROUGH "INORGANIC:HIDDEN SHELL OPAL"
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.

Naptune

  • Bay Watcher
    • View Profile
Re: Having trouble with DFHack createitem command.
« Reply #2 on: December 25, 2017, 02:45:40 am »

Put quotes around anything with spaces, or DFHack (like other command prompts) will treat them as separate arguments, so it'll search for a material named "INORGANIC:HIDDEN".

Code: [Select]
createitem ROUGH "INORGANIC:HIDDEN SHELL OPAL"

Thank you, I believe that should work now.
Logged