The Action Editor: Basic Overview - voxraygames/worldbuilding GitHub Wiki

Table of Contents

Introduction

The Voxile Editor comes with a robust scripting system called the Action Editor, which can be used for:

  • Assigning Dialogue to an NPC
  • Creating quest requirements
  • Changing the Time of Day
  • Moving NPCs around the world
  • Tracking gameplay events

… and much more!

It looks a little scary to begin with, but don't worry! You'll be a pro level designer in no time.

Let's take a look at the ACTIONS tab and see what all the fuss is about.

image

Wow, that's a lot of buttons. Let's break it down.

Breakdown

Main Tabs

image

  • WORLD
    Contains whole-level options where you can save the game, edit water levels, and more.

  • INVENTORY
    Contains your inventory while editing your level. Note that this does not apply to the player character when you publish your level.

  • LOAD
    Contains the voxel repository, from individual blocks to whole brushes and groups. This is also where you select gameplay elements such as enemies, NPCs and moveable platforms.

  • FIND
    Contains the find tool, which allows you to search your level for instances of a given object, or designate regions for scripting purposes.

  • ACTIONS
    Contains the action editor.

  • PROPERTIES
    Contains the contextual properties menu. This will open automatically when you select an object with the Properties tool (the blue cog on your hotbar).

  • NEW WORLD
    Contains the level generator. Use this to make a new level.

Action Hosts

image

You can think of Action Hosts as the containers for the various scriptable elements in your level. Vendors, crafting benches, NPCs, quests - if you can interact with it, it needs an Action Host. Note that the action editor begins with an array of Action Hosts already implemented.

  • Spawn Auto Trigger Host
    Contains script which activates at level start.

  • Player
    Contains crafting recipes which the player knows by default and can craft on their person.

  • Wood Workbench
    Contains crafting recipes which the player knows by default and can craft on any wooden workbench.

  • Stone Workbench
    Contains crafting recipes which the player knows by default and can craft on any stone workbench.

  • Iron Workbench
    Contains crafting recipes which the player knows by default and can craft on any iron workbench.

  • Smelter
    Contains crafting recipes which the player knows by default and can craft at any smelter.

  • Stove
    Contains crafting recipes which the player knows by default and can craft at any stove.

  • Campfire
    Contains crafting recipes which the player knows by default and can craft at any campfire.

  • Magic Workbench
    Contains crafting recipes which the player knows by default and can craft on any magic workbench.

  • Vendor Bullets Host
    Contains which bullets are available to purchase from the bullet vending machine.

  • Trigger Host
    Contains all trigger operations for the level (such as doors). Is updated automatically whenever you add a new trigger item into the world.

There are also some buttons below that allow us to edit our Action Hosts.

  • Add Template
    Add a new action host from a list of templates.

  • Delete
    Delete the selected Action Host.

  • ^
    Moves the selected Action Host up in the list.

  • v
    Moves the selected Action Host down in the list.

Host Properties

image

Here is where you will edit the properties of Action Host, as well as set scriptable elements such as dialogue, shop inventory and quest parameters.

  • Host ID
    The ID that you can use to refer to this action host elsewhere in the Action Editor. It is a numeric value by default, but it can be a good idea to give it a more memorable name.
    N.B. Vendors must have the prefix 'vendor_' at the start of their Host ID.

  • Name
    The player-facing name of your Action Host; this is only necessary if the player can directly interact with it.

  • Welcome text
    For interactable NPCs. The line of dialogue they open with when first meeting the player - before the player says anything.

  • Welcome back
    For NPCs. This should contain generic dialogue executed when the player speaks to the NPC in the middle of performing a quest objective (something along the lines of "Hurry up and finish my quest!").

  • Voice
    Set the vocal presence and pitch of your host's voice. Can be useful for vocal NPCs, or items like books or notes which don't have voices at all.

  • Craftable/Vendor Items Items which are craftable or purchasable from this host. Note that for entity to be a vendor in the world, you must prefix their Host ID with 'vendor_'.

  • Add Action
    Add an 'action' to your host. This may be dialogue, quest objectives, action triggers, etc.

Action Properties

image

Clicking Add Action adds an action to the Action Host.

  • Action ID
    The unique ID which allows you to reference this dialogue in scripting. By default, this is a string of 18 random numbers.

  • Prompt
    In dialogue, what the player 'says' to initiate this action.

  • Response
    In dialogue, what is said back to the player by the Action Host (usually an NPC).

  • Summary
    If this action begins a quest, the summary is the quest objective in the player's quest log. Otherwise ignored.

  • Welcome back
    Generic text which is said by the Action Host if the player speaks to them in the midst of fulfilling a quest objective.

  • Activation

    • Activated at NPC Spawn
      Should this action be activatable at the beginning of the level? If not, it must be activated with an activate effect.