-
Notifications
You must be signed in to change notification settings - Fork 1
Editing Blueprints
Generally, in order to edit blueprints in the game, the typical process is to use a postfix harmony patch after the point at which the game loads the blueprint library.
Pathfinder WoR Example:
[HarmonyPatch(typeof(ResourcesLibrary), "InitializeLibrary")]
static class ResourcesLibrary_LoadLibrary_Patch
{
static void Postfix()
{
try
{
Main.logger.Log("Library patching initiated");
//Do your logic/etc.. here
}
catch (Exception ex)
{
Main.logger.Log("Error while patching library");
}
}
}
Once you are in the postfix, modifications made to blueprints will persist for the session, so if you do not want to replace original blueprints, you should copy before editing.
Units are the NPCs and other actors in the game that have statistics. At their core, they have a brain, an inventory, and a fairly wide variety of other properties needed to function. Alongside that, they have a list of facts, and a componentsList that defines more details.
Generally you will usually:
- Modify core values, such as race, portrait, faction, size, alignment, etc...
- Add or remove facts from the unit
- Edit their inventory
- Add or remove components from their componentList
Components are things like the class levels a unit has (add feats, spells, etc... that come from it's class), working with it's tactical/army statistics (for the army battles), or a few other things.
As class levels and the class-related information on a unit is something that is commonly edited, that will be the part mainly focused on here.