New Content - Implemented OP Shield Skill

Atrophied

New member
Can "Throw Shield" (skill # 7114) be added to the quick skills buttons in the relay browser adventuring window?
 

slyz

Developer
Can't you add those yourself? I never used the Mafia quick skills (I use the KoL CAB), but I think they are controlled with the combatHotkeyX preferences (where X is the number of the hotkey).

Maybe someone who uses those can be of more help though.

EDIT: on the right of the buttons Mafia adds, select the number of the key you want to use to throw your shield, enter "skill throw shield" in the window that comes up, and press that key to throw your shield.

EDIT2: even better, the buttons are controlled by KoLMafia preferences "relaySkillButtonCount" and "stationaryButtonX" where X goes from 1 to relaySkillButtonCount.

If you want the second button to be "throw shield", type "set stationaryButton2 = 7114"
 
Last edited:

lostcalpolydude

Developer
Staff member
Maybe he's talking about the buttons that mafia automatically adds and removes as you use skills. Maybe Throw Shield isn't recognized as a skill and doesn't get added when you use it. I also use the CAB so I'm just guessing.
 

slyz

Developer
There must be discussion about this in another thread, but I see that the stationary button decorator isn't well suited for skills that depend on an item being equipped, since Mafia doesn't consider those as available to your character.

EDIT: oh, equipment manager does add those skills! It is missing the Throw Shield though.
 
Last edited:

slyz

Developer
r9637 avoids conditionally granted combat skills from being removed from the stationaryButtonX preferences if you don't currently have them. This means you can "set stationaryButton2 = 7114", and you will keep this setting even if you enter a combat without the Patriot Shield equipped.

Previous behavior was to delete any stationaryButtonX preference that contained a skill you didn't currently have. Now it only does that for non-conditional skills (conditional skills simply have their buttons greyed out).
 

Atrophied

New member
On that note, Spring Raindrop is a conditional skill (1/combat) that doesn't grey out after use as of r9636.

Also: thanks! Much appreciate the work you do for KoLMafia :)
 

slyz

Developer
Mafia doesn't know about 1/combat skills, so they won't grey out after you use them, even with r9637.
 

Veracity

Developer
Staff member
It knows about some one/combat actions, like chefstaff jiggling and entangling noodles. Of course, noodles are problematic when you fight a monster that KoL allows you to noodle multiple times...
 

slyz

Developer
In r9637, buttons are now enabled if:
Code:
hasSkill && FightRequest.getCurrentRound() > 0
The problem is that hasSkill is true only for skills that have been added via KoLCharacter.addAvailableSkill(). Currently, EquipmentManager.setEquipment() adds some skills associated to equipment, but not all of them. It also adds them definitively.

I guess the availability of those skills could be detected from the contents of fight.php, but since this seems rather low priority, I'll simply remove hasSkill from the line quoted above.
 

Veracity

Developer
Staff member
Currently, EquipmentManager.setEquipment() adds some skills associated to equipment, but not all of them. It also adds them definitively.
That's not good. Skills could/should be added depending on equipment, effects, outfits...

Perhaps we need a separate list - conditionalSkills, say - which is skills which are currently but temporarily available, but which gets refreshed when things change.
Perhaps we need to augment classskills.txt to describe exactly what conditions grant a skill, rather than hardcoding (some of) them into EquipmentManager.

Code:
7003	Hot Breath	5	5	0	Effect: Hot Breath
7008	Moxious Maneuver	5	0	0	Class: Disco Bandit OR Accordion Thief
7010	Fire red bottle-rocket	5	5	0	Item: bottle-rocket crossbow
7015	Creepy Grin	5	30	0	Item: V for Vivala mask
7018	Trashquake	5	100	0	Outfit: Vile Vagrant Vestments AND Zone: Hobopolis
7025	Get a You-Eye View	5	30	0	Effect: Form of...Bird!
7042	Rise From Your Ashes	5	20	0	Effect: Form of...Bird! AND ...what?
7061	Spring Raindrop Attack	5	0	0	Item: haiku katana AND ... once per combat
7076	Play a Guitar Solo	5	10	0	Item: Elvish sunglasses AND ... once per combat
7097	Turtle of Seven Tails	5	15	0	Item: Flail of the Seven Aspects
7114	Throw Shield	5	0	0	Item: Operation Patriot Shield AND ... once per combat
Looks complicated. For example, if you have summoned a hobo underling - a combat skill available if you have Hodgman's outfit - you are granted 5 additional skills, with weird limitations on how you can mix and match them for the duration of the combat.

I do like having the source of the skill - effect, item, outfit - available there so we can automatically give you a button to remind you of the existence of the skill, perhaps, when you equip the item that grants it. Sort of like how we have an automatic Jiggle button when you have a chefstaff equipped.

I guess the availability of those skills could be detected from the contents of fight.php, but since this seems rather low priority, I'll simply remove hasSkill from the line quoted above.
This sounds simpler. Perhaps a combo approach using a change to the data file AND parsing the fightpage.

- add a field to conditional skills in classskills.txt showing the simplest thing that makes the skill available: item, effect, outfit.
- create a conditionalSkills list which is updated every time you gain or lose and effect, equip or remove equipment, and so on.
- create a availableCombatSkills list which is cleared and refreshed at the beginning of every round of a fight from what KoL lists in the Use Skill dropdown on the fight page.
- when generating the stationary buttons for a round, start with attack/script etc., followed by class-granted skills - steal, moxman - followed by common skills everybody wants to remember - noodles, olfaction - followed by the last <n> skills the player actually used in combat - and then add a button for every skill in conditionalSkills which is also in availableCombatSkills.
- as always, buttons are greyed out if you don't have enough mana or have already cast it this round or ... hmm. Well, if they don't appear on availableCombatSkills, eh?

That will do the trick for relay browser + stationary buttons.

In the old days of pre-macrofied CCS, that would also have allowed us to automatically skip unavailable skills as we execute the CCS round by round. Now that CCSs are compiled into macros, not so helpful; it will tell you if you have a skill at the beginning of a macro.

If you happen to have a consult script which does things a round or two at a time, KoLmafia parsing each fight response as it comes in to detect what combat skills are CURRENTLY available could be useful.
 
Top