Difference between revisions of "Modify MultiUse Radial Menu"

From ARK Modding Wiki
Jump to navigation Jump to search
(Created page with "Category:Tutorials Category:General Written by Mezzow - [https://forums.unrealengine.com/development-discussion/modding/ark-survival-evolved/67032-tutorial-example-add...")
 
Line 2: Line 2:
 
[[Category:General]]
 
[[Category:General]]
 
Written by Mezzow - [https://forums.unrealengine.com/development-discussion/modding/ark-survival-evolved/67032-tutorial-example-adding-custom-multiuse-radial-menu-entry-action Original Post]
 
Written by Mezzow - [https://forums.unrealengine.com/development-discussion/modding/ark-survival-evolved/67032-tutorial-example-adding-custom-multiuse-radial-menu-entry-action Original Post]
 +
 +
__TOC__
  
 
Hi, in this tutorial i will try to give you an overview how you can add a custom MultiUse entry to your mod structure(should also work for any other actor).
 
Hi, in this tutorial i will try to give you an overview how you can add a custom MultiUse entry to your mod structure(should also work for any other actor).
Line 11: Line 13:
 
The path to the asset should look like this: ARKDevKit\Projects\ShooterGame\Content\Mods\ADKTutorials\MultiUse\TestBox_MU_Basic.uasset
 
The path to the asset should look like this: ARKDevKit\Projects\ShooterGame\Content\Mods\ADKTutorials\MultiUse\TestBox_MU_Basic.uasset
  
Let's start:
+
==Start==
- I am going to assume you know how to setup a mod and custom structure and have already done both.
+
I am going to assume you know how to setup a mod and custom structure and have already done both.
  
 
# Open up the blueprint of your custom structure.
 
# Open up the blueprint of your custom structure.
# In the "Defaults" panel, look for the flag "Blueprint Multi Use Entries" and set it to true:[[File:MultiUseEnable.png|frame|none]]
+
# In the "Defaults" panel, look for the flag "Blueprint Multi Use Entries" and set it to true:[[File:MultiUseEnable.png|600px|none]]
# Go to the "Graph" tab, right-click on "BPTry MultiUse" and select "Implement function". Do the same thing again for "BPGet Multi Use Entries":[[File:MUImplement.png|frame|none]]
+
# Go to the "Graph" tab, right-click on "BPTry MultiUse" and select "Implement function". Do the same thing again for "BPGet Multi Use Entries":[[File:MUImplement.png|600px|none]]
 
 
 
# Now you are set to add your own entry to the menu through those functions. I won't cover every step here, instead i created the basic example blueprint with extensive comments that hopefully explains itself:
 
# Now you are set to add your own entry to the menu through those functions. I won't cover every step here, instead i created the basic example blueprint with extensive comments that hopefully explains itself:
  
- "BPGet Multi Use Entries" function:
+
=="BPGet Multi Use Entries" function==
 
+
[[File:GetMultiUse.png|600px|none]]
 
+
=="BPTry Multi Use" function==
[screenshot]https://i.imgur.com/5HdZL9L.png[/screenshot]
+
[[File:TryMultiUse.png|600px|none]]
 
+
'''NOTE:''' Always set "Return Value" to true on the Return node(at least for the default execution path) or else options that trigger UI Widgets like pin codes and custom names won't work anymore!
- "BPTry Multi Use" function:
+
=="BPClient Do Multi Use" Event on the Event Graph (Optional)==
 
+
[[File:ClientDoMU.png|600px|none]]
 
+
==Additional Information==
[screenshot]https://i.imgur.com/xvVnLrE.png[/screenshot]
 
NOTE: Always set "Return Value" to true on the Return node(at least for the default execution path) or else options that trigger UI Widgets like pin codes and custom names won't work anymore!
 
 
 
- (optional)"BPClient Do Multi Use" Event on the Event Graph:
 
 
 
 
 
[screenshot]https://i.imgur.com/HYnqsFN.png[/screenshot]
 
 
 
Some additional information how these functions work:
 
 
- "BPGet Multi Use Entries" is executed on the client as soon as a player is near enough to interact and targets the structure. It passes the default multiuse entries of the actor as an array, you can then modifiy it within the function and return back the modified array. This returned array is then used to determine the menu entries that get displayed.
 
- "BPGet Multi Use Entries" is executed on the client as soon as a player is near enough to interact and targets the structure. It passes the default multiuse entries of the actor as an array, you can then modifiy it within the function and return back the modified array. This returned array is then used to determine the menu entries that get displayed.
  

Revision as of 01:42, 8 April 2018

Written by Mezzow - Original Post

Hi, in this tutorial i will try to give you an overview how you can add a custom MultiUse entry to your mod structure(should also work for any other actor).

I will cover only the basics in this tutorial but i am planning to create more example blueprints with comments that cover some more advanced use cases of the multiuse functions and ideally other topics too, if you guys like this one.

You can download the example asset with all the comments on github here: GitHub - ADKTutorials If you download as zip extract to ARKDevKit\Projects\ShooterGame\Content\Mods and remove the "-master" tag from the "ADKTutorials" folder. The path to the asset should look like this: ARKDevKit\Projects\ShooterGame\Content\Mods\ADKTutorials\MultiUse\TestBox_MU_Basic.uasset

Start

I am going to assume you know how to setup a mod and custom structure and have already done both.

  1. Open up the blueprint of your custom structure.
  2. In the "Defaults" panel, look for the flag "Blueprint Multi Use Entries" and set it to true:
    MultiUseEnable.png
  3. Go to the "Graph" tab, right-click on "BPTry MultiUse" and select "Implement function". Do the same thing again for "BPGet Multi Use Entries":
    MUImplement.png
  4. Now you are set to add your own entry to the menu through those functions. I won't cover every step here, instead i created the basic example blueprint with extensive comments that hopefully explains itself:

"BPGet Multi Use Entries" function

GetMultiUse.png

"BPTry Multi Use" function

TryMultiUse.png

NOTE: Always set "Return Value" to true on the Return node(at least for the default execution path) or else options that trigger UI Widgets like pin codes and custom names won't work anymore!

"BPClient Do Multi Use" Event on the Event Graph (Optional)

ClientDoMU.png

Additional Information

- "BPGet Multi Use Entries" is executed on the client as soon as a player is near enough to interact and targets the structure. It passes the default multiuse entries of the actor as an array, you can then modifiy it within the function and return back the modified array. This returned array is then used to determine the menu entries that get displayed.

- "BPTry Multi Use" is executed on the server when a player activates a menu entry. The "Use Index" indicates which multiuse entry was activated. If the "Return Value" bool is set to true in the return node the "BPClient Do Multiuse" Event will be fired on the client.

- The "BPClient Do Multi Use" event is fired on the activating client after "BPTry Multi Use". An example for when you can use this is if you want to display notifications for the interacting player only.