Fabrication building dont want to assist factorys

Discussion in 'Mod Support' started by CryFisch, September 23, 2014.

  1. CryFisch

    CryFisch Member

    Messages:
    98
    Likes Received:
    28
    I want to mod a supportbuilding, like the dronestation in supreme commander or the caretaker in zero k.
    The model is a double laser tower (looks realy cool with the fab_spray).
    It´s buildable with a normal fabber.
    It can support constructing building, reclaim and repair.

    The problem is: It cant assist a factory and the areapatrole has no effect(shoul repair).

    What is wron in the code?



    Code:
    {
      "base_spec": "/pa/units/land/base_structure/base_structure.json",
      "display_name": "!LOC(units:fabrication_structure.message):Fabrication Structure",
      "description": "!LOC(units:missing.message):Missing.",
     
     
     
     
      "max_health": 1500,
      "build_metal_cost": 150,
      "atrophy_rate": 7.5,
      "atrophy_cool_down": 15,
      "spawn_layers": "WL_AnyHorizontalGroundOrWaterSurface",
     
     
      "unit_types": [
        "UNITTYPE_Fabber",
        "UNITTYPE_Structure",
        "UNITTYPE_Basic",
        "UNITTYPE_Land",
        "UNITTYPE_SurfaceDefense",
        "UNITTYPE_Defense",
        "UNITTYPE_FabBuild"
      ],
      "command_caps": [
        "ORDER_Patrol",
        "ORDER_Build",
        "ORDER_Reclaim",
        "ORDER_Repair",
        "ORDER_Assist",
        "ORDER_Use"
      ],
      "guard_radius": 120,
      "guard_layer": "WL_AnySurface",
      "recon": {
        "observer": {
          "items": [
            {
              "layer": "surface_and_air",
              "channel": "sight",
              "shape": "capsule",
              "radius": 130
            }
          ]
        }
      },
      "model": [
        {
          "layer": "WL_LandHorizontal",
          "filename": "/pa/units/land/laser_defense/laser_defense.papa",
          "animtree": "/pa/anim/anim_trees/defense_turret_anim_tree.json",
          "skirt_decal": "/pa/effects/specs/skirt_defense.json"
        },
        {
          "layer": "WL_WaterSurface",
          "filename": "/pa/units/sea/floating_laser/floating_laser.papa",
          "animtree": "/pa/anim/anim_trees/defense_turret_anim_tree.json"
        }
      ],
      "tools": [
        {
          "spec_id": "/pa/units/land/fabrication_structure/fabrication_structure_build_arm.json",
          "aim_bone": "bone_pitch",
          "muzzle_bone": [
            "socket_rightMuzzle",
            "socket_leftMuzzle"
          ]
        }
      ],
     
     
     
      "fx_offsets": [
        {
          "type": "build",
          "filename": "/pa/effects/specs/fab_spray.pfx",
          "bone": "socket_rightMuzzle",
          "offset": [
            0,
            -1.891,
            -0.11
          ],
          "orientation": [
            0,
            0,
            0
          ]
        },
        {
          "type": "build",
          "filename": "/pa/effects/specs/fab_spray.pfx",
          "bone": "socket_leftMuzzle",
          "offset": [
            0,
            -1.891,
            -0.11
          ],
          "orientation": [
            0,
            0,
            0
          ]
        }
      ],
     
     
     
     
     
      "events": {
        "build_complete": {
          "audio_cue": "/SE/Build_Complete/structure_small"
        },
        "fired": {
          "audio_cue": "/SE/Weapons/structure/laser_defense_double_fire",
          "effect_spec": "/pa/effects/specs/default_muzzle_flash.pfx socket_rightMuzzle /pa/effects/specs/default_muzzle_flash.pfx socket_leftMuzzle"
        },
        "died": {
          "audio_cue": "/SE/Death/structure_small",
          "effect_scale": 0.6
        }
      },
      "mesh_bounds": [
        6,
        6,
        17.2
      ],
      "TEMP_texelinfo": 10.2184,
      "area_build_separation": 18
    }
  2. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    First thing I would do is get rid of
    Code:
    ,
          "muzzle_bone": [
            "socket_rightMuzzle",
            "socket_leftMuzzle"
          ]
    It's unnecessary and might cause issues. Everything else looks fine as far as I can see.

    It would be helpful to have a look at the build arm as well. If you haven't already, add "auto_repair": true and set a max range.
  3. CryFisch

    CryFisch Member

    Messages:
    98
    Likes Received:
    28
    I added the autorepair. Now it autorepairs :)

    But it still cant assist?

    Code:
    {"base_spec":"/pa/tools/engineer_build_arm_adv/engineer_build_arm_adv.json",
    
    "yaw_rate":180,
    "pitch_rate":180,
    
    "pitch_range":300,
    "yaw_range":300,
    
    "auto_repair": true,
    
    "construction_demand":{"energy":3000,"metal":80}}
  4. CryFisch

    CryFisch Member

    Messages:
    98
    Likes Received:
    28
    The navigation code is needed to patrole and assist




    Code:
        "navigation": {
        "type": "land-small",
        "acceleration": 0,
        "brake": 0,
        "move_speed": 0,
        "turn_speed": 0,
        "dodge_radius": 0,
        "dodge_multiplier": 0,
        "wobble_factor": 0,
        "wobble_speed": 0
        },
      
    thetrophysystem likes this.

Share This Page