Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Creating Waterskins through reactions (also custom FLASK items)  (Read 3096 times)

Xangi

  • Bay Watcher
  • ɛkzændʒiː
    • View Profile

Is it possible? I can't find the raw for the waterskin for some reason, but I want to know if I can add a reaction for an adventurer to create one.
Logged
A spooky ghost.

Previous mod (34.11):
<<Fear The Night!>>
http://www.bay12forums.com/smf/index.php?topic=103747.0

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #1 on: April 05, 2013, 02:30:20 am »

The wiki will never harm you and is your best friend forever.

(Seriously, I spend a third of my modding time there. Another third is in various DFHack references and the last is actually modding).

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #2 on: April 05, 2013, 02:34:48 am »

Putnam, I think only 5% of your time is actual modding, and 95% is helping people in the forum. ;)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #3 on: April 05, 2013, 02:37:26 am »

That's how my modding time is divvied; most of my time is here :V

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #4 on: April 05, 2013, 02:40:37 am »

That's how my modding time is divvied; most of my time is here :V
Forum mode is the best mode after all. :P
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Xangi

  • Bay Watcher
  • ɛkzændʒiː
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #5 on: April 05, 2013, 02:48:27 am »

The wiki will never harm you and is your best friend forever.

(Seriously, I spend a third of my modding time there. Another third is in various DFHack references and the last is actually modding).

Of course I saw that, but is it possible to define them in a new raw? Nothing here indicates one way or the other http://dwarffortresswiki.org/index.php/DF2012:Item_definition_token, and while tools do contain various containers, none of them are flasks. Further, what is the proper item token for a waterskin? FLASK:WATERSKIN? It doesn't actually say.
Logged
A spooky ghost.

Previous mod (34.11):
<<Fear The Night!>>
http://www.bay12forums.com/smf/index.php?topic=103747.0

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #6 on: April 05, 2013, 02:50:14 am »

No new waterskins, no.

Also, it does say:

Most item tokens do not have a subtype; for these, either NO_SUBTYPE or NONE must be specified.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #7 on: April 05, 2013, 03:06:13 am »

FLASK:NONE:CREATURE_MAT:CREATURE_ID:LEATHER

creature id would be whatever creature leather you want there. CREATURE_MAT:CAT would be fine for example.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Wannabehero

  • Bay Watcher
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #8 on: April 05, 2013, 10:09:26 am »

Code: [Select]
[REACTION:MAKE_WATERSKIN_ADV]
[NAME:make leather waterskin]
[ADVENTURE_MODE_ENABLED]
[REAGENT:leather:1:SKIN_TANNED:NONE:NONE:NONE]
[PRODUCT:100:1:FLASK:NONE:GET_MATERIAL_FROM_REAGENT:leather:NONE]
[SKILL:LEATHERWORK]
Logged

Xangi

  • Bay Watcher
  • ɛkzændʒiː
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #9 on: April 05, 2013, 02:02:18 pm »

Code: [Select]
[REACTION:MAKE_WATERSKIN_ADV]
[NAME:make leather waterskin]
[ADVENTURE_MODE_ENABLED]
[REAGENT:leather:1:SKIN_TANNED:NONE:NONE:NONE]
[PRODUCT:100:1:FLASK:NONE:GET_MATERIAL_FROM_REAGENT:leather:NONE]
[SKILL:LEATHERWORK]

So does it just know to make a waterskin based on the material? Sorry, I've been away from my main computer for a while now, gong to be back tonight to test it.
Logged
A spooky ghost.

Previous mod (34.11):
<<Fear The Night!>>
http://www.bay12forums.com/smf/index.php?topic=103747.0

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #10 on: April 05, 2013, 02:58:32 pm »

Yes.

Xangi

  • Bay Watcher
  • ɛkzændʒiː
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #11 on: April 05, 2013, 04:24:07 pm »

Yes.
Well, good to know, though my hopes of custom wearable containers have been crushed. Oh well.
Logged
A spooky ghost.

Previous mod (34.11):
<<Fear The Night!>>
http://www.bay12forums.com/smf/index.php?topic=103747.0

Wannabehero

  • Bay Watcher
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #12 on: April 08, 2013, 12:41:47 pm »

Yes.
Well, good to know, though my hopes of custom wearable containers have been crushed. Oh well.

Custom wearable containers?  Hopes don't need to be crushed.  Reactions are very customizable (within certain limits)

The example reaction takes a piece of leather and makes a waterskin out of the same leather type, because of the GET_MATERIAL_FROM_REAGENT:leather:NONE tag line.

If you wanted, say, a stone flask, you can just make a new reaction that uses stone and calls out the stone as your product material.

Code: [Select]
[REACTION:MAKE_FLASK_STONE_ADV]
[NAME:make stone flask]
[ADVENTURE_MODE_ENABLED]
[REAGENT:a:1:ROCK:NONE:NONE:NONE]
[PRODUCT:100:1:FLASK:NONE:GET_MATERIAL_FROM_REAGENT:a:NONE]
[SKILL:STONECRAFT]

This should, in theory, produce a stone flask from a small rock (note, as written, it will use ANY rock you have on you).  I haven't tested it in game, but the theory is there.  The same could be done with wood, bone, ect.
« Last Edit: April 08, 2013, 01:21:30 pm by Wannabehero »
Logged

Trapezohedron

  • Bay Watcher
  • No longer exists here.
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #13 on: April 08, 2013, 01:05:15 pm »

Or, you could make a new tool, one with a large carrying capacity, and force reactions to fill it with drink? Sure, those things won't be wearable, and the contents might get washed by water, but you've got to try at least. Minecarts have quite a large capacity.
Logged
Thank you for all the fish. It was a good run.

Xangi

  • Bay Watcher
  • ɛkzændʒiː
    • View Profile
Re: Creating Waterskins through reactions (also custom FLASK items)
« Reply #14 on: April 08, 2013, 04:08:23 pm »

Or, you could make a new tool, one with a large carrying capacity, and force reactions to fill it with drink? Sure, those things won't be wearable, and the contents might get washed by water, but you've got to try at least. Minecarts have quite a large capacity.
That's basically what I ended up doing.
Logged
A spooky ghost.

Previous mod (34.11):
<<Fear The Night!>>
http://www.bay12forums.com/smf/index.php?topic=103747.0