$val_now = $war_chances[$a][$v]; echo substr(FixedLengthFloat($val_now, $display_length), 0, -1); if ($v == 11) { echo "), <br>"; } else { echo ", "; } } } echo ");<br>"; echo "\$PVP_forced_balancing_slide = array(<br>"; for ($a = 0; $a <= 11; $a++) { echo "     array("; for ($v = 0; $v <= 11; $v++) { $val_now = $PVP_forced_balancing_slide[$a][$v]; echo substr(FixedLengthFloat($val_now, $display_length), 0, -1); if ($v == 11) { echo "), <br>"; } else { echo ", "; } } } echo ");<br>"; echo "Just for a forum post in case anyone cares<br>"; echo "50% mean the 2 classes are perfectly balanced. Higher then 50% means overpowered class<br>"; for ($i = 1; $i <= 11; $i++) { if ($i != 10) { echo FixedStrLen($class_names[$i], $display_length); } }
<?php $start_values = array(0.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 0.0, 5.0); $end_values = array(0.0, 73.52941199999999, 52.083333, 75.18797000000001, 41.493776, 52.083333, 73.52941199999999, 52.083333, 51.282051, 52.083333, 0.0, 47.87); $start_values_for_level = 1; $end_values_for_level = 80; $gen_for_max_level = 137; for ($level = 0; $level < $gen_for_max_level; $level++) { echo "{"; for ($class = 0; $class <= 11; $class++) { $step = ($end_values[$class] - $start_values[$class]) / ($end_values_for_level - $start_values_for_level); $val_now = $level * $step + $start_values[$class]; echo FixedLengthFloat($val_now, 8); if ($class == 11) { echo "},<br>"; } else { echo ", "; } } } function FixedLengthFloat($val, $len) { //sorry we cannot make it longer if (strpos("@" . $val, ".") == 0 && strlen($val) > $len + 2) { return $val; } //this is not float but int if (strpos("@" . $val, ".") == 0) { $val .= "."; } //to much precision we pinch it off