Difference between revisions of "Skill creation"
Line 63: | Line 63: | ||
''Example:'' Battering Ram has a HitRadius of 1, meaning the character can hit characters or objects in a 2m wide path. | ''Example:'' Battering Ram has a HitRadius of 1, meaning the character can hit characters or objects in a 2m wide path. | ||
+ | == Requirements == | ||
+ | |||
+ | * '''Requirement''', a weapon requirement: StaffWeapon, MeleeWeapon, RangedWeapon, DaggerWeapon, ShieldWeapon, None | ||
+ | * '''Requirements''', conditional requirements: Combat, Immobile (typically checking !Immobile for teleport skills) | ||
+ | * '''Memorization Requirements''', ability requirements (e.g., RangerLore 2, or Sneaking 1) to memorize the skill | ||
== Conditions == | == Conditions == | ||
Line 75: | Line 80: | ||
Conditions can include Character, Self, Nonself, Ally, Party, Player, Enemy, Item, Dead, Summon, NonSummon, MySummon, Owner, Party, Combat, Locked, AllowDead, FacingMe, CanPickup, HasStatus, InSurface, Surface. | Conditions can include Character, Self, Nonself, Ally, Party, Player, Enemy, Item, Dead, Summon, NonSummon, MySummon, Owner, Party, Combat, Locked, AllowDead, FacingMe, CanPickup, HasStatus, InSurface, Surface. | ||
− | '' | + | ''Note'': Combat should generally be a requirement, not a condition. |
+ | |||
+ | '''Examples''' | ||
* NonSelf;Ally;!Dead;NonSummon // only target alive, non-summon allies (not including the caster) | * NonSelf;Ally;!Dead;NonSummon // only target alive, non-summon allies (not including the caster) | ||
Line 83: | Line 90: | ||
* (InSurface:SurfaceFire)|(HasStatus:BURNING)|SurfaceFire // target either entities standing in fire or burning, or a fire surface directly. | * (InSurface:SurfaceFire)|(HasStatus:BURNING)|SurfaceFire // target either entities standing in fire or burning, or a fire surface directly. | ||
− | * | + | * !Dead&((!Enemy&!DamagedOnHeal)|(Enemy&DamagedOnHeal)) // (Chain Heal) target living allies that aren't damaged by healing (undead or decaying touch), but also target enemies if they are damaged by healing |
Line 90: | Line 97: | ||
The "SkillProperties" parameter gives skills status effects and a few other specific effects. Like conditions, skill properties can take simple logic. | The "SkillProperties" parameter gives skills status effects and a few other specific effects. Like conditions, skill properties can take simple logic. | ||
− | * '''Statuses''', in the form of "''STATUS, | + | * '''Statuses''', in the form of "''STATUS,Chance,Duration.''" |
− | * '''AOE dependent statuses''', with AOEBOOST | + | * '''AOE dependent statuses''', with ''AOEBOOST:STATUS,Chance,Duration'' |
− | * '''Surface creation''', in the form of "''CreateSurface,Radius,?,SurfaceType,Chance,Duration?''" | + | * '''Surface creation''', in the form of "''CreateSurface,Radius,?,SurfaceType,Chance,Duration?''" |
+ | * '''Target surface creation''', surfaces appear only on targets with ''TargetCreateSurface.'' | ||
+ | * '''Cone surface creation''', surfaces appears in a cone area ''TargetCreateConeSurface''. | ||
* '''Surface manipulation''', such as ''ignite'' or ''curse''. | * '''Surface manipulation''', such as ''ignite'' or ''curse''. | ||
− | * '''Backstab conditions''', including ''AlwaysBackstab'' and ''CanBackstab'' | + | * '''Resurrect''', Revive a character with ''Resurrect,Chance?,VitalityOnRevived''. |
+ | * '''Backstab conditions''', including ''AlwaysBackstab'' and ''CanBackstab''. | ||
* '''High ground''', use ''AlwaysHighGround'' to always grant a skill high ground bonuses. | * '''High ground''', use ''AlwaysHighGround'' to always grant a skill high ground bonuses. | ||
− | * '''Equalize''', take vitality and armor percentages and equalize them among certain targets with Equalize, TargetType | + | * '''Equalize''', take vitality and armor percentages and equalize them among certain targets with ''Equalize, TargetType''. |
* '''Summon''', for specific instances, you can summon characters with ''Summon,Template,Duration,SummonType,?.'' SummonType is totem or '-', for non-totem? | * '''Summon''', for specific instances, you can summon characters with ''Summon,Template,Duration,SummonType,?.'' SummonType is totem or '-', for non-totem? | ||
− | * '''Source''', steal source points with DRAIN,???? | + | * '''Source''', steal source points with ''DRAIN,????''. |
− | * '''Sabotage''', blow up a random arrow or grenade in an inventory with | + | * '''Swap''', Swap places with your target with ''SwapPlaces,?,?,Effect,Effect''. |
− | * '''Movement based damage''', with DAMAGE_ON_MOVE,Chance,Duration,?,? | + | * '''Sabotage''', blow up a random arrow or grenade in an inventory with ''Sabotage,Amount.'' |
+ | * '''Movement based damage''', with ''DAMAGE_ON_MOVE,Chance,Duration,?,?''. | ||
==== Examples ==== | ==== Examples ==== | ||
Line 117: | Line 128: | ||
|- | |- | ||
| Equalize,All; Sabotage,1 || Equalize the health of a group of targets, and explode 1 random arrow or grenade in each of their inventories. | | Equalize,All; Sabotage,1 || Equalize the health of a group of targets, and explode 1 random arrow or grenade in each of their inventories. | ||
+ | |- | ||
+ | | Resurrect,500,20 || Revive a character with 20% vitality. | ||
|- | |- | ||
| SELF:IF(Surface:Fire):ARROWHEAD_FIRE,100,2 || If targeting a fire surface, apply fire damage buff to yourself for 2 turns. | | SELF:IF(Surface:Fire):ARROWHEAD_FIRE,100,2 || If targeting a fire surface, apply fire damage buff to yourself for 2 turns. | ||
Line 126: | Line 139: | ||
| Ignite;Melt;Contaminate || Explode existing oil and poison surfaces, melt ice, and turn water into poison | | Ignite;Melt;Contaminate || Explode existing oil and poison surfaces, melt ice, and turn water into poison | ||
|- | |- | ||
− | | TARGET:IF(Tagged:INCARNATE_S&(InSurface:SurfaceFire | + | | TARGET:IF(Tagged:INCARNATE_S&(InSurface:SurfaceFire|InSurface:SurfaceLava)):INF_FIRE,100,-1 || If target is incarnate and in fire or lava, permanently grant fire infusion. |
|- | |- | ||
− | | TARGET:IF(HasStatus:BLEEDING | + | | TARGET:IF(HasStatus:BLEEDING|InSurface:SurfaceBlood):DECAYING_TOUCH,100,2 || If target is bleeding or standing in blood, then apply decaying touch. |
|} | |} | ||
+ | |||
+ | |||
== Best Practice == | == Best Practice == |
Revision as of 18:35, 10 September 2017
You can edit or create a wide array of skills with the Stats editor. While the skill creator is quite powerful, complex skills may require scripting. Almost any kind of skill is possible, though some things are more difficult than others. Skills, like most stats, can be edited in both the editor's stat editor and directly in a text editor. Both have their advantages, though it is recommended you start with adding skills in the stat editor.
Contents
Skill Type
Skill Type determines the fundamental behavior of the skill and what parameters are available to edit.
- Target, usually affects one target with a non-projectile effect.
- Shout, a self-buff or area of effect skill.
- Projectile, fires one or more projectiles along a preset path. Can be used for a self-jump as well.
- ProjectileStrike, a series of projectiles which rain from the sky rather than originating from the caster.
- Cone, cause an effect in a cone shape determined by angle and range.
- Zone, cause an effect in a rectangular or square shape
- Jump, a self-teleport skill.
- MultiStrike, a self-teleport skill that is also an attack.
- Rush, a directional movement skill that requires a walkable path.
- Teleportation, a teleportation of one or more characters
- Summon, create one or more characters or objects.
- Wall, create one or more characters or objects.
- Dome, create a persisting area of effect with a dome visual.
- Rain, a large area of effect skill that usually changes the atmosphere and creates a distribution of surfaces.
- Storm, a large area of effect skill that usually changes the atmosphere and creates a distribution of surfaces, as well as raining projectiles down.
- Tornado, a large area of effect skill that usually clears surfaces and statuses.
- Quake, a large area of effect skill with screen shake and ground-based visual effects.
Basic Parameters
Every skill requires the following parameters to be filled out.
- Entry, a unique name so that the skill can be referenced in scripts or other locations. Usually a structure of "Skilltype_Skillname."
- Ability, Which ability tree this skill belongs to, which determines how it is sorted in the skill menu and which primary attribute scales its damage. Can be None.
- Level, (?)What level this skill scales to. All existing skills are set to -1 level, which means the skill's damage scales with character level.
- Tier, (?)
- ActionPoints, how many action points the skill costs.
- Cooldown, the cooldown in turns. Can be set to -1 for a once per combat skill.
- Memory, the memory cost
- Magic Cost, How many source points the skill costs
Damage
- Damage Multiplier, the base damage, "100" being an average damage skill, or using exact weapon damage if is a weapon skill.
- Damage Range, the percentage of variation in damage.
- DamageType, the type of damage.
- Damage, an optional source of the damage amount which can take the caster or target's current or maximum armor or vitality
- UseWeaponDamage, if yes, multiplies your weapon damage by the Damage Multiplier
- UseWeaponProperties, if yes, the skill can inflict on chance hits of your weapon and other properties, like "ignite."
- DivideDamage, if yes, splits the damage among the targets or projectiles you fire.
- Stealth Damage Multiplier, multiplies the damage if you are in stealth.
- Distance Damage Multiplier, the percentage extra damage you gain per 1m farther away you are from a target.
Range
- TargetRadius, How far a Target, Projectile, or Teleportation, skill can reach
- AreaRadius, How far an area of effect a shout or rain spell can reach from the caster, or the area of effect of a target or projectile skill.
- ExplodeRadius, The area of effect that a projectile deals damage in. This is often but not always the same as AreaRadius.
- AddWeaponRange, (?) If your weapon range is greater than the primary range factor, than it takes into your weapon range into account.
- Range, The range of a cone or zone skill like Ground Slam.
- HitRadius, Typically the area of effect of a teleporting or rushing character.
- AddRangeFromAbility, (?)
Example: Ricochet has a TargetRadius of 13 for the initial target, an AreaRadius of 5 for determining the area the projectile can bounce to other enemies, and an ExplodeRadius of 0, so that the arrow does not deal damage to multiple enemies each time it hits an enemy.
Example: Whirlwind has an AreaRadius of 3, but has AddWeaponRange as yes, so a spear with 3.5m weapon range will have half a meter more range.
Example: Battering Ram has a HitRadius of 1, meaning the character can hit characters or objects in a 2m wide path.
Requirements
- Requirement, a weapon requirement: StaffWeapon, MeleeWeapon, RangedWeapon, DaggerWeapon, ShieldWeapon, None
- Requirements, conditional requirements: Combat, Immobile (typically checking !Immobile for teleport skills)
- Memorization Requirements, ability requirements (e.g., RangerLore 2, or Sneaking 1) to memorize the skill
Conditions
- TargetConditions, what conditions targets must meet to be direct targets of this skill. This can include simple logic, like "IF", "not" (!), "and" (&), "or" (|), and parentheses.
- AOEConditions, conditions for an AOEBoost skill property.
- ForceTarget, If yes, you cannot cast this without targeting a valid target (e.g., no targeting terrain)
- CanTargetCharacters, if yes, can target characters
- CanTargetItems, If yes, can target items.
- CanTargetTerrain, If yes, you can target the terrain. Useful for skills that can manipulate surfaces, like Shocking Touch. Also good for area of effect attacks like Ground Slam, where you might want to target a space inbetween two characters to hit them both. Otherwise, make this no to prevent accidental casts.
Conditions can include Character, Self, Nonself, Ally, Party, Player, Enemy, Item, Dead, Summon, NonSummon, MySummon, Owner, Party, Combat, Locked, AllowDead, FacingMe, CanPickup, HasStatus, InSurface, Surface.
Note: Combat should generally be a requirement, not a condition.
Examples
- NonSelf;Ally;!Dead;NonSummon // only target alive, non-summon allies (not including the caster)
- Tagged:UNDEAD;FacingMe // only target undead characters that are facing you (e.g., for a holy light spell)
- (InSurface:SurfaceFire)|(HasStatus:BURNING)|SurfaceFire // target either entities standing in fire or burning, or a fire surface directly.
- !Dead&((!Enemy&!DamagedOnHeal)|(Enemy&DamagedOnHeal)) // (Chain Heal) target living allies that aren't damaged by healing (undead or decaying touch), but also target enemies if they are damaged by healing
Skill Properties
The "SkillProperties" parameter gives skills status effects and a few other specific effects. Like conditions, skill properties can take simple logic.
- Statuses, in the form of "STATUS,Chance,Duration."
- AOE dependent statuses, with AOEBOOST:STATUS,Chance,Duration
- Surface creation, in the form of "CreateSurface,Radius,?,SurfaceType,Chance,Duration?"
- Target surface creation, surfaces appear only on targets with TargetCreateSurface.
- Cone surface creation, surfaces appears in a cone area TargetCreateConeSurface.
- Surface manipulation, such as ignite or curse.
- Resurrect, Revive a character with Resurrect,Chance?,VitalityOnRevived.
- Backstab conditions, including AlwaysBackstab and CanBackstab.
- High ground, use AlwaysHighGround to always grant a skill high ground bonuses.
- Equalize, take vitality and armor percentages and equalize them among certain targets with Equalize, TargetType.
- Summon, for specific instances, you can summon characters with Summon,Template,Duration,SummonType,?. SummonType is totem or '-', for non-totem?
- Source, steal source points with DRAIN,????.
- Swap, Swap places with your target with SwapPlaces,?,?,Effect,Effect.
- Sabotage, blow up a random arrow or grenade in an inventory with Sabotage,Amount.
- Movement based damage, with DAMAGE_ON_MOVE,Chance,Duration,?,?.
Examples
SkillProperties | Effect |
---|---|
BLEEDING,100,2 | 100% chance to set bleeding for 2 turns |
AOEBOOST:HARMONY,100,2 | Heal the target according to the number of allies within range (determined by area radius and AOEboost Conditions) |
CreateSurface,2,,Fire,100,2 | 100% chance to create a circle of fire with 2m radius that lasts 2 rounds. |
CLEANSE_WOUNDS,100,1;TargetCreateSurface,1,,Water | Heal targets and create water of 1m radius under them. |
Equalize,All; Sabotage,1 | Equalize the health of a group of targets, and explode 1 random arrow or grenade in each of their inventories. |
Resurrect,500,20 | Revive a character with 20% vitality. |
SELF:IF(Surface:Fire):ARROWHEAD_FIRE,100,2 | If targeting a fire surface, apply fire damage buff to yourself for 2 turns. |
TARGET:IF(Tagged:INCARNATE_S):INF_FIRE,100,-1 | If targeting an incarnate, permanently grant it fire infusion |
Summon,4cd5defc-5d36-4d76-b606-b6ca69a13617,4,totem,Target_DummyTargetSkill; | Summon a bone totem for 4 turns. |
Ignite;Melt;Contaminate | Explode existing oil and poison surfaces, melt ice, and turn water into poison |
TARGET:IF(Tagged:INCARNATE_S&(InSurface:SurfaceFire|InSurface:SurfaceLava)):INF_FIRE,100,-1 | If target is incarnate and in fire or lava, permanently grant fire infusion. |
TARGET:IF(HasStatus:BLEEDING|InSurface:SurfaceBlood):DECAYING_TOUCH,100,2 | If target is bleeding or standing in blood, then apply decaying touch. |
Best Practice
When designing skills, consider the niche it fills and what sort of flavor it has. Try to make the skill feel distinct, but easy to understand. A little flavor text and a good name can go a long way to making a skill interesting.
If you want the AI to use new skills intelligently, avoid scripting if you can. The AI can adapt to new skills, and can interpret the value of statuses with simple stat bonuses pr reductions. In general, a skill that does not depend on scripts will have less opportunity for bugs.
If AI use is not a priority, and you've exhausted possibilities within the stats editor, then scripting can open up new opportunities. In general, the easiest way to script a skill is to have the skill apply a custom status, and use the OnStatusApplied(__Me,YOURSTATUS) trigger in a character script that every character this skill can be used on has (e.g., Base, or "Player" if this skill is only cast on players.)