PA Server API Requests

Discussion in 'Mod Support' started by wondible, June 23, 2014.

  1. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Suggested Flag: auto_reclaim
    Normal Location: in any *build_arm.json file.
    Variables accepted: boolean; true or false.
    Default variable: false
    Prerequisites: none
    Expected Behaviour: As with "auto_repair", auto_reclaim will allow the unit to automatically reclaim any wreck within range as long as there is space in storage.
    Example: fabrication_combat_bot_build_arm has:
    "auto_reclaim": true
    The Combat Fabricator will attempt to reclaim any wreckage that is within its range.
  2. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Suggested Flag: max_health
    Normal Location: An ammo file.
    Variables accepted: float
    Default value: not present
    Expected Behaviour: Makes it so that anti-entity projectiles can damage the projectile.
    Example: "max_health": 100,
    Last edited: September 30, 2014
  3. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Missiles can already be given health values. What we don't have is any interaction between anti-entity ammo and their targets beyond the single; the only viable option with an anti-entity ammo is using "collision_check": "target" & "collision_response": "destroy".

    And it's not because said ammo doesn't have damage values either. I'm assuming you've tried removing "collision_check": "target" & "collision_response": "destroy" and gotten the same result we have; a crash.
    Last edited: July 9, 2014
  4. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    While we are at this:


    Suggested Flag: auto_reclaim_enemies
    Normal Location: in any *build_arm.json file.
    Variables accepted: boolean; true or false.
    Default variable: false
    Prerequisites: none
    Expected Behaviour: As with "auto_reclaim", auto_reclaim_enemies will allow the unit to automatically reclaim any enemy units within range.
    Example: fabrication_combat_bot_build_arm has:
    "auto_reclaim_enemies": true
    The Combat Fabricator will reclaim any enemy unit that is within its range. This would allow for "battle" fabricators that reclaim enemy units. Perhaps it should also check for auto_attack so it does/doesn't reclaim unless you give it a direct order.
    bsergent likes this.
  5. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Suggested Flag: self_destruct_weapon
    Normal Location: in any unit blueprint tool section.
    Variables accepted: boolean; true or false.
    Default variable: false
    Prerequisites: none
    Expected Behaviour: As with death_weapon, except triggered on a self-destruct rather than normal death. The behaviour of death_weapon should also change such that it does not trigger on self destruct.
    nanolathe likes this.
  6. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    If I am understanding you correctly, its already in. Just add "self_destruct": true to the tool_weapon.
  7. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    That causes the unit to self destruct when the weapon is fired; I'm looking for the opposite behaviour - firing a weapon when the unit is self destructed.
  8. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    Ah...

    Code:
    {
          "death_weapon": true,
          "spec_id": "/pa/units/land/bot_bomb/bot_bomb_tool_deathweapon.json"
        }
    So this this is what you're looking for. You just have to make sure to have "ammo_type": "PBAOE" otherwise if there isn't a target in range when it dies, well I guess you can see where that ends.

    Edit: I should not type before going to sleep.
    Last edited: July 16, 2014
  9. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I'm aware of that flag, but that will cause the weapon to fire regardless of what caused the death; I'd like to isolate self-destructs and give them a different death weapon.
  10. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Add the ability to Hook json files, or otherwise overwrite/change values without needing to shadow an entire blueprint. This is especially important for unit_list.json, and also needed in build.js.
  11. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Suggested Flag: damage_reduction
    Normal Location: any unit .json file
    Variables accepted: float
    Default variable: 0
    Prerequisites: none
    Expected Behaviour: Any damage taken by the unit from any damage source is reduced by an amount defined in the float.
    Example: A tank has:
    "damage_reduction": 25
    When hit by a projectile that does 100 damage it is reduced by a flat 25, and the remaining 75 damage is dealt normally.

    Interacts with armour (AT) by first reducing the damage by the flat value defined by “damage_reduction”, and then applying the AT damage multiplier.
  12. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Might I suggest "user_self_destruct_weapon" to avoid confusion?
  13. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Suggested Flag: model_scaler
    Normal Location: any unit.json or ammo.json file
    Variables accepted: float
    Default variable: 1
    Expected Behaviour: Multiplies the size of the model by the value.
    Example: A pgen has "model_scaler": 0.5,
    the pgen will be half it's normal size.

    This won't affect placement size, which must be changed manually.
    Last edited: October 10, 2014
  14. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    o_O
    This doesn't work. PA doesn't handle models in such a way that they can be scaled by code.
  15. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    It's already supported, just not in unit blueprints; terrain meshes have variable per-axis scale values (and can even be different per-instance of a mesh, as there's an additional "scale_variation" parameter):

    From pa\terrain\mountain\mountain.json
    Code:
      ...
      "brushes": [
        {
          ...
          "scale": [
            1.0,
            1.0,
            1.0
          ],
          "scale_variation": 0.0,
          ...
        },
        ...
  16. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Brushes are very different from units, which is what @stuart98 was asking for.

  17. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I know, I was just saying that the engine does support dynamic scaling of papa models, at least for terrain, so adding that functionality to unit models shouldn't be a stretch (hehe).
    stuart98 and cwarner7264 like this.
  18. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Doubtful. Last I heard, Neutrino said it would be a very difficult task to make dynamic scaling of units and that it would be easier (for a given value of easy... which is actually very hard) to rescale everything by hand.

    When the Vanguard were formed it was a hot-topic at the time, and was one of the questions we put forward.

    Now this may have changed in the months since Jon said that... but I doubt it.
    Raevn likes this.
  19. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Suggested Flag: ignore_radar_area/ignore_sight_area
    Normal Location: Somewhere near the ignore_radar setting, or ignore_sight
    Variables accepted: Any number
    Default variable: 0
    Prerequisites: none
    Expected Behaviour: Higher numbers will increase size of the circle. Will either give a circular radius making any unit within said radius invisible to radar or vision, depending.
    Example: bot_cloak has:
    "ignore_radar": true","ignore_radar_area": 50
    or
    "ignore_sight": true","ignore_sight_area": 50
  20. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Suggested Flag: death_unit
    Normal Location: in any unit.json file.
    Variables accepted: string; the path to a unit.json
    Default variable: None.
    Prerequisites: none
    Expected Behaviour: Makes the unit, instead of turning into wreckage on death, turn into the specified unit.
    Example: tank_light_laser has
    "death_unit": "/pa/units/land/tank_light_laser_wreckage/tank_light_laser_wreckage.json"
    The tank will now turn into that unit upon death.

    The functionality that I'd use it for is turning units onto wrecks with a high push class on death, resulting in unmovable wreckage (This would be combined with a pbaoe death weapon that each unit has with a high trigger range, similar to Statera walls).
    wondible likes this.

Share This Page