Learn an Engram using an Item

From ARK Modding Wiki
Revision as of 11:20, 24 August 2016 by Tao (talk | contribs) (added persistence)
Jump to navigation Jump to search

This is a step by step guide for manually adding an engram to the learned engrams list using an item's "Blueprint Used" function.

Learn an engram on blueprint used

  1. Open the item and navigate to the graph tab
  2. Find the function "Blueprint Used", right click it and press "Implement Function"

Building the graph to update to show changes in the current session

Building the graph to store the changes persistently

The best way is to connect this graph to the execution node of "Initialize Inventory"

LearnEngram08.png

This might look a bit confusing at first glance but I'll walk you through it.

  1. From your "Cast To ShooterPlayerState" Node drag the "Shooter Player State" Pin and get "My Player Data Struct" and "My Player Data" as seen in the upper right part of the picture. From "My Player Data" drag "My Data".
  2. From your "Cast To PrimalCharacter" node drag the "Primal Character" Pin and get "My Inventory Component", from that get "Default Inventory Items" as seen in the lower left part of the picture.
  3. Next drag the "MyPlayerDataStruct" (Upper right) Pin and get "Break PrimalPlayerDataStruct".
  4. Now drag the "My Data" and "My Player Data Struct" (Upper right) Pins and for both get "Set Members ...". Connect the "Initialize Inventory" Node execution pin from the first graph to the first "Set members" Node, and the execution Pin from the first "Set members" Node to the second.
  5. The execution pins are now set up, now we need to finish up the data connections. Begin with connecting all matching pins from "Break PrimalPlayerDataStruct to the two "Set members" nodes. Leave out the "MyPersistentCharacterStats" Pin!
  6. From the "Break PrimalPlayerDataStruct" drag the Pin "My Persistent Character Stats" and get "Break PrimalPersistentCharacterStatsStruct"
  7. From one of the "Set members" Nodes drag the "My Persistent Character Stats" input pin and get "Make PrimalPersistentCharacterStatsStruct". Connect the "Make .. " node to the second "Set members" node too.
  8. As seen in the lower left part of the image connect the Default Inventory Items Pin to the "Player State Engram Blueprints" Pin of the "Make .. " node.
  9. Finally Connect the "Character Status Component Experience Points" and "Player State Total Engram Points" of the "Break PrimalPersistentCharacterStatsStruct" to the "Make ..." Node.

Result

Now give your character the item and use it. As a result you should see the item in your engram tree view, your crafting engrams in the inventory, and additionally a message "ADDED: Engram [XYZ]" should appear, just like when regularly learning an engram.

Copy & Paste

You can find a full paste of the blueprint graph here: http://pastebin.com/raw/EtbMUfnf

Interactive Blueprint Display

You can find an interactive Copy & Paste version here: http://blueprintue.com/blueprint/_6p7uoo9/ Sadly the ARK custom classes and structs are now shown with name, but in combination with the above images this should allow you to get stuff working!