Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 3.46 KB

README.md

File metadata and controls

30 lines (26 loc) · 3.46 KB

Plasma-Custom-Nodes

A library to unify and streamline the process of adding custom nodes into Plasma

Create a custom node using this Library

Note: This library requires that its methods are called before [Assembly-CSharp.dll]Holder.Awake so make sure the mod entry is happening at least prior to that

  1. Create a new class that inherits PlasmaModding.CustomAgent [?]
  2. Create a gestalt using PlasmaModding.CustomNodeManager.CreateGestalt
  3. Add any ports to the gestalt using PlasmaModding.CustomNodeManager.CreateCommandPort, PlasmaModding.CustomNodeManager.CreatePropertyPort and PlasmaModding.CustomNodeManager.CreateNode
  4. Create the node from the gestalt using PlasmaModding.CustomNodeManager.CreateNode

PlasmaModding.CustomNodeManager

This class is static. It should not be instantiated, all methods can be called directly on the type PlasmaModding.CustomNodeManager

  • Create Gestalt: PlasmaModding.CustomNodeManager.CreateGestalt(Type, string, string?, AgentCategoryEnum)
  • Create Command Port: CreateCommandPort(AgentGestalt, string, string, int)
  • Create Property Port: CreatePropertyPort(AgentGestalt, string, string, Behavior.Data.Types, bool, Behavior.Data?, string?)
  • Create Output Port: CreateOutputPort(AgentGestalt, string, string, Behavior.Data.Types, bool, Behavior.Data?, string?)

PlasmaModding.CustomAgent

This class should only be extended, not instantiated. The reason it is not an interface is because the Agent class is not an interface