Jump to content

Drain-able Food


arrukus

Recommended Posts

Is there any way we can have a food item (whiskey etc) that is drain-able? I want alcohol to be used up in increments for both drinking and cleaning/disinfecting. They need to be linked so when you clean a lot you can only get so drunk and vise versa.

Link to comment
Share on other sites

Well, kind of, the game has a way of creating such things very, very easily through using the existing Crafting OnCreate but god damnit, recipes absolutely have to have a result.

For example, you can create a Drainable item and have it affect the player through executing a recipe tied to it (The only item needed to execute it is the item itself). Call the recipe "Drink" and have it call a OnCreate function that affects the stats.

The only thing that really stands in the way is the need for a recipe to create something else, one could possible get around it by having the recipe create a dummy item and then have a script that instantly removes it. There probably are other ways but that one seems to most obvious to me.

Link to comment
Share on other sites

Well, for lulz I made a mod that adds a Drainable, Drinkable Whiskey where Drinking is done in a way I described above.

It can be spawned from NecroForge by using it's Spawn Anything feature using SVGTestMod.SVGWhiskey as the Module.ItemID, I was too lazy to add other spawning mechanism to be honest.

 

http://www.mediafire.com/download/3gemu3104rcx03g/SVGTestMod.zip

The player can either drink it all in one go, getting extremely drunk or in small increments, the effect it has on the player is done by lua code. It also removes some stress, boredom and sadness and doesn't affect hunger or thirst (It could though) Poisoning could be done in a similar fashion.

If someone wants to expand upon that idea using this as a template, be my guest.
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...