STAR TREK 2d20
Page 5 of 9 First ... 34567 ... Last
  1. #41
    Quote Originally Posted by SilentRuin View Post
    Yeah the changes I'm making are super RISKY because image.lua seems to have no way to partially override it - I'd not invest to heavily in making my stuff work. The image.lua file I had only my stuff I was adding in - but it kept requiring me to drag more and more in to get other things to work until I had cloned the entire file. It has an onDrop addition from Diablobob I added in - but really its a huge pain to tie things to the image file in terms of being able to use super calls etc.
    Yep I know, as I also had to pull a lot of that file in. I think I replace most of it and dont bother to call the super side, which is probably why your extension breaks when loaded with mine....

    Just some of the files in the ruleset are a pain to work with...

    Its been a while since I looked at that specific file, so I need to refresh myself with the changes I did to make my extension work. Once I've looked at both extensions a bit I might be able to see a solution or a way to patch so both extensions can work. But its always an issue when multiple extensions play with the same sort of area of ruleset.

    -pete
    Forge Profile
    DMsGuild Profile

    Forge Modules: B9's Steel Defender.
    Forge Extensions: B9's Spell Tokens, B9's Encumbrance Tweak, B9's Damage Per Round, B9's Surprise Round.
    DMsGuild Extensions: Advanced Weapon Damage, Advanced Spell Damage, Aspect Of The Bear, Spell Long Rest For NPC, Spell Domain.

  2. #42
    Quote Originally Posted by bratch9 View Post
    Yep I know, as I also had to pull a lot of that file in. I think I replace most of it and dont bother to call the super side, which is probably why your extension breaks when loaded with mine....

    Just some of the files in the ruleset are a pain to work with...

    Its been a while since I looked at that specific file, so I need to refresh myself with the changes I did to make my extension work. Once I've looked at both extensions a bit I might be able to see a solution or a way to patch so both extensions can work. But its always an issue when multiple extensions play with the same sort of area of ruleset.

    -pete
    No literally I tried to call the super side - it does not work in all cases. Had to pull in diablobobs change to it just to get his stuff to work. Here is my description of my trials and tribulations with super and precedence - Moon gave some good answers.
    https://www.fantasygrounds.com/forum...t-works-in-FGU
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  3. #43
    Going to let the final stage of my changes to CW simmer a bit especially as I will be duplicating the module priority logic in my equipped effects extension.

    But... I have a picture for what is coming next to make CW more like I want it to be. Whether you want it that way? Meh. You have options. You can edit out the code. You can stop using the extension

    No explanations. Read the panels from left to right, top to bottom. If you can figure out what I've done - grats! Probably deliver it once I'm sure its harmless to implement in EE. Then will deliver both with this ability. Gist being - in my world - when my players are faced with a myriad of duplicate spell names... well... THERE CAN BE ONLY ONE!!! (insert highlander struck by lighting in your "theater of the mind" )

    ModulePriority.png
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  4. #44
    Quote Originally Posted by SilentRuin View Post
    No literally I tried to call the super side - it does not work in all cases. Had to pull in diablobobs change to it just to get his stuff to work. Here is my description of my trials and tribulations with super and precedence - Moon gave some good answers.
    https://www.fantasygrounds.com/forum...t-works-in-FGU
    Yep super and the scope rules are a bit of a pain. I always look at the function I want to change and look down that code to what functions it calls, as I know those functions will be bound to a previous scope and can cause issues. Which then as you are finding out, you have to 'pull' that 'not required' function up-into your code to get the binding to work. ( Same with variables, this can cause you to have to pull loads of function and ripple out to more variables and functions to pull in... )

    Also if I recall with the way the scope also works.... if the original code had pre-fixed all the function calls with 'self' it could break out of the scope on an overridden file. ( But dont quote me on this, its been a while since I was playing with this... it also has consistency issues depending on the code... )

    so like this,

    fileA.lua

    function y()
    end


    function x()
    local a = y();
    end
    overrides different to if the code was written as,

    fileA.lua

    function y()
    end


    function x()
    local a = self.y();
    end
    Because the 'self' access the current 'scope context' at the time, which allows

    fileB.lua

    function y()
    end
    to allow your fileB.lua to override the reference call in fileA.lua 'function x' scope call to function y, which without the 'self.y' would always call the fileA.lua 'function y' and not yours.

    'self' and 'super' are 'special' and in lua are not fundamental, mainly 'suggestions' on how you can 'wrap' previous context into the new script to 'extend'... its very 'how application implements' this that then can make it not like a 'virtual' type c++ keyword that you know ends up in the function table and can be changed in the sub-class as you would expect. Lua can be 'how the code was written' depends if things like 'super' variables/functions actually call as expected or not.

    this sort of thing...

    https://fantasygroundsunity.atlassia...et+-+Scripting

    super = When scripts are layered, then the super variable is defined and can access a script which this object is based on.

    self = Always refers to the outermost object with all layers applied, even if called from a lower layer.
    So it would be nice if by default the ruleset and extensions always 'self.functionName' called as this would allow 'outermost' object to override 'lower layer' referenced functions..

    but 'good luck' asking for that sort of 'fix' across the every bit of lua code !!

    and in some cases you might want to make sure your code is 'local scope' function call to 'local scope' function..

    But the way the ruleset code is current written without the use of 'self.' function calls, then 'scope' of a function calling tree can cause issues and pull code/variables into extension code that would be nice to then not have to do and take on 'merging' when things change.. pain...

    -pete
    Forge Profile
    DMsGuild Profile

    Forge Modules: B9's Steel Defender.
    Forge Extensions: B9's Spell Tokens, B9's Encumbrance Tweak, B9's Damage Per Round, B9's Surprise Round.
    DMsGuild Extensions: Advanced Weapon Damage, Advanced Spell Damage, Aspect Of The Bear, Spell Long Rest For NPC, Spell Domain.

  5. #45
    Heads up Advantages users - later today this extension will actually break into three extensions. They will still all be in Page 1 here - and in Forge "Advantages" but now they will be in 3 different .ext files due to the RISKY stuff in doing character wizard module priority and pointer areas. So page 1 will change to reflect these three things - and they will all be added to the Forge "Advantages" and need to each be selected in your load campaign to get their functionality...

    Advantages.ext - will revert to its original Advantage/Disadvantage based on holding CTRL/ALT keys.
    AdvantagesCW.ext - will have only the character wizard parts of the old Advantages plus new module priority stuff.
    AdvantagesPA.ext - will only have pointer area stuff.

    Stay tuned for later today when this happens.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  6. #46
    Advantages is now in 3 different extensions - still delivered in page 1 and in Forge under "Advantages Extension".

    "5e - Advantages" - Advantages.ext
    Holding CRL key during button press will give ADVantage. Holding ALT key during button press will give DISadvantage. All Group selections from last session (host only) will be remembered.

    "5e - Advantages CharacterWizard" - AdvantagesCW.ext
    Will add in Module Priority ability and allow CharacterWizard to choose only one race, class, background, spell, or feat is used in selection lists build based on first come first serve in list of modules and their priorities.


    "5e - Advantages Pointer Areas" - AdvantagesPA.ext
    Pointer Areas (cone, square, circle) can be used to select token targets. Caveats - Even if last placed pointer area is not visible it will still be used - only closing image window will clear it. Best have only one pointer area visible if using this.
    Last edited by SilentRuin; January 11th, 2022 at 20:20.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  7. #47
    Quick cut paste error fixed in Advantages.ext - no version update or notification - just file in Page 1 and Forge copy.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  8. #48
    FGU update to CW - updated a file in AdvantagesCW.ext - no version change - page 1 and forge updated.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  9. #49
    Cut and paste error in update from FGU - fixed in AdvantagesCW.ext - in page 1 and forge.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  10. #50
    Advantages PA does not work with Critical Awesome Essentials and Token Height Indication. I had to turn these off to use this feature.

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
  •  
5E Product Walkthrough Playlist

Log in

Log in