Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFHack: createitem Issues  (Read 5625 times)

Kraiger

  • Bay Watcher
    • View Profile
DFHack: createitem Issues
« on: February 20, 2015, 06:01:55 pm »

Hello, I can't figure out how to spawn an iron bar. I've tried
Code: [Select]
createitem METAL:IRON 1 but it hasn't done me any good.

Any and all help would be appreciated.
Logged
This is a masterful image of Machunguroho, Torchsilver, the alicorn, a dark iron bastard sword, a volcanic aurum battle axe, a felsteel heater shield, and an emerald golem. The golem has been struck down. Torchsilver is making a triumphant pose.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack: createitem Issues
« Reply #1 on: February 20, 2015, 06:36:23 pm »

You need an item token:
Code: [Select]
createitem BAR IRON
A full list of item tokens can be found on the wiki.
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.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack: createitem Issues
« Reply #2 on: February 20, 2015, 06:49:03 pm »

gui/hack-wish is far, far easier to use.

The reason it's named so dumbly is because I was stupid and somehow never thought that it would be an easier-to-use createitem when I wrote it.

On the other hand, there are now no less than 3 item creating scripts included with DFHack, which is kinda clunky.

Kraiger

  • Bay Watcher
    • View Profile
Re: DFHack: createitem Issues
« Reply #3 on: February 20, 2015, 07:00:50 pm »

Thank you both for your input. After looking through the wiki and my past attempts from the past hour I figured out what I did wrong.

Code: [Select]
createitem BAR:NONE INORGANIC:IRON #

Was the correct way to go about adding in the items.
Logged
This is a masterful image of Machunguroho, Torchsilver, the alicorn, a dark iron bastard sword, a volcanic aurum battle axe, a felsteel heater shield, and an emerald golem. The golem has been struck down. Torchsilver is making a triumphant pose.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack: createitem Issues
« Reply #4 on: February 20, 2015, 07:50:33 pm »

Neither :NONE or INORGANIC: should be necessary, strictly speaking.

I think the third script Putnam is referring to is createitems.rb, which can only create 5 or 6 types of items (last I checked).
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.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack: createitem Issues
« Reply #5 on: February 20, 2015, 08:41:34 pm »

Neither :NONE or INORGANIC: should be necessary, strictly speaking.
They aren't necessary, but they're a good idea because they eliminate ambiguity.
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.