Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Making stackables  (Read 839 times)

janglur

  • Bay Watcher
  • +Blood Soup+
    • View Profile
Making stackables
« on: April 05, 2012, 01:08:31 pm »

So, in my in-dev mod i've got 'slats' made from clay for making clay-llamelar armor.  But the problem is that they don't stack.  What flag or token do I ass to make them stack in groups of 5 when made?

Code: [Select]
[REACTION:MAKE_CLAY_SLATS]
   [NAME:make (5) clay slats]
   [BUILDING:KILN:NONE/CUSTOM_SHIFT_S]
   [REAGENT:clay:1:BOULDER:NONE:NONE:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
   [PRODUCT:100:5:TOY:ITEM_TOY_SLAT:GET_MATERIAL_FROM_REAGENT:A:NONE]
   [SKILL:POTTERY]
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Making stackables
« Reply #1 on: April 05, 2012, 01:20:49 pm »

You cannot ass tokens to make them stack.

Only certain item types stack, and that's hardcoded.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: Making stackables
« Reply #2 on: April 05, 2012, 02:18:42 pm »


You could write a cheap hack.
Make a second item type, a toy or tool, and call it a "pallet of widgets".  Make a reaction that uses X widgets and outputs a "pallet", then make another reaction to unpack the "pallet".


Another option is to make your custom item one of the item classes which do stack.
A stack of custom ammo, for example, which is an ammo class not used by any weapon.
Still a hack, but it sounds like this would be closer to what you want.

Logged