Log in

View Full Version : Bear's Strength



bratch9
March 4th, 2022, 23:20
Aspect of the Bear, ruleset support..

Due to how this is coded, the 'update' does not happen correct.

51809

The above source code shows that the 'strength' update code is only triggered on 'traitlist' updates. Which is fine for 'powerful build'. But the addition of the 'aspect of the bear' been in the features list needs extra addHander/removehandler calls.

See the attached...

Create character, GO LOOK AT THE INVENTORY page, so that it initialises the 'maximum' to 150
51810

Now add 'Aspect of the Bear' to the 'features' list. ( Case does not matter. )
51811

Now go to the inventory page, the maximum is not updated due to the missing addHandler calls.
51812

To correct this you need to 'adjust the strength' to have it re-calculate.. then you will get the 300 maximum as expected.

-pete

( NOTE.. if you just create a character, add the 'aspect of the bear' and then go to inventory... this will be correct as it only initialises the maximum 'onInit' of the inventory page... so this will show correct.. But I'm yet to get to level 6 without needed to use the inventory page !! )

Zacchaeus
March 5th, 2022, 08:11
Aspect of the Bear, ruleset support..

Due to how this is coded, the 'update' does not happen correct.

51809

The above source code shows that the 'strength' update code is only triggered on 'traitlist' updates. Which is fine for 'powerful build'. But the addition of the 'aspect of the bear' been in the features list needs extra addHander/removehandler calls.

See the attached...

Create character, GO LOOK AT THE INVENTORY page, so that it initialises the 'maximum' to 150
51810

Now add 'Aspect of the Bear' to the 'features' list. ( Case does not matter. )
51811

Now go to the inventory page, the maximum is not updated due to the missing addHandler calls.
51812

To correct this you need to 'adjust the strength' to have it re-calculate.. then you will get the 300 maximum as expected.

-pete

( NOTE.. if you just create a character, add the 'aspect of the bear' and then go to inventory... this will be correct as it only initialises the maximum 'onInit' of the inventory page... so this will show correct.. But I'm yet to get to level 6 without needed to use the inventory page !! )

None of your linked attachments work. I've moved this to the House of Healing.

JustinFreitas
March 5th, 2022, 09:58
Hi B9,

I have an extension for Aspect of the Beast: Bear that you can try if you think it will help your game. Here's the Forge link:
Aspect of the Beast: Bear (https://forge.fantasygrounds.com/shop/items/363/view)

Enjoy,
Justin

bratch9
March 5th, 2022, 10:10
Your systems were having some glitches at the time, it crashed half way adding the attachments... so never posted it the first version. Had to post it a second time and it checked as working, but clearly did not hold properly.. Some glitch in the internet..


Anyway, I've re-created new images for you..


This is the code image, showing that the record_char_inventory.xml only sets up 'traits' addHanders, while the 'manager_char.lua' uses the correct 'hasFeatures' call.

51834

This causes an issue that when you add the 'feature' for 'aspect of the bear', it does not refresh the calculated encumbrance. ( No call to onTraitsUpdated->onSourcesUpdated->getEncumbranceMult )


Below I've attached a new character, showing the basic 150 max, then added 'aspect of the bear' feature, and show the 150 inventry that is wrong.. The final panel is after I change the STR to 11 and back to 10, which is the other 'update' method caused by the 'onSourceValue' function.

51835

-pete

bratch9
March 5th, 2022, 10:13
Hi B9,

I have an extension for Aspect of the Beast: Bear that you can try if you think it will help your game. Here's the Forge link:
Aspect of the Beast: Bear (https://forge.fantasygrounds.com/shop/items/363/view)

Enjoy,
Justin

I also have an extension for 'Aspect of the bear' the new ruleset update of a day or so ago has this built in making both of our extensions redundant.

But it has code issues because they have only addHandler call for 'traits' and did not add them for 'features', so its not 'updating' properly until you adjust the STR or cause something else that might re-calculate the max encumbrance.

-pete