It struck me that we've mostly been just moving the perks around (i.e. editing the perk trees), or in your case changing the summon perks. The actual behaviour of the perks themselves, especially the passive ones, appear to be hardcoded. (Well, hardcoded inside editable script files, so they're not un-editable, but it makes changing them a huge pain in the ass especially since we don't know what else may be referenced.)
\Data\Scripts\AI\CalculatePilotSkills.script shows some damning evidence. It's littered with stuff like
Code:
if pilot:HavePerk("Gunnery_1")
then
amplifier = amplifier + .2;
end;
...instead of simply looping through the pilot's skills and checking what each one is for. This sample code is basically saying that Gunnery_1 perk will always modify some amplifier value by 0.2.
Further incriminating evidence can be found in
\Data\Scripts\AI\perkDispatcher.script:
Code:
if pilot:HavePerk("Learner")
then
amplifier = amplifier + .1
end;
Again, it's making a fixed assumption - in this case, perk "Learner" will always cause a +0.1 value. I'll go through a few more files and see if we can identify what else touches perks.
\Data\Game\Perks.xml:
This supposedly defines each perk, its description, exp point cost, requirements. But if you look, all the PerkRequirement child tags for all entries are empty. (And why is pilot_name inside PerkRequirement? o_O)
\Data\Game\Pilots.xml:
This supposedly defines each pilot, points(?), kills(?), morale(?), and perks. The four value tags ("piloting", "guns", "rockets", "electronic_warfare") match the tags in the PerkRequirement sections of Perks.xml above.
Speculation: it seemed they planned to have a points-based requirement perk tree originally - i.e. instead of buying the skills directly with the pilot's exp, you used the exp to put into one of the four categories, and when you had enough to meet a skill's requirements then that pilot learned it.
A little later along the line they probably realised that with enough points in each category, the player would automatically unlock all the skills which meet those requirements. So in order to avoid this, they decided to make skills require direct skill prerequisites instead. I'm making an educated guess here based on how this explains the structure of the perk definitions inside
\Data\Scripts\include\PilotProperties.script which was mentioned earlier by Nanaki.
Of course, I'm stumped by non-controllable pilots, i.e. NPCs. They don't have skill trees and they don't have entries in
PilotProperties.script. Example, Hero's old classmate, the USS bigshot Ethan Fry. The only perk entries I can find for him are the ones inside
Pilots.xml. So I'm guessing that for NPCs the game does use these. They don't have prerequisites or skill trees to worry about, but can't learn any more skills anyway. I assume that if you want to change their skills you have to do it here.
-
Summary
If you want to change the actual effects of perks, you'll have to go down and dirty into
perkDispatcher.script and
CalculatePilotSkills.script. Say for example you create a combo skill "Strafe_1" which gives both a maneuverability bonus and an accuracy bonus. You'll have to go into these two files and add it.
But it's not that simple, this is all theory only! If I'm not mistaken others have mentioned that we can't actually add new skills (
guys, please correct me here if you can! - I've only taken a look at the pilot/perk scripts, haven't actually tested editing them!).
So let's say you play safe and just mod an existing skill, for example changing Gunnery_1 to give critical hits as well and not just accuracy. This looks within our reach: all you have to do is go to where the function for critical hits is, and create an additional check for Gunnery_1. I'm fairly sure this will work. However, it will affect ALL pilots who have this Gunnery_1 skill.
NOTE: This is
only for passive skills! I've seen mention of the active ones elsewhere in other scripts.