Jump to content

How to edit tooltip values for custom consumable item?


Recommended Posts

Hey guys, I'm trying to make a custom consumable item, but having trouble with finding out how to edit the Tooltip values (When you click on a consumable it shows the values of Health, Food, Stamina, Water, Regen, etc. on the item)

 

Here is a visual image of what I'm trying to accomplish:

https://i.imgur.com/lgkdWL5.png
(Note: I already have the item applying the Health, Water, Cure, Stam Regen... just the tooltip isnt displaying the proper values)

 

I think it has to do with DisplayType. For example if you changed "Food" to "Water" the item's tooltip values would change:

<property name="DisplayType" value="water"/>
VS
<property name="DisplayType" value="food"/>

 

If I'm correct and it has to do with "DisplayType" where would I setup a custom DisplayType for my specific item?

 

Thanks!

Link to comment
Share on other sites

2 hours ago, Bladestorm Games said:

Hey guys, I'm trying to make a custom consumable item, but having trouble with finding out how to edit the Tooltip values (When you click on a consumable it shows the values of Health, Food, Stamina, Water, Regen, etc. on the item)

 

Here is a visual image of what I'm trying to accomplish:

https://i.imgur.com/lgkdWL5.png
(Note: I already have the item applying the Health, Water, Cure, Stam Regen... just the tooltip isnt displaying the proper values)

 

I think it has to do with DisplayType. For example if you changed "Food" to "Water" the item's tooltip values would change:


<property name="DisplayType" value="water"/>
VS
<property name="DisplayType" value="food"/>

 

If I'm correct and it has to do with "DisplayType" where would I setup a custom DisplayType for my specific item?

 

Thanks!

 

Hi Bladestorm Games


For water and food to mark you, it must be this Display Type: foodWater.
Now that if you want to have your item with custom stats, you must create your new Display Type, something like this,example:

 

<item_display_info display_type="foodWaterNew" display_group="groupConsumables">
            <display_entry name="$foodAmountAdd" title_key="statFoodAmount"/>
            <display_entry name="foodHealthAmount" title_key="statHealthAmount"/>
            <display_entry name="$waterAmountAdd" title_key="statWaterAmount"/>
            <display_entry name="dStaminaRegen" title_key="statStaminaRegen" display_type="Percent"/>

           <display_entry name="dDuration" title_key="statDuration" display_type="Time"/>

           <display_entry name="dCureDysentery" title_key="statCureDysentery" display_type="Percent"/>

          <display_entry name="dEfficientDigestion" title_key="statEfficientDigestion" display_type="Percent" display_leading_plus="true"/>
 </item_display_info>

 

You must also add certain values to the item so that it shows you the correct stats.

Example: Honey has this like this

 

<property name="DisplayType" value="foodCureInfection"/>

 

<effect_group tiered="false" name="Food Tier 0">
        <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="8"/>
        <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="2"/>
        <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" buff="buffProcessConsumables"/>

        <display_value name="dCureInfection" value=".05"/>
        <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$buffInfectionAddCurePerc" operation="add" value="5"/>
        <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" buff="buffInfectionAddCure"/>
    </effect_group>

 

And in display type, it has like this:

 

<item_display_info display_type="foodCureInfection" display_group="groupConsumables">
            <display_entry name="$foodAmountAdd" title_key="statFoodAmount"/>
            <display_entry name="foodHealthAmount" title_key="statHealthAmount"/>
            <display_entry name="ddummyNoBonus" title_key="statFoodStaminaBonus" display_type="Bool"/>
            <display_entry name="dCureInfection" title_key="statCureInfection" display_type="Percent"/>
 </item_display_info>

 

It's just a matter of making the values match in display type and item.
Hope that helps you.
Regards

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...