[REFERENCE] Unit Blueprints

Discussion in 'Mod Discussions' started by Raevn, June 9, 2013.

  1. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    As it's currently defined, yes. Whether the engine likes this at the moment is another question :p
  2. theseeker2

    theseeker2 Well-Known Member

    Messages:
    1,613
    Likes Received:
    469
    So confused, so is PAPA or JSON the scripting language, where are the 3D parts defined, like in TA scripts?
  3. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    models & animations are stored in .papa files (think 3do from TA), .json is the unit and other data files.
  4. theseeker2

    theseeker2 Well-Known Member

    Messages:
    1,613
    Likes Received:
    469
    Re: Reference: Unit data files

    Got my first mod, going to make that Red Alert "classic" play in the PA main menu.
  5. theseeker2

    theseeker2 Well-Known Member

    Messages:
    1,613
    Likes Received:
    469
    I see. Makes sense now, might be easier than I thought. Still don't know where unit blueprints are stored in TA, the script files didn't define anything but the animation, my autoscripter must set unit characteristics. To cut things down a bit, how about a command line tool in good old... DOS prompt stuff, I could make that work, a .bat file that autoscripts.
  6. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    TA stored unit data in .fbi files, they were very simple text files.
  7. mcrawffles

    mcrawffles New Member

    Messages:
    9
    Likes Received:
    0

    Hmm ok so if I wanted to replace the model of a unit how would I go about that? I'm used to using fbx's for putting my models/animations into games. I know how to .json export the animations, but I've honestly never heard of the .papa file before today.
  8. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    See viewtopic.php?f=72&t=46767.
  9. mcrawffles

    mcrawffles New Member

    Messages:
    9
    Likes Received:
    0
    Oh derp of course it's a uberent filetype. Interesting.

    I might play around with that a little bit, but more likely I'll wait until something slightly more official comes out.
  10. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Latest patch included a "debug" attribute under headlights. If set to true, it shows a box indicating the headlight position:

    Attached Files:

  11. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Internally we ingest .fbx files for meshes and animation to make a single .papa file. That functionality will eventually be released.
  12. mcrawffles

    mcrawffles New Member

    Messages:
    9
    Likes Received:
    0
    Awesome :D
  13. oxide246

    oxide246 Active Member

    Messages:
    249
    Likes Received:
    30
    edit: As suggest by raevn, I have re-created this in it's own topic here http://forums.uberent.com/forums/viewtopic.php?f=72&t=47678

    Hey guys,

    I was going through tutorials on knockoutjs.com and thought I might as well make something that could be useful to people in the process. So to that end, I have created a unit statistic viewing and unit comparison tool which is attached to this post.

    To install, copy the unit_viewer folder to your PA installation directory then open unit_viewer.html in your browser.

    The way this works is that I have created a PHP script which compiles a massive json file, that builds up a tree structure of all the units and their associated json files. So for example the unit model field has a field in it called animtree which is a reference to a json file. This is loaded into the array under animtree_data. To regenerate this file run "php create_json.php" from the command line.

    The unit comparison page allows you to compare fields of your choosing by entering a value in the heading which is a representation of the units tree structure using a full stop (period) as a delimiter to symbolise the next level in the tree structure. So if you wanted to compare all unit speeds, you would enter navigation.move_speed into the table header. If you wanted to compare the damage of all the unit's "tools" you would enter tools.spec_id_data.ammo_id_data.damage

    The sorting on the comparison table breaks at the moment after the columns refresh. I'm still trying to fix this one.

    If this is useful to anyone and you would like to see a new feature added, feel free to PM me.

    Attached Files:

    Last edited: June 12, 2013
  14. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    That's awesome! It'll be hidden here though; you should post that in a new thread.
  15. oxide246

    oxide246 Active Member

    Messages:
    249
    Likes Received:
    30
  16. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Lets see if I can give info for what you have missing.

    building_skirt: essentially, how much space the unit takes up, regardless if it really is that size. Unenforced at the moment.

    guard_radius: the radius the unit uses for acquiring targets. Things like patrol or the auto weapon systems use the greater of this value or the max weapon range when searching for nearby targets.

    guard_layer: the layer a target must be on for the unit to automatically give chase when patrolling or idle.

    command_caps: does not require "ORDER_" anymore.

    unit_types: custom values not allowed at the moment.

    Tools:
    aim_bone: name of the bone to aim from (weapons and construction arms)
    muzzle_bones: name or list of muzzle bones to fire projectiles from (weapons only)

    Physics:
    air_friction: amount of world and input forces removed from an object per second.
    gravity_scaler: value applied to gravity static value when applied to this object
    ignore_collisions: used for factories so units don't collide with them while being built
    layer: unused


    Hope this helps.
  17. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Thanks Sorian, I've updated the list.

    All units that have a command_caps field still use ORDER_ values, is it just optional?

    Sure did!

    I've made a few other updates as well to incorporate the changes in the latest build (see PA Modding Changes). I'm guessing the "strategic_icons_index" attribute is now obsolete, as there is a new system for specifying icons.
  18. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Optional, but it didn't become optional until a lot of the unit specs were in place, so they were never changed.
  19. stainlesswood

    stainlesswood New Member

    Messages:
    1
    Likes Received:
    0
    By the way, just curious, why json, not Lua is used? I liked Moho-lua modding, allowing any sort of crazy modding.
  20. extraammo

    extraammo Member

    Messages:
    57
    Likes Received:
    15
    JSON isn't a scripting language, it's a data format standard/structure/syntax thing. Like how comma delimited files are a way to structure info.

Share This Page