Jump to content
rientelfon

Medical System Help [Build 40.43]

Recommended Posts

Hey everyone,

 

I am extremely new to modding and I have been successfully doing a few things here and there utilizing tutorials and other things I have managed to find online. However, I am confused on how taking pills works, looking at the item properties for pain killers I notice there is no "PainReduce=X" property. How does this aspect work? I am also curious on how to add new type of actions to the context menu when looking at your health from the UI.

 

I have added the PainKiller Item info below:

item Pills
	{
		Weight	=	0.2,
		Type	=	Drainable,
        UseDelta	=	0.1,
		UseWhileEquipped	=	FALSE,
		DisplayName	=	Painkillers,
		Icon	=	PillsPainkiller,
		Tooltip = Tooltip_Painkillers,
	}

 

Any help on how all this works would definitely be appreciated!

Share this post


Link to post
Share on other sites

So I have learned there is an event that is JustTookPill, and this appears to be in the base BodyDamage.class meaning there is no real way to simulate this same type of action. However, is there any way I can add a custom tooltip? I heard something about a Translate File and have added one that has the following info, but it does not appear to be working.
 

Translate File:
Tooltip_EN = {
	Tooltip_zombieCure = "This will cure you of a zombie infection... or so it appears."
}

Script File:
module ZombieCure{
	imports {
		Base
	  }
	
	item ZombieCurePill {
    Weight = 0.1,
    Type = Food,
	UseWhileEquipped = FALSE,
    ReduceInfectionPower = 50,
    CustomContextMenu   = Take,
    CantBeFrozen = TRUE,
	OnEat = zombieInfectionRemove,
    Tooltip = Tooltip_zombieCure,
    DisplayName = Zombie Cure
  }

Any help is definitely appreciated!

Edited by rientelfon

Share this post


Link to post
Share on other sites

I actually figured this one out on my own, and decided to post the answer here in case anyone else has the same issue. Essentially name your Translate file Tooltip_EN.txt and place it in the following location: <modname>/media/lua/shared/Translate/EN.

 

This fixed my issue!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...