Rck AI Editor

From RPG Creation Kit
Jump to navigation Jump to search

The Rck AI Editor is the tool used to create and edit the NPCs of your game. You can open it from the toolbar, under RPG Creation Kit > RckAI Editor.

Rckaieditor 1.png

In the RPG Creation Kit, NPCs exist as prefabs stored in Assets/RPG Creation Kit/Prefab Library/AI/. The Rck AI Editor works directly on those prefabs: everything you change and save from this window is applied to the prefab itself, so every instance of that NPC placed in your Cells will reflect the changes.

For a complete walkthrough on how to create an NPC and add it to the game, refer to the NPCs Creation tutorial. This page instead describes the editor itself and everything you can do with it.

Note: Creatures and Mounts have their own versions of this tool, the CreatureAI Editor and the MountAI Editor, which you can find under the same menu. They work pretty much in the same way.

The AI List

On the left side of the window you can find the list of all the RckAI prefabs of the project, ordered by their Entity ID. From here you can:

  • Search for a specific NPC by its Entity ID using the search bar (the bar turns yellow while a filter is active).
  • Show/Hide the Demo Files with the "Show Demo Files?" toggle, so the NPCs of the Demo don't get in the way while you work on your own game.
  • Refresh the list with the refresh button, in case you've added or removed prefabs outside of the editor.

Clicking on an NPC selects it and loads it in the right side of the window, where you can edit it through the tabs. The Select Prefab button selects the prefab of the current NPC in the Project Window, in case you need to access it directly.

By right-clicking on the list you can:

  • New: creates a new RckAI prefab with default settings, named [RckAI] NewRckAI.
  • Duplicate Selected: creates a copy of the selected NPC, appending "Copy" to its Entity ID.
  • Delete Selected: deletes the selected NPC after a confirmation dialog. If the NPC was a Persistent Reference, it is also unregistered automatically.

The RckAI Tab

This is the main tab, it defines who the NPC is:

Rckaieditor 2.png

  • Entity ID: the UNIQUE ID of this NPC. It is used to look it up in the AI Database, it names the prefab, and if the NPC is a Persistent Reference it is used as its Ref ID as well.
  • Entity Name: the name of the NPC, it's what will be displayed in game.
  • Race: the Race of this NPC.
  • Is Male?: whether the NPC is male or female, it determines which model of the Race is used.
  • Is Essential?: if enabled, this NPC can never die: when its health reaches 0 it will heal back to 100% of his health.
  • Use Ragdoll?: whether the NPC uses a ragdoll when it dies or an animation.
  • Persistent Reference?: whether this NPC is a Persistent Reference. You just have to tick this, the registration is handled automatically when you save.
  • Animation Controller: the Animator Controller the NPC will use.
  • Look At Enabled?: whether the NPC turns its head to look at things (the Player, other NPCs...).
  • Looting Corpse?: whether the Player can loot the corpse of this NPC once it is dead. If enabled, Looting Equipment? also lets the Player take what the NPC had equipped.
  • Helps members of same faction?: if enabled, the NPC will join the fight when a member of one of its Factions is attacked nearby.

Below, the STATS section contains the Attributes and the Derived Attributes of the NPC. When you edit an Attribute (Strength, Constitution, Willpower...), the derived values such as Max Health, Max Mana, Max Stamina, Max Encumbrance and the Level of the NPC are recalculated automatically using the formulas defined in RCKSettings. You can also see a preview of the Xp OnKill, the amount of XP the Player will be awarded for killing this NPC, which you can adjust with the Xp Mult multiplier.

The Face Tab

This tab lets you customize the appearance of the NPC, it requires a Race to be assigned first.

Rckaieditor 3.png

On the left you can find the list of all the Face Blendshapes of the head model: select one and adjust it with the slider (from -100 to 100) while watching the result in the preview. The Random Face button generates a random combination of all the blendshapes, which is a nice starting point, while Reset Face sets everything back to zero.

At the bottom you can pick the Hair and the Eyes of the NPC, chosen among the types defined in its Race.

The Inventory Tab

Here you define what the NPC owns and what it has equipped:

Rckaeditori 5.png

  • Can be pick-pocketed?: whether the Player can attempt to pickpocket this NPC.
  • Items: the content of the NPC's inventory.
  • Set Ownership / Clear Ownership: these buttons set (or clear) the ownership metadata of every item in the inventory, marking them as owned by this NPC. See Items Ownership, Metadata and Stealing for what this implies.
  • Equipped Items: the items the NPC has equipped. You can equip an item of the inventory by clicking the arrow button next to it, or remove one from the equipment with the X button.

Note: only equip Armors and Weapons, and have only one weapon and one armor piece equipped at a time.

The Spells Tab

Here you can set the Spell In Use (the spell the NPC will cast in combat) and the list of the Spells this NPC knows.

Rckeditorai 6.png

The Behaviour Tab

This tab defines how the NPC behaves in the world:

Rckeditorai 7.png

  • Use BT?: whether this NPC uses Behaviour Trees.
  • Tick Rate: how often the Behaviour Tree is ticked (every frame, every X frames, or every X seconds in realtime or game time). NPCs that don't need to react quickly can use a slower tick rate to save performances.
  • Purpose Behaviour: the Behaviour Tree the NPC runs while it is not in combat.
  • Combat Behaviour: the Behaviour Tree the NPC runs while it is in combat.

The Player Damage Tolerance settings define how forgiving the NPC is when the Player hits it:

  • PDT Hits: the amount of hits the NPC will tolerate from the Player before turning hostile.
  • PDT Timeslice: the time window (in seconds) in which the hits are counted. If this time passes without reaching the amount of hits, the count is forgiven and starts over.

Below, the DIALOGUE section:

  • Use Dialogue System?: whether this NPC can talk to others or be talked to.
  • Current Dialogue: the Dialogue Graph the NPC is currently using.
  • Default Dialogue: the Dialogue Graph the NPC will fall back to.
  • Rotate towards?: whether the NPC rotates towards its interlocutor during a conversation.
  • Follows outside of Cell?: whether the NPC can follow its target even outside of its Cell. It's generally used to chase the player between cells if he gets in a fight with an NPC.

The Factions Tab

Here you can set the list of Factions this NPC belongs to. Factions determine how the NPC reacts to the Player and to other NPCs, and who it will help in a fight.

Saving

At the bottom of the window there are three buttons: SAVE, SAVE & CLOSE and CANCEL.

It is important to understand that the editor works on a copy of the prefab loaded in memory, so nothing is applied until you press SAVE (or SAVE & CLOSE). Pressing CANCEL closes the window and discards everything you've changed since the last save.