====== Test Viewer ====== PHP code to read the HDC files. function parseHdcFile($filePath) { // Check if the file exists if (!file_exists($filePath)) { die("File not found: $filePath"); } // Read the XML content from the file $xmlContent = file_get_contents($filePath); // Parse the XML $xml = simplexml_load_string($xmlContent); // Extract character information $raceName = (string) $xml->CHARACTER_INFO['CHARACTER_NAME']; // Display the character information (you can modify this part) echo "

Race Name: $raceName

\n\n"; // Add more information as needed // Example: Display Characteristics echo "Characteristics:\n
"; $count=0; $base=array(10,10,10,10,10,10,3,3,3,3,2,2,2,4,20,10,20,12,4,4); foreach ($xml->CHARACTERISTICS[0] as $stat) { $statName = $stat['XMLID']; $statValue = $base[$count]+$stat['LEVELS']; $count++; echo "$statName : $statValue
"; if (intval($count/4)==($count/4)) echo "
"; } echo "
"; // echo "
";
//    print_r ($xml);
//    echo "
"; // Add more sections and details as needed } // Example usage $files = glob('./data/media/roleplaying/hero/ws/6e/*.hdc'); foreach($files as $fileName) { parseHdcFile($fileName); echo "
"; };