Difference between revisions of "Suggestion: csv output of battle stats"
(→Overview) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
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. 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: | + | 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. |
− | [[File:Screenshot_2015-08-13_13-00-12.png]] | + | <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]] | ||
Line 17: | Line 19: | ||
== Solution == | == Solution == | ||
A single comma-seperated value (CSV) line. e.g. | A single comma-seperated value (CSV) line. e.g. | ||
− | < | + | <br> |
− | 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,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. |
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.