Example Mod Bigger Boom Bot

From Planetary Annihilation Titans & Classic PA Wiki
Jump to navigation Jump to search

Titans-icon.png Example Mod: Bigger-Boom Bot

This example will demonstrate how to make a server mod that changes a unit's abilities.

Gold-rank-icon.png Bigger-Boom Bot

Here, we will change the boom bot such that it explodes with the force of a nuke and we'll also give it more vision for finding targets.

Gold-rank-icon.png Mod structure

To create a new local server mod, navigate to the Planetary Annihilation Data Directory and if it does not already exist, create a new directory called "server_mods". Inside that directory create a directory for our new mod, for example: "com.pa.you.bigger-boom-bot". And inside of that directory, create a new text file called "modinfo.json". This will contain the information about our mod. It should look like this:

 {
   "context": "server",
   "identifier": "com.pa.you.bigger-boom-bot",
   "display_name": "Bigger-Bomb Bot",
   "description": "Boom bot boom bigger!",
   "author": "you",
   "version": "1.0",
   "build": "105067",
   "date": "2017-11-13",
   "signature": "not yet implemented",
   "forum": "",
   "priority": 100,
   "icon": "",
   "category": ["balance"]
 }


See here for more details on the meaning of these entries.

Next, we are going to add the files we are going to shadow. To do so, we need to create the exact same file structure that PA uses. Since the boombot properties in Planetary Annihilation are located in "pa/units/land/bot_bomb", we have to create a new directory called "pa", then inside that directory a new directory called "units", and inside that "land", and then finally inside that "bot_bomb".

Now we should have the following structure:

Gold-rank-icon.png Editing unit properties

First we need to copy the files we wish to alter to the mod. For the boom bot mod, we need two files, "bot_bomb.json" and "bot_bomb_ammo.json" which can be found in "Planetary Annihilation Installation Directory/pa/units/land/bot_bomb". Copy these to the "bot_bomb" directory of your mod. You mod should now look like this:

Open the two json files in a plain text editor. First we'll adjust the range the boom bots can see. This can be changed in "bot_bomb.json". Look for the "recon" field. Expanded, it looks like this:

 "recon": {
   "observer": {
     "items": [{
       "layer": "surface_and_air",
       "channel": "sight",
       "shape": "capsule",
       "radius": 20
     }, {
       "layer": "underwater",
       "channel": "sight",
       "shape": "capsule",
       "radius": 20
     }]
   }
 }

Change the "radius" for the "surface_and_air" from 20 to 200.

Next, we'll adjust the range of the bomb blast. This can be found in the file "bot_bomb_ammo.json". Change both "splash_radius" and "initial_radius" to 150 to make the bomb bast range 10 times larger. It should now look like this:

 {
   "ammo_type": "PBAOE",
   "damage": 600,
   "splash_radius": 150,
   "splash_damages_allies": false,
   "sim_fire_effect": "/pa/units/land/bot_bomb/bot_bomb_ammo_explosion_ent.json",
   "impact_decals": ["/pa/effects/specs/scorch_b_01.json"],
   "damage_volume": {
     "initial_radius": 150.0
   }
 }

Gold-rank-icon.png Testing

Start Planetary Annihilation and go to Community Mods. Under the Installed tab, you should see the mod you just created. Click on it and click the Enable button.

Then start a game. In the Game Lobby you should see the name of your server mod in the lower left corner. If you play a test game, the boom bot should now have a lot more vision and be more destructive.

Gold-rank-icon.png Publishing

See Submitting Your Released Mod for details on how to publish your mod.