Phantom Brigade - Mobile Base Inventory Modding
The present guide will cover the topic of modding items inside the in-game inventory. A basic understanding and easy procedures into modifying (and eventually duplicate) some items without the use of Developer mode.
The below methods are acquired by self-studying (with a bit of consulting) and personal testing. That being said, I will not be held responsible in case your game will stop working, save files corrupted or you get a compromised gameplay of any sort (although these changes are not hard-coded and pretty safe, better advice first). Therefore, do it AT YOUR OWN RISK.
Pro-tip: always make backups BEFORE attempting any changes suggested by this guide. Not everyone has enough bandwidth to re-download the game from scratch because of some wrongdoing while modding.
NOTE: this guide can also be used to apply this kind of mods in two ways:
or
I personally suggest to take a look at Artyom Zuev's modding system guide, freely available at the following link:
https://wiki.braceyourselfgames.com/en/PhantomBrigade/Modding/ModSystem
Part of the game source code is exposed as configuration files, in .Yaml
extension to be precise. YAML stands for “YAML Ain't a Markup Language”, a Data Serialization Language that shares other languages' concepts like in C, Perl, Python, etc.
Since these files contain a structure and several code indents it is strongly reccommend to use Notepad++
for modding these files, as using simple editors like Windows' Notepad may erase spaces, indents and code blocks structure when making some changes. By doing so the game will refuse to load such custom files as a consequence.
Another thing to take in consideration is, since the present guide includes subsystems and part presets that store items in the inventory, is highly adviced to take a look at the following guide while modding, available at this link: /PhantomBrigade/Modding/parts_name_reference
The game let the player the possibility to have a part inventory within the mobile base that stores every kind of item as the following:
However, the way the game “saves” all of this doesn't exactly happen within game directory; instead, all of the looted or crafted items are stored within the savegame file as a entity file. Let's see in detail to have a deep grasp of the mechanism.
The concerned files are all classified as entities within a save-game folder, which means every data concerning the base, liberated provinces, settlements and others are stored this way. But since we're focusing on tweaking the base inventory, let's go to our savegame folder. Can be found at the following path:
C:/Users/[username]/AppData/Local/PhantomBrigade/
This is the typical listed example of a savegame which contains the following:
Let's go to our savefile Dev_save2 used as an example (you should go to your savefile name). You'll have access to the next place:
CombatActions
→ Combat actions of the units
OverworldActions
→ Folder that stores Ongoing objectives (usually seen in the top left corner of the screen)
OverworldEntities
→ Folder that contains all of the places liberated so far (Bases, settlements, towns, farms, cities, etc.), as well as the entity of our interest: the Mobile Base.
OverworldProvinces
→ Contains the provinces currently available in-game and its configuration files; currently liberated provinces (and still under invader's influence) are recorded here as the files also keep record of the hope level inside of them, with their own threshold.
Pilots
→ Stores the pilot datas and their records such as bio, encounters, portraits and so on. ( link to the Bio modding guide: /PhantomBrigade/Modding/edit_pilot_bio )
Units
→ Contains all of the available mechs; same goes for both the original Brigade's Sleipnir and Lance and mech frames (either empty or pre-built) created from the Workshop.
Other YAML files outside said folders are:
combat.yaml
→ combat-related (still to clarify exactly how it works);
core.yaml
→ the composition of our mechs plus some datas from the overworld;
crawler.yaml
→ Crawler data (still to clarify);
metadata.yaml
→ file that records datas about the current province, how many we have liberated, the base level, time spent in-game and so on;
stats.yaml
→ stores the number of mechs, pilots and the average level of currently owned mechs. Also stores some datas related to the provinces controlled, for example;
world.yaml
→ Contains informations about the Overworld like generated seed, the time spent in there and so on.
For now, let's go to OverworldEntities
and let's open up the mobile base entity, squad_mobilebase.yaml
.
Now that we can finally edit the file for real, let's start by showing you what's inside.
Since an actual mobile base file is way TOO long to explain (and probably more overwhelming for absolute beginners), we have a squad_mobilebase.yaml
stored inside a folder used as a reference for the game to create savefiles in /AppData/Local/PhantomBrigade/
. save_internal_newgame
is a abstract folder used to help us create our savefile when needed and stores all of our game progress based on that internal folder. You can check it at the following path: ….\PhantomBrigade\Configs\Saves\save_internal_newgame\
faction: Phantoms
. Other variables aren't important as they represent the entity itself;supplies
→ stores the supplies we own at the beginning of the game (30);
resources
→ the amount of supplies we currently have. resources are gained when salvaging between missions and scrapping parts in the inventory;
charges
→ the list of charges we have gained through missions. They are listed as per total number and categorized for each type of part or weapon (rifles, armor, missile launchers and so on);
parts
→ Components we store in the inventory, with their own perks and modifiers (this also includes weapons). Notice that the list can also become bigger in case we have a lot of items in our inventory;
subsystems
→ Related to subsystems currently owned per total number and each category.
3. The third part is to count how many smoke screens and influence we have.
a.The first line of the code is used to store the actual base influence to the black market. You can then leave it as it is if you wish (World/Counter/BlackMarketInfluence
)
b. The second line is related to the quantity of Smoke screens, which can be created in particular places inside liberated provinces and mainly used to safely flee from enemy convoys. (World/Counter/Utility_Smoke
)
As explained before, we need to go the parts:
section of our file and let's modify the file. Let's take an example of our currently stored item in the inventory like a weapon with rarity rating of 3 (Missile Launcher):
preset:
→ the part preset of the weapon with its own rarity rating.
livery:
→ the livery applied to that part/weapon.
integrity:
→ Item integrity. It is usually generated with the value 1, so leave it as it is.
barrier:
→ Item barrier. Body parts have barriers but not the weapons. As above, it is always created with the value 1 and can be left as it is.
salvageable:
→ A boolean condition that sets the given item as salvageable or not (inventory items always set to false
)
sockets:
→ The socket which where the item should go (if a weapon, some examples are equipment_left
or equipment_right
)
hardpoints:
→ Hardpoint composes some characteristics of the item. Weapons are listed under internal_main_equipment
as well as can also houses perks (DPS, Mass, Scatter, etc.)
systems:
→ The category where we can find the main composition of internal_main_equipment
and perk_1
as whole:
NOTE: Think of the systems like this way: “We have a system, with a internal_main_equipment
that is a Missile Launcher that uses X livery
, it's level
16 and it's not destroyed
, is fused
and can't be salvageable
. Then this weapon mounts one perk slot (perk_1
) that uses Scatter+++ (perk_scatter_pos_r3
) as a part preset level
16.”
perk_x:
→ the perk that the weapon/item has. Notice that, based on that component, can be also more than one which can be even two or even three slot according to the item rarity.
To conclude this step, be aware of the fact that a weapon preset stored inside the inventory can have more properties and more perks depending from the current rarity level and the kind of the item.
This step doesn't change that much about body parts compared to the second step except for some key difference:
r2
and r3
variants;hardpoint
as they are connected with each other;Here is the reference image of a Lvl.15 Vidar Body Part (Upper Part) with Level 2 Rating level (Uncommon), Thrusters (Heavy) and one Perk slot with Dissipation++ perk on it:
Example (posted as a link due to the big image size)
https://wiki.braceyourselfgames.com/phantombrigade/modding/savefile_folder7.png
After all of the informations needed, you can quietly modify existings items with desidered perks, armors and so on. Or even copy and paste part presets and duplicating items with custom parameters, levels and so on. The only limit is just the fantasy you're applying on items and resources amount.
While this guide is just a fraction of modding the base's inventory, the topic here is wider to cover and sometimes confusing, but not even that difficult to understand once we figure out how the internal things works. This procedure may be useful especially to restore some parts into your inventory due to data loss and have a bit old savefile as a backup. Or, as I said in the summary, to specifically add a given item without using the developer mode's embedded features (only random items can be added with it, which could be either a one random item or all randomized items).
In case of feedback or suggestions about this guide, please free to contact me on Phantom Brigade's modding channel @ Brace Yourself Games's Discord server.