Jump to content

Modding Power Armor Frames...Material Swapping


Recommended Posts

I am working on a test mod that will be incorporated into a larger Power Armor mod. The purpose of the test mod is for understanding how power armor functions, in particular how to properly swap materials for frames so that PA frames can be modded like armor pieces...particularly paints.

So far I have PA Frame furniture correctly loading thier material swap when summoned from console. However, after the initial inimation for loading the fusion core into the armor, and the animation entering the frame, I have noticed two problems.

The first problem is that after the animation, the power armor frame reverts to the original material. I have Frames created as armor, just like the frames already included with the game. They have the appropriate material swaps applied. However, I cannot figure out why they are not being loaded instead of the original material. I suspect a script is involved somewhere, but I don't understand enough about the PA systems to be able to identify how it operates. Any assistance with this would be greatly appreciated.

The second problem is that despite the material reverting to the default after entering the power armor, upon exiting the power armor, the frame returns to the correct material swap, but the material for the fusion core is lost leaving a purple color applied to the mesh. As with the other problem, I suspect a script's involvement, but cannot isolate where. Any assistence with this would also be greatly appreciated.

My goal is to make Frames buildable (probably using the automatron workbench) and assembling the armor on the frame much like building an automatron. This includes paint mods for the frame as well as armor pieces. First things first, I need to resolve the two problems above so that I can move on to the rest of this.

Thanks in advance to all helpers.

Link to comment
Share on other sites

I myself have done a lot of research and testing on this, and unfortunately, most of the power armor functionality is hardcoded, not scripted. The "battery" (fusion core insertion and drain) mostly isn't, but almost everything else is. You may have stumbled upon the power armor systems script; it isn't actually used, just an asset left in the game from before the dev's realized the scripting wasn't enough and they needed to hardcode the functionality. That said, what I think you need to look at to achieve your goals is the "Race" category "PowerArmorRace" and its associated "skin": "PowerArmorSkin" (which is an armor) and that armor object's associated armor add-on: "PowerArmorWhole". As you know, a power armor frame is a furniture, and if you didn't already know, upon activating one, your race technically changes to PowerArmorRace, instead of human, (although your base race remains human) and the player character automatically "equips" the frame "armor" skin. Compatibility issues with other mods can arise because you can't give multiple options for changing this object, but, changing that armor addon's material should do what you need it to.

 

As for the fusion core material turning purple... no idea, sorry, haha.

Edited by ZerasCETA
Link to comment
Share on other sites

If by "power armor systems script" you mean "SystemPowerArmorScript.pex" utilized by SystemPowerArmorQuest [QUST:0001FA20], then yes I have encountered it and the accompanying "PowerArmorActivatorScript.pex" utilized by PowerArmorActivator "T-45d Power Armor" [ACTI:0001D319] containing a reference to SystemPowerArmorQuest [QUST:0001FA20]. You say that they are not utilized? Bummer. Though I'm not surprised. I tested this by changing the material swap associated with the model reference in PowerArmorActivator, and it didn't change anything. No, nothing happened. I have recently turned to looking at the "Race" category and exploring "PowerArmorRace". I haven't tested changing the material reference yet, but that is the next thing on my list. From there, who knows?

Link to comment
Share on other sites

I can confirm that much of Power Armor functionality is hard coded. Armor condition is definitely hardcoded, and frames are either furniture or race. The armor reference required by the race is purely for skinning purposes.

PowerArmorArmorKeyword_DO is the keyword found on armor made to be worn over the power armor frame.

PowerArmorBatteryKeyword_DO is the keyword used to identify power armor battery misc objects.

PowerArmorDefaultFrameArmor_DO is the ​default power armor frame armor object.

PowerArmorDefaultFrameFurniture_DO is the default empty frame furniture.

PowerArmorFrameKeyword_DO is the ​keyword necessary on base power armor frame armor objects.

PowerArmorLinkedFurnitureKeyword_DO is the ​keyword that marks the link from an actor to the power armor furniture they are using or will use.

PowerArmorKeyword_DO is the keyword present on furniture that when activated causes a special race swap to occur on the activator.

PowerArmorRace_DO is the ​race used for visuals for actors when they are in power armor.

​All of these share a Form ID of 00000000, and thus are useless with respect to the console. There are more, but I've chosen not to include them. These are base objects loaded by the Creation Kit prior to loading any esm's or esp's. Then there's this:

Editor ID Form ID Form Type Type Flags
PowerArmorBattery 0000035C AVIF VARIABLE HARDCODED
PowerArmorHeadCondition 000002EF AVIF CONDITION HARDCODED
PowerArmorLeftArmCondition 000002F1 AVIF CONDITION HARDCODED
PowerArmorLeftLegCondition 0000033E AVIF CONDITION HARDCODED
PowerArmorRightArmCondition 0000035D AVIF CONDITION HARDCODED
PowerArmorRightLegCondition 00000388 AVIF CONDITION HARDCODED
PowerArmorTorsoCondition 000002F0 AVIF CONDITION HARDCODED

Link to comment
Share on other sites

Keeping this somewhat brief I can help with your first problem. The only way to do what you want, is it create an underarmor item (like a vault suit or such), your own keyword to match up with said underarmor, and then link that keyword to a powerarmor armor record. See below for exaples. This means for each color you want, you'd have to use a different equippable armor item. Then wear said item when entering the power armor. That then causes the game engine to equip the appropriate power armor visual record that matches up with your suit.

 

The vanilla game has a few types of these already. The vault suit, proctor ingram, atom cat's greaser outfit. When wearing one of those it equips a power armor which shows you wearing the outfit inside. Otherwise it shows a default.

 

Here's an example:

  • If you're wearing Armor_GunnerRaiderMod_Underarmor "Gunner Leathers" [ARMO:00223CFC]
  • it has the keyword usePowerArmorFrameRaider [KYWD:001909D7]
  • So if you enter a power armor with the Gunner Leathers on you get the ArmorPoweredFrameRaider [ARMO:001909D6] visual model.

 

Another example:

  • wearing Armor_BoS_Knight_Underarmor "BOS Uniform" [ARMO:000DEDEB]
  • triggers usePowerArmorFrameBoS [KYWD:00155046]
  • shows ArmorPoweredFrameBOS [ARMO:00198B13]

I hope that takes care of questions related to your first issue. No idea about the fusion core problem though.

 

*Edit: I just though about a potential alternative that might let you do this without making a bunch of equippable armors. It would be a little tricky and require some experimenting with scripting. But you can hook into an event triggered when you want to enter the power armor. Figure out which color it is. Save that in some variable. Then after you've entered it. Grab that value to identify which color it should be. Then figure out which visual model frame is being worn and apply a material swap to that. I haven't given it too much though and I'm not sure if there's any keywords you can link on without having to modify the armor records but it's something to look into. I haven't touched papyrus for a few months so I don't recall the events or functions to test for worn items.

Edited by BigAndFlabby
Link to comment
Share on other sites

Ahem. Yes, you can't use material swaps on power armor frames. As I found out, it causes problems. You'll have to create seperate models that directly point to your new materials. Although now that I think about it, I never tested whether the problems were caused by material swaping the furniture part or the armor part.

 

I have to say I like the idea for the mod, though you may be underestimating what that might take. It's definitely doable though.

 

And for your own sanity, when it comes to equiping all the armor peices you'll need, avoid the keyword system. Do it in papyrus.

Link to comment
Share on other sites

something i've noted while working with material swaps, if you apply a material swap to a model who doesn't have all its materials 'pathed' in the nif file on a base object, then when the model is loaded with your material swap you'll end up with the purple texture effect, while if you apply the same material swap to a object thats been added to the render window, you don't get that purple texture. If you edit those models and add the correct path to the bsgm files for the materials missing them, then apply the material swap, the purple texture effect will go away.

 

This might be the issue your having with the inserted power core.

Link to comment
Share on other sites

something i've noted while working with material swaps, if you apply a material swap to a model who doesn't have all its materials 'pathed' in the nif file on a base object, then when the model is loaded with your material swap you'll end up with the purple texture effect, while if you apply the same material swap to a object thats been added to the render window, you don't get that purple texture. If you edit those models and add the correct path to the bsgm files for the materials missing them, then apply the material swap, the purple texture effect will go away.

 

This might be the issue your having with the inserted power core.

If you're talking about what I think you're talking about then, in my experience, that just caused the material swaps to not apply at all. Additionally the power armor core is a seperate mesh that gets attatched via the attatchment system thing. I don't really know that system, but I would hope that it isn't causing the power armor core's material to not load.

 

Another interesting point I forgot to mention is that, when it happend to me, Paladin Danse was unaffected. He, along other NPCs who are expected to always be in power armor, has a seperate unlimited version of the battery item.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...