Feature - Implemented Improve skill use tracking, particularly for daily-limited skills

zarqon

Well-known member
Can you also sync up limited buffs when making recordings at the fireplace? There are "X / Y casts used" messages there too.
 

roippi

Developer
Can you also sync up limited buffs when making recordings at the fireplace? There are "X / Y casts used" messages there too.

Actually, no there are not.

Code:
Results:
You record a wonderful rendition of Inigo's Incantation of Inspiration.
You lose 100 Mojo Points.
You acquire an item: recording of Inigo's Incantation of Inspiration

Now, down in the page, there is a javascript option box which has in it <option value="716" selected="selected">Inigo's Incantation of Inspiration (4/5)</option>

so we can probably parse that, it's a truncated version of skills.php.
 

roippi

Developer
So, I can easily expose the data in UseSkillRequest.getMaximumCasts(). That function actually returns the remaining daily casts. i.e.

Code:
> ash $skill[ Moxious Madrigal ].dailylimit

Returned: -1

> ash $skill[ Inigo ].dailylimit

Returned: 2

> prefref inigo

_inigosCasts (user, now '3', default 0)

> ash $skill[ Donho ].dailylimit

Returned: 50

Is this acceptable or problematic? Seems nice to me since it takes into account all sorts of variables like trancendental noodlecraft, Way of sauce, and whatnot, but I'm not the intended audience for this.

Proxy record for timescast is going to be a little more work, since we don't internally track that yet.
 

roippi

Developer
Eh, what the heck. Feeling bold (and boldly triple-posting). r10412 adds both.

.timescast is lightly tested. It is intended to be cast attempts - successful casts is actually doable, but more error-prone. Admittedly the combat subsystems of mafia are not my forte, so report any bugs you may find with that.

I think this is implemented, barring any objections regarding the specifics of the implementation.

ETA: one thing I did _not_ do: .timescast is universally defined as "times cast this session," regardless of whether the skill is daily limited or not. Since the daily casts are accessible in preferences, I don't see the need to overwrite session cast count with that info.
 
Last edited:
Top