The way it was before, in a given round, we'd log it like this:
1) Your attack
2) Any familiar actions
3) All the damage done to the monster from any source, summed up and totalled
4) Any meat, items, HP, MP, substats, etc. gained that round (any of which can come before the battle is done, including if you win).
I want to see things in the same order KoL shows them
- If you do damage to the monster from multiple sources - weapon, shieldbutt, familiar, passive - let's see what each source contributed.
- If you get meat or substats or HP or MP from a familiar, let's see it right after the familiar action, rather than at the end, where it is unclear where it came from.
- If you get items in the middle - pickpocket, familiar, whatever - let's see the action that got them.
In addition to having much more revealing logging, specific problems that can solved - better, or at all - if we can do this include:
- Meat from items and familiars while retrieving meat for the nuns
- fighting with a haiku katana tells the damage (in html) twice.
- logging familiar actions that KoL doesn't tag "correctly" - fuzzy dice, for example.
In order to do this, I needed an HTML parser: some way to take the fight page and put it into a data structure that I could walk and operate on. KoL's HTML, like that of many, many sites, is messy and malformed. Browsers are able to take messy HTML and supply missing tags, reorder misplaced tags, and so on, and render something sensible. (By reorder, consider this: the HTML SHOULD have <font><b>text</b></font>, say, but it's actually written as <font><b>text</font></b>. That is Real Common.)
I selected an open source HTML parser which got good reviews for being able to cope with and rationalize anything, is relatively small and fast, and which has the Berkeley license (like KoLmafia itself), rather than being infected with the GPL.
Because I am doing this, KoLmafia is temporarily in another period of instability. You are always welcome to not upgrade to the latest revision, if you wish to avoid this.
Satisfied? Both this note and your other one after a revision failed to build correctly for some people seemed a little confrontational to me. Do you think I change things for the sake of changing them?