Jump to content

How to swap NPC mesh when NPC dies ?


CALEB2

Recommended Posts

As the title says - I'm trying to make NPC swap to another mesh upon death.

 

I have created the mod Dwemer Automatons Glowmapped

 

The problem is, that the automatons use the same mesh when they are active and when they are killed. My mod adds glowing parts to the automatons and my idea is that when they die, the glow disappears. (preferrably slowly)

 

To do that, I think the only solution would be to use two different meshes for an automaton - one with the glowing parts for the active state and the other without the glowing parts for the inactive state.

 

 

My question: how to make these automatonss use another mesh in the inactive state ?

 

 

 

Link to comment
Share on other sites

Yeah, don't understand it. I'm quite the beginner in CK and there are too much entries for Draugr. And I checked every one of them, but did not find anything that could be the thing I'm looking for. There are references for the scripts, but I don't know how to open these scripts after I've extacted them. Skyrim Script Compiler won't open stand-alone files and it doesn't find anythting Draugr related with OPEN command.

 

 

EDIT: found a way to open these scripts. There is a separate script file for the eye glow effect (fx) and command to stop the fx when character dies.

 

But I don't need to turn on and off some fx, I need to swap the whole body mesh. I don't know this script language.

Edited by CALEB2
Link to comment
Share on other sites

Method A:

- You create an 'Animated Mesh' and you call via script the ON and OFF animation state of the "Glow Map".

By On / OFF, i mean, ON = Mesh with 'Glow Map', OFF = Mesh without 'Glow Map'.

* This requires good knowledge of NifSkope to achieve it, and it not easy to explain how to do it in a written post.

* This requires knowledge of Papyrus, but it's nothing difficult to create.


Method B:

- You create a secondary Mesh without "Glow Map" and you create an "Armor add-on" and "Armor' in CK, which upon "Death" or "Dying" of the actor a script on the actor will make the switch to the inactive look of the automaton.

* The armor must not have a name so that the player can see and/or interact with it when looking at the actor's inventory.

* This requires knowledge of Papyrus, but it's nothing difficult to create.


Method C:

- You create a "Texture Set" with the actor's textures without "Glow Map", and upon "Death" or "Dying" of the actor you call the 'Function':

SetNthTexturePath(Int n, String texturePath)

This will change the actor's textures to the 'Inactive State' of the automaton.

* But there is a catch with this one, you need to Disable/Enable the actor so that the swap can happen in real time, otherwise it will only work "OnLoad / Unload" - "OnCellAttach / Detach" and on lose LOS.

* This requires knowledge of Papyrus, but it's nothing difficult to create.


Method D:

- I'll come back to this some other time because my brain got stuck and i can't remember this one right now.... sorry....


All of the 3 options requires that you edit directly all the vanilla actors in CK, in one way or another.


The "Draugr" script will not help you with this, because the script calls for an "Visual Effect" that plays on a specific actor's skeleton, and it just removes the "Visual Effect", in fact the script "Plays" and then "Stops" the fx.


I do this "Swap of Actor's Active States" in my ACT II with a couple of actors, and i use the first 2 options because they are faster and reliable.


I hope it helps, and have a happy modding.

Edited by maxarturo
Link to comment
Share on other sites

Thanks, I know the methods. what I don't know is how-to. Need specifics. What exactly do I need to change in CK and what exactly do I need to write into the script.

 

Let's take for example dwarven sphere centurion. I have meshes and textures. I can create additional meshes and textures for inactive state. That's easy.

Now, when I open CK, what entries I need to change and what are the required changes ? (As I understand, I need to activate the script through CK - how, what entries ?)

The necessary lines in sript would be very helpful. I don't have any knowledge of scripting.

 

The desired result would be a slow transition from one mesh (or texture) to another.

Link to comment
Share on other sites

First - I had my glow mapped meshes.

Then I created the plugin that applies additional textures over the glow map, shading it.

There is also a script that gives plugin the necessary info about the status of the NPC and then the plugin can apply the texture, using different alpha values.

(Constant magic effects with a custom texture and different alpha values)

The higher the alpha value, the more opaque is the texture and weaker the glow.

When I fight the automatons, their glow maps are bright, and when I kill them, the glow is fading slowly away.

(Actually the additional texture that covers the glow map, becomes more and more opaque, while the plugin applies different effects with different alpha values based on the info from the script.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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