Integrating Other Mods - jackeys/Power-Armor-to-the-People GitHub Wiki

A core goal of Power Armor to the People is to make its systems as compatible with other mods as possible, since bringing together other power armor mods coherently is central to what Power Armor to the People is trying to accomplish. This page outlines how to integrate with various aspects of Power Armor to the People, either as an external mod author or when adding another patch to Power Armor to the People.

Adding Legendary Effects

Making Effects Available or Unavailable to Power Armor

By default, Power Armor to the People allows all legendary effects that can apply to any type of armor (LegendaryModRule_AllowedKeywords_ObjectTypeArmor) or to only the chest (LegendaryModRule_AllowedKeywords_ArmorBodyPartChest). If your legendary rule is using one of these for its AllowedKeywords, it can be used for power armor in conjunction with Power Armor to the People. If you don't want it to apply to power armor, be sure to include ArmorTypePower in your DisallowedKeywords form list.

Power Armor to the People does not automatically allow legendary effects for legs, since these include reducing fall damage in the base game. If you have an effect that should be able to apply to power armor legs, you will need to create a new form list to use for AllowedKeywords that includes ArmorTypeLeg, dn_PowerArmor_LeftLeg, and dn_PowerArmor_RightLeg.

Likewise, if you have a new form list for AllowedKeywords altogether, to provide your effect for helmets or arms or something else, you will need to provide an appropriate keyword that is present on power armor for it to be eligible. The dn_PowerArmor_ keywords for arms, legs, helmet, and chest are a great way to ensure it will work for all power armor sets, and if the player's game does not have any power armor available in the base legendary item lists, it won't effect them.

Adding Naming Rules

Added in Power Armor to the People 2.3.0

Power Armor to the People adds legendary naming rules to all of the power armor sets it supports, as well as a system for merging naming changes to all of those from an external mod. This heavily simplifies cascading naming changes to all of these power armor sets.

To make your naming changes show up across all of the power armor sets supported by Power Armor to the People, you need to do the following:

  1. Create Instance Naming Rules for the external mod with the legendary naming rules in Ruleset #0
  2. Merge your Instance Naming Rules contain the additions to PATTP_dn_PowerArmor_Additions_External (FormID B71)
  3. Start the quest PATTP_TriggerLegendaryNamingRulesMerge (FormID B6B)

That's it. The systems within Power Armor to the People will make sure that these changes now get merged into the naming rules for every set of supported power armor. Note that this does not include the core game and DLC instance naming rules (i.e. dn_PowerArmor), as many sorting mods make changes to these that may not be reflected in patches for the power armor mods. It is recommended that external mods directly merge naming rules to the core game and DLC Instance Naming Rules, since these may be different naming rules.

Example Usage

Using this approach also allows for naming rules to be merged solely by script, so no specific patch is needed. Here is an example Quest (which should run on start-up) that merges the naming rules if Power Armor to the People is present and looks for it each time the game loads if not:

Scriptname MergeNamingRulesIntoPAttP extends Quest const

InstanceNamingRules Property RulesToMerge Auto Const Mandatory
{The instance naming rules that should be merged into every power armor mod's naming rules}

Event OnQuestInit()
  ; Try to merge the naming rules now, but if that doesn't work, we will check for Power Armor to the People when the player loads the game
	if !MergeNamingRulesForPAttP()
		debug.trace(self + " could not find Power Armor to the People - registering for game load event until we can")
		RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
	endIf
EndFunction

bool Function MergeNamingRulesForPAttP()
  ; Get the naming rules we need to merge into and the quest we need to start without needing Power Armor to the People as a master
	InstanceNamingRules PAttPNamingRules = Game.GetFormFromFile(0x00000B71, "Power Armor to the People.esp") as InstanceNamingRules
	Quest PAttPTriggerMergeQuest = Game.GetFormFromFile(0x00000B6B, "Power Armor to the People.esp") as Quest

  ; If we found both of these, Power Armor to the People is loaded and a high enough version to support merging naming rules
	if PAttPNamingRules && PAttPTriggerMergeQuest
		debug.trace(self + " injecting armor naming rules into Power Armor to the People")
		PAttPNamingRules.MergeWith(RulesToMerge)
		PAttPTriggerMergeQuest.Start()
		return true
	endIf

	return false
EndFunction

Event Actor.OnPlayerLoadGame(Actor akSender)
  if MergeNamingRulesForPAttP()
		debug.trace(self + " unregistering for game load event")
		UnregisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
	endIf
EndEvent

Supporting Sorting Mods

Sorting mods usually move the legendary naming ruleset to a different spot besides Ruleset #0 (e.g. R88 Simple Sorter will move them to Ruleset #1 after running the patcher). It is important to note that every power armor set will get the same naming rules merged in, so the user must make sure that all of them, as well as the mod adding naming rules, have appropriate sorting mod patches so the rulesets are the same number across all of them. Failure to do so will result in legendary names showing up in unexpected places.

Power Armor to the People only has official support for R88 Simple Sorter, and this only applies to the core and DLC Instance Naming Rules as far as matching the formatting of the R88 INNRs. Supporting this from an external mod only requires that the naming rules being merged in have moved the legendary names to Ruleset #1. Unofficial patches may exist for other sorting mods, such as VIS-G, so just make sure users are clear on how to use the external mod's sorting patches if multiple are available.

However, since sorting patches may not exist for all of the power armor sets that Power Armor to the People supports and naming rules merged using this method only apply to the power armor mods, a user does have the option of only using the sorting mod for the core and DLC sets in their game. This requires support from the external mod or patch, however, since it will need to merge a different set of naming rules into Power Armor to the People and the core/DLC rulesets.

⚠️ **GitHub.com Fallback** ⚠️