Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How do you add clothing that can carry stuff?  (Read 1369 times)

GoblinCookie

  • Bay Watcher
    • View Profile
How do you add clothing that can carry stuff?
« on: October 04, 2014, 05:27:47 am »

I have hit a certain dilemma.  When you create an adventurer from a race that is rather small then the hard-coded backpack that adventurers are given does not resize accordingly.  It remains at 7 weight even as other items scale down because it does not belong to the entity as the other items do.

This leads to such situations as my gremlin carrying a backback that weighs more than twice what his metal spear weighs.  The obvious solution would be to add an item of clothing that can carry items to replace the backback (the player would simply throw it away at the start of the game). 

Problem is, while everything else is uber-flexible items are not.  I can't seem to add the tags from the pouch to an item of clothing, so what should I do?  I cannot seem to located a half-decent list of item tags online neither.
« Last Edit: October 14, 2014, 09:53:43 am by GoblinCookie »
Logged

Suds Zimmerman

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #1 on: October 04, 2014, 07:27:51 am »

To put it succinctly, you can't. Only these tags can go on clothing.
Logged
You don't need a weatherman to know which way the wind blows
DORFAMUNDA - NECROMUNDA DF MOD

GoblinCookie

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #2 on: October 04, 2014, 07:37:34 am »

To put it succinctly, you can't. Only these tags can go on clothing.

So how do I create a backpack?  I need something that can carry things, which belongs to the entity which will be added to an adventurer.  Backpacks seem to be hardcoded, but they must have tags and count as some form of item.
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #3 on: October 04, 2014, 09:05:04 am »

That's the thing - you can't and they don't. They aren't part of the system we can touch with raws.

Pouches are the closest thing we have. Maybe make a version that has ten times as much CONTAINER_CAPACITY and call it a knapsack?
Logged

pisskop

  • Bay Watcher
  • Too old and stubborn to get a new avatar
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #4 on: October 04, 2014, 09:12:51 am »

That's the thing - you can't and they don't. They aren't part of the system we can touch with raws.

Pouches are the closest thing we have. Maybe make a version that has ten times as much CONTAINER_CAPACITY and call it a knapsack?
And hold it in your hands lovingly? :P


---

Is it possible to create a backpack from another item in adventurer mode?  Without DF Hack or something?
Logged
Pisskop's Reblancing Mod - A C:DDA Mod to make life a little (lot) more brutal!
drealmerz7 - pk was supreme pick for traitor too I think, and because of how it all is and pk is he is just feeding into the trollfucking so well.
PKs DF Mod!

scamtank

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #5 on: October 04, 2014, 10:21:16 am »

Easily with a reaction, but I don't really see the point. It'd be just another dumbass backpack with the same old dumbass attributes.
Logged

GoblinCookie

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #6 on: October 04, 2014, 10:52:34 am »

That's the thing - you can't and they don't. They aren't part of the system we can touch with raws.

Pouches are the closest thing we have. Maybe make a version that has ten times as much CONTAINER_CAPACITY and call it a knapsack?

I gave my gremlins entity pouches.  But it does not appear on adventurers when they are created.  Perhaps a person could trade their backpack for a pouch, which was the idea of giving them their own pouches (though they are bugged). 

Can you however create a custom object that belongs to your entity using a reaction or do reactions only work using hard-coded objects? 

Ideally we would have a reaction turning the default backback into a custom backpack of the correct size.
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #7 on: October 04, 2014, 11:24:16 am »

Reactions can accept, to the best of my knowledge, any object of any material as a reagent and produce any object of any material.

I know reactions will produce clothing items that fit the adventurer using them, but I've never checked to see if backpacks produced by reactions also scale. One thing you can do, though if the backpack doesn't scale down, is make a reaction that produces a backpack of an extremely lightweight material. Adamantine should work, but you could make a custom material even lighter if you wanted.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

pisskop

  • Bay Watcher
  • Too old and stubborn to get a new avatar
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #8 on: October 04, 2014, 11:25:14 am »

Reactions can accept, to the best of my knowledge, any object of any material as a reagent and produce any object of any material.

I know reactions will produce clothing items that fit the adventurer using them, but I've never checked to see if backpacks produced by reactions also scale. One thing you can do, though if the backpack doesn't scale down, is make a reaction that produces a backpack of an extremely lightweight material. Adamantine should work, but you could make a custom material even lighter if you wanted.
Backpacks dont have scales.  One size fits all.  Same thing with cloaks, oddly enough.
Logged
Pisskop's Reblancing Mod - A C:DDA Mod to make life a little (lot) more brutal!
drealmerz7 - pk was supreme pick for traitor too I think, and because of how it all is and pk is he is just feeding into the trollfucking so well.
PKs DF Mod!

GoblinCookie

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #9 on: October 04, 2014, 11:48:03 am »

Reactions can accept, to the best of my knowledge, any object of any material as a reagent and produce any object of any material.

I know reactions will produce clothing items that fit the adventurer using them, but I've never checked to see if backpacks produced by reactions also scale. One thing you can do, though if the backpack doesn't scale down, is make a reaction that produces a backpack of an extremely lightweight material. Adamantine should work, but you could make a custom material even lighter if you wanted.

I am not thinking about backpacks any more but pouches.  Do pouches scale down or up? 
Code: [Select]
[ITEM_TOOL:ITEM_TOOL_POUCH]
[NAME:pouch:pouches]
[VALUE:10]
[SOFT_MAT]
[TOOL_USE:SMALL_OBJECT_STORAGE]
[TILE:173]
[SIZE:100]
[MATERIAL_SIZE:1]
[CONTAINER_CAPACITY:1000]

The size seems to be defined in the raws.   So if I wanted to would I be able to reduce the size to say 10 units to create a custom gremlin pouch that will be lighter?

And then can I then create a reaction that destroys the hardcoded backpack and replaces it with a suitably sized 'backpack' based upon the pouch item?
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #10 on: October 04, 2014, 12:45:52 pm »

Yeah, you got it. There's your plan.
Logged

GoblinCookie

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #11 on: October 04, 2014, 12:51:30 pm »

Yeah, you got it. There's your plan.

The problem is that I know nothing about reactions. 
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #12 on: October 04, 2014, 07:09:46 pm »

That's just an excuse to learn how! :P

The wiki page has decent information on it, if a little difficult to follow.

The example reaction should work just fine:
Code: [Select]
[REACTION:<identifier>]
     [NAME:<name>]
     [BUILDING:<BUILDING NAME>:<BUILDING KEY>]
     [REAGENT:A:150:BAR:NONE:POTASH:NONE]
     [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]
     [FUEL]
     [SKILL:<SKILL TOKEN>]
     [AUTOMATIC]
     [ADVENTURE_MODE_ENABLED]
Just give it a proper identifier (any string of numbers and letters, spaces, and underscores) and in-game name and a skill token. You can remove the building, product dimension, automatic and fuel tokens. Then change the reagent and product strings to match what you want.

Replace "pearlash:none" in the product with GET_MATERIAL_FROM_REAGENT:A:NONE which will give the product the material from your reagent. Replace the item string (bar:none) in the product with TOOL:<your pouch ID>. The reagent token's item and material strings you can replace with BACKPACK:NONE:NONE:NONE. That will allow it to accept backpacks of any material. Replace the quantity (the value after 'A') with '1' so you only need one backpack, instead of 150.

In case you care, '150' in both the reagent and product dimensions tokens in the example are used by bars because a single "bars" item contains 150 bits you can think of as individual ingots or something. So in that case you're using 1 full bars item of one type to make one full bars item of another type.

This was REALLY hard to type up on my cell phone, and I can't troubleshoot it for errors on the phone so I'm sorry if I made a mistake.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

GoblinCookie

  • Bay Watcher
    • View Profile
Re: How do add clothing that can carry stuff?
« Reply #13 on: October 05, 2014, 09:02:56 am »

That's just an excuse to learn how! :P

The wiki page has decent information on it, if a little difficult to follow.

The example reaction should work just fine:
Code: [Select]
[REACTION:<identifier>]
     [NAME:<name>]
     [BUILDING:<BUILDING NAME>:<BUILDING KEY>]
     [REAGENT:A:150:BAR:NONE:POTASH:NONE]
     [PRODUCT:100:1:BAR:NONE:PEARLASH:NONE][PRODUCT_DIMENSION:150]
     [FUEL]
     [SKILL:<SKILL TOKEN>]
     [AUTOMATIC]
     [ADVENTURE_MODE_ENABLED]
Just give it a proper identifier (any string of numbers and letters, spaces, and underscores) and in-game name and a skill token. You can remove the building, product dimension, automatic and fuel tokens. Then change the reagent and product strings to match what you want.

Replace "pearlash:none" in the product with GET_MATERIAL_FROM_REAGENT:A:NONE which will give the product the material from your reagent. Replace the item string (bar:none) in the product with TOOL:<your pouch ID>. The reagent token's item and material strings you can replace with BACKPACK:NONE:NONE:NONE. That will allow it to accept backpacks of any material. Replace the quantity (the value after 'A') with '1' so you only need one backpack, instead of 150.

In case you care, '150' in both the reagent and product dimensions tokens in the example are used by bars because a single "bars" item contains 150 bits you can think of as individual ingots or something. So in that case you're using 1 full bars item of one type to make one full bars item of another type.

This was REALLY hard to type up on my cell phone, and I can't troubleshoot it for errors on the phone so I'm sorry if I made a mistake.

Thanks for your help.
Logged