World Data/API?

DeletedUser

Guest
It was all ugly as sin because Im not good with graphical presentation but the fun for me was the backend :) Its going to be interesting to see what tools people come up for this world.

I know how that feeling xD, anyway one has to be carefully when using this data. in TW i got banned for a week for a mistake =(

I was creating a TribeClaiming tool, so that when in tribe families you could claim villages that youll noble and letting the rest of your family know about it to avoid comflicts, that in fact will be a good tool in here not for a while but good to start working on so that when alliances get bigger it will be almost ready =D.

Speaking of that let me know if you are intrested and we can work together on some nice tools, im definitely doing soemthing with this data. I'm in Alpha and Beta with the same username, so you can PM me there and talk about it.

pd: do not try to send masive messages when making this kind of tools it might get you banned.

pd2: try not to make the home/login page look exactly the same as the game without a discalimer it might get you lawsuited =P
 

DeletedUser

Guest
Im making a console application to update the data...

but damm it takes too long to process the data.

processing 51000 players takes a lot of time... prehaps I shouldnt truncate the table on every update?

Im not a performance geek, anyone out there who can throw me a bone on this?

Edit: Its even worst, when i get to the towns it has already been more than an hour, so the towns file is newer and my constrain integrity fails =(

Here is a code snipet

$c->createCommand("TRUNCATE alliance")->execute();
$string = implode("", gzfile($model->alliance_info));
$data = json_decode($string);
foreach($data as $alliance) {
//save alliance to database
}

alliances is fast... but processing 51000 players and 45000 towns takes more than 1 hour =(
 
Last edited by a moderator:

DeletedUser

Guest
I have a script written that ftp's the json data to my server and imports it into a MySQL db. I'm trying to figure out a way to, in the middle of that process, capture the island_x & island_y for each person, strip off the 1st digit of each, combine them to make the ocean, and insert that into a field in my db. Anyone done this already, and care to share?
 

DeletedUser5

Guest
a quick example for you...
PHP:
<?php

$island_x = 193;
$island_y = 553;

$ocean_x = substr($island_x, 0, 1);
$ocean_y = substr($island_y, 0, 1);

echo $ocean_x . $ocean_y;

?>
 

DeletedUser

Guest
Thanks, but the part I'm struggling with is how to then append that result to the json data on-the-fly, and insert it into the database
 

DeletedUser5

Guest
If you send me your code through PM, I'll be more than happy to help you.
 

DeletedUser

Guest
what about when you are adding the players to the database:

PHP:
<?php
//after a json_decode
$player->ocean = substr($island_x, 0, 1).substr($island_y, 0, 1);
?>

How do you people handle the diferent worlds fact?

I have a table for worlds and a foreign key to each other table... and it doenst seems good at all my queries are really slow

I was thinking about creating the whole set of tables for reach world, but Ill like to hear how you do it.
 

DeletedUser5

Guest
what about when you are adding the players to the database:

PHP:
<?php
//after a json_decode
$player->ocean = substr($island_x, 0, 1).substr($island_y, 0, 1);
?>

How do you people handle the diferent worlds fact?

I have a table for worlds and a foreign key to each other table... and it doenst seems good at all my queries are really slow

I was thinking about creating the whole set of tables for reach world, but Ill like to hear how you do it.

Set of tables for each world seems to be the quickest way to do it.
 

DeletedUser

Guest
Is the JSON discontinued?

I'm writing a a PHP app that extracts data from the JSON sources and copies to a local MySQL DB. For the last few days my JSON queries are failing. It seems the files are no longer available :Unhappy:
Did I miss something? Anyone else having this issue?
 

DeletedUser

Guest
I tried to download player_kills and alliance_kills files, but the browser says "not found".
What is the new path for these files?
I would be very grateful for the help.
 

DeletedUser5

Guest
Look two posts above the one you have just made.

It is not difficult to find.
 

DeletedUser

Guest
anyone here using python?

I made a world map of gamma in python (just for fun and exercise)
I will not publish it here because its a bit large but you can download

map
another one
 
Last edited by a moderator:

DeletedUser

Guest
Those are really nice map, specially second one. Can you make similar map for top 12 alliance in gamma.

Yogesh
 

DeletedUser

Guest
I just did, but with top ten alliances because its a mess if you do more :)
I posted it in the Gamma world section.

map
 
Top