STAR TREK 2d20
Page 1 of 2 12 Last
  1. #1

    Advanced Effects, Item Only Effects (action only?)

    So, with the addition of the Advanced Effects extension I've been working on you're able to apply effects to item, npcs and player records and when you drag/drop those npc/pcs into the combat tracker it automatically applies the effects.

    Sounds great? Well, it is (not because I did it mind you) but there is a little quibble with it. If you give a weapon "ATK: 1" that character now has +1 to hit with ALL weapons, not just that weapon.

    So.... I've been pondering how best to deal with that w/o doing a lot of code work and I made a proof of concept run tonight and it worked. Here is how it functions.

    • When the player attacks the item's path (charsheet.XXXX.inventorylist.id-XXXX) is handed off in rAction as rAction.itemPath.
    • During the actionAttack mod I then check for .itemPath exists.
    • If it exists then create rItem.X (matching rSource except for sCTNode)
    • After I check getEffects*(rSource) I also do a getEffects*(rItem).
    • The effects are added together and the modifier function returns them all and the attack bonuses are applied.
    • Walla, attack works and the bonus will ONLY apply if that weapon is used.


    Tonight I just copy/pasted a effects.* block into the item so I've got code work to do to manage adding the "action only" effects from Advanced Effects to the item as ".effects.*".

    Need more extensive testing but preliminary work seems promising.

    Anyone see any holes or have suggestions?
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1
    Quote Originally Posted by celestian View Post
    So, with the addition of the Advanced Effects extension I've been working on you're able to apply effects to item, npcs and player records and when you drag/drop those npc/pcs into the combat tracker it automatically applies the effects.

    Sounds great? Well, it is (not because I did it mind you) but there is a little quibble with it. If you give a weapon "ATK: 1" that character now has +1 to hit with ALL weapons, not just that weapon.

    So.... I've been pondering how best to deal with that w/o doing a lot of code work and I made a proof of concept run tonight and it worked. Here is how it functions.

    • When the player attacks the item's path (charsheet.XXXX.inventorylist.id-XXXX) is handed off in rAction as rAction.itemPath.
    • During the actionAttack mod I then check for .itemPath exists.
    • If it exists then create rItem.X (matching rSource except for sCTNode)
    • After I check getEffects*(rSource) I also do a getEffects*(rItem).
    • The effects are added together and the modifier function returns them all and the attack bonuses are applied.
    • Walla, attack works and the bonus will ONLY apply if that weapon is used.


    Tonight I just copy/pasted a effects.* block into the item so I've got code work to do to manage adding the "action only" effects from Advanced Effects to the item as ".effects.*".

    Need more extensive testing but preliminary work seems promising.

    Anyone see any holes or have suggestions?
    I have a suggestion. Drink more coffee and keep writing more code.
    Thats it.
    Seriously - keep writing.
    You're doing some awesome stuff.

  3. #3

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    I don’t see any flaws in your logic, but what about shields and shield bash or can you do this with any item and not just weapons?

    How about a screen shot of an item with this effect?

  4. #4
    Quote Originally Posted by Bidmaron View Post
    I don’t see any flaws in your logic, but what about shields and shield bash or can you do this with any item and not just weapons?

    How about a screen shot of an item with this effect?
    It should work for any item with an attack.

    I'll finish up a preliminary work up (after my RL job) tonight for my testing and post some images tho honestly it won't be much but a toggle in the Advanced Effects config for the effect.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  5. #5
    I don't believe there is, I've yet to port your extension as my main focus is on SR5e as of late. Regarding what I know of the 3.5/PF ruleset, effects are global and there has to be a work-in to the character sheet for this to work. Some weapons auto-populate attacks if they're configured in a certain manner, I've yet to dig this out, but that's the manner of attack I'd venture for. This is in PF mind you, 5e is more polished so it probably does something similar but in a more integrated manner.

  6. #6
    3.5E /PFRPG will be a little harder, because you have to worry about effect type stacking rules, which you don’t need to worry about for 5E.

    JPG

  7. #7
    Okay, so... after spending a few hours wacking at this tonight I did get it working but... don't like it. To much hacking/fiddly bits to get it to "merge" with the existing effects...

    I'm going to try another direction, something that will apply it like any other effect but the "effect" code will ignore it unless the action was triggered by an item. I'll have to tweak the manager_effect_5E.lua code probably which I was hoping to avoid (means I have to update the extension when new rev comes out) or even deeper, CoreRPG manager_effect.lua code.

    Going to think about it and take another pass tomorrow.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  8. #8
    Much better direction tonight I think. Got the result I wanted from initial testing and will do more later. I took a SS as promised for the requester. The red indicated areas are "actiononly" style effects or results. All the other effects and results are not. I made a roll to hit with the awl pike and the claymore. The awl pike has no actiononly effects and the claymore does. Claymore included the normal effects plus it's action only.

    Progress!

    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  9. #9
    Did some more testing and was even able to have a weapon that would only do extra damage to a type, like a "giant". It appears the IF/IFT coding works properly with this new mode.

    HOWEVER, I've got a blocker for this to be perfect. Right now I can get the item on effects to work properly except when you drag/drop the dice. This appears to be a draginfo issue (eventually rSource which was rActor doesn't include the .itemPath) and I'm trying to figure out how to resolve. I'm not entirely sure how to inject data into that easily.

    Anyone have any experience with that?
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  10. #10

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Take a look at post #3 of the programmatically copying code thread and you can see how I solved a similar quandary. If you have any questions on the technique I will reply here.

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