Page 1 of 6 123 ... Last
  1. #1
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,892

    Alignment Condition extension

    As of FG 3.1.2 this extension is no longer needed. FG has new conditional effects: align, type, size and custom to cover this functionality.

    PF v0.6.2 is NOT FG v3.1.3 Compatible. Do not use this extensions with FG v3.1.3+

    This is a simple extension that adds a number of conditions to the 3.5E or PFRPG DataCommon.conditionaltags list to represent alignment names.

    Why is this needed? Well, it isn't really needed - but it will allow the IFT: conditional effect to be used to enable abilities/weapons that have special effects when targeting creatures of specific alignments - a Paladin's smite evil is a good example.

    Both extensions available for download at the bottom of this post.

    Basic Extension for PFRPG and 3.5E (Alignment Conditions.ext) - doesn't parse NPC alignment, GM has to add the alignment conditions manually.

    Pathfinder (PFRPG) Only Extension (PFRPG Alignment Conditions.ext) - When an NPC is added to the combat tracker the alignment conditions are added automatically. V0.5a - PFRPG FG 3.0.11 Compatible.

    This adds a number of conditions to the ruleset representing alignments:
    • chaotic-evil
    • lawful-evil
    • neutral-evil
    • chaotic-good
    • lawful-good
    • neutral-good
    • neutral
    • true-neutral
    • lawful-neutral
    • chaotic-neutral
    • evil
    • good
    • chaotic
    • lawful

    These are not case sensitive and do not include spaces (it will not work with spaces in the alignment name). To cover alignment specific and more general alignment effects "good", "evil", "chaotic" and "lawful" have been included - this will allow effects to cover spells like "Protection from Evil" - but this does mean that up to 3 conditions need to be added to a creature - the specific alignment and the more general ones, e.g. for Chaotic Evil: Chaotic-Evil; Evil; Chaotic

    These can be added to creatures in the combat tracker as an effect based of their alignment. e.g. Chaotic-Evil

    Then, a player could add conditional effects on their PC in the combat tracker:

    • IFT: Chaotic-Evil; DMG:1d6
    • IFT: Lawful-Evil; DMG:2d6

    Any damage done to a target that has the "chaotic-evil" condition will have 1d6 added and any damage against a target with the "lawful-evil" will add 2d6 damage.

    You will probably want to change the alignment condition effect on an NPC from "VSBL" to "GM" so that the player won't know before doing damage what the alignment of the target is. Once damage is done they'll know due to the extra dice rolls.

    Here is an example - the PC "Fire Starter" has the effect IFT: Neutral-Evil; DMG:1d6 and the Skeleton has the condition (a single effect name) of Neutral-Evil. Therefore the IFT: Neutral-Evil conditional effect will trigger - this means IF Target (has condition) Neutral-Evil

    You can see the result of the roll in the chat window - the purple dice is the additional 1d6 damage.

    Attached Files Attached Files
    Last edited by Trenloe; November 9th, 2015 at 18:36.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,892

    Development Notes

    Originally I added these conditions to the "conditions" table in data_common.lua in the PFRPG ruleset. This resulted in this being specific to the PFRPG ruleset only, would have to be kept up to date with future releases of this file and would also clash with other extensions modifying the same file.

    Then I got to thinking...

    The conditions table is accessed globally by DataCommon.conditions - can I just add extra conditions to the end of this table with the LUA table.insert command?

    The answer is yes!

    This extension is very simple - extension.xml just calls my extension specific script "scripts/alignment_conditions.lua":
    Code:
    <base>		
    	<!-- High-level scripts -->
    	<script name="AlignmentConditions" file="scripts/alignment_conditions.lua" />
    </base>
    In the script I define the new conditions to be added in a table called new_conditions and in the onInit() function I then step through this table one-by-one and add each new condition to DataCommon.conditions using table.insert(DataCommon.conditions, <new condition>) - see below (extension chat window message removed for clarity):
    Code:
    -- New condition list to be added to the DataCommon.conditions in the ruleset being used.
    new_conditions = {
    	"chaotic-evil",
    	"lawful-evil",
    	"neutral-evil",
    	"chaotic-good",
    	"lawful-good",
    	"neutral-good",
    	"neutral",
    	"true-neutral",
    	"lawful-neutral",
    	"chaotic-neutral",
    	"evil",
    	"good",
    	"chaotic",
    	"lawful"
    	}
    
    function onInit()	
    	-- Add new conditions to the end of the current conditions table in DataCommon
    	for k,v in ipairs(new_conditions) do
    		table.insert(DataCommon.conditions, v)
    	end 
    end
    This is incredibly simple - makes the extension relatively future proof and extension clash proof.

    However, in order to add alignment conditions to NPCs when they are dragged to the combat tracker, code has been added to the scripts/manager_combat2.lua file, which is copied from the 3.0.4 version of the 3.5e ruleset.

    Future Smiteworks changes to scripts/manager_combat2.lua in the 3.5E ruleset will require this extension to be updated with the new code.

    June 19th 2014. Compatible with FG 3.0.5.
    Last edited by Trenloe; June 20th, 2014 at 00:54.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,892

    Use Examples

    • Protection from Evil; IFT: Evil; AC:2 deflection; SAVE:2 resistance If the creature attacking has the condition "evil" then AC:2 deflection and SAVE:2 resistance will be applied to the defender. Note- Currently SAVE does not work with IFT in 3.0.2 - it is fixed in 3.0.3.
    • Paladin's Smite Evil: IFT: evil; ATK:2; DMG:4; AC:2 This would be for a Paladin of 4th level with a Charisma bonus of 2, the "evil" condition will need to be applied to the target of the Paladin's smite for this to take effect (if the target is actually evil of course).
    Last edited by Trenloe; June 17th, 2014 at 06:58.

  4. #4
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,970
    Blog Entries
    4
    too bad this can't check character/npc alignment without setting alignment as an effect...
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,892
    Quote Originally Posted by Blackfoot View Post
    too bad this can't check character/npc alignment without setting alignment as an effect...
    Then conditional effects wouldn't work and I'd have to code sh1t lots more than what I did for this simple extension - and it wouldn't be anywhere near as future proof and extension clash proof.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  6. #6
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,970
    Blog Entries
    4
    Quote Originally Posted by Trenloe View Post
    Then conditional effects wouldn't work and I'd have to code sh1t lots more than what I did for this simple extension - and it wouldn't be anywhere near as future proof and extension clash proof.
    Well.. sure.. but it's too bad.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,892
    Added a modified extension specifically for Pathfinder which parses the alignment from an NPC when it is added to the combat tracker and adds conditions based off the alignment found in the "Type" field. For example:



    I have not coded for PCs - mainly as the alignment field is a freeform field so could be all sorts of permutations on how players enter their alignment. Also, as PCs usually get added to the combat tracker and then stay there it will be easy for the GM to add alignment conditions one-time to the PCs once they are in the combat tracker.

    And that's all you'll be getting Blackfoot - if you want anything else, then that's "too bad"!

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  8. #8
    Thanks for this, Trenloe - it's a nice idea.

    Quote Originally Posted by Trenloe View Post
    Protection from Evil; IFT: Evil; AC:2 deflection; SAVE:2 resistance If the creature attacking has the condition "evil" then AC:2 deflection and SAVE:2 resistance will be applied to the defender.
    Does this example work in practice? If so, what does "target" mean in the context of "IFT"?

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,892
    Quote Originally Posted by Callum View Post
    Does this example work in practice? If so, what does "target" mean in the context of "IFT"?
    Doing some further testing, it looks like in this example AC can be used with IFT but not SAVE in FG 3.0.2 - this is fixed in 3.0.3.

    IFT means both a target for an offensive roll (attack/damage etc.) if you are targeting a creature with the condition and in reverse for defensive rolls (changes AC, etc.) if you are targeted by a creature with the condition. It depends on the "Applied To" field in the below table.

    EDIT: Doing some testing of the target combat effects. The ones highlighted in yellow in the following table work fine:


    If "Applied To" = Attacker then IFT means "IF the Target you are attacking has this condition".
    If "Applied To" = Defender then IFT means "IF the creature that is attacking you as a Target has this condition".
    Last edited by Trenloe; February 22nd, 2014 at 19:16.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  10. #10
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,970
    Blog Entries
    4
    Quote Originally Posted by Trenloe View Post
    Added a modified extension specifically for Pathfinder which parses the alignment from an NPC when it is added to the combat tracker and adds conditions based off the alignment found in the "Type" field.

    And that's all you'll be getting Blackfoot - if you want anything else, then that's "too bad"!
    See now.. I knew you were up to the task.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in