New Content - Implemented unknown effect when using potion of temporary gr8ness

taltamir

Member
This is pretty weird but mafia thinks I am getting unknown effect when using potion of temporary gr8ness with r19582
Code:
[COLOR=olive]> use potion of temporary gr8ness[/COLOR]

Searching for "potion of temporary gr8ness"...
Search complete.
Purchasing potion of temporary gr8ness (1 @ 1,320)...
Purchases complete.
Using 1 potion of temporary gr8ness...
You acquire an effect: (unknown effect -1)
Finished using 1 potion of temporary gr8ness.
i am getting the correct effect, mafia just doesn't recognize it
 

Veracity

Developer
Staff member
Yes, another server-side change. Which makes this one - like your other one - New Content.
 

Veracity

Developer
Staff member
Revision 19583 changes the effect name and will automatically detect future changes in effect names that retain the same descid.
 

Magus_Prime

Well-known member
With r19583 after logging in I get the following in the gCLI:
Code:
Sending login request...
[gr8tness] does not match anything in the status effect database.
[gr8tness] does not match anything in the status effect database.
[gr8tness] does not match anything in the status effect database.

This is before any scripts run and I don't know the source of the message.
 

fronobulax

Developer
Staff member
With r19583 after logging in I get the following in the gCLI:
Code:
Sending login request...
[gr8tness] does not match anything in the status effect database.
[gr8tness] does not match anything in the status effect database.
[gr8tness] does not match anything in the status effect database.

This is before any scripts run and I don't know the source of the message.

Check your moods for a mood that has the old name for the effect.
 

Magus_Prime

Well-known member
The issue didn't occur when I logged in this morning and no moods had the old effect name. When it happened I also checked for an active effect and didn't have that either. <shrug>
 

Veracity

Developer
Staff member
Happened to me once, too, and was not reproducible. I would have fixed it, otherwise. I have no idea.
 

Veracity

Developer
Staff member
It was moods. I looked at veracity_moods.txt from the day before I made that change and saw this:

Code:
[ moxie ]
...
lose_effect fat leon's phat loot lyric => cast 1 fat leon's phat loot lyric
lose_effect gr8tness => use 1 potion of temporary gr8tness
lose_effect izchak's blessing => use 1 potion of blessing
...
Today, it looks like this:

Code:
[ moxie ]
...
lose_effect fat leon's phat loot lyric => cast 1 fat leon's phat loot lyric
lose_effect izchak's blessing => use 1 potion of blessing
...
When we load moods, we look up each effect via EffectDatabase.getFirstMatchingEffect, which is the method that prints that error message if it can't find the effect. If it can't find the effect, the effect is removed from the mood. Apparently, we save the mood file each time we load it.

Not sure why; seems it should only save it if you change something.

But that's why you only got that message the first time you logged in: three of your moods were "repaired".

Which is sort of annoying, I guess, since you have to figure out where to insert the correct line, if you want to fix it.

Probably correct beghavior for moods would be to save the mood only if the user makes a change to a mood, not right after loading them at log in.

(I also realize I don't need those three moods. I have not used them in years, as you can probably guess since one of them has a "potion of blessing", which would be a Dungeon of Doom potion, which I have literally never visited since it stopped being required.)
 

Magus_Prime

Well-known member
Well I'll be darned. ;) I had no idea that file existed. I did the same thing you did, checked an earlier version of the file, and found the three moods. Only one of them do I still care about.

Thank you!
 

fredg1

Member
Revision 19583 changes the effect name and will automatically detect future changes in effect names that retain the same descid.

This... uh... may need a bit of tweaking...

Code:
[299] The Copperhead Club
Preference lastEncounter changed from Behind the 'Stache to Shen Copperhead, World's Biggest Jerk
Encounter: Shen Copperhead, World's Biggest Jerk
Took choice 854/1: "Yeah, Shen, I sure did."
choice.php?pwd&whichchoice=854&option=1
Preference questL11Shen changed from step6 to step7
Preference shenQuestItem changed from The Eye of the Stars to 
--------------------
<copperhead     1533	Ancient Annoying Serpent Poison</b><br></td></tr></table></center><p>"Ha ha ha," Shen laughs, wincing. "Okay, you got me that time. So we're even now."<p>"Ha ha ha," you reply. "No. Not even close."<p>You proceed to beat nine kinds of hell out of him until he tells you where the Copperhead Charm is. It turns out he had it in his jacket pocket all along.<p>"What a douchebag," you mutter as you stomp out of the now completely wrecked and empty nightclub.<center><table class="item" style="float: none" rel="id=7178&s=0&q=1&d=0&g=0&t=0&n=1&m=0&p=0&u=."><tr><td><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/scharm2.gif" alt="Copperhead Charm" title="Copperhead Charm" class=hand onClick='descitem(274926226)' ></td><td valign=center class=effect>You acquire an item: <b>Copperhead Charm	scharm.gif	81d92825729f8b3a913133c18e37a74c
charm image>    Effect	Ancient Annoying Serpent Poison</b><br></td></tr></table></center><p>"Ha ha ha," Shen laughs, wincing. "Okay, you got me that time. So we're even now."<p>"Ha ha ha," you reply. "No. Not even close."<p>You proceed to beat nine kinds of hell out of him until he tells you where the Copperhead Charm is. It turns out he had it in his jacket pocket all along.<p>"What a douchebag," you mutter as you stomp out of the now completely wrecked and empty nightclub.<center><table class="item" style="float: none" rel="id=7178&s=0&q=1&d=0&g=0&t=0&n=1&m=0&p=0&u=."><tr><td><img src="https://s3.amazonaws.com/images.kingdomofloathing.com/itemimages/scharm2.gif" alt="Copperhead Charm" title="Copperhead Charm" class=hand onClick='descitem(274926226)' ></td><td valign=center class=effect>You acquire an item: <b>Copperhead Charm	Muscle: -5, Mysticality: -5, Moxie: -5
--------------------
                You lose an intrinsic: Ancient Annoying Serpent Poison
                You acquire an item: Copperhead Charm
                Preference questL11Shen changed from step7 to finished
                Preference banishedMonsters changed from mad wino:Reflex Hammer:279 to
<copperhead 
charm image>
(vertically centered
between the row
of ----s
and the end of the GCLI) (p.s. The left parsing and the copperhead charm images (in <>) only appeared in the GCLI, not in the Sessions log)
               <rest of the GCLI>
 

Veracity

Developer
Staff member
Never mind. I got one from a character that last ascended before the Copperhead Quest was even available.
Investigating.
 

Veracity

Developer
Staff member
Previously unseen HTML for losing an effect (intrinsic). Previously, we didn't recognize it at all and presumably only adjusted active effects when we refreshed via api.php or charpane.php.

Adjusting my regexp and making a test file with the (now) 4 examples:

Code:
[color=green]> test load results.html[/color]

Read 3,432 bytes into a 3,432 character string

[color=green]> test result[/color]

You acquire an effect: Hot Breath (5)
You lose some of an effect: Got Milk (-5)
You lose an effect: Disco Leer
You lose an intrinsic: Ancient Annoying Serpent Poison
You acquire an item: Copperhead Charm
returned true
Revision 19585
 
Top