New Content - Implemented calculating familiar weight off by one (due to 2CRS ring)

MCroft

Developer
Staff member
I hesitate to mark this a bug, but it might be...

This may be a revisit of something that was worked on last summer (in r26532).

I have a 14 lb (exp 221) gelatinous cubeling as the familiar, with dungeon junk and 16 pounds of improvements.
So, I expected the "right" weight to be 30. KoL reported 31 and KoLmafia reported 30.
When I ran a mod trace, KoLmafia decided it was 30, but it is still out of sync with KoL.

What else can I look at? I didn't notice this for a while and I didn't have debug logs.

Rich (BB code):
Familiar weight: KoL = 31 KoLmafia = 29
Loading character status...
Familiar weight: KoL = 31 KoLmafia = 29
Requests complete.

> modtrace familiar weight

typesourceFamiliar WeightFamiliar Weight Percent
Itemfamiliar scrapbook+5.00= +5.00
Itempile of dungeon junk+5.00= +10.00
SkillCrimbo Training: Concierge+1.00= +11.00
SkillAmphibian Sympathy+5.00= +16.00




Familiar weight: KoL = 31 KoLmafia = 30
Familiar weight: KoL = 31 KoLmafia = 30

> debug on

Loading character status...
Familiar weight: KoL = 31 KoLmafia = 30
Requests complete.

> debug off



From a debug log after I pressed Refresh Status and filtered for "fam"
Rich (BB code):
untitled text:12: "familiar":"171",
untitled text:24: "familiarexp":"221",
untitled text:38: "famlevel":31,
untitled text:51: "familiarequip":"6257",
untitled text:93: "swapfam":0,
untitled text:94: "hidefamfilter":0,
untitled text:101: "unfamequip":"1",
untitled text:138: "familiar_wellfed":0,
untitled text:140: "familiarpic":"gcube",
 
Last edited:

fronobulax

Developer
Staff member
I have seen an off by one message a lot but it shows up when running scripts and hasn't bothered me enough to isolate and reproduce. I;ll try and pay more attention and remember that modtrace exists.
 

MCroft

Developer
Staff member
Perhaps the Crimbo skill wasn't counted when I ascended until I did the mod trace.

But I don't know why KoL thinks it's 31 and we think it's 30. Our numbers match what we know.
 

MCroft

Developer
Staff member
On further investigation, KoL is aware of the 2CRS ring's enchantments and we are not. It would be a bear to support, but if I take it off, Mafia and KoL agree again. It's "friendly", which is +1 familiar weight


Rich (BB code):
up-at-dawn zippy executive greedy family-friendly rosewater-soaked aromatic double-paned lard-coated scorching nippy lion tamer's friendly coward's Lo Pan's Van der Graaf medical-grade ruddy wholesome steel-toed studded quilted grievous Sinatra's Fonzie's Samson's savvy stylish ring of wisdom of dire peril of vim and vigor of incineration of horror of doom of mayonnaise of bravery of Flo-Jo
You can still remember the summer when you found this ring. It was ridiculous.
 
Type: accessory
Cannot be traded or discarded
Mysticality +2
Moxie +3
Mysticality +10%
+1 Muscle Stats Per Fight
+1 Moxie Stats Per Fight
+1 Moxie Stats Per Fight
Weapon Damage +2
Weapon Damage +5%
Damage Absorption +4
Damage Absorption +8
Damage Reduction: 1
Maximum HP +10%
Maximum HP +10%
Maximum HP +10%
+3% Chance of Spell Critical Hit
-2 to Monster Level
+1 to Familiar Weight
+1 Familiar Experience Per Combat
+1 Cold Damage
+3 Hot Damage
+5 Damage to Hot Spells
+3 Damage to Spooky Spells
+5 Damage to Spooky Spells
+3 Damage to Sleaze Spells
+5 Damage to Sleaze Spells
Slight Cold Resistance (+1)
Slight Spooky Resistance (+1)
Slight Stench Resistance (+1)
Slight Stench Resistance (+1)
Slight Sleaze Resistance (+1)
+2% Meat from Monsters
+4% Meat from Monsters
+2% Combat Initiative
+10% Combat Initiative
+1 Adventure(s) per day
Regenerate 1 MP per Adventure
Regenerate 1 HP per Adventure
 

Veracity

Developer
Staff member
On further investigation, KoL is aware of the 2CRS ring's enchantments and we are not. It would be a bear to support, but if I take it off, Mafia and KoL agree again. It's "friendly", which is +1 familiar weight
I don't know that it'd "be a bear" to support it.

InventoryManager.checkMods() looks at all sorts of items that vary per person - either because they are configurable or simply differ - like this ring..

We have the technology to parse an item description and extract all the enchantments out into a string (which we can store in a property, if we wish) and then call

Code:
ModifierDatabase.overrideModifier(ModifierType.ITEM, itemId, mods);

If parsing the enchantments will add up duplicates, it would be easy.
Having a datafile with the various adjectives mapping to enchantments would allow us to parse the "name" of the ring, which would be more complicated, but still "a simple matter of coding". ;)
 

MCroft

Developer
Staff member
I thought it would be a bear because there are 170 possible keywords. But that’s just size.
 

MCroft

Developer
Staff member
I've looked at the description that we get back and I'll need to de-duplicate it (+2% meat from monsters and +4% meat from monsters are both there and they stack).

I'm just working on wrangling the description's modifiers into a format to send to overrideModifiers(). And then I'm going to try to not screw up creating the PR. Thanks for the encouragement!
 

MCroft

Developer
Staff member
We have the technology to parse an item description and extract all the enchantments out into a string (which we can store in a property, if we wish) and then call

If parsing the enchantments will add up duplicates, it would be easy.
Having a datafile with the various adjectives mapping to enchantments would allow us to parse the "name" of the ring, which would be more complicated, but still "a simple matter of coding". ;)
parseItemEnchantments does, indeed add up the enchantments.

It was easy. I spent more time finding that all the components I needed were there and ripping out my version than coding.
I did not store it as a property, because I didn't know that there would be any use for it.
 
Top