NIFE: Weapons v3
Posted: Posted August 13th, 2018 by Xhin
This update to the weapons system adds a ridiculous amount of functionality to NIFE Combat.
The effects "Pierce Shields", "Edit status effects" and "Sacrifice" have been replaced by a Weapon Effects system that can do all of those things and can do 40 different things in all.
Let's look at these new changes:
First part of this update, I organized all the weapon editing panels. Special stuff has been merged into the Weapon effects system, which cleans things up a lot.
There are also Weapon Attack and Weapon Kill event triggers, which fire when the weapon attacks and kills respectively. These event triggers use the #attacker, #weapon and #defender hashtags, which let you use them to get even more functionality.
To simplify things, I've sorted weapon effects into six Subplugins, which can be turned on or off from this panel to make your list smaller as needed. I'll cover all the weapon effects at the bottom of this post.
Adding new weapon effects should be straightforward.
Editing weapon effects should also be straightforward, if you've worked with NIFE's Events/Conditions/Potions systems at all.
You get to choose the likelihood of a weapon effect occuring via the "chance" column. So now you can have weapons that only Pierce Shields some of the time for example.
Weapon effects also conveniently show up next to the weapon, much like potion effects and condition effects show up. If the chance of something occuring isn't 100%, this area will show the chance of that weapon effect occuring.
Weapon Effects Short Guide
This sections covers the short terms used in Weapon Effects since there's a lot of repeats of them:
Self -- Refers to the weapon itself
Master -- Refers to the character who is attacking with the weapon
Prey -- Refers to the character being attacked by the weapon
Room -- Refers to the room the battle is happening in
Home -- Refers to an arbitrary character who can be anywhere. Think of it as the weapon's creator or something.
Luck -- Refers to the chance of one of the weapon's effects, chosen at random.
Cost -- This type of effect consumes some amount of a property in the exact same way magical attacks work. Magical attacks are actually obsolete, but I'm leaving them alone because redundancy is good sometimes.
Link -- This type of effect boosts the weapon's base damage according to a specific property.
Bond -- This type of effect absorbs some of the weapon's final damage into a specific property.
Morph -- This effect turns the weapon into another weapon temporarily, including all damage, effects, etc.
Cut -- This type of effect unequips a random piece of equipment from the defender according to whatever the type is
Break -- This type of effect Cuts the equipment but then also applies the "Broken" trait to it, that has to get repaired before it can be equipped again.
So a PreyLink set to Defense for example would boost the weapon's attack by the Defense stat of the character who's being attacked,
A MasterMorph would temporarily transform the weapon into a weapon owned by the character wielding the weapon,
A RoomCost for the Ambience stat would require that the weapon suck Ambience out of the room before it can be used.
And so on.
Weapon Effects Long Guide
This guide lists out every single effect, the variables that belong to it, and what the effect actually does.
Anywhere you see "TYPE" -- this is a select box where you can decide whether the Amount indicated is an absolute amount or a percentage of the property's maximum value.
Miss -- The chance of the attack missing completely. The cost is still calculated, but the weapon just doesn't find a target.
Misfire -- The chance of the attack hitting someone else in the room. It can't hit you this way.
Recoil -- The chance of the attack hitting you instead of the character you're attacking.
Selfcost (Stat, Amount, TYPE) -- Costs the weapon a specific amount of one of its stats
Mastercost (Stat, Amount, TYPE) -- Costs the attacker a specific amount of one of their stats
Preycost (Stat, Amount, TYPE) -- Costs the character attacked a specific amount of one of their stats
Roomcost (Stat, Amount, TYPE) -- Costs the room itself a specific one of its stats
Homecost (Entity, Stat, Amount, TYPE) -- Costs an arbitrary entity (Room,Character,Item) a specific amount of one of its stats
Luckcost (Amount) -- Takes its cost from the chance of one of the weapon's own effects. For example, if you had a 100% chance of a Luckcost set to 20 and a 100% chance of a Selflink, the weapon would either lose 20% chance for its Luckcost or its Selflink.
The Amount field in Links indicate a percentage of that stat's value. A selflink of Ammo(50) for example would boost the weapon's damage by 50% of the amount of ammo it had.
Selflink (Stat, Amount) -- Boosts weapon damage based on one of the weapon's stats.
Masterlink (Stat, Amount) -- Boosts weapon damage based on one of the attacker's stats.
Preylink (Stat, Amount) -- Boosts weapon damage based on one of the character being attacked's stats
Roomlink (Stat, Amount) -- Boosts weapon damage based on one of the room's stats
Homelink (Entity, Stat, Amount) -- Boosts weapon damage based on a stat of an arbitrary entity which could be anywhere.
Morphs don't necessarily always occur.. the Chance field is useufl here, so that weapons can morph sometimes but not always.
Morph (Weapon) -- Morphs into this specific weapon.
Familymorph (Item Property) -- Morphs into one of the weapons that shares this item property.
Mastermorph -- Morphs into one of the attacker's weapons
Preymorph -- Morphs into one of the defender's weapons
Homemorph (Character) -- Morphs into a weapon of a specific arbitrary character.
Pierce (Part of the Special Techniques plugin)
Pierce Shields -- In combat, Shields are bypassed and damage is dealt to the defender directly.
Pierce Defense -- In combat, the defender's defense is ignored and the damage isn't reduced.
Add Status Effect (Status Effect, Hours)
Remove Status Effect (Status Effect)
Add Protection (Status Effect, Hours)
Remove Protection (Status Effect)
Add Poison Effect (Amount, Stat, Hours)
Add Regen Effect (Amount, Stat, Hours)
Add Finite Effect (Amount, Hours)
These should be straightforward. Adds or removes status effects as well as status effect protection.
Selfbond (Stat, Amount, TYPE) -- Takes a certain amount of the final damage and adds it to one of the weapon's stats.
Masterbond (Stat, Amount, TYPE) -- Takes a certain amount of the final damage and adds it to one of the attacker's stats.
Preybond (Stat, Amount, TYPE) -- Takes a certain amount of the final damage and adds it to one of the character being attacked's stats.
Roombond (Stat, Amount, TYPE) -- Takes a certain amount of the final damage and adds it to one of the room's stats.
Luckbond (Amount) -- Takes a percentage of the damage and adds it to a random weapon effect chance, making that effect more likely to occur.
Homebond (Entity, Stat, Amount, TYPE) -- Takes a percentage of the damage and adds it to an arbitrary entity's stats.
Cut Armor -- Unequips a piece of the defender's armor. Armor is anything that can be equipped and boosts stats.
Break Armor -- Cuts their armor, and also breaks it so it can't be equipped again without fixing it.
Cut Shields -- Unequips one of the defender's shields.
Break Shields -- Cuts the shield and also breaks it so it can't be equipped again without fixing it.
Disarm -- Randomly unequips one of the defender's equipped weapons.
These techniques in particular should be useful for NPC fights.
I haven't tested anything whatsoever as far as actual combat goes. The code looks clean, but there's something ridiculous like ~2000 new lines of code in there so I'm going to be testing over the next few days. In the meantime, use at your own risk!
With this update, the last major plugin in NIFE Alpha is done. I have some minor things to do and kind of a lot of documentation, but hopefully if I keep this pace up I might be able to launch NIFE outside of GTX0 somewhere near the end of the month.
This next week I'm going to be extremely busy IRL, so any NIFE time I spend will be testing this feature or doing minor tasks or planning.
There are 2 Replies
Reply to: NIFE: Weapons v3