Thread: Advantages Extension (FGU 5E)
-
January 10th, 2022, 00:39 #41
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.
-peteForge 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.
-
January 10th, 2022, 01:37 #42
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-FGUFree(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
January 10th, 2022, 04:30 #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.pngFree(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
January 10th, 2022, 11:11 #44
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
fileA.lua
function y()
end
function x()
local a = self.y();
end
fileB.lua
function y()
end
'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.
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...
-peteForge 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.
-
January 11th, 2022, 19:52 #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):
-
January 11th, 2022, 20:18 #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):
-
January 11th, 2022, 22:41 #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):
-
January 12th, 2022, 04:49 #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):
-
January 12th, 2022, 05:24 #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):
-
January 12th, 2022, 15:29 #50
- Join Date
- Dec 2019
- Posts
- 33
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