Posted April 27, 2018
For the past few days, I have been working on modding in 4 new pilots to replace the starting pilots you get in the campaign (Glitch, Behemoth, Dekker, and Medusa).
For the most part, its pretty straightforward and not terribly difficult, but I did run into a few problems that I's like to share and possible ways to get around them.
To start off, just copy one of the existing pilots json data from the /pilots/ directory and change as you see fit. You will need to give them a unique id, and it is helpful to name the file the same as the new pilot's id to help keep things straight, ie: "pilot_custom_BigMike.json" contains pilot with "id=pilot_custom_BigMike".
One thing you will notice is that the 4 starting pilots DO NOT have a value set for the "icon", but the backer pilots DO. That field is used if you want your pilot's portrait to be a png image file. All of the backer pilots have a png for their portrait (as well as a handful of other pilots), but the starting 4 do not. The starting 4 pilots have their portrait generated by the game using the same system that we use to create our main character, only the data for that is saved in a separate file, that I can talk about later if desired.
Then you can set your stats, experience, background, and whatever tags you want associated with your pilot. The last thing I want to make note of in this file, are the 2 fields at the end: "isRonin" and "isVanguard". I'm not sure what "isVanguard" does yet, but I discovered last night that "isRonin" will give your new pilot a special badge that is similar to the badge that the kickstarter backer pilots get. The badge says something to the effect that the character is a unique character, and if they are fired or die they are gone forever from that playthrough. All of the backer pilots have "isRonin" and "isVanguard" set to true, while the 4 starter pilots have them either set to false, or do not have the tags listed in their file at all. This will be important later.
Once that is done, I edit the VersionManifest to add my new pilot(s) and either their png portrait, or the json file that tells the game how to create their appearance with the 3D modelling system.
Once that is done, they are now part of the game, but they will not replace the 4 starting pilots in the campaign yet. I've also noticed that they aren't available in skirmish mode either but I haven't looked into why yet, as my goal at this point is to add them to the campaign.
The next step is to edit the file simGameConstants.json (I think that's the right file name). In that file you'll come across a section for the starting pilots and starting portraits (roughly 1/4 to 1/3 of the way down). This is where I came across my first problem. You can replace (or add) pilots to this section using the id's of the pilots you just created, but if they have an associated png portrait in their pilot file, it will not work. As far as I can tell, all of the starting pilots must have a portrait generated by the game instead of a png. So if you want your replacement pilots to have their portrait generated by the game, this is where you associate them, and you are all done. BUT, if you are like me and you want your pilot to use a png, then you have a problem.
At this point, I have 2 possible solutions that won't directly replace the starting 4 pilots, but will make my created pilots available for hire right after the tutorial is done and you are able to visit the hiring hall. In the simGameConstants.json file, there are 2 fields we can use to get our pilots available for hire. The first is something like "RoninHireRate" or "RoninHireChange"... something like that. just search for "ronin" and you should find it. The default setting is 0.08 (or 8%). So every pilot in the hiring hall has an 8% chance of being one of the "Ronin" pilots rather than a randomly generated pilot. So, in the unlikely event that a ronin is available for hire, there is only a 4 in however many ronin pilots there are (backer pilots + 5 or 10 others + our custom modded pilots) chance that the ronin will be our modded pilots. So first thing we need to do is change that 0.08 to a 1.00 so that every single pilot in the hiring hall will be a ronin pilot. The second step is EITHER: A) edit all of the other ronin pilots in the /pilot/ directory to NOT be ronin ("isRonin" = "false") so that our pilots will have no ronin competition and must be picked, OR B) change the setting for the number of pilots to be shown from the default of 6 to something like 55, so that EVERY ronin will be visible in the hiring hall out of the gate.
Once you do that, hire your new pilots and save the game, I THINK you can go back into the simGameConstants.json file (and the other pilot files if you changed those too) and change the values back to default and have those settings take affect. I haven't had time to test that out just yet, but I plan to this evening. So far, that is the only workaround I've found for being able to replace the starting 4 pilots with 4 custom pilots with a png image for their portrait.
So what do you guys think? Questions? Concerns? Tips? Lets here it!
(I'm at work right now, so I'll edit this post when I get home to add some more specific details and clean things up. I just wanted to get the discussion going.)
For the most part, its pretty straightforward and not terribly difficult, but I did run into a few problems that I's like to share and possible ways to get around them.
To start off, just copy one of the existing pilots json data from the /pilots/ directory and change as you see fit. You will need to give them a unique id, and it is helpful to name the file the same as the new pilot's id to help keep things straight, ie: "pilot_custom_BigMike.json" contains pilot with "id=pilot_custom_BigMike".
One thing you will notice is that the 4 starting pilots DO NOT have a value set for the "icon", but the backer pilots DO. That field is used if you want your pilot's portrait to be a png image file. All of the backer pilots have a png for their portrait (as well as a handful of other pilots), but the starting 4 do not. The starting 4 pilots have their portrait generated by the game using the same system that we use to create our main character, only the data for that is saved in a separate file, that I can talk about later if desired.
Then you can set your stats, experience, background, and whatever tags you want associated with your pilot. The last thing I want to make note of in this file, are the 2 fields at the end: "isRonin" and "isVanguard". I'm not sure what "isVanguard" does yet, but I discovered last night that "isRonin" will give your new pilot a special badge that is similar to the badge that the kickstarter backer pilots get. The badge says something to the effect that the character is a unique character, and if they are fired or die they are gone forever from that playthrough. All of the backer pilots have "isRonin" and "isVanguard" set to true, while the 4 starter pilots have them either set to false, or do not have the tags listed in their file at all. This will be important later.
Once that is done, I edit the VersionManifest to add my new pilot(s) and either their png portrait, or the json file that tells the game how to create their appearance with the 3D modelling system.
Once that is done, they are now part of the game, but they will not replace the 4 starting pilots in the campaign yet. I've also noticed that they aren't available in skirmish mode either but I haven't looked into why yet, as my goal at this point is to add them to the campaign.
The next step is to edit the file simGameConstants.json (I think that's the right file name). In that file you'll come across a section for the starting pilots and starting portraits (roughly 1/4 to 1/3 of the way down). This is where I came across my first problem. You can replace (or add) pilots to this section using the id's of the pilots you just created, but if they have an associated png portrait in their pilot file, it will not work. As far as I can tell, all of the starting pilots must have a portrait generated by the game instead of a png. So if you want your replacement pilots to have their portrait generated by the game, this is where you associate them, and you are all done. BUT, if you are like me and you want your pilot to use a png, then you have a problem.
At this point, I have 2 possible solutions that won't directly replace the starting 4 pilots, but will make my created pilots available for hire right after the tutorial is done and you are able to visit the hiring hall. In the simGameConstants.json file, there are 2 fields we can use to get our pilots available for hire. The first is something like "RoninHireRate" or "RoninHireChange"... something like that. just search for "ronin" and you should find it. The default setting is 0.08 (or 8%). So every pilot in the hiring hall has an 8% chance of being one of the "Ronin" pilots rather than a randomly generated pilot. So, in the unlikely event that a ronin is available for hire, there is only a 4 in however many ronin pilots there are (backer pilots + 5 or 10 others + our custom modded pilots) chance that the ronin will be our modded pilots. So first thing we need to do is change that 0.08 to a 1.00 so that every single pilot in the hiring hall will be a ronin pilot. The second step is EITHER: A) edit all of the other ronin pilots in the /pilot/ directory to NOT be ronin ("isRonin" = "false") so that our pilots will have no ronin competition and must be picked, OR B) change the setting for the number of pilots to be shown from the default of 6 to something like 55, so that EVERY ronin will be visible in the hiring hall out of the gate.
Once you do that, hire your new pilots and save the game, I THINK you can go back into the simGameConstants.json file (and the other pilot files if you changed those too) and change the values back to default and have those settings take affect. I haven't had time to test that out just yet, but I plan to this evening. So far, that is the only workaround I've found for being able to replace the starting 4 pilots with 4 custom pilots with a png image for their portrait.
So what do you guys think? Questions? Concerns? Tips? Lets here it!
(I'm at work right now, so I'll edit this post when I get home to add some more specific details and clean things up. I just wanted to get the discussion going.)