Coder Social home page Coder Social logo

bettercombateffects's Introduction

Better Combat Effects

Build FG Extension Luacheckrc Markdownlint

Current Version: dev_version
Updated: date

Better Combat Effects is an extension that allows for fine tuning of when effects are enabled, disabled, removed, and added.
Comments and Bug Reports

Better Combat Effects supports Effect Builder, a GUI for building effects
Effect Builder
Effect Builder Plugin 5E
Effect Builder Plugin 35E/PFRPG

Modifier Tags

Modifier Value Descriptors Notes Ruleset
Add Effect
DMGA (D) [damage type]* Apply damage when the effect is added
REGENA (D) One time regeneration when the effect is added
SAVEA (N) or [SDC] [ability] (R) (RA) (D) (H) (M) (F) Roll ongoing save when effect is added where (N) is a number or [SDC] 5E 3.5E PFRPG SFRPG
TREGENA (D) One time regeneration to temporary HP when the effect is added
Attack
TKDS (-) DEACTIVATE effect if the source of the effect is attacked 4E
Damage
DMGAT (-) Activate effect when damage is taken
DMGDT (-) Deactivate effect when damage is taken
DMGRT (-) Remove effect when damage is take
TDMGADDT (-) [effect]* or [condition]* TARGET of the attack will add an effect to the TARGET (itself) when damage is done
TDMGADDS (-) [effect]* or [condition]* TARGET of the attack will add an effect to the SOURCE of the attack when damage is done
SDMGADDT (-) [effect]* or [condition]* SOURCE of the attack will add an effect to the TARGET when damage is done
SDMGADDS (-) [effect]* or [condition]* SOURCE of the attack will add an effect to the SOURCE (itself) when damage is done
DMGR (D) or (.N) [damage type]* ,all, [range]* Reduce the raw damage (before resistances) by (D) or when a decimal between 0-1 reduce raw damage by percentage 5E 4E
SAVEONDMG (N) or [SDC] [ability] (R) (RA) (D) (H) (M) (F) Roll ongoing save when the Actor's takes damage where (N) is a number or [SDC] 5E 3.5E PFRPG SFRPG
Expire Effect
EXPIREADD (-) [effect]* or [condition]* Add effect or condition when this effect expires
Misc
DC (N) (N) will be added to the [SDC] when [SDC] is automatically replaced 5E
DUR (N) (-) Sets this effects duration to (N) when applied
Ongoing Damage
DMGOE (D) [damage type]* Apply ongoing damage at the END of the Actor's turn
SDMGOS (D) [damage type]* Apply ongoing damage at the START of the Actor's turn who applied the effect
SDMGOE (D) [damage type]* Apply ongoing damage at the END of the Actor's turn who applied the effect
Ongoing Regeneration
REGENE (D) Apply regeneration at the END of the Actor's turn
SREGENS (D) Apply regeneration at the START of the Actor's turn who applied the effect
SREGENE (D) Apply regeneration at the END of the Actor's turn who applied the effect
STREGENS (D) Apply regeneration to temporary HP at the START of the Actor's turn who applied the effect
STREGENE (D) Apply regeneration to temporary HP at the END of the Actor's turn who applied the effect
TREGENS (D) Apply regeneration to temporary HP at the START of the Actor's turn
TREGENE (D) Apply regeneration to temporary HP at the END of the Actor's turn
Ongoing Save
SAVES (N) or [SDC] [ability] (R) (RA) (D) (H) (M) (F) Roll ongoing save at the START of the Actor's turn where (N) is a number or [SDC] 5E 3.5E PFRPG SFRPG
SAVEE (N) or [SDC] [ability] (R) (RA) (D) (H) (M) (F) Roll ongoing save at the END of the Actor's turn where (N) is a number or [SDC]where (N) is a number or [SDC] 5E 3.5E PFRPG SFRPG
SAVEDMG (D) [damage type]* Damage done on failed ongoing save 5E 3.5E PFRPG SFRPG
SAVEADD (-) [effect]* or [condition]* Add effect or condition on a failed ongoing save 5E 3.5E PFRPG SFRPG
SAVEADDP (-) [effect]* or [condition]* Add effect or condition on a successful ongoing save 5E 3.5E PFRPG SFRPG
Rest
RESTS (-) Remove effect when the Actor takes a short rest
RESTL (-) Remove effect when the Actor takes a short or long rest
Stack
STACK (-) Multiple of this effect is allow to be applied. The option "Allow Duplicate Effects" must be set to off 5E 3.5E PFRPG SFRPG
Turn
TURNAS (-) DEPRECATED - ACTIVATE effect on the START of the Actor’s turn
TURNDS (-) DEPRECATED - DEACTIVATE effect on the START of the Actor’s turn
TURNRS (-) DEPRECATED - REMOVE effect on the START of the Actor’s turn if current duration is 1
TURNAE (-) DEPRECATED - ACTIVATE effect on the END of the Actor’s turn
TURNDE (-) DEPRECATED - DEACTIVATE effect on the END of the Actor’s turn
TURNRE (-) DEPRECATED - REMOVE effect on the END of the Actor’s turn if current duration is 1
STURNRS (-) DEPRECATED - REMOVE effect on the START of the Actor’s turn who applied the effect if current duration is 1
STURNRE (-) DEPRECATED - REMOVE effect on the END of the Actor’s turn who applied the effect if current duration is 1
  • DEPRECATED = Will be removed in the future. Use Change State Cycler (see below)
  • (D) = Dice and numbers supported for value attribute
  • (N) = Only numbers supported for value attribute
  • (-) = Neither number nor dice supported for value attribute
  • (T) = Effects can be targeted to only apply to modifiers against certain opponents
  • [range] = melee, ranged
  • [damage type] = acid, cold, fire, force, lightning, necrotic, poison, psychic, radiant, thunder, adamantine, bludgeoning, cold-forged iron, magic, piercing, silver, slashing
  • [stat] = strength, constitution, dexterity, intelligence, wisdom, charisma
  • [ability] = STR, CON, DEX, INT, WIS, CHA, (FORTITUDE, REFLEX, WILL) - 3.5E
  • [skill] = any skill name
  • [effect] = Any effect label in the custom effect list. Effect label is defined as anything before the first ; i.e. My Custom; ATKDS; "My Custom" would be the effect label
  • [condition] = Any condition as noted above except exhaustion. Note [condition] must be all lower case
  • [SDC] = (5E only) [SDC] will be replaced by the 8 + Actors spellcasting ability modifier + [PRF]. Alternatively [SDC] can be explicitly defined such as 8,[INT],[PRF] or if [SDC] is to be calcualated by a particular stat, such as STR or INT, [SDC] can be written as [SDCSTR] or [SDCINT]
  • (R) will remove the save effect on a successful save
  • (RA) will remove the save effect on any save
  • (D) will disable the save effect on a successful save
  • (H) will deal half damage on a successful ongoing save
  • (M) will indicate this is magical so any creature will magic resistance will gain proper advantage on the save
  • (F) will invert the roll. SAVEDMG, (R), (RA), (D), (H) will be performed on a failed save rather than successful one
  • * = Multiple entries of this descriptor type allowed

Change State

A change state cycler has been added to the combat tracker, custom effects list, and Effect Dialog.

Icon Shorthand Description
Alt ATS ACTIVATE effect on the START of the ANY Actor’s turn
Alt DTS DEACTIVATE effect on the START of the ANY Actor’s turn
Alt RTS REMOVE effect on the START of the ANY Actor’s turn
Alt AS ACTIVATE effect on the START of the Actor’s turn
Alt DS DEACTIVATE effect on the START of the Actor’s turn
Alt RS REMOVE effect on the START of the Actor’s turn when the duration is 1
Alt AE ACTIVATE effect on the END of the Actor’s turn
Alt DE DEACTIVATE effect on the END of the Actor’s turn
Alt RE REMOVE effect on the END of the Actor’s turn when the duration is 1
Alt SAS ACTIVATE effect on the START of the Actor’s turn who applied the effect
Alt SDS DEACTIVATE effect on the START of the Actor’s turn who applied the effect
Alt SRS REMOVE effect on the START of the Actor’s turn when the duration is 1
Alt SAE ACTIVATE effect on the END of the Actor’s turn who applied the effect
Alt SDE DEACTIVATE effect on the END of the Actor’s turn who applied the effect
Alt SRE REMOVE effect on the END of the Actor’s turn who applied the effect when the duration is 1

Additionally, DUSE has been added to the APPLY cycler

Alt

Icon Shorthand Description
Alt DUSE DEACTIVATE effect when the effect has been used

Inline

Inline effects using the Change State cycler are written (S:<shorthand>) where <shorthand> is the shorthand notation. For Example:

[EFF: SomeEfffect; ATK: 1; (C) (D:10 MIN) (T:SELF) (A:ROLL) (S:AS)]

Examples

Power [Source] Effect Code Duration/Target/Expend Notes
Belt of Frost Giant Strength [Item] Belt of Frost Giant Strength; STR: 19-X Targeting=Self
Cloak of Displacement [Item], Displacer Beast [NPC] Displacement; GRANTDISATK; DMGDT Targeting=Self, ChangeState=AS
Deflect Missiles [Class - Monk] Deflect Missiles; DMGR: 1d10 [MONK],[DEX],ranged,bludgeoning,piercing Targeting=Self
Dominate Person [Spell] Dominate Person; SAVEONDMG: [SDC] WIS (R)
Dragon [NPC] Frightful Presence; Frightened; SAVEE: 16 WIS (R)
General Action Dodge Targeting=Self, ChangeState=RS
Ghoul [NPC] Ghoul Claws; SDMGADDT: GOTU Targeting=Self GTOU is an effect in the custom effects list
Ghoul [NPC] GOTU; Paralyzed; SAVEA10 CON (R)
Headband of Intellect [Item] Headband of Intellect; INT: 19-X Targeting=Self
Heavy Armor Master [Feat] Heavy Armor Master; DMGR: 3 slashing, bludgeoning, piercing, !magic Targeting=Self
Interception Fighting Style [Class - Fighter] Interception Fighting Style; DMGR: 1d10 [PRF],all
Turn Undead [Class - Cleric] Turn Undead; Turned; DMGRT Duration=1 Min
Shadow [NPC] Shadow; SDMGADDT: Strength Drain Target=Self Strength Drain is an effect in the custom effects list
Shadow [NPC] Strength Drain; STR: -1d4; STACK; RESTL
Shield of the 300 [Item] Shield of the 300; TDMGADDT: Shield of the 300 Bonus Targeting=self Shield of the 300 Bonus is an effect in the custom effects list
Shield of the 300 [Item] Shield of the 300 Bonus; AC: 1; STACK ChangeState=RS
Sleep [Spell] Sleep; Unconscious; DMGRT Duration=1 Min
Spirit Guardians (Spell) Spirit Guardians; (C); AURA: 15 enemy,neutral,single; ($) Spirit Guardians; IF: FACTION(!self); SAVEA: [SDC] WIS (M) (H); SAVES: [SDC] WIS (M) (H); SAVEDMG: 3d8 radiant Targeting=Self Requires Aura Extension
Storm Desert [Class - Barbarian] Storm Desert; AURA: 10 all; Barbarian Raging Storm Desert; DMGA: 2 fire Targeting=Self Requires Aura Extension
Stunning Strike [Class - Monk] Stunning Strike; Stunned Duration=1 Rnd, ChangeState=SRE
Vitriolic Sphere [Spell] Vitriolic Sphere; DMGOE: 5d4 acid Duration=2 Rnd
Wall of Thorns [Spell] Wall of Thorns; SAVEE7d8 slashing
Water Elemental [NPC] Water Elemental Whelm; grappled; restrained; SDMGOS: 2d8+4 bludgeoning
Web [Spell] Web; Restrained; SAVES: [SDC] DEX (C)

Migrate Deprecated Effects

Deprecated change state tags can be auto migrated for a campaign with the Effects Migrator. A popup box will appear when the table is started such as below. Alt

It is highly recommended the campaign is backed up before performing migration.

Preview will produce a story entry of the migration changes without writing those changes to the database. Review these changes prior to migration. Some changes may be suggested to effects that do not change state and those changes are likely cleanup of extra whitespace or ;

Alt

If the suggested changes are acceptable, use Migrate to migrate effects to the new change state cycyler. This will also create a story entry detailing the changes made to the database. You may want to delete these story entries after the migration, especially if you are creating a module for distribution.

You can also bring up the migrate effects popup with the slash command: /migrate_effects

Options

Name Default Options Notes Ruleset
Allow Duplicate Effects on off/on When off, will not allow duplicate effects (same name, duration, actor who applied the effect) on an Actor 5E
Consider Duplicate Duration off off/on When on, considers Concentration duration when determining if previous concentration effects should expire 5E
Deprecate Change State Tags off off/on When on, TURNAS, TURNDS, TURNRS, TURNAE, TURNDE, TURNRE, STURNRS, STURNRE will no longer process and there is a performance increase on change of turn
Experimental: Autoparse NPC Powers off off/on When on, will autoparse powers and automatically create effects for: DMGOE, SDMGOS, SDMGEOE, TURNRS, TURNRE, STURNRS, STURNRE, SAVES, SAVEE 5E
Restrict Concentration off off/on When on, expires any previous spells with concentration (C) when a new concentration spell is cast 5E
TempHP Reduction is Damage on off/on For purposes of determining if something should happen if an actor takes damage. When off, if an actor takes damage that reduces their Temp HP only and NOT their HP (takes wounds), that reduction is not considered damage

Add Effect on Damage Modifiers

Effects can be automatically added to the source or the target on the damage by either the source of the damage or the target of the damage. For this to work we need two different effects. Example:

  • Shadow; SDMGADDT: Strength Drain

The Shadow has strength drain so we put the above effect on the shadow. When the shadow deals damage, it will apply the effect "Strength Drain" to the target of the damage. The effect "Strength Drain" needs to be an effect listed in our custom effects list or conditions table. The effect looks like this:

  • Strength Drain; STR: -1d4; STACK; RESTL

bettercombateffects's People

Contributors

rhagelstrom avatar bmos avatar

Watchers

 avatar

bettercombateffects's Issues

3.5E Script error nil compare

https://www.fantasygrounds.com/forums/showthread.php?68831-Better-Combat-Effects&p=640827&viewfull=1#post640827

Since the last update, applying damage in a 3.5e campaign does not work anymore. Fresh 3.5 test campaign with only BCE attached, it only contains a PC and a goblin. Hit the goblin with the dagger, then try to apply damage, and the error occurs. No Effects even used:
[ERROR] Handler error: [string "scripts/manager_action_damage.lua"]:1217: attempt to compare nil with number

This seems to be the following line from the 3.5e ruleset package:
elseif nDamage < 0 the
from the
function decodeDamageText(nDamage, sDamageDesc)

3.5 Script Error on Damage

https://www.fantasygrounds.com/forums/showthread.php?68831-Better-Combat-Effects&p=648979&viewfull=1#post648979

Pathfinder 1E

We went to play today and Damage and healing would not apply in automated way (spells, melee, NPC to PC, PC to NPC...) (so any Hp adjustments) and had to be manually dealt with on the CT. everything was working around 2 weeks ago when tested last.

This is the error:
Handler error: [string "scripts/manager_action_damage.lua"]:2005: attempt to compare nil with number

We run ALOT of extensions and removing yours makes everything work. I will try and take the time to find the other extension it is probably conflicting with. I have a list of most of my extensions in my signature.

Starfinder Ideas

  • SF has another HP pool called Stamina Points that are depleted before HPs. If you can figure out a way to regenerate those like you can do with HP and TEMP already. In effects that is, the heal dialogue has an option for it.
  • Starfinder has something called fortification its a thing where if you get hit by a critical hit you roll a d100 and you have a certain percentage to make it a normal hit instead.

Aura - Multiple targets entering

Good Day Rhagelstrom
Love this extension! So many improvements to FG!
I have not used the Aura effect for a bit due to the cleric not casting Spirit Guardians for a few sessions. We had some issues of multiple targeting and damage. I opened a fresh test campaign with only Aura Effects and Better Combat Effects extensions and using following effect on the caster:

AURA: 15 foe; Spirit Guardians; IF: FACTION(notself); SAVEA: WIS [SDC] (M)(H); SAVES: WIS [SDC] (M)(H); SAVEDMG: 3d8 radiant,spell,magic (C)
https://www.fantasygrounds.com/forums/showthread.php?68831-Better-Combat-Effects&p=645900&viewfull=1#post645900

Upon entering the aura it targets a creature multiple times (from 2 to 4) rolling saves and damage and the damage shows untyped. Plus it adds another effect and rolls saves and damage for every step taken.

The applied effect is:

FROMAURA; Spirit Guardians; IF: FACTION(notself); SAVES: WIS 14 (M)(H); SAVEDMG: 3d8 radiant,spell,magic (C)

When leaving the aura it was not removing the effect and adds more if the NPC moves back in.

When only running the Aura extension it adds and removes the effect correctly.

Thanks

EXPIREADD not working

Fixed feedback issue with EXPIREADD but looking at the code EXPIREADD expires before it can check the effect for EXPIREADD

3.5E Issue with some tags

https://www.fantasygrounds.com/forums/showthread.php?68831-Better-Combat-Effects&p=643567&viewfull=1#post643567

Latest fantasy grounds unity. Windows 10. Better combat effect v 2.34. Pathfinder 1 ruleset (PFRPG)
No other extensions.
I think all (or most) these find did work before, it might have been all the way back to version 2.23 since BCE was broken in version 2.24 for pathfinder for a while
I have tested everything else, so what I did not report here works as intended for pathfinder ruleset unless I missed something.

SAVEA does not work at all. Example:
SAVEA: will 10
This does nothing. It only says Effect ..... expired without rolling anything

SAVEONDMG does not work. Example:
SAVEONDMG: reflex 10
effect is placed on character A
When character A takes damage no roll is made.

SDMGOS does not work with dice. Example:
"SDMGOS: 2d6" does not work
"SDMGOS: 2" does work
"DMGOE: 2d6" does work
"SDMGOE: 2d6" does work

STACK This effect also work in Pathfinder. It only says 5E in forge

3.5E STACK

STACK doesn't work in 3.5E. I'm pretty sure there was a good reason stack wasn't included in original 3.5E release but I need to review why or fix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.