Unit JSON deserialization question

Discussion in 'Mod Discussions' started by Greendolph, April 21, 2015.

  1. Greendolph

    Greendolph Active Member

    Messages:
    97
    Likes Received:
    104
    I have a deserializer that reads the unit data for every unit in the game, but some information seems hard to extract, like what is capable of building what. Is there documentation on the json format for units? Particularly on what can be built by what, cost, build power, and build efficiency?

    Thank you.
  2. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    Just open a .json in notepad++

    Anyway there's a list for all unittypes in the modding forum somehere. Ill go search it real quick.
  3. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
  4. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    .json are easy to read in notepad, there is no reason for deserialization. Everything is simple like "metal_cost": 40, "health": 100, etc... :p
  5. Greendolph

    Greendolph Active Member

    Messages:
    97
    Likes Received:
    104
    If I wanted to know the information myself it would be easier to get it from pa-db.com. The problem is I want *my computer* to know the information. Hence deserialization.

    The links you shared here are very useful, thanks :)
  6. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,084
    Someone made a schema, it might be a little dated but the core properties don't move (...often)

    https://forums.uberent.com/threads/wip-units-ammo-and-tools-json-validation-schema.60451/

    Otherwise the blueprint and unit database mods may be a good place to look for inheritance calculation and where to find various properties.

Share This Page