Effect On Entity
In this page we are going to take a look at ''Effects On Entity'', the system the RPG Creation Kit uses to alter the Health, Stamina, Mana and Attributes of an entity. If you ever made a Health Potion, a poison or an enchanted sword, you already used them. Effects are a building block used all over the kit, so it is a good idea to understand how they work.
Where Effects Are Used
You will find an "Effects" list in three places mainly:
- Consumable Items: the effects are executed on the entity that uses the item, this is how potions and food work.
- Spells: a spell has two lists, "On Caster Effects" executed on who casts the spell, and "On Target Effects" executed on who is hit by it.
- Enchanting Recipes: the effects are constant and stay active as long as the enchanted item is equipped (see Crafting & Enchanting).
Effects work on any entity that has an "Entity Attributes" component, so they apply to the Player but also to NPCs and creatures.
The Fields
For each effect you can set:
- Effect Type: what the effect does, see the list below.
- On Attribute: only used by the Attribute types, it is the attribute to alter (Strength, Dexterity, Agility, Constitution, Speed, Endurance, Charisma...).
- Duration: the duration of the effect in seconds, see below since the meaning changes a bit depending on the type.
- Magnitude: the strength of the effect, how many points are added, removed or recovered.
- Icon: the icon shown in the effects UI.
- Show In Effects UI: if the effect should appear in the effects UI of the Player.
Effect Types
The types are divided in three families, each one available for Health, Stamina, Mana and Attributes.
Restore
Restore recovers the current value, it is the classic potion effect. With a Duration of 0 the whole Magnitude is recovered instantly, with a Duration greater than 0 the Magnitude is spread over the seconds of the duration, so a "Restore Health" with Magnitude 50 and Duration 5 heals 10 points per second for 5 seconds. Restore used on an attribute is not really used or useful as of now.
Fortify
Fortify temporarily raises a value: the Max Health, Max Stamina, Max Mana or an Attribute is increased by the Magnitude as soon as the effect starts, and Duration expires. A "Fortify Strength" with Magnitude 5 and Duration 60 gives +5 Strength for one minute.
If you set the Duration to 0, the bonus is applied instantly and never removed, so you can use it to create permanent rewards, such as an elixir that gives +1 Str, or an Ogre Root (if you get this reference, you're a real one!).
Damage
Damage is the opposite:
- Damage Health / Stamina / Mana lower Magnitude spread over the Duration exactly like Restore. This is how you make a poison that deals its damage over several seconds. With a Duration of 0 the whole damage is applied instantly.
- Damage Attribute lowers an Attribute by the Magnitude for the Duration, then gives it back, like a curse that weakens the target for a while.
The Effects UI
When an effect with a duration is running, it can show on screen in the effects UI and the active effects are also listed in the "Active Effects" section of the Character tab of the inventory. The icon is not referenced directly, but by its ID in the Icons Database.
So if you want a new icon for your effect, remember add it first to the "Icons Database File" asset otherwise the icon will not be found in the dropdown list:
Two things to keep in mind:
- Effects are paused while the game is pause out a poison by sitting in the inventory or any other menu.
- Active effects are written on the Save File, so an effect that is halfway through its duration will resume from that point when the game is loaded.
A Note About Enchantments
Enchanting Recipes only accept the Fortify and Damage types, because the effect of an enchantment is constant: it is applied when the item is equipped and removed when it is unequipped, and the Duration is ignored. "Restore" types cannot be used.
