Creature Prefab & Graphics Setup
The Creatures Module requires a "main prefab" that contains a Traits component, among a few other important things. You don't have to set this up yourself, though! By creating a Creature in the Creature Editor, navigating to the Stats section, and clicking on Generate/Sync Prefab & Class for this Creature, it will automagically create and assign the necessary components to a GameObject, create a prefab out of it, and assign it in the creatures Prefab's section under "Main" (don't change this name).
Besides a Traits component, this feature also adds these components:
Creature Utility - This handles all kinds of internal logic for the specified creature, such as move learning, evolution, status handling, and more.
Bag - Required for either Held Item or Equipment setup.
Equipment Sync - Syncs equipment between the Bag and Creature Utility.
Creature Graphics Controller
In my example games, I have also placed a Creature Graphics Controller component on the Main Prefab of each creature. This isn't necessary, but I highly suggest it for the sake of organization, unless you really really need or want to have creature graphics separate from the actual main prefab for whatever reason. You'll also want to add an Animator component with your Creature Animator Controller if following my general setup (see below).
If you're referencing what I've done in the examples (suggested), pay attention to how I've set up the Main Prefab for each creature. The root holds all the important components. There is also a Subcontroller as a child of the root (for miscellaneous GC2 logic you'd like to individually place on creatures), and 2 other graphics-based children (graphics roots), one for battle graphics and one for overworld graphics. These graphics roots should be dragged into the Creature Graphics Controller so the controller knows when to set each active or inactive.
TUTORIAL: Setting up Graphics for Creatures in the Main Prefab
It is highly suggested to follow this structure; its the easiest and quickest way to ensure creatures display correctly during gameplay.
First, make sure you've created your Main Prefab for your creature. You can access it by selecting in the Creature Prefabs tab and clicking on the name; it will ping in your project window. Double click it in the project window to open it.
Depending on how your animations are set up, you may want to add an Animator to the root; this is what I've done, as it made it easy to target with GC2's visual scripting, but if you need the Animator component to be elsewhere from the root, remember that GC2 allows you to target children, so it's still possible to target an Animator in a child object.
The main two things to do here are setup Battle Graphics and Overworld Graphics in two separate roots so you can reference them in the Creature Graphics Controller. The system will then know what to set active/inactive based on whether the creature is sent out or not, and whether its been sent out in battle or in the overworld.
In most circumstances, you can create an empty GameObject as a child of the main prefab, name it something like "Battle" or "Graphics", then drag your graphics gameobject into this (such as a sprite renderer set or a model). On the Empty GameObject, if you're using sprites, you can add a Sorting Group component and an Outline Highlighter for effects. Then, you can create another empty, name it something like "Overworld" or "Graphics (Overworld)", and do the same thing; drag in your graphics to this object. This allows you to change scale as needed to properly size your creatures, and you can also add a shadow or other effects if necessary.
Obviously you can tweak these instructions as needed if you need something more specific to your graphics setup, but all should work properly as long as you drag graphics roots into the Creature Graphics Controller! This is also assuming you know how Animator Controllers work, of course; if you still need help, feel free to reach out on Discord and we'll find a way to set it up. I'll also make a video tutorial in the future.
Last updated