I've been struggling to get skeletons to log correctly in the session log and be decorated correctly in the Relay Browser.
Here is how KoL works for everything except skeletons:
Standard KoL fight page has a 'monname' span around the name of the monster.
Haiku fight page does not have that.
Standard KoL fight page marks up the monster's name in bold.
Here's how KoLmafia uses the above:
The Encounter: line in the session log has the name of the monster - that part which is bold.
We use the name as the monster 'type' - unless it's a generic monster, in which case we translate it based on image.
If the monster is Elemental, color the name - and only the name - in the appropriate color
Every monster in Dreadsylvania works like the above - except for the skeletons.
Skeletons are named "Prisoner XXX: name including nickname"
Skeletons have additional lines for Sentence: and Crime:
Every kind of skeleton - except the Hot Skeleton - has a 'monname' span.
The Hot Skeleton does not have that span.
Skeletons with the 'monname' span wrap said span around all three lines - Prisoner X:, Sentence:, and Crime:
On the first line, "Prisoner X:" is bold but the name with nickname is not bold.
KoLmafia has the following issues trying to deal with all that:
- The "name" pulled out for the Encounter: line in the session log is merely "Prisoner X" - since that is the first bold part. The rest of the name (and nickname) is not only not bold, it has other markup.
- We now insert a 'monname' span to duplicate KoL's for the Hot Skeleton. But, since we use the beginning and end of the span to decide what to color - we insert a "class=elementX" into the span directive - all three lines - Name, Sentence, and Crime - end up getting colored for all elemental skeletons.
In the ideal world, we'd have this:
- In the session log - Encounter: Prisoner XXX first "nickname" last
- The whole name - and only the name - gets colored appropriately
Here is how KoL works for everything except skeletons:
Standard KoL fight page has a 'monname' span around the name of the monster.
Haiku fight page does not have that.
Standard KoL fight page marks up the monster's name in bold.
Here's how KoLmafia uses the above:
The Encounter: line in the session log has the name of the monster - that part which is bold.
We use the name as the monster 'type' - unless it's a generic monster, in which case we translate it based on image.
If the monster is Elemental, color the name - and only the name - in the appropriate color
Every monster in Dreadsylvania works like the above - except for the skeletons.
Skeletons are named "Prisoner XXX: name including nickname"
Skeletons have additional lines for Sentence: and Crime:
Every kind of skeleton - except the Hot Skeleton - has a 'monname' span.
The Hot Skeleton does not have that span.
Skeletons with the 'monname' span wrap said span around all three lines - Prisoner X:, Sentence:, and Crime:
On the first line, "Prisoner X:" is bold but the name with nickname is not bold.
KoLmafia has the following issues trying to deal with all that:
- The "name" pulled out for the Encounter: line in the session log is merely "Prisoner X" - since that is the first bold part. The rest of the name (and nickname) is not only not bold, it has other markup.
- We now insert a 'monname' span to duplicate KoL's for the Hot Skeleton. But, since we use the beginning and end of the span to decide what to color - we insert a "class=elementX" into the span directive - all three lines - Name, Sentence, and Crime - end up getting colored for all elemental skeletons.
In the ideal world, we'd have this:
- In the session log - Encounter: Prisoner XXX first "nickname" last
- The whole name - and only the name - gets colored appropriately