STEAM SUMMER
Page 1 of 7 123 ... Last
  1. #1

    Advantages Extension (FGU 5E)

    Advantages Extension (FGU 5e) (also in the Forge now)
    My personal grab bag I add simple stuff into that I want for my campaigns. Use at your own risk "as is".
    Now the Forge delivery will contain 3 different extensions (broke out the more risky stuff so it could be separately loaded/unloaded without losing other functionality. This code is free for anyone to take and use even FGU.

    "5e - Advantages" - Advantages.ext
    V1.0 - New Feature: Holding CRL key during button press will give ADVantage. Holding ALT key during button press will give DISadvantage.
    V1.1 - New Feature: All Group selections from last session (host only) will be remembered.
    V1.2 - Fix: needed to fake/translate DB active_category value "**" as uncategorized(true category is "") so that it could be stored in DB.
    V1.3 - Fix: Changed load order to 80 to work with elven accuracy
    V1.9 - Feature - provided new option "Allow CTR/ALT held key for ADV/DIS" defaulted to "on" in order to let that feature be optional.
    V1.14 - Removing "Advantages Pointer Areas" and "Advantages CharacterWizard" functionality to separate extensions. "Advantages" is now back to only have the above listed version features.

    New DB nodes (* is any DB node using CoreRPG masterindex stuff - usually buttons on right side of FGU):

    <*_masterindex>
    <active_category type="string">Last Active Group (Category) Name</active_category>
    </*_masterindex>

    "5e - Advantages CharacterWizard" - AdvantagesCW.ext
    V1.0 - Feature - Charwizard has annoyed me that it hardcoded what I get to choose from. As all the global searches in FGU take the first module name match (race,class,feat,spell,background) that they hit I'm making the charwizard list choices do the same. If you have local definition that will always be taken first (how that FGU global search works). There is a new option with this extension now "Use first name match for CharWizard lists" which will not do this stuff if you turn it off (will do default hardcoded choice behavior of original code). It is defaulted to be on.
    Feature - A new option to "Remove CharWizard add actions logic" defaulted to "off" that will remove the ability of CW to add its own features and traits into the action tab as extensions can already be doing that from a different source (notably my Equipped Effects and Aridhro's PHB supplemental modules).
    Feature - support new Module Priority Level so that is displayed in the module activation page entries. There are 3 levels (1-3) or none that can be set. Currently if my CW modification is used its a first come first server name match. Which works well unless you have supplemental modules that have conflicted names. Not a problem in Aridhro's data as he names his so the order comes out the way he wants them (they will get hit first before the things they supplement). But in other places (and for future) you may have many supplemental mods with lots of name conflicts. This module priority level lets you pick which modules get preference. If any module is set with a value it will keep searching for name matches until it finds the lowest priority match. So if I have PHB (SW) and Tasha's (SW) I can set Tasha's as priority 1 and insure any name conflicts we pick that one to resolve it. Likely I won't use this myself as the first come first serve works with my supplemental data already (I only use PHB). But if you have a lot of supplemental modules then this might help you. It only records loaded modules in the local DB under <module_priorities> with a <ModuleName> and a <ModulePriority> for its data. Any time the onInit gets triggered for the manager (app startup) this data will be cleaned up based on what modules are currently loaded (removes any that are not). It also only records ones that have had their module priority set. The option provided under "Module Priority" is "Display Module priority level (1-3)" defaulted to "off". This is only for display of module priority level in the module activation window. To get the character wizard (CW) modification to use it for name resolution another flag under "Advantages" is provided called "Use Module Priority" defaulted to "off". This will make the name matching I do for classes, spells, feats, etc. look at the priorities to resolve name conflicts instead of first come first serve. Risky modification due to the frequency CW changes and the unavoidable cloned parts of that code involving list generation for race, class, background, spells, and feats.

    New DB nodes for module priority support (* is for child numbers):
    <module_priorities>
    <id-*>
    <ModuleName type="string"></ModuleName>
    <ModulePriority type="number"></ModulePriority>
    </id-*>
    ...
    </module_priorities>
    https://youtu.be/ll_fXXiNo3o

    V1.1 - FGU changes - updated to match changes in FGU CW.
    V1.2 - FGU changes - updated to match changes in FGU CW.
    V1.3 - Bug - specialized module guard for my personal "AE5E" modules that have feats that are not really feats had a mistake causing error for "non me" people.
    V1.4 - FGU changes - updated to match changes in FGU CW.
    V1.5 - Bug - module priority should only be visible to host.

    "5e - Advantages Pointer Areas" - AdvantagesPA.ext
    V1.0 - Feature - New option "Target Pointer Area" that is defaulted to "off". Will store the last active pointer area you defined and use it to target any tokens within that area in the same way map target mode indicator does. In fact, the target mode icon on the map toolbar is hijacked when this option is turned on so that if it has a stored last pointer area (defined by right/mouse held down with shift/alt/ctr key held down or with right mouse draw pointers option) and there are tokens in that area it will select them unless all are already selected then it unselects them (just like normal targeting mode behavior). If nothing is found inside the stored pointer area or no stored last pointer area exists then it will do normal targeting mode behavior. The only way I could find to remove the last active pointer after all user pointers are removed from map was to turn off and back on the option. No code to determine when a pointer was removed could be found, so this was "good enough". This is User based so is only relevant for the users last active pointers regardless where that graphics originated from (if its on your map its yours as far as your map is concerned - no way to determine who "did it"). In case you are unfamiliar with pointer areas they are the temporary graphics of a circle, square, or cone that you can place in your map. Risky modification hijacking some code not meant to do what I'm doing with it (all the pointer logic I really need is buried in the engine and not exposed for access) so I'm putting this in here - free - guarded with option. Use at own risk.
    Feature - for the V1.5 feature having CTR key pressed while selecting map toolbar targeting icon while an active pointer area is present will only select tokens that are same faction as selected token(s). Having ALT key pressed will only select tokens that are different faction from selected token(s). Both keys will not allow things that are not in CT to be selected. Same behavior as V1.5 - will target tokens unless all are currently targeted then it will unselect them.

    V1.2 - Bug - made sure targeting only targets map tokens that are in combat tracker list.

    Reported Conflicts:
    Advantages PA does not work with Critical Awesome Essentials and Token Height Indication.

    Extensions = RISK: This note is added to all the extensions I maintain. I want users to understand that extensions are code that is added to or overrides portions of code in the Fantasy Grounds Unity (FGU) application. When the underlying code in FGU changes it can break an extension. When you run with other extensions they can conflict by trying to overwrite the same parts of the FGU code. I will keep my extensions working with FGU changes, and the extensions I use (listed in my FGU signature) as I have direct control over those things. I cannot make the same promise with other extensions. If I am notified of an incompatibility I will attempt to resolve it - but if I cannot I will list what the known extension incompatibilities are. Understand before you get any extensions that it comes with RISK. Not just my extensions - any extension.

    Included is original text used for describing this extension - provided for reference if needed.
    Attached Files Attached Files
    Last edited by SilentRuin; June 17th, 2022 at 21:27.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  2. #2
    Forgot to add in the extension (sigh) Fixed.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  3. #3
    Added text (host only) to remembering groups between sessions.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  4. #4
    Caveat: If you have an empty group name then FGU does not really treat it as really in the list when you come back up. If this was the last one chosen it will show in list but pulldown will not show it - just pick a valid one or recreate the group name. This is just how those group/category lists work.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  5. #5
    V1.2 - Fix: needed to fake/translate DB active_category value "**" as uncategorized(true category is "") so that it could be stored in DB.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  6. #6
    I should warn about using hot keys that require CTRL, ALT, or SHIFT to trigger because if you put anything in a hot key that also reacts to CTRL, ALT, or SHIFT you can't really trigger it without those effects being applied. For example, with this extension if you had a CTRL hot key with some kind of dice roll it would always roll it with advantage. If you had an ALT hot key with some kind of dice roll it would always roll it with disadvantage. And if you are in regular FGU even with no extensions you had a SHIFT hot key with some kind of damage roll it would always make it a critical roll.

    This is going to be true with anything you put in CTRL, ALT, or SHIFT hot key triggers because those keys will be detected by the simple act of trying to put something in that reacts to them in there.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  7. #7
    Quote Originally Posted by SilentRuin View Post
    My personal grab bag I add simple stuff into that I want for my campaigns. Use at your own risk "as is". Set for "5E - Advantages" but probably could have extension.ext file changed to support any ruleset as its pure CoreRPG code modifications I think. This code is free for anyone to take and use even FGU.

    V1.0 - New Feature: Holding CRL key during button press will give ADVantage. Holding ALT key during button press will give DISadvantage.

    V1.1 - New Feature: All Group selections from last session (host only) will be remembered.

    V1.2 - Fix: needed to fake/translate DB active_category value "**" as uncategorized(true category is "") so that it could be stored in DB.


    Extensions = RISK: This note is added to all the extensions I maintain. I want users to understand that extensions are code that is added to or overrides portions of code in the Fantasy Grounds Unity (FGU) application. When the underlying code in FGU changes it can break an extension. When you run with other extensions they can conflict by trying to overwrite the same parts of the FGU code. I will keep my extensions working with FGU changes, and the extensions I use (listed in my FGU signature) as I have direct control over those things. I cannot make the same promise with other extensions. If I am notified of an incompatibility I will attempt to resolve it - but if I cannot I will list what the known extension incompatibilities are. Understand before you get any extensions that it comes with RISK. Not just my extensions - any extension.

    Included is original text used for describing this extension - provided for reference if needed.
    This extension is in conflict with elven accuaracy. When we hold the ctrol to advantage, it gives an error if the elven accuaracy extension is on

  8. #8
    Quote Originally Posted by Tatershal View Post
    This extension is in conflict with elven accuaracy. When we hold the ctrol to advantage, it gives an error if the elven accuaracy extension is on
    Not enough information to go on. You'll have to supply the error in my code here. This is a very simple extensions in that part and calls the original code - so if they are doing the same (calling the original code in what they do) there should be no issue. Super simple. Not sure what it can conflict with. UNLESS you already have the advantages set some other place - then of course you'd not want this extension.

    Code:
    function encodeAdvantage(rRoll, bADV, bDIS)
    	if Input.isControlPressed() then
    		bADV = true;
    	else
    		if Input.isAltPressed() then
    			bDIS = true;
    		end
    	end
    	saveencodeAdvantage(rRoll, bADV, bDIS);
    end
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  9. #9
    Quote Originally Posted by SilentRuin View Post
    Not enough information to go on. You'll have to supply the error in my code here. This is a very simple extensions in that part and calls the original code - so if they are doing the same (calling the original code in what they do) there should be no issue. Super simple. Not sure what it can conflict with. UNLESS you already have the advantages set some other place - then of course you'd not want this extension.

    Code:
    function encodeAdvantage(rRoll, bADV, bDIS)
    	if Input.isControlPressed() then
    		bADV = true;
    	else
    		if Input.isAltPressed() then
    			bDIS = true;
    		end
    	end
    	saveencodeAdvantage(rRoll, bADV, bDIS);
    end
    the log https://drive.google.com/file/d/1FQk...ew?usp=sharing
    log.png

  10. #10
    Yeah that is not this code. I would have no idea why they are not guarding against nil values for data. You will have to check with the author or not use this code. I can fix my stuff - I can't fix someone else's. It's possible they are doing something with the other part of this code involving master index and saving of the group name - but I really have no idea. Sorry.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

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
  •  
SWADE Playlist

Log in

Log in