Tutorial/Example: Adding custom MultiUse(Radial) menu entry/action

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 - Mezzow/ADKTutorials: Tutorial/Example Blueprints for the Ark Survival Evolved DevKit
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

Let’s 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:

**[screenshot]https://i.imgur.com/KW8h3jE.png[/screenshot]

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”:
[screenshot]https://i.imgur.com/MuOW9Yh.png[/screenshot]

**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:

**

[INDENT=2][screenshot]https://i.imgur.com/5HdZL9L.png[/screenshot][/INDENT]
**

  • “BPTry Multi Use” function:

**

[INDENT=2][screenshot]https://i.imgur.com/xvVnLrE.png[/screenshot][/INDENT]

[INDENT=2]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![/INDENT]
**

  • (optional)“BPClient Do Multi Use” Event on the Event Graph:

**

[INDENT=2][screenshot]https://i.imgur.com/HYnqsFN.png[/screenshot][/INDENT]

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.

  • “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.

I hope this tutorial/example is somewhat conclusive, if not please tell me! Also if anyone spots errors in any of the explanations and comments do not hesitate to correct me!
As i wrote earlier if you guys like this i am willing to make more tutorials of this kind, so any feedback or question is welcome!

How to restrict access to menu entries (Tribe only, Personal Owner only and Server Admin only)

Brilliant! You’re an asset to the modding community Mezzow. Very grateful for all the support you have given. Thanks man! I have done a bunch with multi-use now too with comments etc. Incase anyone wants some more references or something to learn from I would be happy to post here. Again, Mezzow. You’re awesome man!

if only this was posted before i starting my menu took me a day or 2 to learn how to do it my self =( but thanks for this

Another user was asking me about this topic and one thing I wanted to make sure they knew about was replication. Depending on what you want the item to do, you might need to ensure everything is bouncing back and forth between the server and all other connected users. For the changing materials in my Advanced Architecture Mod I do this by creating an integer variable and setting the replication to RepNotify. This opens another function that fires every single time that variable is changed. I have my Try multi use do what it needs to do but also change the value of my repnotify integer. That new function then has all the major changes to my structures being made and it replicates nicely. That variable you use can also have the box for SaveGame checked and the value will individually save for any deployed structures you made with this setup. This is invaluable for also setting up an OnBeginPlay event in the main event graph where you can decide to make changes to the structure the moment its loaded into the game, and have those changes reflect a previously chosen value, even after a restart.

I will try and make an example that explains replication in this context better. Or maybe one that explains replication at all, i will see.
Regardless i can only recommend to watch the networking tutorial series by epic here: https://www.youtube.com/playlist?list=PLZlv_N0_O1gYwhBTjNLSFPRiBpwe5sTwc

Thanks Mezzow, the tutorial works great! This will really bring my mods to a more professional level :slight_smile:

Once again, can’t thank you enough! Now that I’m editing my own mods I can give players more control over how things work (now my trampoline mod needs only one trampoline and I can let the players set it up how they want). My horizons have expanded. Please do more tutorials.

Personaly I would like to see an ‘Admin only’ multiUse action, or a multiUse action that gets user text input like the in game note paper :smiley:

Here is an example on how to do some checks(Tribe only, Personal Owner only and Server Admin only). It all goes in the “BPGet Multi Use Entries” function:

[screenshot]https://i.imgur.com/qxJYK22.png
[/screenshot]

[screenshot]https://i.imgur.com/xRimnGw.png
[/screenshot]

[screenshot]https://i.imgur.com/b1PdPly.png
[/screenshot]

You can do other things like checking if the structure is powered, pin locked, etc. in a similar manner.

Im going to expand this a bit more and then also upload it to github.

Sweet! I feel like I’m becoming more powerful, ha ha.

In the photo above for the Tribe condition check, you have a node linking the Target/Targeting team, Targeting team and the Branch nodes, what is the node called. When I connect the nodes, it uses the “Convert int to boolean” node, which from what I can tell only accepts one input, not two as you have illustrated above. See my screenshot below:

[screenshot]http://i.imgur.com/WauKkzG.png[/screenshot]

That node is called “Equal(Integer)” and is used to check uf the two values you put in are equal. Those are available for different variable types.

Thanks for your reply, I managed to figure that out in the end, all works splendidly. Thanks for the awesome tutorial. Quick question, with the Tribe Alliance system dropping in the next patch, do you think you’ll be able to update the tutorial when that happens to cover conditionally checking for allied tribe targets as well? That would be really helpful.

I will definitely look into that when we get the devkit update!

I want to change the ‘Whistle’-menu, so I can add or replace the actions in the radial selector to my own custom action/functions. How can I do this? It probably won’t change by editing the MultiUse menu.

This thread was linked to me with the instruction:

Could you show an example of how to go about doing this please?
I’m basically trying to spawn a dino from a custom structure the way bosses are spawned with a tribute at the towers.

@Mezzow Since you seem to know a lot about this, is there any reason why in multiplayer my cart doesn’t show any interaction/multiuse but does in single player? I’ve followed the examples exactly.

Awesome tutorial Mezzow.

Is it possible to move/rotate a placed structure over the radial menu?

Ok i finally found it out my self :cool::
In the BluePrint you have to uncheck ‘Stationary Structure’ and then you can use the ‘BPTry Multi Use’ Graph in combination with the node ‘Add Relative Rotation’.

I’ve been trying to extend the Fireplace object to be more advanced than its current “less useful but prettier campfire”, but I can’t extend BPGetMultiUseEntries to add more options to it. Does anyone know what’s going on here, specifically the “Cannot override” error? It’s doing that for copies, subclasses, even for the basic campfire in the same situations. ADK version is 242.8.

I think you need to connect the Multi Use Entries in the start node to the return values in the end node in this case… of course… that means this doesn’t actually do anything… but between those you could do your Array Add to add new options to the menu… but it’s going to give errors as it is in your screenshot since the return value has nothing…