Found a bug with the log parser we use to make the database. It seems spawngroups were being assigned 50% chance per npc, regardless of how many npcs were in the spawngroup. This caused a greater than 100% chance on groups with more than 2 npcs in it. Thus making the lower mobs on the list not spawn. I created a php script to fix this. Tested it today seems to work great. All our future databases will have this run before release now that we've identified the problem. You must have a php capable web server to run this script.
Fill it in with your own database mysql connect info.
Code:
<?
class database {
function database(){
$dbhost = 'localhost';
$dbuser = 'dbuser';
$dbpass = 'dbpass';
$db = 'database';
$link = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($db) or die("Failed to select database with error: ".mysql_error());
}
function openConnectionWithReturn($query){
$result=@mysql_query($query) or die("Query failed with error: ".mysql_error());
return $result;
}
function openConnectionNoReturn($query){
@mysql_query($query) or die("Query failed with error: ".mysql_error());
}
}
$database = new database();
$from =0;
$from2 = 0;
$count_q = "SELECT * FROM spawngroup";
$count_r = mysql_query($count_q);
$count_x = mysql_num_rows($count_r);
while($from2 < $count_x) {
$max_results = $from + 1000;
$query = "SELECT * FROM spawngroup ORDER by id ASC LIMIT $from, $max_results";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
$spawngroupID = $row['id'];
$query2 = "SELECT * FROM spawnentry WHERE spawngroupID='$spawngroupID'";
$result2 = mysql_query($query2);
$count = mysql_num_rows($result2);
echo($spawngroupID . "<Br />");
if (!$result2 || ($count<1)) {
?>ERROR <?
} else {
if ($count==1) {
$percent = 100;
} else {
$percent = (100/$count);
$percent = round($percent);
}
while(($percent*$count)>100) {
$percent=$percent-1;
}
$leftover = (100 - ($percent * $count));
$final = $percent+$leftover;
$i = 1;
while($row2 = mysql_fetch_array($result2)){
$npcID = $row2['npcID'];
$chance = $row2['chance'];
if (($count==1) && ($chance!=100)) {
$query3 = "UPDATE spawnentry SET chance=100 WHERE spawngroupID=$spawngroupID AND npcID=$npcID";
}
if (($count==2) && ($chance!=50)) {
$query3 = "UPDATE spawnentry SET chance=50 WHERE spawngroupID=$spawngroupID AND npcID=$npcID";
} else {
if (($i==$count)) {
$query3 = "UPDATE spawnentry SET chance=$final WHERE spawngroupID=$spawngroupID AND npcID=$npcID";
} else {
$query3 = "UPDATE spawnentry SET chance=$percent WHERE spawngroupID=$spawngroupID AND npcID=$npcID";
}
$result3 = @mysql_query($query3);
$i++;
}
}
}
}
$from2 = $from;
$from = $from + 1000;
}
?>DONE!
Use it at your own risk. i've tested it but who knows what it may do for you. ALWAYS back up your database before doing something big like this.
hope it helps!