Planet data conversion

Discussion in 'Mod Discussions' started by cola_colin, August 31, 2013.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I am trying to add information about the played planet to pa stats, so people can replay maps given the correct version of the game.
    However I am having problems with that I can only get this kind of data from the server callback for the played planet:

    radius 600
    heightRange 10
    waterHeight -0.75
    biome moon
    temperature 2.5
    seed 12929
    name RenameNeptunia

    The settings stored by PA for the planet from the editor are:
    name RenameNeptunia
    seed 12929
    radius 20
    heightRange 0
    waterHeight 60
    temperature 100
    biome moon
    index 3
    mass 2500

    I've found the formula to convert the radius in the new game js:
    var radius = 2000.0 * ((size / 100.0) + 0.1);

    However I am missing out on the other values. Is known how they can be converted?
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    So I've put some more time into investigating and I think this is actually somehow broken:

    Among some other minor weird behaviors observed the biggest problem was this:
    I've created a planet of waterHeight 60 and hosted it, left the game and created the game again. The planet is supposed to be kept, but it turns out that the game stores the weird values instead. So the 60 has become some small values I forgot. This results in a pretty rocky planet with no water at all when starting the game. So if you just keep playing on the same planet you get rocks every time.
    Also it seems that only the host has access the to "correct" and unmodified values. So I guess I really can't figure out how to get the correct values to pa stats :/

    EDIT:
    http://pa.lennardf1989.com/Tracker/index.php?do=details&task_id=2494
    Last edited: October 14, 2013
  3. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    mine does this if i use the original template name,
    if i use a random name and click save, the planet loads same every time.
    If i use the earth template and don't pick a random name, the planet i generated in the system editor changes to its default or incorrect values from an earlier revision of the game after one play of the system on the servers.

    weird values on sliders i have noticed.
    Water: sometime this number ends up a decimal (32.7373) or a negative number (-1.6372) this crashes the game in the system editor when you press the build button or planet preview button.

Share This Page