This is an extensive and detailed guide for creating new status effects or modifying existing ones in Рука Мерлина, written by The Hand of Merlin’s game designer, Мат.
Введение
Our game relies heavily on Эффекты статуса, так что мы’ll focus on those today – teach you how to create or edit them!
Мы’ll be looking at some effects already in-game, such as Burn and Backplates, например. С надеждой, ты’ll be able to implement what you learn here to your own mechanics.
Обратите внимание – Status effects don’t really work until you set yourself an Способность, а Единица, или Реликвия that uses it, so feel free to peruse the guides on those topics.
What is a Status Effect?
A Status Effect is anything that modifies a unit during a Skirmish. It can change rules, атрибуты, modify damage, or even change how some abilities and AI behaves.
In The Hand of Merlin, Status effects often have “Стеки” associated with them, which is a sort of “number of magnitude”. This stack size can be used for all sorts of effects, and can even be the duration of the effect.
If you want to create your own Status Effect, use the Create menu (Ctrl+n), and choose Generic – > (Мерлин) Status effect params.
Once you have a new file, remember to save it. We usually use the Content\Merlin\Effects folder.
Сейчас, позволять’s break down each feature of the status effect.
Identification
The first thing is setting your effect with a Имя. Choose something short, but descriptive.
Then you get a Описание. This is usually a bit more complex, and is filled with dynamic tags to be filled in. Позволять’s take a look at the one for Burning:
Брать <особенный>{Повреждать}</особенный> повреждать <особенный>каждый ход</особенный>. <br/><особенный>Decays</особенный>, потерять <особенный>1</особенный> куча <особенный>за ход</особенный>.
Это’s a bit heavy with tags, но здесь’s what everything is:
<особенный></особенный> is a wrapper you can use when you want that part of the text to be accepted. We have several of these, described in Merlin/databases/DescriptionParser.rsc.
<br/> is to break a line.
{Повреждать} is a special entry that refers to an ID set up later in Activated Actions.It could be anything, as long as it’s the same down there, as we’ll see. You can also refer to Attribute Modifiers, Damage modifiers, и т. д.. Just check our other effects for some examples!
It ends up looking like this:
Because these are text properties, you have two fill in two fields:
- Identifier
- Нить
This is to make it easier for translations. If you are making a big mod, you might want to have your own identifier naming conventions, но здесь’s mine: Я использую HOM.StatusEffect.[Имя] и HOM.StatusEffect.[Имя].Описание.
Затем, you can choose if you want the Stack size to actually show. We usually make passives not show stack size for clarity.
И, что еще более важно, decide on a Категория for your status effect. This impacts some abilities and relics that interact with buffs or debuffs, and also colors your effects. Здесь’s how we set it up:
- Positive Status Effects, в синем, are buffs
- Negative Status Effects, in purple, are debuffs.
- Marker status effects, in yellow, are passives and static effects
- Hidden status effects are not shown, and we usually leave them for complex internal mechanics.
Стеки
Speaking of Stacks, there are a few entries here that change how stacks work on a particular effect. Примечание Берсерк здесь:
Merge Behavior determines if you want the effect to merge with other applications of themselves. Say if two enemies apply Отметка to you (increasing the damage they deal), ты’d want them to be separate, but multiple applications of Уязвимый (Increased the damage you receive) should be merged.
Затем, you have what happens in the case of merging: If two instances of the same effect are applied, what should happen? Take the older one? The lowest? The highest? Add them together? Ваш звонок. Берсерк uses the Max stack, not being added.
Затем, you can add a Мин или Макс to stacks – if your min stacks are higher than 0, the effect won’t expire by getting its stacks reduced by 0 like normal, так что будьте осторожны!
Окончательно, обратите внимание на “Allow no affector” и “Allow dead affectors”. If your status effect depends on knowing some information about who gave the effect to you (нравиться Отметка), you can tick this off, making the effect expire when the affector dies.
Визуальные эффекты
If you want your Status effect to have associated particle or sound effects, ты можешь использовать Effect Preset While Active. Там, you can browse effects that are enabled/disabled when the effect starts or expires, и это’ll always be attached to the unit. We tend to use Geometric Particles, так:
Модификаторы
Сейчас, for the actual mechanics. The first half are sort of “пассивный” эффекты, that modify the unit’s attributes or how it deals/receives damage and healing.
We got three major components:
- Attribute Modifiers
- Модификаторы урона
- Healing Modifiers
Attribute Modifiers change one the affected unit’s attributes. You can do it in two ways: by addition/subtraction (Added component), and by multiplication (Multiplied Component). We strongly recommend the former.
Inside each component, you have an addend (a flat increase) and a multiplier, that is dependent on the stack size. Note how we set up Evading:
Because we have a MULTIPLIER in the ADDED component, the resulting Evasion modification is + “1 x Stacks”, so a character with Evading 5 would have an extra 5 to their Evasion stat. Pretty simple stuff! Most of our Attribute modifiers tend to use the stack size as the magnitude of the effect, и это’s how we do it.
But if you must, you can use the multiplied component to do things like “-50% власть” или “Move x2”. Просто будь осторожен, special with Armor and Health, as these are further modified by the Nourishment system.
Повреждать и Healing Modifiers change how a unit deals or receives damage, in a pretty similar way. You do have access to a few more things here, хотя. Позволять’s take a look at Задняя пластина, the passive from Basilisk:
This sets up to “Reduce half the standard damage I’ll take if my conditions are met.”. Some of the new entries are obvious: Направление is if the modifier is for dealt or taken damage, и Тип sets if the damage/healing is Standard, Armor-only, or Health-only.
Сейчас, обратите внимание на Scaling Source – this is what will count as the “стопки” for the stack-based modifier. You got several options:
Backplates uses the sum of incoming life change (aka total damage), Но не стесняйтесь исследовать.
But the star of the show here is the Условия. We talked about them in other guides before, but let’s break down the 2 conditions that Backplates have.
- makes it so that only if the target is NOT at or below 1.5 range will this effect work – то есть. only on Ranged attacks.
- works as sort of an exception as well – only if the ability being used is NOT a spell. We tend to not allow Spells to be reduced by damage reduction effects, to reflect their otherworldly nature.
Most of the entries in the Conditions are just to qualify the condition, but note the “Condition Type”, что’s where you’ll decide which is the actual condition, and which of the other entries will be relevant. Например, тот Связь entry only matters for the “Matches Relation” condition type. We recommend leaving those you aren’t using in their default values.
Unit States
An interesting use for Status Effects is to add “Unit States” to a unit. Там’s a substantial list including many things, mostly centered around disabling the “normal rules” a unit has – AP gathering, enabling skills, that sort of stuff. Most of the list is self-explanatory, but note the last three:
If your conditions and effects relate to taunters, last hitters (last unit that damaged affected unit) and last target, you might use these effects here so that the player can have an extra UI item showing which unit is which, вот так:
In the current design, мы не делаем’t use these effects very often, but you can have some interesting effects, like dealing extra damage to the unit that just attacked you.
Activated Actions
This is where it gets a bit more complicated. Понимаете, whenever some actions happen in game, like a character taking damage or someone dying, all Status Effects in play can receive a notification of that event, and then do something. These are the Activated Actions, и это’s where a lot of our complex Status Effect Behavior comes from.
Позволять’s take a look at Берсерк. Здесь’s how it looks in-game:
Note how it has a growing и decaying характеристики. These are based on Activated Actions!
Здесь’s how a normal decay rule, seen in a lot of effects including this one, is set up:
Description ID is used in determining description items. Помнить Гореть, from the top of the document? The {Повреждать} keyword refers to an activated action set up with “Повреждать” as its description ID.
Затем, у вас есть Trigger Time, which determines the event this status effect will listen to. Each trigger time has in parentheses the actual properties you can listen to in this event, defined in the Trigger Source.
Начало поворота, the one we used for Берсерк’s decay rule, only listens to a Warband match, so that’s the only one we fill in, describing that it is when the turn starts for the affected unit’s warband.
But the set up for the “grow when attacking” is a bit more complicated:
We qualify that the Hit Unit (Primary unit) can be whomever, но Злоумышленник (Secondary Unit) needs to be the affected unit, and it must be using a valid Способность – not dealing damage from status effects or ground effects or whatever.
Обратите внимание: whenever the Trigger lists two units (such as Attacker and Target), the first one is the Primary Unit, и второй, the Secondary unit. These can sometimes be messy to keep track.
The next important thing here is to define an Action Type. This is what kind of effects can be used. Здесь’s a rundown on how to use them, with the caveat that Stack Amount does not need to be about stacks – its Add/mul like most number operations we got.
- Лечить / Повреждать: Modifies the life of a given unit, based on the Stack Amount and Life Change type.
- Show Effect Preset: Good for one-off VFX triggers. We use it constantly with the buff/debuff arrows
- Grant Action Points: Also uses Stack Amount.
- Use Ability: Great for complex behaviors. Remember to set up Auto-targetting in a way that respects the ability targeting. This Action type ignores cooldowns, АП, все это, so it’s best to make unique ability files to use here.
- Expire instantly expires this status effect.
- Gain Reaction Turn makes the affected unit able to act immediately after the trigger, with an amount of AP that you determine in the Stack Amount.
- Apply Aura grants the specified aura with the specified power to the unit.
- Animation States are deprecated.
- Reset Ability Cooldown does exactly that to a listed ability.
- Modify Stacks is commonly used to decay or grow rules, using the Stack Amount.
- Modify Ability Charges/Cooldown can be used to increase or decrease these properties in any listed ability. Great for “reset CD on kill” или подобные эффекты.
- Cancel Reactions / Delayed Abilities remove a listed vigil-type or delayed ability. More about those on our Ability guide.
- Grant Mana grants mana to someone’s warband, based on stack amount
- Show Combat Message allows you to put a small text message on top of the unit when this triggers, defined in the Combat Message entry. As any text entry, it uses identifiers and strings. В качестве примера, Мерлин’s passive effect is “HOM.CombatMessage.Prophecy = Triggered – Пророчество”
Status effects are our most powerful tool, so feel free to explore and mess around with. There are multiple examples to look for both simple and complex behaviors in our folders, Удачи!
Это все, чем мы делимся сегодня для этого. Рука Мерлина гид. Это руководство было первоначально создано и написано Мибс. На случай, если нам не удастся обновить это руководство, вы можете найти последнее обновление, следуя этому связь.