Feature - Implemented Consumption changes on Feast of Boris

Theraze

Active member
During the Feast of Boris, consumption stats for several cranberry-related items changes. I'd just put this into my script, but we don't have any command that does holiday checking, and the RL holidays generally get an out-of-sequence additional KoL holiday, so using gameday_to_string or gameday_to_int won't be accurate on those days...

The items in question are:
Redrum is 5-6 adventures normally, 5-9 on FoB.
Vodka and cranberry is 5-6 adventures normally, 5-9 on FoB. Wiki says 6-9 in one spot, 5-9 in another... without reliable spading, I'd fall on the cautious side that matches the other drink.
Cranberries are 1 adventure normally, 2-4 on FoB.
 
Last edited by a moderator:

Theraze

Active member
Okay, this isn't the most elegant way to do it, but it works... normal day:
> ash $item[cranberries]
Returned: cranberries
plural => handfuls of cranberries
descid => 134332822
image => cran.gif
levelreq => 1
quality => crappy
adventures => 1
muscle => 0
mysticality => 0
moxie => 0
fullness => 1
inebriety => 0
spleen => 0
notes =>
combat => false
reusable => false
usable => false
multi => false
seller => none
buyer => none
With the Feast of Boris check removed, to make it apply:
> ash $item[cranberries]
Returned: cranberries
plural => handfuls of cranberries
descid => 134332822
image => cran.gif
levelreq => 1
quality => good
adventures => 2-4
muscle => 0
mysticality => 0
moxie => 0
fullness => 1
inebriety => 0
spleen => 0
notes =>
combat => false
reusable => false
usable => false
multi => false
seller => none
buyer => none
This turns redrum down to 3-6 normally as well, and turns KoLCharacter.isFullnessIncreased from private to public, so we can detect FoB/Drunksgiving easily and reliably. With >2<=3 average adventures per consumption, all 3 are of "good" quality during FoB, so the patch overrides quality as well as adventure ranges.
 

Attachments

  • FeastConsumptionExceptions.patch
    3.9 KB · Views: 27

Theraze

Active member
Looked at this again... it wasn't setting, since it was using KoLCharacter for the FoB detection, but the ItemDatabase is initialized before your character loads. So... this patch actually works to set proper overrides. It loads from the HolidayDatabase and does the same check that KoLCharacter makes to check if you have enhanced appetite.
> ash $item[redrum].adventures

Returned: 5-9
No weird check removals, just running as it should.
 

Attachments

  • FeastConsumptionExceptions.patch
    3.1 KB · Views: 31

Theraze

Active member
So still using this manual bit and it's still working, but... I was wondering whether it would be a more elegant solution to have an override data file instead. It could be formatted something like:
type (item, monster, familiar, etc)
specific (which item, monster, etc)
override type (holiday, realday, equipped, etc)
override specifics (feast of boris, tuesday, crimbco lanyard, etc)
changes (adventures 5-10, Def: [MOX], etc)

If this override system actually worked, it could function for items like the cranberry consumables that change on the Feast of Boris (for which the patch in 3 is currently written for). It could, however, also function to turn certain monsters into scaling if conditions are met, or even be used to control Tuesday's Ruby and anything else that varies.

The problem with monsters that occurs to me is that the monsters are initialized when you log in, not at combat initialization, so that might not work out quite as well as I was envisioning, but... Does that sound like something worth pursuing, or better avoided?
 

Theraze

Active member
Attaching a new version for 11482. Decided to update it so it wouldn't make my system scream as hard with all of these ItemDatabase changes... :)

Edit: Clarifying what exactly this does: If today is the Feast of Boris, consider the 3 special cranberry items as more valuable. This updates the ItemDatabase, making their proxy records correct. On non-FoB days, or for normal food, it loads 'normally' from the data files. I asked whether people would actually want an override file, but received no interest, so... hardcoded overrides. :)
 

Attachments

  • 11482-FeastConsumptionExceptions.patch
    3.1 KB · Views: 29
Last edited:

Theraze

Active member
New patch for 12630. Still works. Still does what it says above.
 

Attachments

  • 12630-FeastConsumptionExceptions.patch
    3 KB · Views: 27

Bale

Minion
This sounds similar to some of Darzil's projects. Perhaps he'll give you patch a look see.
 

Theraze

Active member
If not, I'm happy to have EatDrink grab cranberry items for me automatically during FoB. It just feels sort of mean to not share. :)
 

Darzil

Developer
Added to r12652, thanks.

I changed the patch around somewhat, mainly to check it wasn't holiday first, to minimise the number of statements hit when it isn't Boris Day, partially just reducing code length a bit.
 

Bale

Minion
Congrats Darzil, now you're vetting patches submitted by members of the community. You've come full circle.
 

Theraze

Active member
Whee! That cuts down my unique code to just the wiki lookup bits. And yes... it's more efficient to start by eliminating non-Boris. I did it that way because I fully expected TPTB to throw in more holiday overrides, but... happy to be wrong, so far. :) Least it's easy to refactor if they do change things up on us... :)
 
Top