Jump to content

Modding Power Armor Frames...Material Swapping


Recommended Posts

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.

 

I'm not sure if its the same thing or not, but thats what it made me think of, I kept fighting with a material swap, and couldn't figure out for the life of me what was going on, until I took a look at the mesh inside of nifscope. What it was doing was not ignoring the material swap but also was wiping out any textures being loaded for that model, so the whole thing went purple. After I added the bsgm lines to the nif for the materials and tried it, it worked perfectly both in ck and in game, no more purple texture. So thought i'd toss it out there just in case it might of been the same thing going on with it.

Link to comment
Share on other sites

I'm not sure if its the same thing or not, but thats what it made me think of, I kept fighting with a material swap, and couldn't figure out for the life of me what was going on, until I took a look at the mesh inside of nifscope. What it was doing was not ignoring the material swap but also was wiping out any textures being loaded for that model, so the whole thing went purple. After I added the bsgm lines to the nif for the materials and tried it, it worked perfectly both in ck and in game, no more purple texture. So thought i'd toss it out there just in case it might of been the same thing going on with it.

The issue I ran into was the fact that some of the models for the vanilla power armor frame didn't actually have a .BGSM to swap out. The materials it was using were defined in the .nif, even though there was an external material just waiting to be used.

Link to comment
Share on other sites

 

The issue I ran into was the fact that some of the models for the vanilla power armor frame didn't actually have a .BGSM to swap out. The materials it was using were defined in the .nif, even though there was an external material just waiting to be used.

 

 

I've ran into a couple of those as well, so I just created a bgsm file for them, or found one that worked for the object that was already setup, and added that information in and pointed it to the edited model.

Link to comment
Share on other sites

http://www.nexusmods.com/fallout4/mods/6698/?

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.

 

Indeed, I am aware of your mod. Rest assured I have looked to your mod for guidance. In fact, it's because of your mod that I'm investigating material swapping for frames. The only thing is, (no offense meant) your mod is rather heavy handed for use with swaps. It may prove to be the only way in the long run, but I'm hoping to avoid this.

 

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.

 

In the case of PowerArmorFurniture.nif, I noted that the frame had its textures set, but didn't have a material applied at all. The texture swaps for the furniture would never set until I manually added the reference to the base material in NifSkope. After that, swapping materials works fine. That's what you are seeing in the top picture. All the frames are swaps.

 

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.

 

I'll have to double check, but I don't think that any of the meshes I've worked with have meshes for fusion cores. I don't think that's the problem.

Here's the usual run of events. I summon the frame desired via the console by clicking on a power armor workbench and using the placeatme command. The correct frame displays upon leaving the console. I click on the frame, and the animation to install the power core runs. The core correctly displays on the mesh. The second time I click on the frame, the entering animation runs. The material remains present during this entire process.

This is where the problem occurs. As BigAndFlabby noted, certain clothing/skinsuit armors have a "usePowerArmorFrameXXX" keyword that triggers which power armor frame to load when changing from player race to power armor race. In short, the power armor system is not agnostic with respect to clothing/armor. Use of specific clothing will load either the vault suit (default) frame, the atom cats frame, the BoS frame, the raider frame, or the wastelander frame. I ignore the scribe frame as that is used specifically for Proctor Ingram. I haven't tested what occurs when you enter power armor with clothing that has no "use" keyword association, but there must be something coded for it.

​Regardless, at this point, since my character is still wearing their vault suit, the vault suit model loads with no respect to changing the material for the frame. I have created Armors for it, but they are never used. So, when I scroll out, it shows my character wearing the default frame instead of my custom material. It also shows the power core. When exiting the power armor, the frame immediately reverts back to the material for the furniture as before, but this is where I notice the power core losing its material.

​What I really want to do with this is something a little more like modding power armor pieces. I want a frame category that only allows me to swap materials, and then pass that information on to the power armor race just like everything else does. This may resolve my problem in the long run as I can use standard assets without having to modify them significantly. Just a mod to swap the material of the frame and possibly a script to do so. After that, I'm looking to figure out a way to construct frames. I'm not satisfied with the "place as furniture in settlement" mod (Where did that mod go anyway?) and the Buildable Power Armor Frames that is in use today. I'm thinking about tying frame building to the Automatron Workbench. I'd build the frame and equip it just like an automatron minus the robot parts, and utilize an AI core like Power Armor Autopilot to deactivate the AI for the frame. I think this would be a lore friendly (not to mention realistic) way to build frames, and it makes turning power armor into companions in a way that makes sense.

Link to comment
Share on other sites

I think I need to restate what I think the problem is for clarity's sake.

​After adjusting the PowerArmorFurniture.nif in NifSkope to contain a reference to the PAFrame01.BGSM, the furniture becomes able to accept Material Swaps. I created a furniture for each swap, which is what you see in the picture. What I need to do is utilize the default furniture, and apply swaps through mods just like mods for the armor pieces worn by the power armor. I've tried utilizing tutorials for modding armor, but they don't quite apply in this case. Anyone know of a tutorial on doing swaps on furniture? With all the bed mods, it would be a great mod to have. Just activate the bed for modding instead of sleeping, and viola! You have different "sheets" or whatever. At any rate, just like how armor pieces transfer over to the power armor race when the furniture is activated, I need to transfer the frame material mod over. That should be all that it takes. I just don't understand the process of going from furniture to power armor race.

Link to comment
Share on other sites

The default base frame is the ArmorPoweredFrameRaider [ARMO:001909D6] as identified by PowerArmorDefaultFrameArmor_DO [DFOB:0015503E].

 

To do the material swap on the base frame you'll need some way of knowing which one you should be using. One thought might be to make new "armor" items that resides in the power armor inventory and are "equipped" to trigger the swap. Something maybe like how the AI cores work on the power armor auto pilot.

*Edit: Actually thinking about that now, that might be tricky as it won't reference the equipped armor object.

 

Maybe adding a script to a custom armor record to trigger onequip and then set the material swap. That can be done by adding a custom mod attachment node and creating different armor mod items then via the onequip script adding the mod. That should then trigger the material swap. It still would require modifying the nif to have a base bgsm reference to swap on like you did. As well as creating a custom mod item for each swap.

 

On another note. If you are comfortable with it, if you want to pm me a link of the mod as you have it I can look at the fusion core issue and see if I can figure out what's up with the losing of the materials.

Edited by BigAndFlabby
Link to comment
Share on other sites

 

Maybe adding a script to a custom armor record to trigger onequip and then set the material swap. That can be done by adding a custom mod attachment node and creating different armor mod items then via the onequip script adding the mod. That should then trigger the material swap. It still would require modifying the nif to have a base bgsm reference to swap on like you did. As well as creating a custom mod item for each swap.

This is more or less what I had in mind. Still, it doesn't work quite as easily as a material swap for normal armor/clothes. I'm going to have to study the PA system a little more on this. Thanks for the tip on the base armor though. I'll have to look into that as well.

Link to comment
Share on other sites

ah alright i get it :smile: on the purple texture bit, yesterday i had a console doing the same thing when the model was swapped using material swaps on it, the only way i could get it fixed was rather then use the material swap, make the texture changes directly in the nif. after that the problem went away on the swapping of the model. There seems to be issues with bethesda's material swapping and how its handling the texture bit it seems, this is the second oddity i've had happen using them :/.

 

Hope you find a solution for the power armor, you'd think someone has ran across your issue before.

Edited by caleb68
Link to comment
Share on other sites

I had a brain fart. I forgot the reference id's get nuked when you have an object in inventory and it's not out in the world. So there's no way to target the equipped frame directly to swap. You'd need to do something before hand so it equips the right one like with the suit keywords.

 

You could still use the unique underarmor with keyword to pick the visible frame style. Then setup a script on the furniture object that on activate equips the character with the proper suit and then gets in. If you repeatedly enter and exit different frames your inventory would get pretty loaded up but that's one option. You could also have the same script remove any other suits so you only have the last one used. If you don't mind exiting naked you could just put a timer and have it remove from inventory it after you enter. But if you're going to publish the mod that isn't the cleanest way, some people might not like having clothes missing when exiting.

 

Or make 1 suit and a bunch of different mod options and have the above mentioned on activate script add the proper mod to the suit to trigger the keyword matchup. That would require spawning the suit with PlaceAtMe to get the ObjectReference so you can use the addmod function. Then move it to inventory and equip it. You'd have to remove any others from inventory before hand or it'll get confused on which one to equip. Best method for this scenario would be to play an XMarker somewhere hidden. Then in the script properties add the xmarker so you can reference it. then it'd go something like this example:

 

Make an armor, or clone one - like the vault suit to be lazy. (for this example we'll call it "myPASuit")

Make a attach parent keyword. This'll be used for the mod. ("ap_myPAColor")

Put keyword on the armor you made/cloned.

 

Make a keyword for the color choice. ("myPAColorBlue")

Make an omod with property adding the keyword for color choice ("omod_myPAColorBlue").

 

Then in the script attached to the furniture spawn the suit, add the mod, then pick it up and equip.

 

Actor Player = Game.GetPlayer()
ObjectReference NewRef = XMarker.PlaceAtMe(myPASuit, 1) ; assign reference with new placement
NewRef.AttachMod(omod_myPAColorBlue) ; attach the mod
Player.RemoveItem(myPASuit, 100) ; remove up to 100 of the suit from inventory. untested if it'll unequip and remove or leave equipped alone.
Player.AddItem(NewRef, 1, true) ; add newly made ref to inventory and mute the message
Player.EquipItem(myPASuit, false, true) ; equip the suit in inventory silently

Or something like that. I'm not sure if you can skip the add and equip and just use equip with the objectreference. I think I tried that once and it didn't work because it requires the base id though.

Link to comment
Share on other sites

ah alright i get it :smile: on the purple texture bit, yesterday i had a console doing the same thing when the model was swapped using material swaps on it, the only way i could get it fixed was rather then use the material swap, make the texture changes directly in the nif. after that the problem went away on the swapping of the model. There seems to be issues with bethesda's material swapping and how its handling the texture bit it seems, this is the second oddity i've had happen using them :/.

 

Hope you find a solution for the power armor, you'd think someone has ran across your issue before.

Indeed. However, only Galvon94 has approached this issue at least as far as I have. I'll have to test the texture swap problem as you proposed. I'd hat to think that Bethesda made their code that sloppy, but simultaneously, I wouldn't be surprised. There is a solution, and I will find it.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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