If you're wondering why the hell would I use php for this, it's because php has the function explode, which is pretty much essential for handling csv files. I know I can write that function manually on C, but I already told you how lazy I am
Note: After processed by the script, the skill won't be ready-to-go yet, cause it may still have bad result codes, and those will have to be changed manually for sure. Don't think you can throw in some aloken buff to this and they will magically start to work
For individual skills:
Instructions: put the skill you want to convert to A3 to the same folder as the script, change the name of the skill file in the script and open the script page, it will debug the skill and save it as skillname.csvnew
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--Made by Zombe-->
<link rel="shortcut icon" href="favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Debugger</title>
</head>
<body>
<center>
<?php
$filename = 'k_2_1_jumpingcrash.csv'; //The name of the skill file to convert
$file = file($filename); //Load the file
echo('File loaded...<br />');
unset($file[28],$file[29],$file[30]); //Remove a few lines
for($i=0;$i<28;$i++) //Adding the first segment.
{
$newfile[] = $file[$i];
}
echo('First segment done...<br />');
$newfile[] = chr(10); //Add a few empty lines
$newfile[] = chr(10); //'\n' wouldn't work for some reason so I had to use chr(10)
$newfile[] = 'Combo,,,,,,,,,,,,,,,,,Style,,,'.chr(10); //This line I just added manually, since it's identical in all skills
for($i=33;$i<184;$i++) //Setting up a cycle to go through the second segment
{
$expl = explode(',',$file[$i]); //Getting cells from a row to an array
if(strlen($expl[10]) == 8) //Adjustment to 1 cell,
$expl[10] = substr($expl[10],1,7); //Since it usually differs in new actions but is required for old ones.
unset($expl[8],$expl[9],$expl[18],$expl[19]); //Removing a few columns
$newstr = ''; //Resetting the string
foreach($expl as $cell) //Going through each cell
$newstr .= ','.$cell; //And forming a new line
$newstr = substr($newstr,1,strlen($newstr)-1); //Removing the first comma
$newfile[] = $newstr; //Adding the second segment.
}
echo('Second segment done...<br />');
$newfile[] = chr(10); //Few empty lines again.
$newfile[] = chr(10);
//For this part it was messing up a bit, adding everything to 1 line, so I decided to do this part manually, since it's identical for all skills (I think?)
$newfile[] = 'LevelIndex,SPCostLevelUp,PCLevel,MaxOption,OptionIndex,OptionCode,OptionValue,MaxRequire,ReqIndex,Index,Level,CastTick,CoolTick,StartComboIndex,EndComboIndex,ResourceHP,ResourceMP,ResourceItemCode,ResourceItemCount'.chr(10);
$newfile[] = '0,-,-,0,-,-,-,0,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
for($i=193;$i<283;$i++) //Setting up a cycle to go through the third and last segment
{
$expl = explode(',',$file[$i]); //Getting cells from a row to an array
unset($expl[3],$expl[4],$expl[21],$expl[22]); //Removing a few columns
$newstr = ''; //Resetting the string
foreach($expl as $cell) //Going through each cell
$newstr .= ','.$cell; //And forming a new line.
$newstr = substr($newstr,1,strlen($newstr)-1); //Removing the first comma.
$newfile[] = $newstr; //Adding the third segment.
}
echo('Third segment done...<br />');
file_put_contents($filename.'new',$newfile); //Saving file.
echo('File saved. Skill conversion complete, enjoy :)');
?>
</center>
</body>
</html>
For multiple skills:
Instructions: create a direcotry "rawskills" (Name can be changed in the script) in the same directory as the script, put all the skills you want to convert inside it, then open the script page, it will debug all the the skills found inside rawskills folder, and save them with the same name to a folder named "debugged" (Name can also be changed in the script).
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--Made by Zombe-->
<link rel="shortcut icon" href="favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Debugger</title>
</head>
<body>
<center>
<?php
$readdirname = 'rawskills'; //The name of the directory containing skill files to debug.
$savedirname = 'debugged'; //The name of the directory where to put the debugged skill files.
if(!file_exists($readdirname)) //If input directory doesn't exist, kill the script.
die('Error: input directory "'.$readdirname.'" doesn\'t exist.');
$dir = scandir($readdirname); //Getting list of files in directory
unset($dir[0],$dir[1]); //Removing . and .. backlinks
foreach($dir as $filename) //Going through all files found.
{
unset($newfile); //Resetting file.
if(pathinfo($filename, PATHINFO_EXTENSION) != 'csv') //Skipping non-csv files found.
continue;
$file = file($readdirname.'/'.$filename); //Load the file
echo($filename.' loaded...<br />');
unset($file[28],$file[29],$file[30]); //Remove a few lines
for($i=0;$i<28;$i++) //Adding the first segment.
{
$newfile[] = $file[$i];
}
$newfile[] = chr(10); //Add a few empty lines
$newfile[] = chr(10); //'\n' wouldn't work for some reason so I had to use chr(10)
$newfile[] = 'Combo,,,,,,,,,,,,,,,,,Style,,,'.chr(10); //This line I just added manually, since it's identical in all skills
for($i=33;$i<184;$i++) //Setting up a cycle to go through the second segment
{
$expl = explode(',',$file[$i]); //Getting cells from a row to an array
if(strlen($expl[10]) == 8) //Adjustment to 1 cell,
$expl[10] = substr($expl[10],1,7); //Since it usually differs in new actions but is required for old ones.
unset($expl[8],$expl[9],$expl[18],$expl[19]); //Removing a few columns
$newstr = ''; //Resetting the string
foreach($expl as $cell) //Going through each cell
$newstr .= ','.$cell; //And forming a new line.
$newstr = substr($newstr,1,strlen($newstr)-1); //Removing the first comma.
$newfile[] = $newstr; //Adding the second segment.
}
$newfile[] = chr(10); //Few empty lines again.
$newfile[] = chr(10);
//For this part it was messing up a bit, adding everything to 1 line, so I decided to do this part manually, since it's identical for all skills (I think?)
$newfile[] = 'LevelIndex,SPCostLevelUp,PCLevel,MaxOption,OptionIndex,OptionCode,OptionValue,MaxRequire,ReqIndex,Index,Level,CastTick,CoolTick,StartComboIndex,EndComboIndex,ResourceHP,ResourceMP,ResourceItemCode,ResourceItemCount'.chr(10);
$newfile[] = '0,-,-,0,-,-,-,0,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
$newfile[] = '-,-,-,-,-,-,-,-,-,-,-,0,0,0,0,0,0,0,0'.chr(10);
for($i=193;$i<283;$i++) //Setting up a cycle to go through the third and last segment
{
$expl = explode(',',$file[$i]); //Getting cells from a row to an array
unset($expl[3],$expl[4],$expl[21],$expl[22]); //Removing a few columns
$newstr = ''; //Resetting the string
foreach($expl as $cell) //Going through each cell
$newstr .= ','.$cell; //And forming a new line.
$newstr = substr($newstr,1,strlen($newstr)-1); //Removing the first comma.
$newfile[] = $newstr; //Adding the third segment.
}
if(!file_exists($savedirname)) //If output directory doesn't exist
{
mkdir($savedirname); //Then create it
echo('Output directory "'.$savedirname.'" doesn\'t exist. Creating...<br />');
}
file_put_contents($savedirname.'/'.$filename,$newfile); //Saving file.
echo($filename.' converted!<br />');
}
echo('<br /><b>Skill conversion complete!</b><br />Enjoy :)');
?>
</center>
</body>
</html>






