Game doesn't register changes?

Discussion in 'Mod Discussions' started by marblefidofido, April 27, 2016.

  1. marblefidofido

    marblefidofido New Member

    Messages:
    6
    Likes Received:
    2
    Im trying to add alternative fire to the dox and used the replicators mod as a base. But nothing i do to the assault bot.json changes anything ingame?. I've even tried editing the games files themselves but it just doesn't add the alternative fire order. Is there anything im doing wrong?
    Here is the code i've changed
    Code:
    {
        "base_spec" : "/pa/units/land/base_bot/base_bot.json",
        "display_name" : "Dox",
        "description" : "!LOC:Basic Infantry- Fast, adaptable, expendable. Amphibious. Attacks land, air and sea targets.",
        "max_health" : 40,
        "build_metal_cost" : 45,
        "attachable" : {
            "offsets" : {
                "root" : [0, 0, 0],
                "head" : [0, 0, 3.5]
            }
        },
        "buildable_types":"",
        "unit_types" : ["UNITTYPE_Bot", "UNITTYPE_Mobile", "UNITTYPE_Offense", "UNITTYPE_Land", "UNITTYPE_Basic", "UNITTYPE_FactoryBuild", "UNITTYPE_CannonBuildable","ORDER_FireSecondaryWeapon"],
        "transportable" : {
            "size" : 1
        },
        "guard_layer" : "WL_AnySurface",
        "navigation" : {
            "type" : "amphibious",
            "acceleration" : 50,
            "brake" : -1,
            "move_speed" : 18,
            "turn_speed" : 720
        },
        "physics" : {
            "radius" : 2.0
        },
        "recon" : {
            "observer" : {
                "items" : [{
                        "layer" : "surface_and_air",
                        "channel" : "sight",
                        "shape" : "capsule",
                        "radius" : 105
                    }, {
                        "layer" : "underwater",
                        "channel" : "sight",
                        "shape" : "capsule",
                        "radius" : 105
                    }
                ]
            }
        },
        "model" : {
            "filename" : "/pa/units/land/assault_bot/assault_bot.papa",
            "animations" : {
                "death01" : "/pa/units/land/assault_bot/assault_bot_anim_death01.papa",
                "walk" : "/pa/units/land/assault_bot/assault_bot_anim_run.papa",
                "idle" : "/pa/units/land/assault_bot/assault_bot_anim_idle.papa",
                "aim_up" : "/pa/units/land/assault_bot/assault_bot_anim_aim_up.papa",
                "aim_down" : "/pa/units/land/assault_bot/assault_bot_anim_aim_dwn.papa"
            },
            "animtree" : "/pa/anim/anim_trees/bipedal_mech_anim_tree.json",
            "walk_speed" : 20
        },
        "tools" : [{
                "spec_id" : "/pa/units/land/assault_bot/assault_bot_tool_weapon.json",
                "aim_bone" : "socket_aim",
                "projectiles_per_fire" : 2,
                "primary_weapon":true,
                "muzzle_bone" : ["socket_leftMuzzle", "socket_rightMuzzle"]
            },
            {
                "spec_id":"/pa/units/land/assault_bot/bot_nanoswarm_replicator.json",
                "aim_bone":"socket_aim",
                "secondary_weapon":true,
                "show_range":false
            }
        ],
        "events" : {
            "build_complete" : {
                "audio_cue" : "/SE/Build_Complete/bot"
            },
            "fired" : {
                "audio_cue" : "/SE/Weapons/bot/assault_fire",
                "effect_spec" : "/pa/effects/specs/default_small_muzzle_flash.pfx socket_rightMuzzle /pa/effects/specs/default_small_muzzle_flash.pfx socket_leftMuzzle"
            }
        },
        "audio" : {
            "loops" : {
                "move" : {
                    "cue" : "/SE/Movement/bot/assault_loop",
                    "flag" : "vel_changed",
                    "should_start_func" : "is_moving",
                    "should_stop_func" : "is_not_moving"
                }
            },
            "selection_response" : {
                "cue" : "/SE/Selection/bot/assault"
            }
        },
        "selection_icon" : {
            "diameter" : 8.0
        },
        "mesh_bounds" : [4, 2, 4],
        "TEMP_texelinfo" : 4.07719
    }
    



    PS. sorry for bad grammar and spelling english isn't my firs language
  2. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    How is your mod packaged?

    Did you make sure to enable it on PAMM?
  3. marblefidofido

    marblefidofido New Member

    Messages:
    6
    Likes Received:
    2
    I took an already made mod an just added the assault bot files to it.
    and yes i did activate it in pamm.
  4. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    You put a commandcap in with unit types. That's not where it goes. Copy command caps array from base_bot and append the secondary weapon order there.

    Does /pa/units/land/assault_bot/bot_nanoswarm_replicator.json exist? If not you'll need to create it.
  5. marblefidofido

    marblefidofido New Member

    Messages:
    6
    Likes Received:
    2
    Yes that fixed it. thanks for the help.
    though is it possible to make a unit delete with alternative fire??
  6. elodea

    elodea Post Master General

    Messages:
    1,694
    Likes Received:
    3,040
    you might find this helpful. https://forums.uberent.com/threads/tutorial-pa-unit-jsons.71559/

    Secondary fire weapon involves the following,

    In Unit Spec
    Code:
    "command_caps": [
    ORDER_FireSecondaryWeapon
    ],
    ...
    "tools": [{
    ... weapon stuff here
    "secondary_weapon": true
    }]
    
    In Tool Spec
    Code:
    "manual_attack": true
    

    To make it delete with alt fire

    In Ammo Spec
    Code:
    "ammo_type": "PBAOE",
    "damage": 0
    
  7. marblefidofido

    marblefidofido New Member

    Messages:
    6
    Likes Received:
    2
  8. elodea

    elodea Post Master General

    Messages:
    1,694
    Likes Received:
    3,040
    oh i forgot, to make it delete itself, you also need to put this into the tool spec

    Code:
    "self_destruct": true
    
    All the best
    Nicb1 likes this.

Share This Page