Jump to content

Need help on 'Setscale' function


Aoikani

Recommended Posts

Ok, I have a dilemna. I have a race that is short, designed in the CS. Within the game, the race while alive is correct in height. When it dies, it reverts back to a size equal to a Breton or Imperial or anyother race that is taller in height. It's not copied from another race, it has it's own body values set to 0.68. Now, if I set him as dead, (which is my plans - a dead body) by reducing the health, then while in CS render window, it reverts to Imperial height.

If I checkmark 'Auto Calculate' his stats, in the CS render window he stays at the intended size, but his health sets to auto calulations which requires I use a script to kill him now. I guess you can't set an actor to 0 health while auto-calculating stats. That's fine. But, after making a script to kill him, he reverts to full Imperial skeleton size again. Now, I tried "setscale" = 1 which should set his height to .68 (the designed height) but, it doesn't work. I took in account that it has to be refreshed too, so I disabled / enabled the actor. Still doesn't work. The height is suppose to be at .68. How do I keep him that way after death? Do I also need to refresh the save game to test this in game? Because I have noticed that while testing mods, in your save.. it doesn't show unless you revert to an older save. In others words I'm wondering if the changes are supposed to be refreshed by changing cells and coming back to test. Either way, I need a suggestion on handling the dead actor that wants to grow taller after he dies. o.O

 

my code: was really simple, just on load, killed him and then setscale and disabled/enabled.

ref me

begin onload
set me to getself
kill
me.setscale 1
me.disable
me.enable
return
end

 

The result I get from this is: The actor is at .68, then dies onload of cell but reverts to 1.0 scale.

 

Aoikani

Link to comment
Share on other sites

you did create a new race, didn't you? that's the only way i would be going about this, no reason why their height would revert after that :thumbsup: Goodluck

 

Yes, it's a new race. Body data set to .68, but after he dies. It reverts to 1.0. o.O

Link to comment
Share on other sites

It's one of the bugs with how the skeleton works. When dead, the NPC body reverts to use the scale of the standard skeleton. This can be seen by setting someone's scale to 2 or 3, then killing them, although the thickness of their limbs remains the same, all the pieces get scrunched together and leaves them still about the same size as a normal person.

 

If you can fix it, it would be done by setting the scale to .68 after death. But chances are that this will just result in having very thin limbs. As you can't change skeletons through scripting, and any smaller skeleton would screw up body meshes, there really isn't a heck of alot you can do.

 

It's possible that this is one of the technical reasons why children were never added to the game, or was left this way so that a child mod would always have problems when those children were killed. Or just never came up since there were never any really short races.

Link to comment
Share on other sites

It's one of the bugs with how the skeleton works. When dead, the NPC body reverts to use the scale of the standard skeleton. This can be seen by setting someone's scale to 2 or 3, then killing them, although the thickness of their limbs remains the same, all the pieces get scrunched together and leaves them still about the same size as a normal person.

 

If you can fix it, it would be done by setting the scale to .68 after death. But chances are that this will just result in having very thin limbs. As you can't change skeletons through scripting, and any smaller skeleton would screw up body meshes, there really isn't a heck of alot you can do.

 

It's possible that this is one of the technical reasons why children were never added to the game, or was left this way so that a child mod would always have problems when those children were killed. Or just never came up since there were never any really short races.

 

What if I created an alternate skeleton that was scaled down and used OBSE to replace it after death? Do you think this would work? After all, the particular Actor, persistent and named and now dead, shouldn't be a problem should it? It wouldn't replace all FormID types by replacing that specific Actor would it? I'm not sure if it's possible through OBSE, but it might be.

 

Aoikani

Link to comment
Share on other sites

If you can fix it, it would be done by setting the scale to .68 after death. But chances are that this will just result in having very thin limbs. As you can't change skeletons through scripting, and any smaller skeleton would screw up body meshes, there really isn't a heck of alot you can do.

 

Vagrant, after testing several ways to resolve this yesterday, I find that it's exactly what you say. The best I could come up with is, setting the desired weight I want at Scale 1 for appearance sake. Then placing it in the CS and scaling it down making it persistent. Now in the game when the NPC dies, the height meet my requirements but I lose the weight appearance now. So, my idea now is .. do think it would work if I scale an alternate skeleton to .68 in Nifskope and at death, replace it through OBSE? I believe I saw functions for this procedure. I'm not sure though, I'll have to check.

 

Also, I've been told that I should use 'Setsize' instead of 'Setscale' for actors.

 

Aoikani

Link to comment
Share on other sites

Not too familar with OBSE, but don't think it supports skeleton swapping. Not sure of what the difference between setsize and setscale are. It still might not accomplish anything since on death a NPC becomes more or less a havoked container. Scaling havoked objects has been known to have issues.
Link to comment
Share on other sites

Well I've worked on it for awhile now and can't resolve the mass issue, but since I have the height correct now I can live with a little mass loss if I can keep it close to the original form. So, that wraps that then. :) thanks Vagrant.

 

Aoikani

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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