Stale data for guilds and characters due to crossplay merges

Discussion in 'Developer Notes' started by airmetforums, Feb 2, 2016.

  1. WiezzlerHDR New Player

  2. Feldon New Player

    The ability to create new threads has been removed.

    I have now resurrected the Census Forums so that we all have a unified place to talk about the Census API. Discussions about Census are useful for all 3 currently supported games -- EverQuest II, Planetside 2, and DC Universe Online. Having us all scattered across the galaxy makes it that much harder for us to learn from each other and continue to develop fan sites and mobile apps.

    I have been involved in the Census API since its creation in October 2011 and have approval from RadarX to promote this site. I hope you'll join us...

    https://forums.eq2wire.com/
    • Like x 1
  3. Nombezie New Player

    Hello WORLD?!

    Looks like there has been a lot of commenting about the 'stale' state of the DCUO Census API. The last post here was 3 months ago, with someone saying. ~" I have permission to redirect you here..." some COMMUNITY driven forum that appears dead for the most part.

    Is anyone actively developing or supporting the DCUO Census??

    <crickets>

    Well... I am actively developing and providing information here... yes, in this thread... since the forum has been locked. /smh
  4. Nombezie New Player

    Step one... setup service id... https://census.daybreakgames.com/#service-id - check!
    Step two... read ****** documentation on API... https://census.daybreakgames.com - check!
    Step three... create account on forums to document stuff no one else appears to have... - check!

    [EXAMPLE OF PULLING BASIC CHARACTER INFORMATION USING PHP]

    if(isset($_GET['name'])) {
    $response = file_get_contents('http://census.daybreakgames.com/s:YOURSERVICEID/get/dcuo:v1/character/?name=' . $_GET['name'] . "&c:limit=10");
    $response = json_decode($response, true); /* yes - I converted the JSON object to an array */
    $recordsReturned = count($response['character_list']);
    $validRecords = 0;

    if($recordsReturned > 0) {
    for ($i = 0; $i < $recordsReturned; $i++) {
    if($response['character_list'][$i]['active'] == 'true' AND $response['character_list'][$i]['deleted'] == 0) {

    $validRecords = $validRecords + 1; /* counter for character records that are crap */
    /* BREAK OUT 'COLLECTION' VALUES FOR EACH RESULT */
    echo "character_id: " . $response['character_list'][$i]['character_id'] . "<br />";
    echo "name: " . $response['character_list'][$i]['name'] . "<br />";
    echo "world_id: " . $response['character_list'][$i]['world_id'] . "<br />";
    echo "title_id: " . $response['character_list'][$i]['title_id'] . "<br />";
    echo "alignment_id: " . $response['character_list'][$i]['alignment_id'] . "<br />";
    echo "gender_id: " . $response['character_list'][$i]['gender_id'] . "<br />";
    echo "power_type_id: " . $response['character_list'][$i]['power_type_id'] . "<br />";
    echo "power_source_id: " . $response['character_list'][$i]['power_source_id'] . "<br />";
    echo "movement_mode_id: " . $response['character_list'][$i]['movement_mode_id'] . "<br />";
    echo "region_id: " . $response['character_list'][$i]['region_id'] . "<br />";
    echo "level: " . $response['character_list'][$i]['level'] . "<br />";
    echo "origin_id: " . $response['character_list'][$i]['origin_id'] . "<br />";
    echo "personality_id: " . $response['character_list'][$i]['personality_id'] . "<br />";
    echo "active: " . $response['character_list'][$i]['active'] . "<br />";
    echo "combat_rating: " . $response['character_list'][$i]['combat_rating'] . "<br />";
    echo "pvp_combat_rating: " . $response['character_list'][$i]['pvp_combat_rating'] . "<br />";
    echo "current_health: " . $response['character_list'][$i]['current_health'] . "<br />";
    echo "current_power: " . $response['character_list'][$i]['current_power'] . "<br />";
    echo "deleted: " . $response['character_list'][$i]['deleted'] . "<br />";
    echo "max_health: " . $response['character_list'][$i]['max_health'] . "<br />";
    echo "max_power: " . $response['character_list'][$i]['max_power'] . "<br />";
    echo "defense: " . $response['character_list'][$i]['defense'] . "<br />";
    echo "toughness: " . $response['character_list'][$i]['toughness'] . "<br />";
    echo "might: " . $response['character_list'][$i]['might'] . "<br />";
    echo "precision: " . $response['character_list'][$i]['precision'] . "<br />";
    echo "restoration: " . $response['character_list'][$i]['restoration'] . "<br />";
    echo "vitalization: " . $response['character_list'][$i]['vitalization'] . "<br />";
    echo "dominance: " . $response['character_list'][$i]['dominance'] . "<br />";
    echo "skill_points: " . $response['character_list'][$i]['skill_points'] . "<br />";
    echo "max_feats: " . $response['character_list'][$i]['max_feats'] . "<br />";
    echo "hash: " . $response['character_list'][$i]['hash'] . "<br />";
    };
    if($validRecords == 0) {
    echo "No active records found with name: '" . $_GET['name'] . "'.";
    };
    } ;
    else {
    echo "No records found with name: '" . $_GET['name'] . "'.";
    };
    }
    else {
    echo "I can't search for nothing!";
    };
  5. undrline Issue Tracker Volunteer

    Great start. Perhaps the best place for this would be to start a thread in the Guides section:
    https://forums.daybreakgames.com/dcuo/index.php?forums/oracle’s-database-guides.16/
  6. Nombezie New Player

    I might do that, but it seems that the cenus development thread is a good place for discussion and really needs some life breathed back in to it. As a web developer and seo specialist of 18 years, i have to say, the documentation is horrible. It would be nice to have this thread unlocked.
  7. xD25x Dedicated Player

    Interesting that recently league sp rankings have been updated on wavedox. Js
  8. undrline Issue Tracker Volunteer

  9. Darth Piper Loyal Player

    That's why I filed the ticket in the first place. After all this time you would think that the devs would have copied stuff over. As a person in IT who has done development, operations, and systems engineering I can tell you that this process smells of a database sync. The Census API appears to be reading off of a read-only copy of the database that has only part of the data replicated... the accomplishment of known feats, CR, skill point totals, stats... but for some reason the individual feats themselves and the data about the gear seem to have been forgotten, or at least omitted from the automatic process. If it's a manual process, you would think that shortly after the release of a new DLC and the settling of the dust, the replication process would be run (assuming it's a manual process).

    *walks up with coffee mug in hand* If they could automate this process... that would be great. :)
  10. undrline Issue Tracker Volunteer

    I was all ready to correct you when you said database sync, then you went on to replication, and I calmed down.
  11. Darth Piper Loyal Player

    Haha! :) I would suggest switching to decaf, but for us IT Engineers that's sacrilege (unless you have a medical reason for using decaf, of course).

    I've been doing this stuff for far too many years, and that's why I make the educated guess of the use of a database and a missing or forgotten process. Given my guess, I will say that the use of a read-only database by the Census API is actually a smart move from a security point-of-view. Writing to it is unidirectional (comes from the internal source) and can never write back into the main system, so even if someone did manage to hack this database, it would be self-correcting via the replication process.

    Pardon me while I get back to my TPS reports... ;)