Mafia Data Collection

This is where you spade, shovel and sickle. Or is it reap?
Post Reply
User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Mafia Data Collection

Post by QuantumNightmare » Sun May 04, 2008 4:29 pm

I've been talking to HCO's macman about where to direct spading work once our monster info project starts to wind down, and he mentioned that in the future we might approach Veracity and the mafia team to include some automated data collection for us. I'd like to use this thread to brainstorm some useful things to have mafia collect data about. Note that no contact with the mafia team has been done yet.

1) Tavern Faucet locations
2) Tower monsters
3) # of boss bat bodyguards (confirmation of queue reject rate)
4) Noncombat statgains based on mainstat
5) Basement test variation (most important for gauntlet/elemental tests)
6) Crypt / airship / friars turncounts with noncombat rate (ballroom song is an inaccuracy here)
7) Hidden Temple turncount for three noncombats
8) Spooky sapling/map/fertilizer turncount
9) Turncounts for other important noncombats: tower ruins, white castle, Mr Alarm, all shirt, demon names, desert adventures, unlocking the manor, conservatory
10) Insult collection (75% chance of insult being received, what are the odds of getting an unknown insult?)
11) Opposum/blender adventure gains (with/without milk/munchies)
Last edited by QuantumNightmare on Mon May 05, 2008 1:36 pm, edited 4 times in total.

macman104
Just Plain Old Pie
Posts: 13
Joined: Tue Apr 15, 2008 9:07 pm
Contact:

Post by macman104 » Sun May 04, 2008 4:40 pm

Do we have anyone who is handy with php? If you check out the monsterstats script here, and if you look at the source for the functions like "storeMonsterHPVarianceOnline", or "storeBangPotionDataOnline", and the like, you can see how Numfar stored information online. If we had something like that set up, that would probably be the easiest way to have mafia submit information. If we don't I can see if we can get Numfar back into the fold, but he's been out of the scripting/coding scene for quite a while.

All of his pages are non-active now, but he had ones like: http://batmantis.com/kol/towerresults2.php

User avatar
Flolle
Fie the Pie
Posts: 848
Joined: Mon Apr 02, 2007 10:13 am

Post by Flolle » Sun May 04, 2008 5:25 pm

Automatic Mafia data gathering would be more than awesome. That way, we might actually spade the mechanics behind all those once per ascension areas/encounters. And various other turnintensive things. :D


Here are my ideas:
  • How many Astronomers were found with how many turns in the HitS. (To check how many times the special rejection rate-rerolls of the Astronomers can occur. Only once per encounter roll or more than that.)
  • Turncounts for all quest encounters in the Arid Desert. (To check whether all of them are superlikelies)
  • Turncounts for all those shirt encounters + total turns spent in areas that have these encounters. (They are probably low chance superlikelies just like the demon names, but I haven't seen encounter probabilities anywhere)
  • Turncount for finding Mr. Alarm for the first time. (An update made it clear that he's a normal noncombat)
  • Total encounter analysis of the Road to White Citadel: Total turns, combats, noncombats, turncount of the quest noncombats, turncount of quest item drops.
  • Turncounts for Tower Ruins quest noncombats. (because it seems as if there is a minimum turncount floor in place)
  • Turncount of the Knob Goblin Encryption Key + all adventures that were rolled before it appeared. (To see whether there are some dependencies between it and certain encounters)
  • Turncount for finding the Manor Door.
  • Turncounts of the Hammer Quest-noncombats from the Sleazy Back Alley (turns spent in the Alley and total turns spent). (It seems like there is a turncount floor in place)
  • Action rate analysis of the Cocoabo at different weights: General action rate and rates for the different actions themselves. (The Cocoabo has a different general action rate depending on how much it weights.)

User avatar
lostcalpolydude
Forum Maestro
Posts: 2945
Joined: Wed Apr 23, 2008 6:54 pm

Post by lostcalpolydude » Sun May 04, 2008 6:27 pm

I'm not that great with PHP, but I've used it some, and inserting info into a database that's sent in a URL isn't that difficult. Given that the storeMonsterHPVarianceOnline function sends the data in a URL that looks like

Code: Select all

'http://www.batmantis.com/kol/hpvariancesink.php?PlayerName=' + me.charName + '&FightNumber=' + fightNumber + 
        '&MonsterName=' + monsterName + '&HPVariance=' + remainingHP + '&BaseHP=' + baseHP + '&EnhancedHP=' + enhancedHP + '&ScriptVer=' + scriptVersion +
        '&DebugInfo=' + debugInfo

(the url doesn't actually look like that, there's a bunch of stuff putting the whole URL together) the php file to add that into a database would look something like

Code: Select all

<?php
$playerName = $_GET[PlayerName];
$fightNumber = $_GET[FightNumber];
$monsterName = $_GET[MonsterName];
$hpVariance = $_GET[HPVariance];
$baseHP = $_GET[BaseHP];
$enhancedHP = $_GET[EnhancedHP];
$scriptVersion = $_GET[ScriptVer];
$debugInfo = $_GET[DebugInfo];

$username = database username //inside of quotes (single or double works)
$password = database password //inside of quotes
$hostname = "localhost";
/*   It might be better to put the above three lines into a file that isn't web-accessible and then use
   require_once("/full/path/to/db_login.php");
   to include it.  That way, if something screwy happens with the web server and it stops properly
   parsing php, it won't expose the login info to everyone.
*/
if($playerName) {
   $db = mysql_connect($hostname, $username, $password) or die("Unable to connect");
   
   $selected = mysql_select_db("db_name",$db);
   mysql_query("insert into table_name values($playerName, $fightNumber, $monsterName, $hpVariance, $baseHP, $enhancedHP, $scriptVersion, $debugInfo)");
   
   mysql_close($db);
}

Apparently phpBB sucks at properly sanitizing code. The last line of that (after the line I listed) would have a question mark followed by the thing pointing in the opposite direction of whatever < is called, but if I include that in the code block (or even have those characters somewhere later in the post, separated by other characters) then a bunch of stuff disappears from the post. *Goes to check for the fifth time if the post finally isn't broken*

If something like this was put into mafia, the server running this database would have to be able to take a good amount of load. I think the harder part would be the code to get that data along with displaying the data that has been put in the database.
Last edited by lostcalpolydude on Sun May 04, 2008 8:52 pm, edited 1 time in total.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

macman104
Just Plain Old Pie
Posts: 13
Joined: Tue Apr 15, 2008 9:07 pm
Contact:

Post by macman104 » Sun May 04, 2008 7:01 pm

I also want to note that none of this has been run by Veracity or Holatuwol who will probably be doing the coding unless someone else decides to. So, right now it's a brainstorm. I just wanted to make sure that was clear so there wasn't any expectation of work on their part.

Post Reply