Jump to content

Script question.


Thorham

Recommended Posts

So have templates for each of the armor types. Then have some additional ones for specific quest related stuff. Not sure how many specific quest armors there are. Might be able to get by with one template for each armor type that has all the quest keywords on it and only use it when specific quest armors of that type are equipped.

Not a bad idea, however I just discovered that armors have other properties that can't be copied, such as the improvements from tempering. Probably uses a keyword for this, so who knows how many templates are ultimately needed.

 

Well, that's probably the end of my mod :(

Edited by Thorham
Link to comment
Share on other sites

I think the easiest route (tho time consuming) to get the stats etc but have a different appearance is to make a male mesh/texture set & a female mesh/texture set. Then go and change ALL the armor addon forms to point to the new custom sets. Then you can use the OMOD install option for NMM (xml scripting is easiest to get the hang of) and let the player pick what they want their gear to look like. Then whenever STOCK armors are equipped they'll look like that, but then that will affect what is worn by all the other NPCs too. Otherwise you'd have to duplicate all the armors and use your script to swap them.

 

 

It could be the end of your mod.... However, you could adapt your idea to say swap body style on armor removal. I.e. leave the NPCs at whatever installed base, but swap the body on the player to say UNP or CBBE based on mod worn armors? Or depending upon player weight swap into different style underwear... just randomly thinking...

Link to comment
Share on other sites

that will affect what is worn by all the other NPCs too.

That's what I'm trying to avoid.

 

Otherwise you'd have to duplicate all the armors and use your script to swap them.

Yeah, thought of that, except the CS only allows duplicating one item at a time :wallbash: Also has the disadvantage of conflicting or not working with armor and clothing mods.

 

However, you could adapt your idea to say swap body style on armor removal. I.e. leave the NPCs at whatever installed base, but swap the body on the player to say UNP or CBBE based on mod worn armors? Or depending upon player weight swap into different style underwear... just randomly thinking...

Interesting. So if I understood this right, you're basically saying that the way the player character looks can be changed from within a script? If that's the case, then all that's needed is for certain equipped items to be invisible on the player character.

 

I think it wouldn't be odd that "clone armor" would not have all the properties and tempering of the original. A photocopy is never as good as the original.

Except that I'm trying to copy something digitally. It would be very odd if a digital copy would be different.

 

That said, there is all kinds of keywords tomfoolery you can get up to with SKSE, perhaps you should take a look.http://www.creationkit.com/Category:SKSE

Yep, seen it, but I sadly couldn't find anything to actually set keywords.

 

Thanks for the replies, guys :thumbsup:

 

I think it's time for a different approach. As long as it's impossible to duplicate an item in the way it's duplicated in the CS, and then change the nif files, I don't think this is ever going to work very well, because there's just too many possible loose ends.

 

Time to look at writing an SKSE plugin :) Perhaps that will allow me to simply change player character apparel more directly.

Link to comment
Share on other sites

Interesting. So if I understood this right, you're basically saying that the way the player character looks can be changed from within a script? If that's the case, then all that's needed is for certain equipped items to be invisible on the player character.
If you are already able to "clone" an armor but have it look different.... the naked body is in all practicality armor too... but idk if it would work or not, I was just thinking out loud. I'd love to see different underwear per weight slider setting, would give a lot more variety in game...

 

It would be a lot of work, but I think if you were to combine your idea with some existing mod ideas you may be able to achieve something close to what you are looking for.

 

Realistic Body System - http://skyrim.nexusmods.com/mods/23311

-- Changes the NPCs to be different races from the player. Also changes what gear they wear to fit their specific race settings so that there is no spontaneous body shape change on armor removal. According to documentation, when armor is removed from one of the NPCs it is converted via script to a player wearable form (i.e. the stock armor or whatever else has replaced it.)

 

I would think that incorporating that mod or using your own version of it would allow you to modify the player's gear in the following manner:

-- change the body slot assignment on armors so that they overlap the body rather than replace it

-- drop the worn body models from the armor addon forms, so that when equipped they dont' appear but are present.

-- freely equip whatever display gear you want (this can replace the body parts if necessary), which could if you wanted also be enchantable & temperable or not.

 

This would give you an invisible worn armor for stats & enchantment, but have a visible ground/inventory model for interaction purposes and the appearance that you want. Mannequins would become pointless as they wouldn't show the armor when worn, unless you had separate versions specifically for them to display depending upon what has been added to their inventory...

Link to comment
Share on other sites

Thanks IsharaMeradin for giving this serious thought, but I've found a way to change 3rd and 1st person view models while in game! There's an ArmorAddon script, and it's not in the CS documentation. Check out ArmorAddon.psc in scripts\source. Combined with actor.QueueNiNodeUpdate(), you can change the look of an armor on the fly (tested, armor changes looks immediately).

 

If it's possible to make the 1st person view behave like the 3rd person view, all this can be done simply by changing the 1st person nifs.

 

What I'm doing now is something else: Change 3rd person nif, update player. When player changes locations, restore original nifs, update all actors, change nif again, update player.

 

If this works, it'll work for any item.

Link to comment
Share on other sites

O.o

 

I think those may be SKSE additions without the SKSE mention. At least they look like several other SKSE added functions... big hint that it is SKSE is that the file is located inside the SKSE archive.

 

I'm rarely in first person, so if you get something to work in 3rd person I'd be interested in seeing the code. You can share via PM if you don't want to publicly show it...

Link to comment
Share on other sites

If it's possible to get the 1st camera to behave like the 3rd person camera, then it might be simple, but there's of course the fact that there's only on 1st person skeleton...

 

Another thing, I tried Actor.QueueNiNodeUpdate() on NPCs, but it doesn't work, only the players nifs are updated (this works fine). If it did, this would most likely be a done deal :(

Edited by Thorham
Link to comment
Share on other sites

Finally got the NPCs to update by unequipping, updating and reequipping the item. Someone on another forum suggested it. All I had to add to that were some waits :)

 

if (npc!=Game.GetPlayer())
   item = npc.GetWornForm(4) as Armor
   Utility.Wait(0.01)
   npc.UnequipItem(item, false, false)
   npc.QueueNiNodeUpdate()
   Utility.Wait(0.01)
   npc.EquipItem(item, false, false)
endif

Edited by Thorham
Link to comment
Share on other sites

  • Recently Browsing   0 members

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