FG Spreadshirt Swag
Page 1 of 8 123 ... Last
  1. #1

    Effect Targeting Enhancement (Extension)

    edem has updated this extension for FG v3.3.0 compatibility - get it here: https://www.fantasygrounds.com/forum...l=1#post336587

    Greetings!

    After playing a couple 5e games through Fantasy Grounds, I found one thing I really wanted was greater ability to customize effect application.

    Effects in the 5e ruleset already support an "Effect Target", which limits the scope of when they take effect. For example, if one player gets a damage bonus against a particular NPC, you can add the effect "DMG:2" to the player, and then set the Effect Target. The effect "DMG:2" on the player would make him deal an additional 2 damage to all creatures, whereas setting the Effect Target makes him deal an addional 2 damage only against the chosen Effect Targets.

    The EffectTarget is an excellent feature, but setting it is a bit of a pain. Currently, you can set the effect target by either shift-dragging the effect to the target, or by applying the effect, then using the effect target button in the combat tracker. I wanted to create an easier way to handle most uses.

    Effect Targeting Enhancement (Extension)

    The Effect Targeting Enhancement creates an additional setting for Effects in the "Spell/Ability Effect" window. With these settings, you have the option of automatically setting the Effect Target of an effect to be yourself, your targets, or none (current and default behavior).

    Here is an example using the spell Hex:
    Attachment 10116

    Now, to apply the Hex effect on your current target, all you have to do is trigger the effect.

    With this modification, there are often multiple ways of achieving the same result (essentially a Push or a Pull). Let's say you had an ability where you dealt reduced damage to allies (Presumably AoEs, but maybe the Barbarian needs to sustain his rage...):
    Attachment 10117
    The first applies an effect to your targets, with you as the effect target, granting them resistance to the attack. Thus, incoming damage, for them, is reduced.
    The second applies the effect to yourself, with your targets as the effect target, and decreases all damage by 5. Thus, outgoing damage, for you, is reduced.

    Effect Targeting works with many (but not all) effect elements. Check the wiki for more details on which modifiers currently function properly.

    I've attached a sample character with example effects, showcasing the extension.

    Please post any issues you have here, and I will try to address them.

    v0.3 - Effect Targeting Enhancement is now compatible with the 5E Player Effect Removal Extension
    v0.5 - Effect Targeting Enhancement is now compatible with the Fantasy Grounds v3.1.5

    Current Version: v0.5
    Compatible with FG: v3.1.5

    TASagent

    Do not use the attached old extension This is provided purely for reference as the original author is not updating this now.
    Last edited by Trenloe; May 8th, 2017 at 14:48. Reason: updating compatibility

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Nice one!

    FYI - this modifies the same base 5E scripts that the 5E Player effect removal extension uses and so only one of these can be used at the same time.

    As an additional FYI (you may be already doing this) - keep copies of all of the base FG files you change, so that when a new version comes out you can quickly do a file compare to see which scripts (if any) you need to update in your extension because of changes in the new version. I put the unmodified base scripts in the extension itself, renamed with the version they were taken from, for easy future reference. See the 5E Player effect removal extension extension for an example of this.
    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
    Thank you, Trenloe.

    Ahh, I see what you did. When I started working on it I just made a local git repo of the 5e ruleset files. That way, when I get an update I can just dump it in the directory and see where my changes conflict. I think I'll do this as well, though, so other people could have access to it.

    It might be kind of fun to create an extension that had a few hooks that the Remove Effect Tag and Effect Targeting Enhancement (and potentially others) could latch onto to allow some extensions that are otherwise compatible in functionality to work together. Only one hitch - Do you know of any way an extension can test to see if a different extension is loaded, and alter what files get clobbered as a result?
    +2 License of Ultimate Hosting
    Current Projects: Murder in Baldur's Gate Module
    Completed Projects: Curse of Strahd module, Sword Coast Adventurer's Guide Module, Out of the Abyss Module, Legacy of the Crystal Shard Module, Scourge of the Sword Coast Module, Effect Targeting Extension (5e), Unearthed Arcana: Vitality Extension

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by TASagent View Post
    It might be kind of fun to create an extension that had a few hooks that the Remove Effect Tag and Effect Targeting Enhancement (and potentially others) could latch onto to allow some extensions that are otherwise compatible in functionality to work together.
    The problem with anything like this is that it can quickly become outdated by FG code updates and the owners of all of the extensions would have to update when new FG code came out and it could soon become outdated. We get extension developers who create cool extensions, then life takes them away from the forums and we are then stuck with essentially what we had in the first place - incompatible extensions.

    Plus, what would be required to create hooks into the base FG code can vary widely from one extension to the next. It's doable - but would need quite a bit of work up front to analyse what the "compatible extensions" are doing in each script, then will require custom hooks to be written, and will need future FG updates to be implemented within the extension/s to keep them current and compatible - if one extension owner doesn't provide timely updates then it all falls apart.

    I don't know what your definition of "fun" is, but that doesn't sound too much fun to me (especially the long run update/maintenance).

    Quote Originally Posted by TASagent View Post
    Only one hitch - Do you know of any way an extension can test to see if a different extension is loaded, and alter what files get clobbered as a result?
    I thought I remembered something discussed about reading extension versions recently, but I can't find it at the moment.
    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!

  5. #5
    Yeah. The compatibility extension would need to be collaboratively developed by modders who wanted to utilize it, which at least would reduce the probability of it just fading away. And any extension that wanted to hook into it would be encouraged to implement all of its features twice - One that just clobbers the relevant files and one that hooks into the compatibility extension.

    If it were possible to detect if the compatibility extension were selected for loading, and branch which files you load as a result, it would at least have a nicer end-user experience. Otherwise you'd just need to set the compatibility extension to load last and cross your fingers there isn't some race condition (the documentation suggests that load order isn't strictly observed). At least if it were handled that way, the individual extensions would continue to work in the event that the compatibility extension ceased to be supported, with only a bit of extra work upfront on the modder's part.

    I only asked because the Effect Removal extension is nifty, and I wouldn't want to force people to choose one or the other. Plus, we touch very different parts of the same file, so there's no reason, in principle, that both couldn't function at the same time if set up properly.

    Edit: To be clear, I wasn't suggesting a global extension compatibility framework, just something small to get these to to cooperate together if people wanted. :-)
    +2 License of Ultimate Hosting
    Current Projects: Murder in Baldur's Gate Module
    Completed Projects: Curse of Strahd module, Sword Coast Adventurer's Guide Module, Out of the Abyss Module, Legacy of the Crystal Shard Module, Scourge of the Sword Coast Module, Effect Targeting Extension (5e), Unearthed Arcana: Vitality Extension

  6. #6
    When poking around at the Remove Effect extension, I started delving into the merge tag, and ruleset layering. I wasn't able to find references to it in the official documentation, just a few threads and the patch notes, but perhaps I'd missed it. In any case, I can use this to at least slim down the profile of the extension. I'm going to see what I can do, compatibility-wise, probably this evening.

    Thanks!
    +2 License of Ultimate Hosting
    Current Projects: Murder in Baldur's Gate Module
    Completed Projects: Curse of Strahd module, Sword Coast Adventurer's Guide Module, Out of the Abyss Module, Legacy of the Crystal Shard Module, Scourge of the Sword Coast Module, Effect Targeting Extension (5e), Unearthed Arcana: Vitality Extension

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by TASagent View Post
    When poking around at the Remove Effect extension, I started delving into the merge tag, and ruleset layering. I wasn't able to find references to it in the official documentation, just a few threads and the patch notes, but perhaps I'd missed it. In any case, I can use this to at least slim down the profile of the extension. I'm going to see what I can do, compatibility-wise, probably this evening.
    FYI - Merge only works for XML not for the LUA scripts. The Remove Effects extension doesn't use any FG XML (other than the base extension.xml) so this isn't going to help any in this case.
    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
    Ahh, thanks. Perhaps I misunderstood what was meant by the nested scripts.
    +2 License of Ultimate Hosting
    Current Projects: Murder in Baldur's Gate Module
    Completed Projects: Curse of Strahd module, Sword Coast Adventurer's Guide Module, Out of the Abyss Module, Legacy of the Crystal Shard Module, Scourge of the Sword Coast Module, Effect Targeting Extension (5e), Unearthed Arcana: Vitality Extension

  9. #9

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,381
    Load order can set by each individual extension. I had to set load order when I made an extension that overrode the Castle graphic for someone. That's because I had to make sure the theme loaded before the extension that changed the castle graphic. If no load order is set, the usual case, then its done by alpha.

    Edit: Sample Code

    Code:
    <root version="3.0" release="3">
    	<properties>
    		<name>5E Dice Tower Icon</name>
    		<version>0.05.01</version>
    		<author>JeffKnight</author>
    		<description>Changes the Dice Tower Icon</description>
    
        <ruleset>
          <name>5E</name>
          <!-- <minrelease>25</minrelease> -->
        </ruleset>
        <loadorder>5</loadorder>  <!--  -->
      </properties>
    
    	<base>
          <!-- Display version # in chat window -->
          <script name="5EDiceTowerMsg" file="scripts/5EDiceTowerMsg.lua" />
    
          <!-- Desktop -->
          <includefile source="desktop/desktop_classes.xml" />
    
          <!-- Graphics -->
          <includefile source="graphics/graphics_frames.xml" />
          <includefile source="graphics/graphics_icons.xml" />
       </base>
    </root>
    Last edited by Griogre; June 5th, 2015 at 00:54.

  10. #10
    I definitely read somewhere that the load order was more of a suggestion than something that you can rely on. However, on looking around and trying to find it (and failing), I have the suspicion that that was, at best, out-of-date information. Thanks for the update, Griogre.
    +2 License of Ultimate Hosting
    Current Projects: Murder in Baldur's Gate Module
    Completed Projects: Curse of Strahd module, Sword Coast Adventurer's Guide Module, Out of the Abyss Module, Legacy of the Crystal Shard Module, Scourge of the Sword Coast Module, Effect Targeting Extension (5e), Unearthed Arcana: Vitality Extension

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Log in

Log in