Difference between revisions of "Suggestion: csv output of battle stats"
(→Solution) |
(→Overview) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | This is a suggestion/request of sorts. The intention is to allow players to parse battle output. | + | = Overview = |
+ | This is a suggestion/request of sorts. The intention is to allow players to parse battle output more reliably. | ||
Currently there are two methods that I am aware of to determine the health and energy of players and ferals: hp and fprompt. | Currently there are two methods that I am aware of to determine the health and energy of players and ferals: hp and fprompt. | ||
− | hp outputs a table of coloured bars which is a good visual aid | + | hp outputs a table of coloured bars which is a good visual aid. fprompt outputs a much leaner version of this content that is easier to parse but is less immediately interpretable by eye. My current solution to parsing fprompt is to capture each line, format it then add it to an array. |
− | + | <br> | |
− | + | Here's my output as an example, the battle stats are in the top, right pane: | |
− | + | [[File:Screenshot_2015-08-13_13-00-12.png|900px]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | |||
− | [[File:Screenshot_2015-08-13_13-00-12.png]] | ||
Line 50: | Line 19: | ||
== Solution == | == Solution == | ||
A single comma-seperated value (CSV) line. e.g. | A single comma-seperated value (CSV) line. e.g. | ||
− | ENEMIES,rgb,13. Bouncy Half-Gryphon Bartender 12302/13886 72/100, | + | <br> |
+ | ENEMIES,rgb,13. Bouncy Half-Gryphon Bartender 12302/13886 72/100,ENEMYPETS,rgb,Pet 1: Blah 11607/11607 129/150,PLAYERS,rgb,Anwen 11519/11519 28/98,PETS,rgb,GRIND(Anwen) 8798/8798 54/106,THINGS,rgb,Tactics Soldier(!) 0/104 100/100,END | ||
where rgb is the applicable colour value. | where rgb is the applicable colour value. | ||
Breakdown of sections: | Breakdown of sections: | ||
+ | <pre> | ||
ENEMIES,rgb,13. Bouncy Half-Gryphon Bartender 12302/13886 72/100,... | ENEMIES,rgb,13. Bouncy Half-Gryphon Bartender 12302/13886 72/100,... | ||
ENEMYPETS,rgb,Pet 1: Blah 11607/11607 129/150,... | ENEMYPETS,rgb,Pet 1: Blah 11607/11607 129/150,... | ||
Line 61: | Line 32: | ||
THINGS,rgb,Tactics Soldier(!) 0/104 100/100,... | THINGS,rgb,Tactics Soldier(!) 0/104 100/100,... | ||
END | END | ||
+ | </pre> | ||
== Summary == | == Summary == | ||
CSV is trivial to parse, the output would be unambiguous and there is no fear of missed lines (either it's there or it isn't!). Section names (ENEMIES, THINGS) could be shortened if necessary. | CSV is trivial to parse, the output would be unambiguous and there is no fear of missed lines (either it's there or it isn't!). Section names (ENEMIES, THINGS) could be shortened if necessary. |
Latest revision as of 23:12, 16 August 2015
Overview
This is a suggestion/request of sorts. The intention is to allow players to parse battle output more reliably.
Currently there are two methods that I am aware of to determine the health and energy of players and ferals: hp and fprompt.
hp outputs a table of coloured bars which is a good visual aid. fprompt outputs a much leaner version of this content that is easier to parse but is less immediately interpretable by eye. My current solution to parsing fprompt is to capture each line, format it then add it to an array.
Here's my output as an example, the battle stats are in the top, right pane:
This works most of the time but there are two issues that make it unreliable and inconvenient.
1. Sometimes a line gets garbled and thus it is missed resulting in incomplete status. 2. Some ferals (Primes, backups, others) do not have a number and period at the start of the string which makes them harder to categorise. They can, of course, be categorised by looking for "Prime" and "backup" in the name but this leaves the (admittedly unlikely) possibility that a player may choose a name with one of these strings in it at some future point.
Solution
A single comma-seperated value (CSV) line. e.g.
ENEMIES,rgb,13. Bouncy Half-Gryphon Bartender 12302/13886 72/100,ENEMYPETS,rgb,Pet 1: Blah 11607/11607 129/150,PLAYERS,rgb,Anwen 11519/11519 28/98,PETS,rgb,GRIND(Anwen) 8798/8798 54/106,THINGS,rgb,Tactics Soldier(!) 0/104 100/100,END
where rgb is the applicable colour value.
Breakdown of sections:
ENEMIES,rgb,13. Bouncy Half-Gryphon Bartender 12302/13886 72/100,... ENEMYPETS,rgb,Pet 1: Blah 11607/11607 129/150,... PLAYERS,rgb,Aluthal 11713/12091 100/100,... PETS,rgb,GRIND(Anwen) 8798/8798 54/106,... THINGS,rgb,Tactics Soldier(!) 0/104 100/100,... END
Summary
CSV is trivial to parse, the output would be unambiguous and there is no fear of missed lines (either it's there or it isn't!). Section names (ENEMIES, THINGS) could be shortened if necessary.