Jump to content

Help creating script for werewolf skin replacers


Recommended Posts

Hi I need a script that changes werewolf skin based off of if you have a perk or not basically if have perk it makes the skin change to skin and if not have perk skin stays the base skin

 

I have tried using the scripts from dragon aspect but it does not equip skin it just places in inventory

Edited by tcain99
Link to comment
Share on other sites

here is the script i have so far

 

sound property SoundFX auto
faction property new01 auto
faction property PlayerWerewolfFaction auto
Armor property WerebeastSkin auto
race property PlayerOriginalRace auto
race property WerebeastRace auto

function OnUnequipped(Actor akActor)

if akActor == game.GetPlayer()
game.GetPlayer().SetRace(PlayerOriginalRace)
game.GetPlayer().UnequipItem(WerebeastSkin, true)
imagespacemodifier.removeCrossFade(2.00000)
game.SetPlayerReportCrime(true)
game.GetPlayer().SetAttackActorOnSight(false)
game.GetPlayer().RemoveFromFaction(new01)
game.GetPlayer().RemoveFromFaction(PlayerWerewolfFaction)
endIf
endFunction

 

function OnEquipped(Actor akActor)

if akActor == game.GetPlayer()
PlayerOriginalRace = game.GetPlayer().GetRace()
if PlayerOriginalRace == WerebeastRace
game.GetPlayer().EquipItem(WerebeastSkin, true)
endIf
game.GetPlayer().AddToFaction(new01)
game.GetPlayer().AddToFaction(PlayerWerewolfFaction)
game.SetPlayerReportCrime(false)
game.GetPlayer().SetAttackActorOnSight(true)
SoundFX.Play(game.GetPlayer() as ObjectReference)
utility.Wait(2 as Float)
imagespacemodifier.removeCrossFade(2.00000)
game.ForceThirdPerson()
utility.Wait(1 as Float)

endIf
endFunction

Link to comment
Share on other sites

Explain in simple terms and in order (a, b, c, etc...) what you want to achieve.

There is lack of information necessary to assist you, for example:

- Will the perk be handling the script. Or will be another way?

- How is the perk added and/or remove?

- In the script you posted, what's calling those 'Functions'? some other script? if so, why don't you post that one too, so that we can understand you layout. Or you are just using 'Function' instead of 'Event'?

- Etc...

Link to comment
Share on other sites

i made a mod that uses this script on a ring that is equipped after casting the spell when the ring is equipped the werewolf skin chosen should change from the normal werewolf skin to the new one

 

what i would like is a passive ability granted through perk that makes it so if you have the perk and ability when you transform into a werewolf your werewolf sklin changes to a custom one

Link to comment
Share on other sites

So, where does the script above goes?

You have the ring with the script, and now you want an ability to run on a perk to monitor the ring? why don't just do it on the existing script above? to avoid a bunch of issues and to not overkill the mod with unnecessary things.


I think that you have an idea, but you don't want to go into details, but if you don't do this then no one can actually help you.

A lot of times things are not as simple as: Just make me a script that does the "X" thing and you are done.


There is still lack of crucial information in order to be able to understand you, and you are the only one with the idea and that's sitting in front of your pc.

Link to comment
Share on other sites

0k ill try to give more information

 

 

the scrip[ above is a modified script from my dragonize mod which has a set of sequences to work

 

1 - add a custom ring with unique slot that when equpped changes your race to designated race

 

2- custom dragon aspect script is used to equip ring as a constant effect that is activated through the add ability feature on a second fire and forget script and is permanent until you use the revert spell which is a dispell type spell

 

the posted script is a modified script that does all that but instead of race it is armor

 

problem it is a constant effect and it is and armor equip script but it interferes with the body of your race when not in werewolf form

 

what i really am wanting to create is a script that adds a perk instead which is simpler and should have no mesh problems that

 

1- when gain the perk if player becomes werewolf form equips the custom skin and removes the skin effect when not in werewolf form

 

problem i made a working one but it still has a bug skin changeds to custom skin but does not last as long as werewolf form if you extend time as werewolf by feasting on hearts

 

please help with a solution to the perk problem that makes it so the perk is constant but only works as a werewolf form and lasts as long as you are in werewolf form and then when not in werewolf form is dormant and not in effect

Link to comment
Share on other sites

Except that it's hard to understand you because your english ain't that good, there is still lack of important information in order for me to be able to assist you properly.


Anyway, despite that you will come back to this asking to fix it because it does or doesn't do something, here is a script for an Ab magic effect as you originally requested, good luck friend.



Race Property WerebeastRace Auto
Armor property WerebeastSkin auto
Armor property WerebeastSkinNew auto
Actor iActor

EVENT OnEffectStart(Actor akTarget, Actor akCaster)
iActor = akTarget
Race AR = iActor.GetRace()
ENDEVENT

EVENT OnRaceSwitchComplete()
Race BR = iActor.GetRace()
If ( BR == WerebeastRace )
iActor.UnequipItem(WerebeastSkin)
iActor.EquipItem(WerebeastSkinNew)
ElseIf ( BR == AR )
iActor.UnequipItem(WerebeastSkinNew)
EndIf
ENDEVENT

Edited by maxarturo
Link to comment
Share on other sites

Another way that would work, if you have issues, is SetSkin() function. To visually apply the change may require a ninode or weight update. One downside here is you would need a reload routine vs if equip a skin. Only if the other suggestion gives you issues, should you explore this one

Link to comment
Share on other sites

SetSkin(), Net Immerse and all related function have the flaw that they don't work in 'Real Time', and you need to unload and load the mesh in order for the function to visualy appear in game.

The OP needs it to execute immediately.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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