PDA

View Full Version : [REQUEST] One-Use Item



ItsCliffGaming
January 14th, 2019, 14:21
Would it be possible to make an extension that would allow an item to be used (like a Potion) and then delete itself? If that is easy enough, would it be possible to make it where if you have X amount of items, it would remove 1 from it? For things like scrolls and potions this would be SUPER handy.

Trenloe
January 14th, 2019, 14:25
Are you asking if this functionality is possible in an extension - before you start writing it yourself? Or are you asking for someone to write this extension for you?

If your question is the former, then yes, it is possible to do the functionality you mention in an extension.

Zacchaeus
January 14th, 2019, 15:52
You can do this already (certainly in 5e which is what I think you are referring to). Add the item to the actions tab by creating a new action along with whatever effects that can be applied. Then go into preparation mode and switch the daily/rest box to Once. Then type in the number of items/uses that the character has in the box. In Combat mode a row of tick boxes will appear which can be ticked off when the items is used. When the last use is ticked the item will disappear from the actions tab.

The item of course istn't deleted from the inventory (nor is the number reduced in the case of multiple items of the same type), but this is the best way to handle what I would call consumables which have a finite number of uses. This also means that for things like potions which the character might buy/find more of the player can go into preparation mode and untick an already used box so that the items comes back along with all of the associated effects. This saves having to redo everything from scratch.

Usually I will pre-progarm this kind of thing into new characters so that the effects etc are all there but the boxes are all ticked off so that initially they are hidden. Character finds a potion of healing during a game and can just untick a box and everything is there ready for it to be used without having to mess around creating effects mid session.

ItsCliffGaming
January 14th, 2019, 16:45
Are you asking if this functionality is possible in an extension - before you start writing it yourself? Or are you asking for someone to write this extension for you?

If your question is the former, then yes, it is possible to do the functionality you mention in an extension.

It was more-so the latter, if possible. I am trying to understand how to build them myself, but LUA is a fun process. So, if it is simple, and someone is inspired to do so, that would be amazing. If not, it's understandable, but I figured I would put in a request!


You can do this already (certainly in 5e which is what I think you are referring to). Add the item to the actions tab by creating a new action along with whatever effects that can be applied. Then go into preparation mode and switch the daily/rest box to Once. Then type in the number of items/uses that the character has in the box. In Combat mode a row of tick boxes will appear which can be ticked off when the items is used. When the last use is ticked the item will disappear from the actions tab.

The item of course istn't deleted from the inventory (nor is the number reduced in the case of multiple items of the same type), but this is the best way to handle what I would call consumables which have a finite number of uses. This also means that for things like potions which the character might buy/find more of the player can go into preparation mode and untick an already used box so that the items comes back along with all of the associated effects. This saves having to redo everything from scratch.

Usually I will pre-progarm this kind of thing into new characters so that the effects etc are all there but the boxes are all ticked off so that initially they are hidden. Character finds a potion of healing during a game and can just untick a box and everything is there ready for it to be used without having to mess around creating effects mid session.

I had no idea that it would automatically hide itself when it goes to 0. That is good info to have, thank you! Now, if there was some way for one of these to be built in actions, when a 'consumable' is added, and then either hide, or delete itself, after all are gone, and then remove it from the inventory, that would be AMAZING.

LordEntrails
January 14th, 2019, 17:21
It's possible, but since their is no "consumable" object type, you would have to code the LUA to check for each item you want to have this behavior, and then what the appropriate action would be to add. So you would have to code a potion of healing, a potion of greater healing, etc. Lots of coding for what most people would consider limited returns :)

I always suggest if you want to start writing extensions, to go through the Decal Extension Tutorial on fg-con.com. Thought it's very basic and not related to what you actually want to do, it has some key fundamentals in it that will get you started with FG extensions before you try something challenging.

ItsCliffGaming
January 14th, 2019, 17:29
It's possible, but since their is no "consumable" object type, you would have to code the LUA to check for each item you want to have this behavior, and then what the appropriate action would be to add. So you would have to code a potion of healing, a potion of greater healing, etc. Lots of coding for what most people would consider limited returns :)

I always suggest if you want to start writing extensions, to go through the Decal Extension Tutorial on fg-con.com. Thought it's very basic and not related to what you actually want to do, it has some key fundamentals in it that will get you started with FG extensions before you try something challenging.

Thanks for the tip! I will check out the video to try and get some basic ideas down pact.

In regards, one thing that comes to mind would to be able to right click an item from Inventory and do something like "Make Consumable" - and it would add something to the Actions tab, that would be setup for limited use. Even if you have to add the [HEAL: 4d4+4] to it every time, it seems (to me) that it would be worth it!

Zacchaeus
January 14th, 2019, 17:50
Add it to the wish list. Link in my signature.

ItsCliffGaming
January 14th, 2019, 17:55
Add it to the wish list. Link in my signature.

Damn! That is a crazy list! Will do. Thanks, again, for everyone's support!