public class AnalysisTool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
CHARACTERS
The array containing character names
|
static java.lang.String |
DIRECTORY_PATH
The path of the directory containing the replay file(s)
|
static boolean |
HP_MODE
The mode (HP mode or Time mode) when FightingICE is launched
|
static java.lang.String |
OUTPUT_PATH
The path of the output directory
|
Constructor and Description |
---|
AnalysisTool() |
Modifier and Type | Method and Description |
---|---|
void |
analyze(java.io.File file)
Extracts the frame information from the replay file and analyzes it
The frames information written in the replay file is as follows. isLeft: a boolean value whether the character is on the left side of the opponent character (left side: true , right side:
false )actionRemainingFrames: # of remaining frames of the action the character is executing actionId: The index of the action that the character is executing @see Action hp: The amount of the HP energy: The amount of the energy x: The x coordinate of the character box's top-left corner when isLeft is true , or the one's top-right corner when
isLeft is false y: The y coordinate of the character box's top-left corner keyByte: The key of the action that the character is executing represented in byte |
void |
fileClose()
Closes all files
|
static void |
main(java.lang.String[] args) |
java.io.File |
openOutputFile(java.io.File file)
Creates the output file
|
void |
readFile(java.io.File dir)
Reads all replay files in the directory and analyzes them.
|
void |
writeHeader()
Writes the header to the output file.
In this project, the following information is used as the header. Each character's max HP Each character's name If you don't need the header, please comment out pw.println |
public static java.lang.String DIRECTORY_PATH
public static java.lang.String OUTPUT_PATH
public static final java.lang.String[] CHARACTERS
public static boolean HP_MODE
public static void main(java.lang.String[] args)
public void readFile(java.io.File dir)
dir
- The path of the directory contains files you want to analyze.public void analyze(java.io.File file)
true
, right side:
false
)isLeft
is true
, or the one's top-right corner when
isLeft
is false
file
- The file to analyzepublic void writeHeader()
pw.println
public java.io.File openOutputFile(java.io.File file)
file
- The read filepublic void fileClose()