Skip to content
Hippolippo edited this page Oct 18, 2022 · 16 revisions

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