[HLP] Commander model as a unit model

Discussion in 'Mod Discussions' started by Mirolog, November 15, 2014.

  1. Mirolog

    Mirolog Well-Known Member

    Messages:
    294
    Likes Received:
    405
    Hello everyone!

    I want to make something the "officer" unit.
    Lots of health, big dps, and abilities to heal your army. Mix of assault bot and combat fabricator.
    And i want it to use Invictus (Delta) Commander model. Is it even possible?
    Combat fabricator has different animations and "build arm" but commanders have just models in their .json files?

    So i need some help mixing adv assault bot, adv combet fabricator, and Delta Commander. If its possible, of course.
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
  3. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Yes. My youtube has some crappy quality videos on modding. Was thinking of updating them.

    Anyway, you want to make a server mod folder, if you absolutely must copy an existing units mod. The things you need are as follows:

    -yourmod/modinfo.json with all your mod's info

    -yourmod/pa/units/unitlist.json and make sure to add your new unit unless you instead use an existing unit such as Advanced Combat Fabricator (believe me, nobody will ever miss it)

    -yourmod/pa/units/land/fabrication_bot_combat_adv if that is the unit you will "swap" for your officer unit. Don't worry, you can change everything about it.

    -gamelocation/planetaryannihilation/stable/media/pa/units/commanders/base_commander/base_commander.json this is the commander's stats. You can start by copying this, and pasting it into the adv combat fab's folder and renaming it to the adv combat fab's json

    -gamelocation/planetaryannihilation/stable/media/pa/units/commanders/imperial_invictus/imperial_invictus.json just copy this and paste it at the end of your officer's .json, which by these instructions are the base commanders renamed to fabrication_bot_combat_adv.json. Just paste it at the end, before the brackets, and remove the extra brackets around it. That should insert the model. Also, remove the invictus parenting the base commander, it should have no base_spec.

    -gamelocation/planetaryannihilation/stable/media/pa/units/commanders/base_imperial.json same as the model, copy and paste this in while removing the base_spec, to give your officer the animations of an imperial commander. Now he will have commander stats, imperial bones, invictus model, and will replace the combat fab. adv. according to this instructions.

    -yourmod/pa/units/land/fabrication_bot_combat_adv/fabrication_bot_combat_adv.json This should look like the base commander AND the added animations and models. Change what you want, name it, remove SI_name so it uses adv.combatfab. icon, change description, change metal value and health, if you want to restrict building then add "onlyassistbuildable" from the vanilla pa fabrication_bot_combat.json, change the weapons and you may have to borrow the files at the original location and move them to the folder unit location.

    -yourmod/pa/units/land/fabrication_bot_combat_adv/fabrication_bot_combat_adv_build_arm.json Cite this as your "tool" in your combatfab's .json, including the location of the file. Then, edit it with as much repair power and range and energy consumption as you want. Metal consumption by the way, the more there is the more it heals but the more metal it takes the eco as well. Energy consumption can be 0 if you want it to repair energyless (not metalless)

    -yourmod/pa/units/land/fabrication_bot_combat_adv/fabrication_bot_combat_adv_tool_weapon.json Copy and paste whatever weapon you want your unit to have here and rename it this. Cite it in the combatfab's .json.You can copy the inferno flame weapon, the commander's weapon, the gil-e's weapon, with any adjustments you want to give it. Adjust it's range, rate of fire, and whether the weapon consumes energy or metal and has a "clip size" or whatever. Multiple weapons can be added with multiple files, the commander has like 5 already, you can use as many as you like, including the build arm, the land air and sea weapons, the secondary manual fire AOE weapon, and the death explosion. Damage and such are in Ammos.

    -yourmod/pa/units/land/fabrication_bot_combat_adv/fabrication_bot_combat_adv_weapon_ammo.json Copy and paste the ammo of the weapon you chosen, and then edit that, including damage, splash, splash radius, bulletspeed, and tracking or whatever.

    -yourmod/ui/main/shared/js/build.js this is how the game places your unit in a build grid. The adv combat fab's build icon would place it in the top right. Place or rearrange the units how you like. top row is 0-4, middle is 5-9, bottom is 10-14, left to right. Make sure your adv combat fab's unit types arent "commander" anymore, make it construction, advanced, factorybuild, offense, bot, basically mainly the original combat fab's unit types.

    -yourmod/ui/main/atlas/icon_atlas/img/ this folder has the strat icons, however server mods don't add these, client mods do. Which is why I suggest you use the existing combatfabadv. If you don't use it, you can still add si_name and specify the unit's icon you do want to use. In NavalRedux the subs use tank icons.

    -yourmod/ui/main/live_game/img/build_bar/units/fabrication_bot_combat_adv.png using the dimensions of the old unit .png, you can use a pic of the invictus corner icon or whatever you need to make a suitable build icon. Or, just use text, possibly some symbols for repair and gun and whatever.
    Mirolog likes this.

Share This Page