PDA

View Full Version : 5E - Capital Gains



MeAndUnique
November 19th, 2021, 22:50
Check it out on The Forge (https://forge.fantasygrounds.com/shop/items/375/view).

A Fantasy Grounds extension that adds support for managing custom resources.

A new Resources section has been added to both that character sheet and NPC sheet. Resources can be configured to have an upper limit or be left limitless. They may also be configured to gain and/or lose value periodically, such as on the start of the turn or after a long rest, for example. Resource definitions may also be shared amongst multiple characters by dropping a reference to the "Share with" list in the resource editor. (Resource sharing requires all participants to be in the CT for full automation.)

There is also a new Resource action type, which may be configured to spend or gain the associated resource. A resource spending action may be configured as variable to specific a minimum and (optional) maximum value to spend when using the action, enabling the value to be changed on the fly via Ctrl+Mouse Wheel on either the action text or mini-action button.

The following syntax additions have been made for effect processing:

[CURRENT(n*Resource Name)] - When the effect is applied this notation will be replaced with the current value of the named resource, multiplied by n. n is optional.
[SPENT(n*Resource Name)] - When the effect is applied this notation will be replaced with the amount of the named resource that has been spent this turn, multiplied by n. n is optional.


The following effects have been added:

RSRCHEALS: d, Resource Name - While this effect is active any time the named resource is spent by the bearer of this effect, the bearer of the effect is healed by d (which can be any dice string).
RSRCHEALT: d, Resource Name - While this effect is active any time the named resource is spent by the bearer of this effect, the targets of the bearer are healed by d (which can be any dice string).
GRANTS: d, Resource Name - While this effect is active on the start of the bearer's turn, the applier of the effect will gain d (which can be any dice string) of the named resource.

anathemort
November 20th, 2021, 02:38
Well this is really neat, thanks for sharing. I really appreciate your extensions!

rhagelstrom
November 20th, 2021, 14:44
I'm still trying to wrap my head around this. I think there are a lot of possibilities. Would it be possible to automate arcane ward with this? Can you post some screenshots of examples so I can get a better idea how this works?

randomnumber46
November 21st, 2021, 11:44
This seems to stop me from adding NPCs to the combat tracker. I've tried loading only this extension and immediately adding an unmodified NPC to the tracker and it just doesn't work. If I add an encounter I get '[ERROR] Unable to create NPC record. ([NPC name])' in the chat.

Very cool extension though, I can already see a lot of potential uses!

MeAndUnique
November 21st, 2021, 19:36
I'm still trying to wrap my head around this. I think there are a lot of possibilities. Would it be possible to automate arcane ward with this? Can you post some screenshots of examples so I can get a better idea how this works?

While I work on getting something a bit more complete put together I hope this will suffice as a bit of a high level visual intro. :)
50051

MeAndUnique
November 21st, 2021, 19:38
This seems to stop me from adding NPCs to the combat tracker. I've tried loading only this extension and immediately adding an unmodified NPC to the tracker and it just doesn't work. If I add an encounter I get '[ERROR] Unable to create NPC record. ([NPC name])' in the chat.

Very cool extension though, I can already see a lot of potential uses!

Sorry for the inconvenience and thanks for reporting! Version 1.0.1 has been released to address this.

anathemort
November 22nd, 2021, 02:40
So far, I'm using it for sorcery points and paladin's lay on hands pool. I'll be exploring ways to use it for a radiant soul monk next week, too!

nephranka
November 23rd, 2021, 13:07
I don't know if this has been reported but there is a conflict with Zarestia's Spell action info ext. When you right click to add a resource it throws:
[string "campaign/scripts/power_item.lua"]:119: attempt to index global 'powertknbutton' (a nil value)

MeAndUnique
November 23rd, 2021, 19:34
Zarestia and I have been in communication and hope to have this resolved soon.

nephranka
November 23rd, 2021, 19:56
Thank you for taking a look.

MeAndUnique
November 23rd, 2021, 22:30
Version 1.0.2 released which relocates the resource action menu item for compatibility with the CAE extension.

nephranka
November 23rd, 2021, 22:48
Version 1.0.2 released which relocates the resource action menu item for compatibility with the CAE extension.

Does this also address spell info ext conflict as well. Thanks.

Edit: nevermind just saw the other thread. Thanks!

Tabarkus
November 24th, 2021, 17:06
Can this extension be used to automatically manage rations and water as resources on a long rest?

If I configure it to Gain a ration on a long rest it adds it properly, but if I configure it to Lose a ration on a long rest I get a "Handler error: 240: attempt to perform arithmetic on a string value".

I can configure the Gain using negative numbers and it subtracts properly.

bratch9
November 24th, 2021, 18:23
I've had a look into the reported conflict with ASD, reference Conflict with ASD (https://www.fantasygrounds.com/forums/showthread.php?61703-extension-Advanced-Spell-Damage-Extension-casting-spells-at-higher-level&p=628060&viewfull=1#post628060)

Because these extensions change a number of power and effect blocks of code this is a significant conflict. ASD totally replaces some of these functions, due to code changes mid way into the functions, making the inclusion of the full functions a requirement and not possible to call the original.

The reported error can be resolved by moving the CG extension to a higher load order, so that most of its functions that call into ASD replaced ruleset functions will work. But it still causes the evaluation effects function to fail.

This is because 'evalEffect' in ASD adds extra parameters and so also does not call the original function. So when CG is loaded at its current point its 'evalEffect' does not get called so it does not resolve the 'SPENT' value in the effect. And when its loaded higher this fails due to not knowing about the extra parameters and so these get dropped and that breaks the ASD 'evalEffect' function.

I can probably look further into the exact function flow for the 'evalEffect' and it might be possible to resolve this part at my side, but it would require CG be loaded at a higher priority for the other parts to function.

Could I request CG change its load order to > 110, and I'll look into the evalEffect evaluation fail, and see if I can patch in calling some of the CG code to exchange this about.

-pete

( Again I noticed CG using globals to jump things over functions, which is not a good design. But I understand its use.. Its why ASD has extra parameters to functions to pass these about which is also causing conflict issues, and is also not a good design for compatibility. Neither ways are good designs but I dont see a good way without dev ruleset changes to the effects systems to allow parameter extensions. I'm not sure if the big release due in december is going to move effects down into coreRPG and allow per rule modifications. Since the effect system started in 5E and has been pulled about into most other rulesets, its probably due a refactor into coreRPG. I've not looked at the 'test' branches to see how 'broken' extensions will be. This might be a good broken time for me to adjust how ASD works. )

Kelrugem
November 24th, 2021, 19:33
This is because 'evalEffect' in ASD adds extra parameters and so also does not call the original function. So when CG is loaded at its current point its 'evalEffect' does not get called so it does not resolve the 'SPENT' value in the effect. And when its loaded higher this fails due to not knowing about the extra parameters and so these get dropped and that breaks the ASD 'evalEffect' function.

I just skimmed through your message, but one should be able to cater for possible additional parameters of other extensions by using ... :) That is as in



function onInit()
OldevalEffect = ScriptName.evalEffect;
ScriptName.evalEffect = evalEffect;
end

function evalEffect(Old/typical variables, ...)
local blah = OldevalEffect(Old/typical variables, ...);
Remaining code
end


Observe the ... in the function :) (I mean one has to use the dots, literally) If I am not mistaken, with that one can cater for any additional parameters from other sources :) but depends of course always a bit on the context etc., especially if the new variables are not added at the end of the base variables, then it will probably not be possible. But I hope you get the idea :) In the best case MeAndUnique just has to add the dots after increasing the loadorder :)

I hope this helps, but I just skimmed the post

bratch9
November 25th, 2021, 13:50
I just skimmed through your message, but one should be able to cater for possible additional parameters of other extensions by using ... :) That is as in



function onInit()
OldevalEffect = ScriptName.evalEffect;
ScriptName.evalEffect = evalEffect;
end

function evalEffect(Old/typical variables, ...)
local blah = OldevalEffect(Old/typical variables, ...);
Remaining code
end


Observe the ... in the function :) (I mean one has to use the dots, literally) If I am not mistaken, with that one can cater for any additional parameters from other sources :) but depends of course always a bit on the context etc., especially if the new variables are not added at the end of the base variables, then it will probably not be possible. But I hope you get the idea :) In the best case MeAndUnique just has to add the dots after increasing the loadorder :)

I hope this helps, but I just skimmed the post

Thanks for the info, was not sure on the '...' capture of extra variables and how to pass them in lua. ( I'm more a c++ person, so those end up in vargs to process. )

When I get some time I'll add some debug output and try and track down the failing point of the evalEffect. ( I've got some changes in my extension I should resolve and check into git before I get too far into debug this issue. )

Its also possible that the 'format' been odd is causing the issue...

I'm testing with 'DMG: [2*SPENT:ki]d10' and I'm not a fan of the 'd10' been attached but outside the '[]' control section. So its possible I have code looking for '^]' ending a token in ']' which is now seeing ']d10' and not spotting the end of the token..

I'm also not a fan of the use of '*' for multiply. As far as I recall its possible to do [2CHAR] to get 2xChar bonus as a value.

And I'm not a fan of ':' in the [] section for the spent as its the marker for command. I'd prefer to see a () section more like other effect items like 'size(>m)' construct.

In my other extension I can generate dice which the normal effect [] section can not. But I added the dice type as an optional at the end. So [2CHR] => '2x char bonus' would become [2CHR6] => 2xChar bonus of d6...

As a suggestion I'd prefer to see the 'DMG: [2*SPENT:ki]d10' looking more like 'DMG: [2SPENT(ki)10]' as this follow more the ruleset decode structure.

Also the likes of 'ki points' does not work due to the space, and with the () section it would be easy to grab that block and trim start/end and maybe split by ','. To add support for the likes of 'SPENT(ki points, bonus)' for it to convert to 'ki point + bonus' pair of resources. ( with even maybe pre-fix '-' to allow negatives to interact. )

-pete

anathemort
November 25th, 2021, 17:03
I second pete's formatting ideas. Those elements of consistency would be a great enhancement!

MeAndUnique
November 25th, 2021, 18:48
Hey folks, sorry for the delay on response. I'm out of town for the holiday.

When I get back next week I can certainly address the bug with ration loss not working as intended as well as bump the load order.

Also, thanks for the "..." reminder! I too often forget about that due to C-based trauma.

As for formatting suggestions (in no particular order):
The asterisk is technically optional, so feel free to exclude it for "2CURRENT". I find it to be beneficial when reading complex effect blocks to break up longer chunks, especially with decimal numbers.

I'm not immediately a fan of the proposed notation for including dice inside the effect. And given that it is not similar to any ruleset representation (in fact [STR] d6 works (sometimes)), well, I'll give it some time to grow on me before committing either way.

The use of a ":" in the effect was to avoid nesting scope notation with () and [], since that seemed like it would be cumbersome for most users. The colon matches natural language a bit closer for what is being represented. I think I'll leave this one to a vote, both here as well as asking my players. Though I should clarify that if a change is made it will be to support putting the dynamic notation (bullets 3 and 4 from the first post) in brackets to calculate and replace when the effect is added, so a multiplication factor would live inside the parenthesis.

Resources with spaces in the name are already supported by design, so if that's not working in some context it's a bug I'll happily fix.

I think I'll change the dynamic notation to have the multiplication factor in front of the resource name, which with the optional nature of the syntax will support "-Resource Name".

Comma delimiting inside the SPENT block could be useful, though I have a gut feeling that it would be such a niche case that it may not justify the complexity of the code, since the same outcome can presently be achieved with multiple blocks. I'll give it some thought.

MeAndUnique
November 25th, 2021, 19:07
Regarding the merits, or lack thereof, of various design decisions. I do think it important to call out that CG doesn't use global variables. It does use local variables to represent object state, albeit in a manner that is similar to stack memory. Of course, I don't need to explain to someone with a C++ background how local and global variables couldn't be more different. As for the nature of the primary variable itself, capturing object state in a local variable is fundamental OO design. I know some folks have strong opinions about OO in general, though I think it's safe to say the ship has sailed on that discussion in the context of FG.

Of course in an ideal world the ruleset code itself would be more SOLID, which could certainly mitigate the necessity of jumping through some of the hoops we have encountered. That will continue to improve as it has been, I'm sure, so maybe some day an alternative solution to the current situation with more simplistic presentation will be viable. Until then, I'm going to stick with this style of solution wherever necessary, as the primary alternative of adding function parameters along the entire stack is much more likely to cause conflicts.

bratch9
November 26th, 2021, 11:35
Regarding the merits, or lack thereof, of various design decisions. I do think it important to call out that CG doesn't use global variables. It does use local variables to represent object state, albeit in a manner that is similar to stack memory. Of course, I don't need to explain to someone with a C++ background how local and global variables couldn't be more different. As for the nature of the primary variable itself, capturing object state in a local variable is fundamental OO design. I know some folks have strong opinions about OO in general, though I think it's safe to say the ship has sailed on that discussion in the context of FG.

Of course in an ideal world the ruleset code itself would be more SOLID, which could certainly mitigate the necessity of jumping through some of the hoops we have encountered. That will continue to improve as it has been, I'm sure, so maybe some day an alternative solution to the current situation with more simplistic presentation will be viable. Until then, I'm going to stick with this style of solution wherever necessary, as the primary alternative of adding function parameters along the entire stack is much more likely to cause conflicts.

We clearly have a different definition of 'global' then.

In 'manager_effect_cg.lua", your use of 'bReplace' is a global. It is set in 'evalEffect' and this calls 'evalEffectOriginal' and during some point of the 'evalEffectOriginal' function it will call your intercepted 'parseEffectComp'. In effect you are passing this around as a global.

Variables outside of a function scope or parameter list are the definition of 'global'.

Just because you choose to consider 'local bReplace = false;' as not a global because it is local to your script does not change the fact it is a global variable.

ie,

local bReplace = false; -> is a lua script 'local' global. ( You will get a per script instance of this variable. )
bSomething = false; -> is a lua system wide global which can be accessed by other scripts. ( You will get a single instance of this for the game. )

Just clearing up what I consider a global.

-pete

bratch9
November 26th, 2021, 11:42
Regarding the merits, or lack thereof, of various design decisions. I do think it important to call out that CG doesn't use global variables. It does use local variables to represent object state, albeit in a manner that is similar to stack memory. Of course, I don't need to explain to someone with a C++ background how local and global variables couldn't be more different. As for the nature of the primary variable itself, capturing object state in a local variable is fundamental OO design. I know some folks have strong opinions about OO in general, though I think it's safe to say the ship has sailed on that discussion in the context of FG.

Of course in an ideal world the ruleset code itself would be more SOLID, which could certainly mitigate the necessity of jumping through some of the hoops we have encountered. That will continue to improve as it has been, I'm sure, so maybe some day an alternative solution to the current situation with more simplistic presentation will be viable. Until then, I'm going to stick with this style of solution wherever necessary, as the primary alternative of adding function parameters along the entire stack is much more likely to cause conflicts.

On the difference between your use of a local global to pass custom values and adding parameters..

In a normal product it would be a poor design ( you would change the full source code. ), but in this case of extension API it is probably better than passing extra variables to replaced ruleset functions. Because rulesets and other extensions are not written to cope with the extra parameters.

It would be different if the ruleset used the '...' by default, ie 'function parseEffectComp(s,...)' and always passed the '...' to sub function calls to default that all functions by design should consider the possibility of extra parameters and the need to pass those about.

BUT since the ruleset does not use the '...' by default, I do think your global version with increased compatibility is the better design than passing parameters.

-pete

bratch9
November 26th, 2021, 12:03
Hey folks, sorry for the delay on response. I'm out of town for the holiday.

When I get back next week I can certainly address the bug with ration loss not working as intended as well as bump the load order.

Also, thanks for the "..." reminder! I too often forget about that due to C-based trauma.

As for formatting suggestions (in no particular order):
The asterisk is technically optional, so feel free to exclude it for "2CURRENT". I find it to be beneficial when reading complex effect blocks to break up longer chunks, especially with decimal numbers.

I'm not immediately a fan of the proposed notation for including dice inside the effect. And given that it is not similar to any ruleset representation (in fact [STR] d6 works (sometimes)), well, I'll give it some time to grow on me before committing either way.

The use of a ":" in the effect was to avoid nesting scope notation with () and [], since that seemed like it would be cumbersome for most users. The colon matches natural language a bit closer for what is being represented. I think I'll leave this one to a vote, both here as well as asking my players. Though I should clarify that if a change is made it will be to support putting the dynamic notation (bullets 3 and 4 from the first post) in brackets to calculate and replace when the effect is added, so a multiplication factor would live inside the parenthesis.

Resources with spaces in the name are already supported by design, so if that's not working in some context it's a bug I'll happily fix.

I think I'll change the dynamic notation to have the multiplication factor in front of the resource name, which with the optional nature of the syntax will support "-Resource Name".

Comma delimiting inside the SPENT block could be useful, though I have a gut feeling that it would be such a niche case that it may not justify the complexity of the code, since the same outcome can presently be achieved with multiple blocks. I'll give it some thought.

My suggestions are just suggestions. As you say you have reasons for how they are encoded, and I gave suggestions and reason for mine. Your users can make suggestions and maybe you will implement or not.

On the dice encoding after the [] section, 50102 are the 5e ruleset responses to the different types. By default neither of the '[] d6' or '[]d6' evaluate to a valid 'DMG: line'

Which is why I suggested and implemented in my extension the value been inside the '[]' section. To the ruleset this still parses with the default code.

ie, [2CHA6] would parse into '2 *' the lookup for 'CHA6' which would then fail to lookup due to the 'elseif sTag == "CHA" then' which would not map it and so would be correctly skipped due to the ruleset 'nil' check.

I dont know in what 'cases' these 'sometimes' work?

But as you say, how you want to encode the token structure is upto you on this. I can only make suggestions.

-pete

Kelrugem
November 26th, 2021, 12:10
My suggestions are just suggestions. As you say you have reasons for how they are encoded, and I gave suggestions and reason for mine. Your users can make suggestions and maybe you will implement or not.

On the dice encoding after the [] section, 50102 are the 5e ruleset responses to the different types. By default neither of the '[] d6' or '[]d6' evaluate to a valid 'DMG: line'

Which is why I suggested and implemented in my extension the value been inside the '[]' section. To the ruleset this still parses with the default code.

ie, [2CHA6] would parse into '2 *' the lookup for 'CHA6' which would then fail to lookup due to the 'elseif sTag == "CHA" then' which would not map it and so would be correctly skipped due to the ruleset 'nil' check.

I dont know in what 'cases' these 'sometimes' work?

But as you say, how you want to encode the token structure is upto you on this. I can only make suggestions.

-pete

You have to write: DMG: d6 [2CHA] :) First the dice, then tags, the space after d6 will be interpreted as an addition. If you want to add damage types, then DMG: d6 [2CHA], slashing and so on :)

Or are you speaking about using 2CHA as the number of d6 you want to use? (here: the 2*CHA mod will be added as a modifier to 1d6)

bratch9
November 27th, 2021, 19:55
You have to write: DMG: d6 [2CHA] :) First the dice, then tags, the space after d6 will be interpreted as an addition. If you want to add damage types, then DMG: d6 [2CHA], slashing and so on :)

Or are you speaking about using 2CHA as the number of d6 you want to use? (here: the 2*CHA mod will be added as a modifier to 1d6)

Yes I'm only talking about the 2CHA becoming a number of dice of a dice type not a basic addition of value. Which is used by the CG extension to generate flexible dice amounts, see image in link (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=50051&d=1637523389)

As I said by default 5e ruleset does not support this and we were talking about the merits or not of encoding this as either '[2CHA]d6' as per CG or as my extensions do as '[2CHA6]'.

My feeling was that the '[]' should be self contained as the 5e ruleset would see [2CHA6] as looking for 2x 'CHA6' which would fail but would still process the rest of the DMG type line. While '[2CHA]d6' breaks the parse process and stops. Both are going to cause failures to evaluate but in different ways. My point was that its very simple to have a 'space' that is hard to spot so '[2CHA] d6' and '[2CHA]d6' causing different results. While [2CHA6] is very specific if more 'cryptic' because you are not listing a 'd<n>' descriptor.

It comes back to a lot of the match type codes do searches for the likes of 'ends with ']'' which an encoding of '[2CHA]d6' breaks as now it end with ']d6' when tokens get split by ' ' separators. If you split by ' []' list of tokens to split with then the processing code is different because you are looking at start token '[' a number of tokens and then end token ']'. which is very different code to match("[(^])") { I'm sure I've got that wrong from off the top of my head, for starts with '[' and give me everything upto the end of ']' } type lua match searches used around the code and effect parses.

But how the encode works and is adjusted is up to CG, I was only making a suggestion to keep everything in the '[]' as this feel more in the spirit of the '[]' generation to 'something' exchange process of the effect line.

-pete

rhagelstrom
November 27th, 2021, 20:11
Just a my .02. If you go with [2CHA]d6 instead of [2CHA6] then you can leverage EffectManager5E.evalEffect to eval the brackets for you

bratch9
November 27th, 2021, 21:45
Just a my .02. If you go with [2CHA]d6 instead of [2CHA6] then you can leverage EffectManager5E.evalEffect to eval the brackets for you

As shown in #22 see image Dice.png (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=50102&d=1637927783) the '[2CHA]d6' does not evaluate in the default 5e ruleset.

I'm not sure if the ruleset has an option to enable this parse process or if its an extension in use that allows this change ?

But my testing show, and seen in the image attached above, that the default ruleset does not process that construct. Which is why my extension added support for '[2CHA6]'.

-pete

bratch9
November 28th, 2021, 14:42
I've updated advanced spell damage and seems to be evaluating the CG effect lines and clears up the initial script error when character is open.

It does require CG to load after ASD, so I'd request a change to <loadorder>120</loadorder>

-pete

MeAndUnique
November 29th, 2021, 14:58
Just released version 1.0.3 which increases load order and fixes a bug with periodic resource loss.

anathemort
November 29th, 2021, 17:28
Thanks for your rapid attention on this, MeAndUnique! Happy to report I have updated and all is well now :)

Tabarkus
November 30th, 2021, 15:10
Thanks, I've been planning a 'survival' type adventure campaign and this extension will be very useful. I have a couple of requests, I'm not a coder so I don't know how practical these requests are so take them with a grain of salt.

Can you make the Resource section operate as a "drop down menu" like other sections do where you can minimize the space taken up on the Actions tab?

Can you have the Resource usage also reduce the Inventory count of things like Rations and Waterskins?

MeAndUnique
November 30th, 2021, 15:32
Thanks, I've been planning a 'survival' type adventure campaign and this extension will be very useful. I have a couple of requests, I'm not a coder so I don't know how practical these requests are so take them with a grain of salt.

Can you make the Resource section operate as a "drop down menu" like other sections do where you can minimize the space taken up on the Actions tab?

Can you have the Resource usage also reduce the Inventory count of things like Rations and Waterskins?

Glad to hear that it will be useful for you!

Accordion collapsing is just on oversight on my part, I will have that fixed in the next update (no fixed schedule, though). Sorry for the inconvenience.

For inventory management I'd recommend taking a look at Kit'N'Kaboodle (https://forge.fantasygrounds.com/shop/items/41/view). E.g. you could set a ration up as having a single charge, lose a charge a 6pm each day (if using the Clock Adjuster extension as well, otherwise Long Rest is built-in), and be destroyed on last charge used. I think there's an opportunity to harmonize the two extensions with novel functionality, but I haven't yet wrapped my head around what that should look like.

Tabarkus
November 30th, 2021, 22:58
Cool, thanks, I'll look into those.

Tabarkus
December 2nd, 2021, 14:45
Hey, I get the following displayed in the chatbox when using Captial Gains set to Resource Lose on Long Rest: 50172. I don't get this display when I set things to a Gain setting.

MeAndUnique
December 2nd, 2021, 15:37
Hey, I get the following displayed in the chatbox when using Captial Gains set to Resource Lose on Long Rest: 50172. I don't get this display when I set things to a Gain setting.

Woops, sorry about that. I'll get that removed in the next update.

MeAndUnique
December 7th, 2021, 19:34
Version 2.0.0 has been released with updated effect syntax and bug fixes. Due to the change in syntax this is a potentially breaking change for existing effects.

BushViper
December 12th, 2021, 07:05
I have my own set-up, but it's not elegant. So, I'm curious about what people have come up with in terms of setting up Food/Water consumption and what it looks like. Also, some kind of warning if they're out of either resource.

nephranka
December 12th, 2021, 17:26
I have my own set-up, but it's not elegant. So, I'm curious about what people have come up with in terms of setting up Food/Water consumption and what it looks like. Also, some kind of warning if they're out of either resource.

I use Kit'N'Kaboodle and ration item with the following set:

the display group to consumables
Charge 1, never
On last charg destroy
Power: Consume food, 1 charge

After we have resolved hunting, staying at an inn, etc...I tell them to take a day's worth of rations and I see the output in chat.

MeAndUnique
December 16th, 2021, 03:01
Hey folks, a new module just released that I'm super proud of that ties in to Capital Gains, among a handful of other great extensions, for a brand new class mechanic centered around managing a highly dynamic resource called Ferocity. If you or your players enjoy the fantasy of a character that cooperates with a wild creature, I highly recommend taking a look at Beastheart and Monstrous Companions (https://www.fantasygrounds.com/store/product.php?id=IPFG5EMCDMTB).

randomnumber46
December 22nd, 2021, 02:05
I've just tried making a Beastheart with this and it's excellent, however, it's generating ferocity for both the beastheart and the companions turns in the combat tracker, even though they are sharing the same resource. Should I be doing anything different than just dragging both to the combat tracker? I'm dragging from the PCs character sheet for the companion using the Friend Zone extension.

MeAndUnique
December 22nd, 2021, 19:03
I've just tried making a Beastheart with this and it's excellent, however, it's generating ferocity for both the beastheart and the companions turns in the combat tracker, even though they are sharing the same resource. Should I be doing anything different than just dragging both to the combat tracker? I'm dragging from the PCs character sheet for the companion using the Friend Zone extension.

You can open up the Ferocity resource for either the companion or the Beastheart by hitting the magnifying glass next to it, from there just set one of them to never gain Ferocity. Personally, I set the companion to always go immediately before the Beastheart in initiative order on the CT and have the Beastheart not gaining Ferocity on their own.

As an aside improvements to cohort initiative handling is on my radar, though there are still some edge cases to work out for general usability.

BlazingAzureCrow
December 30th, 2021, 00:37
I'm encountering an odd problem. I imagine you might not be able to address it on your end, but I wanted to mention it anyway. I started getting errors in-game when opening the actions tab for the first time, where several lines of errors would come up, all reading

script execution error: [string "scripts/manager_power_cg.lua:]:24: attempt to index local 'rAction' (a nil value)

It doesn't seem to stop anything from working, but it pops up that first time it's opened in a session, then never again until the next one. The curious thing about this is that after extensive testing, I've noticed in only happens when the three extensions "Kit'n'kaboodle", "Capital Gains" and "Mad Nomand's Character Effects Display" are on. No single one or combination of the two causes it. It has to be all three for the errors to happen. Since two of those are your extensions I figured I'd talk to you first. Is it possible to get a fix to this?

MeAndUnique
December 31st, 2021, 18:20
I'm encountering an odd problem. I imagine you might not be able to address it on your end, but I wanted to mention it anyway. I started getting errors in-game when opening the actions tab for the first time, where several lines of errors would come up, all reading

script execution error: [string "scripts/manager_power_cg.lua:]:24: attempt to index local 'rAction' (a nil value)

It doesn't seem to stop anything from working, but it pops up that first time it's opened in a session, then never again until the next one. The curious thing about this is that after extensive testing, I've noticed in only happens when the three extensions "Kit'n'kaboodle", "Capital Gains" and "Mad Nomand's Character Effects Display" are on. No single one or combination of the two causes it. It has to be all three for the errors to happen. Since two of those are your extensions I figured I'd talk to you first. Is it possible to get a fix to this?

I will certainly take a look. Though given the error I suspect it to be a case where something has been overridden in another extension without calling the original code, which often results in conflicts. If I can identify a specific point to address I'll pass it along to Mad Nomad.

BushViper
December 31st, 2021, 19:31
script execution error: [string "scripts/manager_power_cg.lua:]:24: attempt to index local 'rAction' (a nil value)



I get the same error in the same situation.

I'd recommend going to Mad Nomad's Discord server and asking him to fix it. If he sees that it's affecting a lot of people he might be more inclined to address it.

MeAndUnique
January 1st, 2022, 21:52
Just released v2.0.1 which fixes a conflict with BCE and addressed a couple of internal bugs.

BlazingAzureCrow
January 2nd, 2022, 02:20
I'm not sure if the error I mentioned before was what was meant to be fixed, but it's still there. BCE is also having a conflict with something that's making SAVEE effects not roll properly, but I haven't figured out what extension it's conflicting with.

Ludd_G
January 2nd, 2022, 12:05
So far, I'm using it for sorcery points and paladin's lay on hands pool. I'll be exploring ways to use it for a radiant soul monk next week, too!

Hmmm, I feel like I'm just not getting it, but how do you set this up for the Paladin's Lay On Hands? I've successfully set it up for Monk's Ki points and Artificer's Infusions but these seem much more simple as the cost is set rather than variable. Any pointers?

Cheers,

Simon

anathemort
January 2nd, 2022, 16:15
Hmmm, I feel like I'm just not getting it, but how do you set this up for the Paladin's Lay On Hands? I've successfully set it up for Monk's Ki points and Artificer's Infusions but these seem much more simple as the cost is set rather than variable. Any pointers?

Cheers,

Simon

I have two games with different paladin characters. One is very simple, they just like to manage it themselves so we don't have a resource deduction action. The other is always using it in increments of 5 so they have just one heal5, deduct5 action. Any other increments can be handled manually.

MeAndUnique
January 4th, 2022, 06:09
I'm not sure if the error I mentioned before was what was meant to be fixed, but it's still there. BCE is also having a conflict with something that's making SAVEE effects not roll properly, but I haven't figured out what extension it's conflicting with.

Unfortunately, I have not been able to find any areas that I can address directly on my end. It does look like it will likely be a relatively straight-forward process on the Character Sheet Effects Display side of the code. Mostly just a few spots were missed to ensure that other extensions have an opportunity to run.

MeAndUnique
January 4th, 2022, 06:20
Hmmm, I feel like I'm just not getting it, but how do you set this up for the Paladin's Lay On Hands? I've successfully set it up for Monk's Ki points and Artificer's Infusions but these seem much more simple as the cost is set rather than variable. Any pointers?

Cheers,

Simon

If you wanna get a bit advanced, and allow for very quick and precise spending, you can add the following as a persistent effect to the paladin: "RSRCHEALT: Lay on Hands". Then give them a Resource called "Lay on Hands" and a new Resource Action to Spend 0 "Lay on Hands". Now, with all of the setup complete, whenever they would like to use the ability, they can set the amount they would like to heal in the Modifier box in the bottom-left, select their target, and hit the Spend action previously set up (dragging and dropping of the spend action on to the target also works).

nephranka
January 4th, 2022, 22:38
If you wanna get a bit advanced, and allow for very quick and precise spending, you can add the following as a persistent effect to the paladin: "RSRCHEALT: Lay on Hands". Then give them a Resource called "Lay on Hands" and a new Resource Action to Spend 0 "Lay on Hands". Now, with all of the setup complete, whenever they would like to use the ability, they can set the amount they would like to heal in the Modifier box in the bottom-left, select their target, and hit the Spend action previously set up (dragging and dropping of the spend action on to the target also works).

I gave this a spin and all works except for the targeting. If I target in the CT it heals the paladin. If I drag and drop on the target it works as intended. Maybe I missed something?

MeAndUnique
January 5th, 2022, 22:53
Version 2.0.2 is up with a bug fix for regular targeting not working as intended when using RSRCHEALT.

nephranka
January 6th, 2022, 01:30
Version 2.0.2 is up with a bug fix for regular targeting not working as intended when using RSRCHEALT.

Working as intended. Thanks!

MeAndUnique
January 8th, 2022, 21:59
Just released version 2.0.3 to address a somewhat obscure and relatively minor conflict.

MeAndUnique
January 9th, 2022, 18:15
Released v2.0.4 to update (S)GRANTS to work with recent BCE changes.

Sesa
January 9th, 2022, 22:02
I'm not sure if it was this extension but the party could view the party inventory on the party sheet after I added this extension to my campaign, even though the Party: Show inventory to clients option is turned off in the game options.

MeAndUnique
January 9th, 2022, 22:37
I'm not sure if it was this extension but the party could view the party inventory on the party sheet after I added this extension to my campaign, even though the Party: Show inventory to clients option is turned off in the game options.

I can verify that the party sheet inventory is unaffected when only Capital Gains is loaded. As such it is either another extension causing the issue directly, or the result of a conflict when multiple extensions are loaded together. If it is the result of a conflict between Capital Gains and another extension I'd be happy to investigate a solution, though I'd need to know what other extension Capital Gains is conflicting with first.

anathemort
January 9th, 2022, 22:46
I'm not sure if it was this extension but the party could view the party inventory on the party sheet after I added this extension to my campaign, even though the Party: Show inventory to clients option is turned off in the game options.

If you recently added the Inventory Search extension, this was a bug there. I fixed it in v1.3.0, now live on the forge.

Sesa
January 10th, 2022, 18:44
If you recently added the Inventory Search extension, this was a bug there. I fixed it in v1.3.0, now live on the forge.

I do have that extension but it wasn't recently added, and I have been updating it. Will still check if it's that one, thanks.

Bonkon
January 12th, 2022, 22:46
Good Day MeAndUnique :)
I love the idea of this extension! I have the recharges working but I am struggling to get the effects syntax to work. I am trying to make a Staff of Healing. I tried following your screenshot from earlier showing damage added with the Way of the Long Death monk. I can get the correct deductions from the Resources but it will not calculate the roll in the effect. My syntax is:
HEAL: [SPENT:Staff of Healing]d8 with the options of 1 round and target self.

When I click the effect what I get on the CT is:
HEAL: [SPENT:Staff of Healing]d8

Just to ensure it was not the HEAL command I also tried setting up DMG exactly as your screenshot shows.
This was tested on a clean campaign with no other extensions running.
Thanks :)

BlazingAzureCrow
January 13th, 2022, 01:12
I'm not sure if this has been reported before, but whenever I have only Mad Nomad's Character Effects Display and Capital Gains on, it doesn't show anything in the action tab for the in-box text for resource spending.

50956

BushViper
January 13th, 2022, 01:28
I'm not sure if this has been reported before, but whenever I have only Mad Nomad's Character Effects Display and Capital Gains on, it doesn't show anything in the action tab for the in-box text for resource spending.

50956

Yep. The issue is known to both MeAndUnique and Mad Nomad. However, it's an issue that Mad Nomad has to fix. It may help if you go to his Discord channel on Rob2Es server and report the issue.

MeAndUnique
January 15th, 2022, 18:02
Just released version 2.0.5 with a bug fix for (S)GRANTS effects.

nephranka
January 19th, 2022, 11:57
I was experimenting with the ext and I could not seem to get the following to work. Maybe it can not do it, but I thought I ask.

I created a resource called Divine light. I used the AE ext to add: RSRCHEALT: [SPENT(Divine Light)]d6 to the character. I add an effect that spends Divine Light using the modifier box. When I click it I get the resource is spent in chat but no healing occurs. Maybe the [ ] did not resolve to a number? I assume it is the way AE resolves the effect. If I use RSRCHEALT: Divine Light it heals the amount equal to the modifier box. Thanks!

Edit: alternately, might it be that RSRCHEALT is decoding the number from the spent but is not rolling the dice to heal? Just thinking out loud.

Edit2: I cannot get the []d6 part of the effect to pass to the RSRCHEALT. It appears to not be an issue with AE and maybe I am asking the ext to do something it was not designed to due.

randomnumber46
February 13th, 2022, 01:09
Are there any plans to add resources to the combat tracker for NPCs?

Leprekorn
March 10th, 2022, 13:54
So I have linked a monstrous companion to a caregiver sharing the ferocity pool, should a change in ferocity triggered by either of the 2 meen a change in boths ferocity or will only the changes made to the caregivers ferocity be reflected on both? The reason I ask is I have added the aura effect to the monstrous companion and set it that on the monstrous companions turn it generates the 1d4 standard ferocity however I am only seeing the change on the monstrous companion not the care giver.
51943

Leprekorn
March 10th, 2022, 14:13
I have it working now seems like my companion having inventory was causing issues, when I re added them to the CT

nephranka
March 10th, 2022, 17:01
Looks like something is broken on the player side for RSRCHEALT. The DM can do it with no issues but the player just spends resource points and heals zero.

MeAndUnique
March 13th, 2022, 04:31
Hey folks, just released version 2.0.6 which fixes compatibility with Inanimate Object Manager as well as the issue with players not being able to properly use RSRCHEALT.

nephranka
March 13th, 2022, 12:07
Hey folks, just released version 2.0.6 which fixes compatibility with Inanimate Object Manager as well as the issue with players not being able to properly use RSRCHEALT.

That looks to have fixed it. Thanks!

MeAndUnique
April 21st, 2022, 09:53
Just release version 2.0.8 which allows the current resource field to dynamically grow if large values are used. Special thanks to @daddyogreman for the idea and code contribution!
Also, apparently I forgot to update the forum post for v2.0.7, which fixed the ruleset restriction to 5E.

MeAndUnique
April 26th, 2022, 12:10
Just released version 2.1.0 which enables support for using Hit Dice as a special resource. Simply set the resource name for the action or effect with an optional class, e.g. "Wizard Hit Dice", and then use as you would any other resource. Additionally, bonus hit dice may be added by defining the resource in the dedicated Resource section (note: these bonus hit dice are only for fueling Actions, not healing). Bonus hit dice are spent and gained from actions before normal hit dice. This feature better supports the Hibernation Wizard from MCDM's Arcadia #2 (https://shop.mcdmproductions.com/collections/arcadia/products/arcadia-issue2), Coming Soon™ to a Fantasy Grounds near you!

Fingersome
April 27th, 2022, 00:33
Just released version 2.1.0 which enables support for using Hit Dice as a special resource. Simply set the resource name for the action or effect with an optional class, e.g. "Wizard Hit Dice", and then use as you would any other resource. Additionally, bonus hit dice may be added by defining the resource in the dedicated Resource section (note: these bonus hit dice are only for fueling Actions, not healing). Bonus hit dice are spent and gained from actions before normal hit dice. This feature better supports the Hibernation Wizard from MCDM's Arcadia #2 (https://shop.mcdmproductions.com/collections/arcadia/products/arcadia-issue2), Coming Soon™ to a Fantasy Grounds near you!

Huzzah! :D

BushViper
April 28th, 2022, 13:56
Just released version 2.1.0 which enables support for using Hit Dice as a special resource. Simply set the resource name for the action or effect with an optional class, e.g. "Wizard Hit Dice", and then use as you would any other resource. Additionally, bonus hit dice may be added by defining the resource in the dedicated Resource section (note: these bonus hit dice are only for fueling Actions, not healing). Bonus hit dice are spent and gained from actions before normal hit dice. This feature better supports the Hibernation Wizard from MCDM's Arcadia #2 (https://shop.mcdmproductions.com/collections/arcadia/products/arcadia-issue2), Coming Soon™ to a Fantasy Grounds near you!

Ha, I had already HD set up as a resource and was wondering why I saw that my players had double the amount of HD available when I logged in today. I was confused until I saw this post.

MeAndUnique
April 29th, 2022, 21:27
Just released v2.1.1 to fix a bug preventing proper resource gain for unlimited resources.

Fingersome
April 30th, 2022, 03:28
Would be neat if there was a way to automate substituting a resource when damage is taken, so that you can fully automate arcane ward; it already works well enough without this, but if it's possible, perhaps some kind of effect like RABSORB: n <damage type>, that spends n resources when damage is taken, and negates n damage...? I don't know the feasibility of coding that, but that would be very handy for the abjurer on one of my tables.

It would also work to enable all kinds of other forms of pseudo-hit-points.

MrDDT
April 30th, 2022, 22:38
Thanks for this ext, pretty cool.

MeAndUnique
May 15th, 2022, 16:49
Just released v2.1.2 with a bug fix for players not being able to active effects with dynamic values based on the amount of resource spent.

MeAndUnique
May 21st, 2022, 21:22
A number of users have requested to be able to toss a coin my way so I have created a page for them to do so and added a link to the first post. Please feel no obligation to do so though!

MeAndUnique
May 29th, 2022, 21:27
Just released version 2.1.3 which addresses some minor rare bugs that interfere with text updating correctly.

MeAndUnique
June 4th, 2022, 18:18
Just released v2.1.4 with a minor compatibility fix for The Talent (https://forge.fantasygrounds.com/shop/items/667/view).

Fingersome
June 18th, 2022, 21:45
Being able to track how many items, or how much of a certain currency you have in your inventory as a resource would be neat

MeAndUnique
June 18th, 2022, 21:50
Being able to track how many items, or how much of a certain currency you have in your inventory as a resource would be neat

Could you elaborate on the desired usage a bit?

Fingersome
June 18th, 2022, 23:32
Could you elaborate on the desired usage a bit?

So, if for example you had an item such as arrows in your inventory, you could have an ability which consumes arrows from your inventory.
The idea came from my homebrewing a Dark Gift for a ravenloft game which allows a person to eat gold pieces to fuel certain abilities - so being able to use an item as a resource (either in a similar way to how hit dice are coded as a special resource) or by allowing you to create a resource with the same name as the item in your inventory and have them mirror each other... something like that?

Am I explaining this well, or not at all haha

MeAndUnique
June 20th, 2022, 18:22
So, if for example you had an item such as arrows in your inventory, you could have an ability which consumes arrows from your inventory.
The idea came from my homebrewing a Dark Gift for a ravenloft game which allows a person to eat gold pieces to fuel certain abilities - so being able to use an item as a resource (either in a similar way to how hit dice are coded as a special resource) or by allowing you to create a resource with the same name as the item in your inventory and have them mirror each other... something like that?

Am I explaining this well, or not at all haha

Hmmm. Well, for the arrows in particular I would guess that Ammunition Manager (https://forge.fantasygrounds.com/shop/items/26/view) might be an ideal fit.

For general item usage tracking, Kit'N'Kaboodle (https://forge.fantasygrounds.com/shop/items/41/view) supports consumables by setting them up as single charge items that are destroyed on the last charge being used, and when used with Capital Gains a special resource of "Item Name Charges" is available, similar to hit dice.

Which leaves coins, or treasure in general, which I'll definitely give some thought to. However I think it is probably a fairly niche feature, so may be a bit low on priority.

Fingersome
June 20th, 2022, 18:50
Glad to know at least of of that functionality exists through other extensions :D

FGUDM
July 15th, 2022, 21:56
There seems to be an issue with Kit'N'Kaboodle, the "add resource" option is no longer there when using "add action" in any of the actions tab.

MeAndUnique
July 16th, 2022, 10:57
There seems to be an issue with Kit'N'Kaboodle, the "add resource" option is no longer there when using "add action" in any of the actions tab.

It would seem that I got some wires crossed in the fixes for the recent ruleset update, sorry for the inconvenience! I'm presently on vacation and don't have access to a computer, but I'll address this once I get back home.

FGUDM
July 19th, 2022, 02:22
It would seem that I got some wires crossed in the fixes for the recent ruleset update, sorry for the inconvenience! I'm presently on vacation and don't have access to a computer, but I'll address this once I get back home.

No worries! Hope you enjoy your vacation!

jfg1984
July 22nd, 2022, 16:18
If I'm understanding this extension correctly ... this could be used to automate the optional "spell points instead of spell slots" rule, yes?

BushViper
July 22nd, 2022, 16:24
If I'm understanding this extension correctly ... this could be used to automate the optional "spell points instead of spell slots" rule, yes?

Yes. Spell Points and Hit Dice-fueled Martial abilities are the two primary resources I use it to manage.

jfg1984
July 22nd, 2022, 16:28
Amazing. I jump in it.

MeAndUnique
August 13th, 2022, 22:42
Just released version 2.1.6 which addresses a conflict when using SGRANTS effects along with SHARETURN effects from Temporal Fixation.

AmishCyborg
August 16th, 2022, 02:00
Is there a way to gain or lose resources via effect? For example, gain a point whenever you're hit? (I'm a little obsessive about making everything automated xD)

MeAndUnique
August 16th, 2022, 03:58
Is there a way to gain or lose resources via effect? For example, gain a point whenever you're hit? (I'm a little obsessive about making everything automated xD)

There isn't presently though it is likely as a future feature, either directly in Capital Gains or via Trigger Me Timbers. Do you have a specific example that I can use to inform the design?

AmishCyborg
August 16th, 2022, 05:26
I think all the conditions, triggers, etc can be done using existing effects, there just needs to be an [effect] to increase/reduce the resource so I could write something like ATKADD: [effect] or SAVEADD: [effect] to automate the process of repetitive or conditional changes.

If you want to get really fancy you could add temporary increases/decreases to the current or maximum amount of a resource.

[My super duper niche use is a custom paladin class that stacks a bonus when taking certain actions in accordance to their oath, then either fulfills their oath and increases that bonus's minimum permanently or fails and the stack resets. (Example: +1 dmg to smite, temporarily increasing by 1 each time you smite an evil creature on the same day. Killing evil creatures might increase the base bonus to +2, +3, etc, which the temporary bonus stacks on top of.) Currently, this can still be accomplished by tracking the permanent and temporary bonuses as 2 resources and simply increasing or decreasing them manually.]

jfg1984
August 16th, 2022, 17:03
I'm using Captial Gains to run spell points instead of spell slots ... so for me a good example of use would be being able to add the resource reduction into the spell effect itself. Something like (using Better Combat Effects Gold):

Fireball; SAVEA: [SDC] DEX (M)(H); SAVEDMG: 8d6 fire, spell; RESOURCESPEND: 6 mana pool

BushViper
August 16th, 2022, 22:01
I'm doing the exact same thing with Spell Point.

I also requested the mana expenditure feature, but if I remember correctly, MeAndUnique said that including the resource in the effect line isn't currently possible with FGU, but I could be misremembering what he said to me.

jfg1984
August 17th, 2022, 04:56
I have a bug I'd like to report. Please see the attached photo.

54004

When I try to take an action I've created on one character with resource expenditures as part of the action's coding(in this case a DM master sheet) and pull it over to a PC's action tab, it pulls over correctly ... but I get that error.
This happens when running only Capital Gains so I don't think it's a conflict with anything else.

MeAndUnique
August 20th, 2022, 15:51
Just released v2.1.7 which addresses the error when dragging powers with resource actions between characters. Additionally added support for version tracking with Power Up (https://forge.fantasygrounds.com/shop/items/726/view) moving forward.

MeAndUnique
August 20th, 2022, 16:18
I'm doing the exact same thing with Spell Point.

I also requested the mana expenditure feature, but if I remember correctly, MeAndUnique said that including the resource in the effect line isn't currently possible with FGU, but I could be misremembering what he said to me.

To clarify, it isn't a case of being limited by FGU itself. More so it is something that I am trying to move toward with Trigger Me Timbers (https://forge.fantasygrounds.com/shop/items/598/view); though progress on that front has been slowed recently by the need for keeping up with the recent changes to the ruleset for already existing functionality across my extensions.

jfg1984
August 20th, 2022, 18:47
To clarify, it isn't a case of being limited by FGU itself. More so it is something that I am trying to move toward with Trigger Me Timbers (https://forge.fantasygrounds.com/shop/items/598/view); though progress on that front has been slowed recently by the need for keeping up with the recent changes to the ruleset for already existing functionality across my extensions.

Heh, yeah I just bought you a coffee. You're putting tons of work into a lot of stuff that's basically free; but I'd sign up to a monthly contribution with how much I've come to rely on your extensions to enrich the game I run.

rocketvaultgames
August 25th, 2022, 02:37
I'm trying to get all the bugs worked out for a new Beast Heart joining the campaign next week. Everything was good when I tested last week, but now I'm seeing a couple of issues.

Ferocity is linked from Caregiver to Companion who are sharing a turn with the effect: SHARETURN. Altering the ferocity value on the Companion sheet by typing or ctrl-mousewheel doesn't alter the corresponding value on the Caregiver sheet. It does work the other way around.

Auras show up when enemies are in range (I deactivated Untrue Effects as that was causing other problems), but they don't actually grant the ferocity as expected.

Chat shows that it does, but the actual ferocity value remains unchanged. It does correctly add the d4.

Thank you for all you do. I would happily pay for these extensions you offer for free.

Leprekorn
August 25th, 2022, 07:53
I have you used the coding from the appendix in the BH mod as I have been using these with no issues. Alongside the suggested exts.

MeAndUnique
August 25th, 2022, 11:05
I'm trying to get all the bugs worked out for a new Beast Heart joining the campaign next week. Everything was good when I tested last week, but now I'm seeing a couple of issues.

Ferocity is linked from Caregiver to Companion who are sharing a turn with the effect: SHARETURN. Altering the ferocity value on the Companion sheet by typing or ctrl-mousewheel doesn't alter the corresponding value on the Caregiver sheet. It does work the other way around.

Auras show up when enemies are in range (I deactivated Untrue Effects as that was causing other problems), but they don't actually grant the ferocity as expected.

Chat shows that it does, but the actual ferocity value remains unchanged. It does correctly add the d4.

Thank you for all you do. I would happily pay for these extensions you offer for free.

In my testing on this I am seeing that resources are indeed misbehaving a little bit for cohorts that are freshly added to the CT, however once the campaign is reloaded everything is working as expected on my end. I'll work on getting that patched up in the near future.

Thanks for reporting :)

rocketvaultgames
August 25th, 2022, 15:32
Excellent. After reloading it seems to be working correctly now. Unfortunately, I did not consider reloading, but I did try recreating the PC and NPC to no avail...

One other thing I noticed, even after reload:

There doesn't seem to be a way to delete a resources field. The right click radial menu doesn't have an option for it. The trash bin icon is for "hide/show additional health fields". This might be from Constitutional Amendments?

The "edit list" button seems to turn on editing (tooltip changes), but doesn't give the option to delete anything. Not crucial, but thought I'd mention it.

MeAndUnique
August 26th, 2022, 17:52
Excellent. After reloading it seems to be working correctly now. Unfortunately, I did not consider reloading, but I did try recreating the PC and NPC to no avail...

One other thing I noticed, even after reload:

There doesn't seem to be a way to delete a resources field. The right click radial menu doesn't have an option for it. The trash bin icon is for "hide/show additional health fields". This might be from Constitutional Amendments?

The "edit list" button seems to turn on editing (tooltip changes), but doesn't give the option to delete anything. Not crucial, but thought I'd mention it.

Thanks for the heads up; I'll see about getting that fixed as well.

MeAndUnique
August 30th, 2022, 16:54
Just released version 2.1.8 which fixes the resource deletion button on NPC sheets so that it is appropriately shown when editing the resource list. The menu option overlap still needs sorting out in Constitutional Amendments (that menu gets awful crowded...)

MeAndUnique
January 28th, 2023, 18:00
V2.2.0-rc1 is up on TEST. This should be compatible with the upcoming FG release slated for February, though of course there could be more changes that will need addressing.

MeAndUnique
February 4th, 2023, 19:50
Version 2.2.0-rc2 is on TEST to account for recent changes to the ruleset.

Bonkon
February 10th, 2023, 19:18
Good Day MeAndUnique :)
I seem to have a conflict between Capital Gains and BCEG. When clicking to use the resource it does not work. I will also post on the BCEG board.
I loaded only those two in a test campaign.
I would hate to lose either one of these great assets! :)

MeAndUnique
February 11th, 2023, 17:22
Good Day MeAndUnique :)
I seem to have a conflict between Capital Gains and BCEG. When clicking to use the resource it does not work. I will also post on the BCEG board.
I loaded only those two in a test campaign.
I would hate to lose either one of these great assets! :)

Sorry to hear you're having issues, I'll work with Ryan tog et it sorted out. Could you elaborate on the specifics of "does not work"? Also, does it make a difference based on what is clicked to use the resource or the resource being dragged and dropped instead?

MeAndUnique
February 11th, 2023, 21:04
Ryan was able to figure it out and has an update forthcoming.

Bonkon
February 12th, 2023, 22:34
Sorry to hear you're having issues, I'll work with Ryan tog et it sorted out. Could you elaborate on the specifics of "does not work"? Also, does it make a difference based on what is clicked to use the resource or the resource being dragged and dropped instead?

Good Day MeAndUnique :)
Sorry I did not get back on the boards sooner, but it seems the issue was discovered? If either of you needs more info I will be back on tomorrow to help if needed. :)

MeAndUnique
February 23rd, 2023, 20:17
Version 2.2.0 is live to account for today's FGU update.

Lexi the Red
February 28th, 2023, 07:01
I've got an odd one for you. Since the last update Capital Gains (love, love, love this extension, btw) appears to remove the 'Reparse Actions' option on the right-click radial menu for powers on the Actions tab.

See the attached screenshots with Capital Gains only loaded, and without it.
56481
56482

Thank you for all the amazing work you do, your extensions are on my "must have" list.

MeAndUnique
March 1st, 2023, 16:03
I've got an odd one for you. Since the last update Capital Gains (love, love, love this extension, btw) appears to remove the 'Reparse Actions' option on the right-click radial menu for powers on the Actions tab.

See the attached screenshots with Capital Gains only loaded, and without it.
56481
56482

Thank you for all the amazing work you do, your extensions are on my "must have" list.

Thanks for reporting, that is a complete oversight on my part and I will take a look at getting it fixed in the near future. Sorry for the inconvenience in the meantime.

Ecks
March 12th, 2023, 00:16
I noticed that with the "Show GM rolls" option set to Off and "Show results to client" option set to On, any Resource gain rolls don't show either the roll or the result to the client. With both options set to On, both the roll and result are then shown to client (as expected). With "Show GM rolls On and "Show results to client" Off, then the die roll is shown but not the result (as expected). Is there a way to have GM rolls off and still show the resource gain result to the players?

Also, I have a character with a shared resource with their companion, and I'm seeing the following error on the console whenever opening the resource editor:

[3/11/2023 4:11:01 PM] [ERROR] Script execution error: [string "C:resource_editor_main:sharelist"]:5: attempt to index field 'idelete' (a nil value)

To recreate:

Create a new 5E campaign with only the Capital Gains extension enabled
Create two characters and put on CT
Add a resource on character 1
Open resource editor, drag character 2 to the window to share the resource with them
Error pops up in console

MeAndUnique
March 15th, 2023, 17:17
Version 2.2.1 is live with a fix for the radial menu issue. The error when linking shared resources is forthcoming as I work on getting caught back up after vacation.

thedruski
March 21st, 2023, 00:15
This was one of my favorite 5e extensions. You don't happen to have one for Pathfinder2e by chance, do you?

Ecks
March 27th, 2023, 04:41
Noticed this on the Beastheart player in my last session - when they went to use End of Combat healing on their companion with 0 Ferocity remaining the heal value shown in the chat was -2147483648: capture.jpg (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=56854). Didn't actually cause any issues as far as I could tell. Thank you for all your work on these awesome extensions!

MeAndUnique
March 29th, 2023, 15:25
Noticed this on the Beastheart player in my last session - when they went to use End of Combat healing on their companion with 0 Ferocity remaining the heal value shown in the chat was -2147483648: capture.jpg (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=56854). Didn't actually cause any issues as far as I could tell. Thank you for all your work on these awesome extensions!

Do you happen to know what steps they took to cause this? It seems to be working as intended on my end in a clean campaign with both the beastheart and their companion on the CT, the effect is applied to the beastheart first, then the spend resource action is dragged onto the companion.

Ecks
March 29th, 2023, 16:26
Do you happen to know what steps they took to cause this? It seems to be working as intended on my end in a clean campaign with both the beastheart and their companion on the CT, the effect is applied to the beastheart first, then the spend resource action is dragged onto the companion.

I think what happened is at the end of combat they had 0 ferocity, applied the effect to the beastheart, and then clicked the "Rsrc" button (instead of dragging it), which showed a -2147483648 heal on themself. However, even with dragging the heal on to the companion, if the beastheart has 0 ferocity, the negative heal value is shown.

To recreate in a new 5E campaign with only the Capital Gains extension enabled:

Load the Beastheart module
Create a new character with at least the following:

Name
New resource named Ferocity, leave value unchanged (i.e. 0)
Drag the End of Combat healing power from Beastheart Reference Manual Appendix A to the character Actions tab.

Drag the character to the CT
Add a companion from NPCs to CT (I used Basilisk Companion), set to Friend faction
On test character, click button for End of Combat healing effect
On test character, drag Rsrc button to Basilisk Companion on CT
Chat shows 0 ferocity spent and a heal value of -2147483648

MeAndUnique
April 1st, 2023, 15:51
I think what happened is at the end of combat they had 0 ferocity, applied the effect to the beastheart, and then clicked the "Rsrc" button (instead of dragging it), which showed a -2147483648 heal on themself. However, even with dragging the heal on to the companion, if the beastheart has 0 ferocity, the negative heal value is shown.

To recreate in a new 5E campaign with only the Capital Gains extension enabled:

Load the Beastheart module
Create a new character with at least the following:

Name
New resource named Ferocity, leave value unchanged (i.e. 0)
Drag the End of Combat healing power from Beastheart Reference Manual Appendix A to the character Actions tab.

Drag the character to the CT
Add a companion from NPCs to CT (I used Basilisk Companion), set to Friend faction
On test character, click button for End of Combat healing effect
On test character, drag Rsrc button to Basilisk Companion on CT
Chat shows 0 ferocity spent and a heal value of -2147483648


Great, thanks for taking the time to write this up! I can now reproduce the issue and will work to resolve it.

ColoradoGM
April 3rd, 2023, 21:31
This is the formula recommended in the Beastheart module, using Aura Effects with Capital Gains:
AURA: 5 foe; Grant Ferocity; IF: FACTION(notself); SGRANTS: 1, Ferocity

The issue I'm having: it parses correctly the number of attackers and then tries to give that number of Ferocity to those attackers, instead of the NPC that's carrying this effect. I've tried switching between (SELF) and targets, it does the same either way. Can anyone who's used this help?

Leprekorn
April 4th, 2023, 04:13
Are you applying the effect to the Beastheart or the companion It should be to the companion.

ColoradoGM
April 4th, 2023, 05:24
yes, it's on the companion. The Beastheart has to put it on the companion, because I can't make effects like that in an NPC stat block, it has to be on a PC's action page.

MeAndUnique
April 4th, 2023, 15:24
This is the formula recommended in the Beastheart module, using Aura Effects with Capital Gains:
AURA: 5 foe; Grant Ferocity; IF: FACTION(notself); SGRANTS: 1, Ferocity

The issue I'm having: it parses correctly the number of attackers and then tries to give that number of Ferocity to those attackers, instead of the NPC that's carrying this effect. I've tried switching between (SELF) and targets, it does the same either way. Can anyone who's used this help?

While I'm not seeing this exact symptom I can reproduce some inconsistent results with SGRANTS, where sometimes it works perfectly and sometimes it doesn't fire at all... So that's gonna be a bit of an extra challenge to tackle. Sorry for the inconvenience.

BlazingAzureCrow
April 6th, 2023, 00:10
Minor issue, and I don't know what side it should be corrected on - when this extension and Close Encounters are loaded in a clean campaign with no other extensions, the icon for adding a resource option is pushed to the side by Close Encounters. When clicking on it, it now does nothing. Is there any way to work around this conflict?

56977

MeAndUnique
April 8th, 2023, 20:19
Minor issue, and I don't know what side it should be corrected on - when this extension and Close Encounters are loaded in a clean campaign with no other extensions, the icon for adding a resource option is pushed to the side by Close Encounters. When clicking on it, it now does nothing. Is there any way to work around this conflict?

56977

I've spoken with the author, we just happened to get out of sync in our approach for adding new items to the menu there. Close Encounters should be getting an update in the near future to address it.

MeAndUnique
April 8th, 2023, 20:21
Version 2.2.3 has been released with a fix for the large negative value being shown when using RSRCHEALT and having none of the resource in question. Incidentally, I have been unable to reproduce any issues with SGRANTS after implementing this fix, and so I believe it will also address that.

nephranka
April 24th, 2023, 12:40
Ran into this issue last night. Trying to heal the target. I have the effect on the resource loaded but when I put 20 into the modifier window and hit the resource button I get 20 spent and no healing just:
Berries [20] -> [SPEND][INSUFFICIENT][10 REMAINING]

Only this ext loaded.

Edit: When I change to the effect to : Goodberries; RSRCHEALT: 5 Berries and spend the resource I get 5 healing. So it appears to be something with the modifier box and healing?

MeAndUnique
April 24th, 2023, 15:55
Ran into this issue last night. Trying to heal the target. I have the effect on the resource loaded but when I put 20 into the modifier window and hit the resource button I get 20 spent and no healing just:
Berries [20] -> [SPEND][INSUFFICIENT][10 REMAINING]

Only this ext loaded.

Edit: When I change to the effect to : Goodberries; RSRCHEALT: 5 Berries and spend the resource I get 5 healing. So it appears to be something with the modifier box and healing?

It is trying to spend 20 goodberries when there are only 10 available, hence the part of the output that says there are insufficient resources. As such it is expected that nothing will happen.

nephranka
April 24th, 2023, 16:05
It is trying to spend 20 goodberries when there are only 10 available, hence the part of the output that says there are insufficient resources. As such it is expected that nothing will happen.

I had 30 when I hit the button and it removed them which is why it now reads 10.

nephranka
April 24th, 2023, 16:09
Here I spent 1 with 8 avaliable and it dropped to 7...same error.

Bonkon
April 25th, 2023, 07:46
Good Day :)
We were having the same problem in our last session but I have not had the time to try to see what was going on. It seems to be incrementing OK, just keeps putting the [INSUFFICIENT] in the chat from what we saw. Was only using it to increment charges without effects though. :)

MeAndUnique
May 3rd, 2023, 15:44
Thanks for the info, I'll dig in on why it is being overzealous about indicating there being insufficient resources.

nephranka
May 4th, 2023, 01:03
Thanks for the info, I'll dig in on why it is being overzealous about indicating there being insufficient resources.

Thanks. It does appear to be connected to the use of the modifier box. Also, it is more than just telling us there is insufficient resources. It fails to heal as a result. I assume due to its mischaracterization of the current resource amount :)

nephranka
July 4th, 2023, 13:42
Just checking back to see if there is any chance this could be fixed? Thanks!

Fingersome
July 10th, 2023, 13:50
Some of the new redesigns for class abilities split the resource regeneration of certain features - they regenerate all charges on a long rest, but also regenerate X charges on a short rest- some way to specify this for resource types would be great.

MeAndUnique
July 16th, 2023, 17:09
Once again I am very sorry for the delay. Version 2.2.4 has just been released which addresses the above issues with spending resources.

MeAndUnique
July 16th, 2023, 17:17
Some of the new redesigns for class abilities split the resource regeneration of certain features - they regenerate all charges on a long rest, but also regenerate X charges on a short rest- some way to specify this for resource types would be great.

Hmmm, I'm not opposed to the idea, though there are two primary considerations I have. The first is that I have so very little time these days as is, chasing the constantly changeable nature of the playtest material isn't likely to be very feasible. And the second is that when things do finally settle down, the new release will almost certainly warrant a brand new ruleset which will have its own potentially substantial challenges for Capital Gains being made compatible.

Fingersome
July 16th, 2023, 17:20
Entirely fair - you should prioritize your own time over hobby projects <3

nephranka
July 17th, 2023, 11:26
Once again I am very sorry for the delay. Version 2.2.4 has just been released which addresses the above issues with spending resources.

Thanks!

Nomad28
March 24th, 2024, 21:01
Why is it that gaining a resource allows for a dice function, but spending a resource doesn't and just has the Variable option under VALUE? I can't figure out how the min/max/interval is supposed to work, the only amount that gets spent after changing the Spell/Ability Resource window is whatever number is inputted under VALUE before where you can check/uncheck "Variable?"

Ecks
March 24th, 2024, 23:03
I can't figure out how the min/max/interval is supposed to work, the only amount that gets spent after changing the Spell/Ability Resource window is whatever number is inputted under VALUE before where you can check/uncheck "Variable?"
When spending the resource, mouse over the "Spend Resource" line or button and use CTRL+Mouse wheel up/down to change the amount spent.

rocketvaultgames
May 21st, 2024, 20:37
It appears that Capital Gains removes the "Cast" button from the radial menu when Critically Awesome Essentials is also loaded.

60895

Is there any way to add Resource and have the Token from CAE without losing Cast?

elblade121
June 5th, 2024, 16:00
It appears that Capital Gains removes the "Cast" button from the radial menu when Critically Awesome Essentials is also loaded.

60895

Is there any way to add Resource and have the Token from CAE without losing Cast?

I have confirmed this as well through removal of extensions and interaction. Looking forward to a reply or fix to enjoy both extensions together.

rhagelstrom
August 13th, 2024, 18:08
Fix for 4.5.10 on my GitHub

https://github.com/rhagelstrom/CapitalGains/releases

jfg1984
August 28th, 2024, 15:52
Hey there,

I noticed that this extension is spitting out errors with the most recent version of FGU, and this mod hasn't been updated in about 400 days. I take it this mod's been abandoned? :cry:

Leprekorn
August 28th, 2024, 15:59
See the post just above

jfg1984
August 28th, 2024, 16:20
Whooops! But also, yay!

Lexi the Red
September 18th, 2024, 04:13
Looks like the latest 2024 update broke Capital Gains again. The positioning of the Resources bar is over Weapons on the Actions tab.
Kit n Kaboodle is doing the same thing. I'll post over there as well.
62027

Vass_Dts
September 18th, 2024, 05:52
No surprise there, but with the new character sheet, the resources section is.... well, not where it's supposed to be. :P

Vaall
September 18th, 2024, 09:22
Hey,

Attached is an update to fix the display issue in the Action tab of a character sheet.

rocketvaultgames
September 18th, 2024, 20:13
Thanks much for this! Any chance of fixing the NPC side?

Vaall
September 18th, 2024, 23:50
Hey,

I tried to fix this. Tell me if this fixed the problem?

I am not a coder, I have no knowledge about it, I just tested some changes based on the 5E ruleset. If there are other problems, I want to look but I do not promise success every time.

rocketvaultgames
September 19th, 2024, 00:53
This does seem to fix it so that it's not overlapping with anything else. It used to be above Traits and below CR/PB/XP (Or Advanced Effects if that is loaded). Now it is after all the actions which is a lot less convenient.

If there's any way you could bump it back up near the top, that would be awesome! Thanks much!!

Old: 62055

New: 62056

Vaall
September 20th, 2024, 12:58
Hey, Good news, I managed to put it back in place (after a lot of trying for something that seemed simple in the end).
62081

Enjoy the new version.

rocketvaultgames
September 20th, 2024, 13:51
Amazing. Thank you so much!!

Kelace
September 21st, 2024, 15:00
I'm getting an error when I use the edit button on the actions tab of a character sheet. I only have Capital Gains loaded as an extension. Everything looks fine on the character sheet, no overlapping of anything.

Kelace
September 23rd, 2024, 15:29
I'm still receiving an error with only Capital Gains extension loaded.
I'm not seeing any overlap, and this error only occurs when I attempt to click the edit button on the actions tab. I can edit but the error window pops up when before and after the edit button is clicked.
62121

rhagelstrom
September 23rd, 2024, 15:59
I'm still receiving an error with only Capital Gains extension loaded.
I'm not seeing any overlap, and this error only occurs when I attempt to click the edit button on the actions tab. I can edit but the error window pops up when before and after the edit button is clicked.
62121

Is this with the updated version posted a few posts above?

Kelace
September 23rd, 2024, 17:41
yes it is

Vaall
September 24th, 2024, 08:19
Hey,

I only managed to disable the part that caused the error message (without it impacting the use of the extension). FYI, the original code is still in the extension file but it is not read when launching FGU.

Then, there is the part where when you activate the edit mode it allows you to display the trash next to the resources to delete them. I don't know how to do it.

To remove a resource on a character sheet ==> Right click on the resource ==> Delete item.

Kelace
September 26th, 2024, 21:06
Hey,

I only managed to disable the part that caused the error message (without it impacting the use of the extension). FYI, the original code is still in the extension file but it is not read when launching FGU.

Then, there is the part where when you activate the edit mode it allows you to display the trash next to the resources to delete them. I don't know how to do it.

To remove a resource on a character sheet ==> Right click on the resource ==> Delete item.

Alright, thank you. :)

thedruski
October 16th, 2024, 17:40
Does anyone know why this extension is now showing as Unlisted in the Forge inventory? I cannot seem to get it to show up for my campaigns any longer. It was working fine two days ago when I last logged on.

rhagelstrom
October 16th, 2024, 17:51
It was probably delisted because it is abandoned. Constitutional Amendments looks like the same thing happened. Not sure why the other M&U broken exts are still available. I'd think the base ext would still be there to use but maybe not, not familiar with how that all works with the forge update. You should be able to download the latest working from this thread though (read up).

All that being said, there is some behind the scenes work that needs to be done to get this relisted. If someone is really gun-ho about being the maintainer send me a DM so we can all at least be on the same page.

thedruski
October 16th, 2024, 17:55
Thank you so much for the quick response! The fix above seems to have gotten it back for now.

If I knew anything at all about coding I'd happily take this one over, but, alas, I know very little. If it isn't too difficult to learn I'd still be game to give it a go.

Nalistar
October 20th, 2024, 04:26
Hi,

I'm getting this error "[ERROR] Script execution error: [string "C:charsheet_actions:actions_iedit"]:7: attempt to index field 'contents' (a nil value)" when pressing the "Edit list" button (bottom right corner) on the Action tab of the PC character sheet.

I just wanted to report it in case it's something that can be fixed.

Thanks

rhagelstrom
October 20th, 2024, 16:22
Hi,

I'm getting this error "[ERROR] Script execution error: [string "C:charsheet_actions:actions_iedit"]:7: attempt to index field 'contents' (a nil value)" when pressing the "Edit list" button (bottom right corner) on the Action tab of the PC character sheet.

I just wanted to report it in case it's something that can be fixed.

Thanks

Not seeing this, are you running other extensions?

Nalistar
October 20th, 2024, 18:05
Not seeing this, are you running other extensions?

No, I tested this with just Capital Gains loaded (v. 2.2.5-rc2 taken from your github) and nothing else (I just retested to be sure, no theme loaded either).

This only happens with the Edit button in the Action tab, no other edit buttons in the other tabs give the error.

rhagelstrom
October 21st, 2024, 17:40
No, I tested this with just Capital Gains loaded (v. 2.2.5-rc2 taken from your github) and nothing else (I just retested to be sure, no theme loaded either).

This only happens with the Edit button in the Action tab, no other edit buttons in the other tabs give the error.

I guess I never tagged the last fix by Vaall in my repo

https://github.com/rhagelstrom/CapitalGains/releases/tag/v2.2.5-rc3

This is the same as what Vaall posted earlier in this thread

Nalistar
October 21st, 2024, 18:33
I guess I never tagged the last fix by Vaall in my repo

https://github.com/rhagelstrom/CapitalGains/releases/tag/v2.2.5-rc3

This is the same as what Vaall posted earlier in this thread

This version fixed the issue I was reporting.

Thanks a lot!

Kelace
April 23rd, 2025, 21:06
Do these 2 strings need to be of a predefined resource name in 5E? or of a resource that has been set in the resource area?
GRANTS: d, Resource Name - While this effect is active on the start of the bearer's turn, the applier of the effect will gain d (which can be any dice string) of the named resource.
SGRANTS: d, Resource Name - While this effect is active on the start of the applier's turn, the applier of the effect will gain d (which can be any dice string) of the named resource.

When I attempt to use this extension enabled with or without other extensions, they don't work for me at all. I use Mana, and Stamina in my game as a Resource that my players gain at the start of their turn. I'd like to have an effect that adds to the amount they could gain from some type of spell effect. The Strings with CURRENT / SPENT , and the Healing ones, come back correctly but just not these ones.

If my understanding is correct on this extension, shouldn't GRANTS: 1d4, Mana give 1d4 mana when the turn starts? And if I'm way off base, could someone please let me know what I am doing wrong.

Lexi the Red
June 4th, 2025, 03:37
Unfortunately I am getting some errors with this extension recently. I tested in a clean campaign with only Capital Gains loaded. I am using Rhagelstrom's most recent fix, v2.2.5-rc3.

Whenever I open up a Resources window, I get the following errors:
64521

FYI, the errors show up in the chat window.

MrDDT
June 4th, 2025, 04:20
Unfortunately I am getting some errors with this extension recently. I tested in a clean campaign with only Capital Gains loaded. I am using Rhagelstrom's most recent fix, v2.2.5-rc3.

Whenever I open up a Resources window, I get the following errors:
64521

FYI, the errors show up in the chat window.

Thank you for the info, we will let him know. The normal Author for this ext is no longer updating their exts and we've got many people to take them over, however, this one is not fully taken over but we expect rhgelstrom to take it over. Currently really busy so we will see when he can get to it. Just keeping people in the loop.

I will see if we can put out a fix if it takes too long.

Farratto
June 4th, 2025, 19:23
Unfortunately I am getting some errors with this extension recently. I tested in a clean campaign with only Capital Gains loaded. I am using Rhagelstrom's most recent fix, v2.2.5-rc3.

Whenever I open up a Resources window, I get the following errors:
64521

FYI, the errors show up in the chat window.

In addition to what MrDDT told you: Thank you for reporting. But FYI, these are not actually errors. These are warning messages that will become errors in future patches to FGU. So you can continue to use the extension without problem until at least the next FGU update (but possibly for several updates still). Hopefully these warnings will get adjusted for before they actually become errors.

rocketvaultgames
July 10th, 2025, 04:45
Is there any way to dynamically set the Limit (maximum value) of a resource?

For example, I'd like a resource of "Mana" that has a limit that is equal to N + Intelligence modifier + Proficiency Bonus. (N varies by class)



Is there any way to modify the Limit of a resource through effects? Maybe something like "LIMIT[RESOURCE_NAME]: n" on an actor would adjust the limit? Same for Gain and Lose...

Is there any way to trigger Gain/Lose on taking/dealing damage or have more instances of Gain and Lose?


I suspect the answer is 'no' to all of these, but I'm hoping I missed something obvious....

MrDDT
July 10th, 2025, 04:59
Is there any way to dynamically set the Limit (maximum value) of a resource?

For example, I'd like a resource of "Mana" that has a limit that is equal to N + Intelligence modifier + Proficiency Bonus. (N varies by class)



Is there any way to modify the Limit of a resource through effects? Maybe something like "LIMIT[RESOURCE_NAME]: n" on an actor would adjust the limit? Same for Gain and Lose...

Is there any way to trigger Gain/Lose on taking/dealing damage or have more instances of Gain and Lose?


I suspect the answer is 'no' to all of these, but I'm hoping I missed something obvious....

The author for this EXT is no longer active.
It has been unlisted and no longer being updated/supported. We are looking to see if we can get someone to take this over to code/update it.

Vass_Dts
August 2nd, 2025, 20:24
Capital Gains has been an immensely important tool for my game as I rely on it to apply some home-brew house rules in FG.

I do understand that my case is probably rather niche, and that this is probably an extension not a lot of ppl use. Which sucks for me as come next update (as of checking it on TEST), the extension becomes mostly unusable as the window to set stuff on resources no longer works at it is using a deprecated framework :( (though it otherwise retains its functionality and any resource set before the update is handled as it used to). Basically, my personal experience is that the extension works just fine, but uses an outdated window.

BushViper
August 2nd, 2025, 21:16
Capital Gains has been an immensely important tool for my game as I rely on it to apply some home-brew house rules in FG.

I do understand that my case is probably rather niche, and that this is probably an extension not a lot of ppl use. Which sucks for me as come next update (as of checking it on TEST), the extension becomes mostly unusable as the window to set stuff on resources no longer works at it is using a deprecated framework :( (though it otherwise retains its functionality and any resource set before the update is handled as it used to). Basically, my personal experience is that the extension works just fine, but uses an outdated window.

Same. It's extremely important to my own games/houserules.

rocketvaultgames
August 3rd, 2025, 00:45
Capital Gains has been an immensely important tool for my game as I rely on it to apply some home-brew house rules in FG.

I do understand that my case is probably rather niche, and that this is probably an extension not a lot of ppl use. Which sucks for me as come next update (as of checking it on TEST), the extension becomes mostly unusable as the window to set stuff on resources no longer works at it is using a deprecated framework :( (though it otherwise retains its functionality and any resource set before the update is handled as it used to). Basically, my personal experience is that the extension works just fine, but uses an outdated window.

I second that! It's actually critical in order to reasonably use the MCDM Beastheart class... and super nice for a lot of other things.

Farratto
August 4th, 2025, 23:20
There is already a fix for this (and likely many other extensions that have fallen out of maintainence for sometime). Please download and use the extension provided by Moon Wizard:

https://www.fantasygrounds.com/forums/showthread.php?85368-Beta-Release-Ruleset-Updates-2025-08&p=747031&viewfull=1#post747031

It's listed as "CoreRPG Old Templates 2025-08".

Lexi the Red
September 22nd, 2025, 20:30
So yet another thing to add to the list for when someone takes over this extension (which I hope is soon, please, please, please :o )...

Apparently once you add a Resource you can't delete it from the character sheet. At least not that I can figure out.

LordEntrails
September 22nd, 2025, 23:22
So yet another thing to add to the list for when someone takes over this extension (which I hope is soon, please, please, please :o )...

Apparently once you add a Resource you can't delete it from the character sheet. At least not that I can figure out.
Have you tried right mouse? Have you tried unlocking the character sheet? New functionality around both of those since this was updated. Plus did you try the link Farratto posted above your post?

Lexi the Red
September 27th, 2025, 03:28
Have you tried right mouse? Have you tried unlocking the character sheet? New functionality around both of those since this was updated. Plus did you try the link Farratto posted above your post?

Yes, yes, and yes. I've included a screen shot of what right clicking does, whether the sheet is locked or unlocked. The mode (combat, standard, preparation) also does not matter. There does not seem to be any delete option that I can find. I've also tested this in a clean campaign, with no other extensions other than the one Farratto posted.
65517

Tools2Rlyeh
September 29th, 2025, 19:43
Well, I just had to reschedule a game because I've relied on this extension to track many different homebrewed resources. It's become a vital addition to our sessions and if I can't edit these resources as the characters level up, it's useless to us. I've tried the fixes listed above and they have not made a difference for me. I've looked for anything I might be able to use as a replacement, but near as I can tell, there's isn't one. If it isn't going to be fixed, I will either have to learn to code my own extensions or I'll need to make my players track all these resources manually. Ugh.

jonesdaadi
October 2nd, 2025, 21:17
If you mouse over the number box in the resource; not the name (character sheet can be locked or unlocked) and right click you will get a slightly different menu than if you right click over the name of the resource. The delete option is hiding there. I have this fix installed and running: CoreRPG Old Templates 2025-08. the only bug i experience is there is no 'X' button to close the window but again right click will give you the option to close the window.

Lexi the Red
October 3rd, 2025, 23:35
If you mouse over the number box in the resource; not the name (character sheet can be locked or unlocked) and right click you will get a slightly different menu than if you right click over the name of the resource. The delete option is hiding there. I have this fix installed and running: CoreRPG Old Templates 2025-08. the only bug i experience is there is no 'X' button to close the window but again right click will give you the option to close the window.

Thank you for this! I swear I right clicked everywhere, but I guess I didn't quite get the right location.

Vaall
October 8th, 2025, 17:56
Hey everyone,
I just wanted to share that I managed to fix the extension (with the help of AI) so that it now works without requiring the Old Template extension and no longer throws any error messages.
I'm not an expert, so I didn’t change anything in its core functionality—only made some aesthetic adjustments. If needed, I can try to improve it further based on your feedback, but I can’t guarantee anything.
Feel free to let me know if something’s missing or needs fixing!

Vaall

rocketvaultgames
October 8th, 2025, 20:17
Hey everyone,
I just wanted to share that I managed to fix the extension (with the help of AI) so that it now works without requiring the Old Template extension and no longer throws any error messages.
I'm not an expert, so I didn’t change anything in its core functionality—only made some aesthetic adjustments. If needed, I can try to improve it further based on your feedback, but I can’t guarantee anything.
Feel free to let me know if something’s missing or needs fixing!

Vaall

Awesome! This is such a great extension that could definitely use some love.

It appears to work now without the "CoreRPG Old Templates 2025-08" extension.

With the Hearth Theme, it does look a little wonky:

65603

...but it works as far as I can tell.


There is one "bug" I'd like to see fixed:

When you manually modify a Limit (maximum value) of a resource, it instantly updates the current value. This is great except in these types of circumstances:

e.g. Current: 8 / Limit: 10.... I want to change the limit to 12... I start typing 12... when I enter "1" it immediately sees that as the new Limit and sets the Current value to "1". I have to manually change that "1" back to an "8" after I finish entering "12". This is a minor hassle, but still an extra step. The problem is that I (or the player) very well might forget and have no idea what the correct Current number should be reset to.


If you are ever interested in expanding functionality, I'd love to see:


A way to dynamically set the Limit (maximum value) of a resource. For example, I'd like a resource of "Mana" that has a limit that is equal to N + Intelligence modifier + Proficiency Bonus (N varies by class).

A way to modify the Limit of a resource through effects... maybe something like "LIMIT[RESOURCE_NAME]: n" on an actor would adjust the limit? Same for Gain and Lose...

A way to be able to trigger Gain/Lose on taking/dealing damage (and healing).

A way to be able to have multiple instances of Gain/Lose per resource.

LordEntrails
October 8th, 2025, 22:43
There is one "bug" I'd like to see fixed:

When you manually modify a Limit (maximum value) of a resource, it instantly updates the current value. This is great except in these types of circumstances:

e.g. Current: 8 / Limit: 10.... I want to change the limit to 12... I start typing 12... when I enter "1" it immediately sees that as the new Limit and sets the Current value to "1". I have to manually change that "1" back to an "8" after I finish entering "12". This is a minor hassle, but still an extra step. The problem is that I (or the player) very well might forget and have no idea what the correct Current number should be reset to..

I believe this can be fixed (I've seen the option but never used it myself) by adding a <delaykeyupdate /> It looks like this in a control:

<number_ct_crosslink name="bptotal">
<frame name="fielddark" />
<bounds>10208,5,35,30</bounds>
<tabtarget>
<prev>nonid_name</prev>
</tabtarget>
<delaykeyupdate />
<hideonvalue>0</hideonvalue>
<script>function update()
window.windowlist.applySort();
end
</script>
</number_ct_crosslink>

mccartysr
October 9th, 2025, 02:20
Version 2.2.5-rc4

Transition to modern templates for the minimum number of controls to restore function.
Add delay to update when changing resource limit


This is a one time fix; I have no plans for further development.
Funny timing that Vaall released their fix today because we are not in communication. I used a different approach as compared to them; where I found errors, I moved them to modern templates. This really helps with theme compatibility, such as hearth.

Extension is available on my github https://github.com/seanmccarty/CapitalGains/releases/tag/v2.2.5-rc4 and attached.

rocketvaultgames
October 9th, 2025, 16:05
Version 2.2.5-rc4

Transition to modern templates for the minimum number of controls to restore function.
Add delay to update when changing resource limit


This is a one time fix; I have no plans for further development.
Funny timing that Vaall released their fix today because we are not in communication. I used a different approach as compared to them; where I found errors, I moved them to modern templates. This really helps with theme compatibility, such as hearth.

Extension is available on my github https://github.com/seanmccarty/CapitalGains/releases/tag/v2.2.5-rc4 and attached.

Thanks!

I can confirm this now looks good in Hearth and the delay is perfect for how often I need to change these in development.

Vaall
October 9th, 2025, 16:53
Version 2.2.5-rc4

Transition to modern templates for the minimum number of controls to restore function.
Add delay to update when changing resource limit


This is a one time fix; I have no plans for further development.
Funny timing that Vaall released their fix today because we are not in communication. I used a different approach as compared to them; where I found errors, I moved them to modern templates. This really helps with theme compatibility, such as hearth.

Extension is available on my github https://github.com/seanmccarty/CapitalGains/releases/tag/v2.2.5-rc4 and attached.

Yes, quite a funny coincidence! Your version is cleaner than mine, so I'll remove mine to avoid any confusion later on. I had only created it as a temporary workaround.
That said, setting the limit value as dynamic could actually be a very interesting idea ��.

Vaall
October 16th, 2025, 19:14
Hey all.

Here’s what’s new and improved:
65653
Dynamic Resource Limit Formula

New formula:
Limit = (Multiplier × Value) + Bonus
Automatically updates whenever any value in the formula changes.
For NPCs, LVL now corresponds to their CR.

New Effects Added

LIMIT[Name]: x or LIMIT: x name → Increases the resource Name limit by x.
GAIN[Name]: x or GAIN: x name → Increases the Current value of resource Name by x.
LOSE[Name]: x or LOSE: x name → Decreases the Current value of resource Name by x.

x : Dice and numbers supported for value attribute

Alternative Gain/Lose Method

Added a second way to apply Gain or Lose when the first is not set to Never.

Resource Gain or Loss via Actions

When dealing damage
When taking damage
When healing others
When receiving healing

Current Limitation

It’s not yet possible to automatically remove the LOSE or GAIN effect when the apply mode is ACTION or ROLL.

Note: This work was assisted by AI and may contain code errors. It does not replace the work of a professional developer. 

Please note that applying this version will reset your existing resources.

Kelace
October 24th, 2025, 05:14
I freaking love you for this right now, I've been messing around with AI trying to figure out how to create my own extension to get this back into my campaign, now I don't have to. Thank you Vaall

Vaall
October 27th, 2025, 22:38
Hey, I managed to fix the current value reset issue. I hope it works fine for you too ;)

Vaall
November 6th, 2025, 18:45
New update (thanks to Brando for pointing it out):

Re-enabled support for the GRANTS and SGRANTS tags.
Fixed an issue where setting the limit to infinity caused the current value to reset when the GRANTS or SGRANTS tag holder was removed. The limit is now capped at 999,999 internally to prevent this.
(Note: Visually, the infinity symbol will still appear when the limit is 0, but the actual value behind it is 999,999.)

Reminder: mccartsyr’s version (#193) remains the corrected base version of Capital Gain.

MrDDT
November 6th, 2025, 19:50
Nice work thank you for keeping it updated.

Farratto
March 15th, 2026, 14:39
Here's a fix for the 2026-02-05 CoreRPG ruleset change. I updated Vaal's version and called it v2.2.5-rc6. If someone needs me to separately update mccartysr's version, let me know.

Farratto
March 15th, 2026, 14:57
I'm sorry, I attached the wrong version. Please ignore the above and use this version:

66810

nephranka
March 15th, 2026, 21:45
I'm sorry, I attached the wrong version. Please ignore the above and use this version:

66810

Thanks! Looks like TEST has blasted this ext fyi.

Farratto
March 22nd, 2026, 13:19
Here's a quick and dirty fix for Test. It should also work in live. It might just throw a new error but this should kill the error it was giving.

66889

Kelace
April 30th, 2026, 19:15
Hey all.


New Effects Added

LIMIT[Name]: x or LIMIT: x name → Increases the resource Name limit by x.
GAIN[Name]: x or GAIN: x name → Increases the Current value of resource Name by x.
LOSE[Name]: x or LOSE: x name → Decreases the Current value of resource Name by x.

x : Dice and numbers supported for value attribute

Alternative Gain/Lose Method

Added a second way to apply Gain or Lose when the first is not set to Never.

Resource Gain or Loss via Actions

When dealing damage
When taking damage
When healing others
When receiving healing


Please note that applying this version will reset your existing resources.

Could I see an example of these two Effects:
GAIN[Name]: x or GAIN: x name → Increases the Current value of resource Name by x.
LOSE[Name]: x or LOSE: x name → Decreases the Current value of resource Name by x.

Because when I enter them in as an effect, say for When dealing damage. because I'm already using 2 other gain in the actions tab part I need a third gain feature,
but nothing is happening.
From what I can see GAIN[Focus]: 1 (Do I put the "When dealing damage")? or how is it suppose to look? or is that Gain/Loss part not fit in the effect line?
I guess I don't know when I'm GAIN[Name] on or LOSE[NAME] on in this sense.
Thanks for clearing this up for me in advance.

SilverDarkCureXZ
May 23rd, 2026, 04:16
Not sure if there will be further updates here, but wanted to inform that the RSRCHEALT function isn't properly working for the new core as its using the old heal function. I did some messing around with the script to stop the console from popping up, but I couldn't get it to function properly beyond that as the resource is expended, but the target is not healed.
[5/22/2026 10:12:52 PM] s'ActorManager.getTypeAndNode/getTypeAndNodeName - DEPRECATED - 2025-04-22 - Use ActorManager.isPC/isRecordType/getCreatureNode/getCTNode'
[5/22/2026 10:12:52 PM] [ERROR] Handler error: [string "CapitalGains:../manager_action_resource.lua"]:409: attempt to index global 'ActionHeal' (a nil value)

Moon Wizard
June 20th, 2026, 01:16
I've done a quick update to revitalize this abandoned extension by request.
No guarantees that any abandoned community extensions will be supported long term; but it should be working again.

Regards,
JPG