mjrice Posted January 31, 2019 Share Posted January 31, 2019 It used to be that when a recipe was unlocked, the game would pop up a message above the hud that said "Recipe Unlocked: {recipe}", and that tooltip key is still in Localization.txt, but I can't figure out how to make it do anything. I thought the way to do it would be to add the parameter "tooltip_key" to the triggered effect that unlocks the recipe, like this example for Bacon and Eggs: <item name="Cookbook: Bacon and Eggs"> <property name="Extends" value="recipeBookBase"/> <property name="CreativeMode" value="Player"/> <property name="EconomicValue" value="500"/> <property class="Action0"> <requirement name="CVarCompare" cvar="foodBaconAndEggs" operation="Equals" value="0"/> <!-- Equals 0 --> </property> <effect_group tiered="false"> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodBaconAndEggs" operation="set" value="1" tooltip_key="ttRecipeUnlocked" /> </effect_group> </item> But this does nothing, and nothing else I have tried has worked. Does anybody know if it is possible to do? Just to be clear, the recipe does get unlocked, I just can't get it to display a message telling the player about it. Link to comment Share on other sites More sharing options...
mjrice Posted February 1, 2019 Author Share Posted February 1, 2019 I figured it out - here are the details if anybody else looking to do the same stumbles onto this: You can display a brief message above the toolbelt by triggering a effect of action type = ShowToolbeltMessage with attribute message set to the string you want to display. On the one hand, this isn't tied to the actual recipe being unlocked, so it relies on you putting the effect in right spot. But on the other hand, this is really nice because you can display any text you want and doesn't involve touching localization.txt. And it works well with multiple items, each message will be displayed for a few seconds before it moves on to the next one queued up. Here is an example, a cookbook that unlocks three different recipes and shows three corresponding messages: <item name="Cookbook: Noodles" > <property name="Extends" value="recipeBookBase"/> <property name="CreativeMode" value="Player"/> <property name="EconomicValue" value="500"/> <property class="Action0"> <requirement name="CVarCompare" cvar="Noodles" operation="Equals" value="0"/> <!-- Equals 0 --> </property> <effect_group tiered="false"> <triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveSkillExp" target="self" skill="attIntellect" experience="1500"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="Noodles" operation="set" value="1"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="Chicken Noodle Soup" operation="set" value="1"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="Tuna Noodle Casserole" operation="set" value="1"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Noodles"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Tuna Noodle Casserole"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Chicken Noodle Soup"/> </effect_group> </item> Link to comment Share on other sites More sharing options...
Ragsy 2145 Posted February 1, 2019 Share Posted February 1, 2019 Thanks for sharing this mjrice I have been thinking about a modlet and this was also eluding me on how to do the message displays. Link to comment Share on other sites More sharing options...
xyth Posted February 1, 2019 Share Posted February 1, 2019 Yes, this will be handy. Thanks for sharing. Link to comment Share on other sites More sharing options...
n2n1 Posted February 1, 2019 Share Posted February 1, 2019 Thank you for the information! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.