Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Block Press mod [Help!]  (Read 665 times)

Doomshifter

  • Bay Watcher
  • Deal with it.
    • View Profile
Block Press mod [Help!]
« on: June 14, 2011, 07:33:59 am »

So, I was trying to make a block-press. The block-press was meant to take ANY object (i.e, whatever object was nearest to the dwarf doing the task of pressing blocks) and turn it into a block of the same kind. Ideally, this would make blocks out of some weird stuff, like bones, booze, blood, corpses, etc. Unfortunately, my initial testing didn't work. Here's what I had.

Building -
Code: [Select]
[BUILDING_WORKSHOP:BLOCKPRESS]
[NAME:Block-Press]
[NAME_COLOR:7:0:1]
[DIM:1:1]
[WORK_LOCATION:1:1]
[BUILD_LABOR:MECHANIC]
[BLOCK:1:0]
[TILE:0:1:207]
[COLOR:0:1:0:7:0]
[TILE:1:1:207]
[COLOR:1:1:MAT]
[BUILD_ITEM:1:NONE:NONE:NONE:NONE][BUILDMAT][WORTHLESS_STONE_ONLY]
[BUILD_ITEM:2:TRAPPARTS:NONE:NONE:NONE][CAN_USE_ARTIFACT]

It's effectively a screw-press with a different name.
Reaction -
Code: [Select]
[REACTION:PRESS_BLOCK]
[NAME:press items into blocks]
[BUILDING:BLOCKPRESS:NONE]
[REAGENT:A:1:NONE:NONE:NONE:NONE] this was supposed to pick any item at all, which it does
[PRODUCT:100:1:BLOCKS:NO_SUBTYPE:GET_MATERIAL_FROM_REAGENT:A:NONE] this was supposed to turn the reagent into a block, which it doesn't
[SKILL:PRESSING]

Even though the reaction and building are in the entity_default.txt, the reaction doesn't work. It appears, the dwarf takes the job, the item is 'pressed' and then ... nothing comes out the other end. I literally watched my dwarfs shove every single item in their caravan into this sucker, only for it to make absolutely nothing.

So, help, pretty please? I just want my elf blood blocks and forgotten beast extract blocks and and human leather blocks and all that jazz.
Logged
Add me on PesterChum! My chumhandle is doomedHermit.
Right now Rampages seem to be Godzilla quietly walking into Tokyo, biting the leg off of one reporter... then creeping off again without a sound.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Block Press mod [Help!]
« Reply #1 on: June 14, 2011, 07:44:56 am »

The first problem I see here is that processed items need the material specified where you have NONE (i.e. WOOD for wood items, much more complex for creature materials). Are you sure you don't get an unknown material which immediately evaporates?
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Doomshifter

  • Bay Watcher
  • Deal with it.
    • View Profile
Re: Block Press mod [Help!]
« Reply #2 on: June 14, 2011, 07:54:14 am »

I watched it carefully and saw nothing evaporating. I'm not sure if perhaps it's just evaporating and dissipating before it can be displayed, though. If so, there'd be no way to tell.

I'm not sure what you mean about specifying the material (my modding knowledge is pretty poor at the moment, I've been out of commission for a while). Do you mean in the reagent or the product? If you mean the reagent, then which NONE should specify something? I could individually make reactions for each type of item (which would also make it easier to select items...).
Logged
Add me on PesterChum! My chumhandle is doomedHermit.
Right now Rampages seem to be Godzilla quietly walking into Tokyo, biting the leg off of one reporter... then creeping off again without a sound.

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Block Press mod [Help!]
« Reply #3 on: June 14, 2011, 08:10:58 am »

I'm pretty sure the syntax is correct for what you want to do. As per a number of reactions (especially wax), the GET_MATERIAL_FROM_REAGENT:A:NONE gets the reagent's material itself, and the NONE:NONE:NONE:NONE for the reagent matches every possible object. The only things I see is that I don't think NO_SUBTYPE is generally used outside of BAR-creating reactions, so maybe that could be a problem, and that the GET_MATERIAL reactions generally have some limiter tag (such as [USE_BODY_COMPONENT]) or item type.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Block Press mod [Help!]
« Reply #4 on: June 14, 2011, 10:38:45 am »

NO_SUBTYPE works fine.

The NONE in the getting material line should cause problems in animal materials AFAIK, and it caused crashes with wood for me (at least in early 2010).

P.S. A very unlikely case: if you test it in a pregenerated world, are you sure THIS is the reaction in the world folder? I ask it just in case.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Eagle0600

  • Bay Watcher
  • Highly Confused
    • View Profile
Re: Block Press mod [Help!]
« Reply #5 on: June 15, 2011, 02:59:44 am »

It makes no sense to me that this shouldn't work. It looks right.
Logged
GENERATION 21:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Trapezohedron

  • Bay Watcher
  • No longer exists here.
    • View Profile
Re: Block Press mod [Help!]
« Reply #6 on: June 15, 2011, 06:56:55 am »

If it doesn't work, I recommend following Deon's instructions and change that NO_SUBTYPE into none to see if it works properly. Otherwise, it looks perfect, and I don't understand why this isn't working at all.
Logged
Thank you for all the fish. It was a good run.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Block Press mod [Help!]
« Reply #7 on: June 15, 2011, 04:01:04 pm »

It was Knigh Otu's suggestion, and I don't see it as a problem. But you still should try.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository