Jump to content

Multiple armor replacers at the same time


Recommended Posts

I've been experimenting with mods lately and as I like to use multiple armor replacers at the same time, was thinking how to make them work together.

 

For now I just put all the replacers in separate boxes and just take the armors I need from them. But I was thinking about automated approach that would equip the armor depending on the body replacer used by the actor (player or NPC).

 

Idea is as following:

 

MCM menu (or just inventory menu) in which the user can link the body replacers with races. Second part would be an inventory token which would run the script whenever armor would be equipped/unequipped or on outdoor to indoor (or vice-versa) cell change. Script would check which body type is on the actor and then equip the matching armor.

 

I have a rough idea how to make it all possible, but I'm wondering, how would it affect the game? Would it make unstable by running the script all the time like that?

 

I'd like some feedback from more experienced people so I know if I should start working on it or not...

 

(Sorry if this is wrong place to post this, didn't know where to put it)

 

Regards,

 

Bastardinho

Link to comment

I think you've got the work already cut out for you.

 

http://newvegas.nexusmods.com/mods/38524/?

 

Script based approaches are the most elegant way to go for distributing armors. With that being said, it is the way most prone to crashing as well. I've had the mod above with the armor replacer installed (could've been a similar mod, though) and the armor distribution failed in more than one place (people standing around in underwear, naked). CTDs were more common as well. This could have been due to how the scripts worked though. 

Link to comment

I think you've got the work already cut out for you.

 

http://newvegas.nexusmods.com/mods/38524/?

 

Script based approaches are the most elegant way to go for distributing armors. With that being said, it is the way most prone to crashing as well. I've had the mod above with the armor replacer installed (could've been a similar mod, though) and the armor distribution failed in more than one place (people standing around in underwear, naked). CTDs were more common as well. This could have been due to how the scripts worked though. 

 

but that one doesn't use scripts for anything but allowing you to put armor on corpses, literally all it does is change the file path for the body type of each race, so they all reference the correct body type, and then he manually gave them the correct armors in their inventory. meaning it has some deadly level conflictions with anything else that alteres races/npcs, unless your good at nvedit.

 

i think a script based one that people can set themselves with mcm is a great idea.

Link to comment

Hmm, I can distinctly remember using a mod that distributed armor (along with with matching underwear) to living NPCs based on races, who had various body shapes. But you are probably right that it wasn't that one. Can't remember which one it actually was, it's been a while.

Link to comment

Script based approaches are the most elegant way to go for distributing armors. With that being said, it is the way most prone to crashing as well. I've had the mod above with the armor replacer installed (could've been a similar mod, though) and the armor distribution failed in more than one place (people standing around in underwear, naked). CTDs were more common as well. This could have been due to how the scripts worked though. 

 

Well, got some experience with scripts and things related to them, so not starting with no know-how... The mod I helped in development (Rapscallion's Sexxxy Card Revamp, here on LL aswell) was only tested for 2 months before releasing just to be sure all script related problems are ironed out...

 

And I'm not worrying about having to do something from scratch...

 

I was thinking to give support for a few armor/body replacers I use, but was just worried if in places with lots of NPCs, like casinos or in events like the Goodsprings fight at the begining of the game, the game would stutter/crash/whatever because of the amount of scripts running at the same time on all nearby NPCs... Hopefully I'll manage to make something usable...

 

 

Regards,

 

Bastardinho

Link to comment

Hmm, I can distinctly remember using a mod that distributed armor (along with with matching underwear) to living NPCs based on races, who had various body shapes. But you are probably right that it wasn't that one. Can't remember which one it actually was, it's been a while.

 

it probably is this one, i might have not been clear in what i was saying, this does give living npcs armor/undies/bodys, but not through script. the plugin manually adds race based armor to each npc based on their race, and changes the path to the upperbodys so that each race uses a different one, no scripts at all, so it does cause a lot of issues if your using other plugins that have race/npc entries. the dead people i mentioned is that this adds 2 scripts, and their only function is that if you place armor on a corpse, it will equip it.

Link to comment

I think it's worth a try. At least this approach would keep your mod compatible with mods like MMUE or FNV Redesigned, which would be a huge plus. If you manage to build a stable script, stability shouldn't be an issue. At least not beyond the usual instability of the game engine. 

 

 

 

 

Hmm, I can distinctly remember using a mod that distributed armor (along with with matching underwear) to living NPCs based on races, who had various body shapes. But you are probably right that it wasn't that one. Can't remember which one it actually was, it's been a while.

 

it probably is this one, i might have not been clear in what i was saying, this does give living npcs armor/undies/bodys, but not through script. the plugin manually adds race based armor to each npc based on their race, and changes the path to the upperbodys so that each race uses a different one, no scripts at all, so it does cause a lot of issues if your using other plugins that have race/npc entries. the dead people i mentioned is that this adds 2 scripts, and their only function is that if you place armor on a corpse, it will equip it.

 

 

Lol, okay. You are right, of course.

 

I think I've got Body by Race and Body Control mixed up. 

Link to comment
  • 4 weeks later...

Okay, been a while since I started working on this...

 

For now, I managed to get the armor swapping working on player character using a quest script.

What it does:

First it checks the race and body replacer linked to that race, then depending on the armor equipped, equips the armor version matched to that body replacer, and deletes the "original" armor. On unequipping the new armor, deletes it and gives back the "original" in inventory (to avoid double weight and such issues).

 

Happy with that part, but now I'm kinda stuck... Can't figure out how to make the script universal so it works on everyone, just the target of the script is changing.

 

Any help is much appreciated.

 

 

Regards,

 

Bastardinho

Link to comment

I set out to do the same thing just recently. It works consistently, however there are some armors that just refuse to work. I cannot explain why. Also, with NVSE/FOSE I was able to get health preservation working.

 

This thread should help you.

http://www.loverslab.com/topic/16940-help-making-a-body-and-armor-replacer-apply-to-a-single-race/?do=findComment&comment=385034

 

My script was based heavily off of the one by Halstrom. I believe that Halstrom made the effect universal by applying the effect to the outfit, and not through a quest. I think I tried to do it through a quest and eventually the game just started crashing whenever I changed outfits.

 

If it helps you, I can probably send you my plugin. It is already set up for races and doesn't have any of the complicated bits from SCR. It is for fallout 3 though. 

 

Although it is setup for one race right now, if you have experience with MCM I would certainly be willing to make it universal. The easiest way would just be to have a folder where you drag the meshes folder of the armor replacer and another folder where you just drag the files for the body replacer. Doing this, though, would mean that the custom Race would have just have a generic name, although that would be easy to change in the GECK. 

 

As I said, my plugin is for Fallout 3, but I'm sure getting it into NV would be quite easy, as the original script I edited was for NV.

Link to comment

*snip*

 

 

Hmmm.... Gonna check out on all that for sure :D

 

This is the core part of my mod:

if (Player.GetEquipped ArmorLeather) == 1
  If BodyPlayer == 1
    Player.AddItem 3MArmorLeather 1 1
    Player.UnequipItem ArmorLeather
    Player.EquipItem 3MArmorLeather
    Player.RemoveItem ArmorLeather 1
  EndIf
EndIf

... and I have it copied for about 30 different armors, for 2 body and armor replacers I use. (was thinking to go up to 3 of them for start)

BodyPlayer variable is set in another script to the value attached to one of the races (eg. Caucasian 1, AA 2, Asian 3, Hispanic 4...)

 

To remove armors, a new script is attached to all race-specific armors. So far only armors with no attached scripts are covered, don't want to mess up armor scripts and make this mod uncompatible (will work something out for them).

Begin OnUnequip
    Player.RemoveItem 3MArmorLeather 1
    Player.AddItem ArmorLeather 1 1
End

Script just deletes the race-specific version and returns the default one.

 

No crashes, works as intended, at least for the player. For now setting the race/body combo in script, need to get to the MCM part, or at least to make a simple item menu.

 

Now just want to make the script universal so it's not only player, but it targets anyone in the same cell (to keep the game from overloading).

 

For folder structure, I was thinking about making a folder structure similar to the vanilla, so people just "dump" the replacer in their respective folder.

If I'm gonna go with the different folder structure, I was thinking about repacking the replacers and posting those repacked versions if I get the permissions, or just making a guide for it.

 

 

Link to comment

You could just use player.getisrace instead of using multiple scripts.

 

To make it universal you might want to try something like this:

ref rActor 

Set rActor to GetContainer 

Then, instead of using "player.additem" you could use "rActor.additem" and it should work fine.

 

I'm just declaring rActor as a variable (you don't need the r infront of the variable, but it helps organize), and then setting it to GetContainer. GetContainer will return the ID of whoever or whatever has the object in their inventory.

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use