I Need Help From Modders!

Post » Wed Jun 20, 2012 6:04 pm

Im trying to make a mod that keeps NPC's default clothing from respawning. And while I was looking around in Skyrim - Misc.BSA I found a PEX file called scripts/defaultequipitemonload. This looked like the file that deals with that sort of stuff, so I decompiled it. What should I change in this text to get rid of default clothing respawn? Please help.
Heres the decompiled text:




.FLAGS

hidden 0

conditional 1

.OBJECTS

OBJECT defaultEquipItemOnLoad : Actor {0}

@doc Causes the actor to equip the specified item(s) on load.

VARS

armor ::ArmorToEquip_var = null {0}

bool ::preventRemoval_var = null {0}

bool ::silent_var = null {0}

weapon ::WeaponToEquip_var = null {0}

light ::TorchToEquip_var = null {0}

ENDVARS

PROPS

PROP bool silent rw {0}

AUTOVAR ::silent_var

ENDPROP

PROP bool preventRemoval rw {0}

AUTOVAR ::preventRemoval_var

ENDPROP

PROP Light TorchToEquip rw {0}

AUTOVAR ::TorchToEquip_var

ENDPROP

PROP Armor ArmorToEquip rw {0}

AUTOVAR ::ArmorToEquip_var

ENDPROP

PROP Weapon WeaponToEquip rw {0}

AUTOVAR ::WeaponToEquip_var

ENDPROP

ENDPROPS

STATES

STATE DEFAULT

None FUNCTION GotoState(String newState) {0}

@doc Function that switches this object to the specified state

FLAGS 0

VARS

None ::NoneVar

ENDVARS

callmethod onEndState, self, ::NoneVar

assign ::state, newState

callmethod onBeginState, self, ::NoneVar

ENDFUNCTION

String FUNCTION GetState() {0}

@doc Function that returns the current state

FLAGS 0

return ::state

ENDFUNCTION

None FUNCTION OnLoad() {0}

FLAGS 0

VARS

bool ::temp0

bool ::temp1

weapon ::temp2

armor ::temp4

light ::temp5

form ::temp3

None ::NoneVar

ENDVARS

callmethod IsDead, self, ::temp0

not ::temp0, ::temp0

cast ::temp0, ::temp0

jmpf ::temp0, 4

callmethod IsDisabled, self, ::temp1

not ::temp1, ::temp1

cast ::temp0, ::temp1

jmpf ::temp0, 23

cast ::temp2, null

cmp_eq ::temp1, ::WeaponToEquip_var, ::temp2

not ::temp1, ::temp1

jmpf ::temp1, 4

cast ::temp3, ::WeaponToEquip_var

callmethod EquipItem, self, ::NoneVar, ::temp3, ::preventRemoval_var, ::silent_var

jmp 1

cast ::temp4, null

cmp_eq ::temp1, ::ArmorToEquip_var, ::temp4

not ::temp1, ::temp1

jmpf ::temp1, 4

cast ::temp3, ::ArmorToEquip_var

callmethod EquipItem, self, ::NoneVar, ::temp3, ::preventRemoval_var, ::silent_var

jmp 1

cast ::temp5, null

cmp_eq ::temp1, ::TorchToEquip_var, ::temp5

not ::temp1, ::temp1

jmpf ::temp1, 4

cast ::temp3, ::TorchToEquip_var

callmethod EquipItem, self, ::NoneVar, ::temp3, ::preventRemoval_var, ::silent_var

jmp 1

jmp 1

ENDFUNCTION

ENDSTATE

ENDSTATES

ENDOBJECT
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Wed Jun 20, 2012 7:28 pm

Decompiling it might have been useful pre-CK... but at the moment, just open up the CK and look at the script there? Besides which, you have to do some odd header changes in the hex to make a decompiled script work when recompiled, and you'll have to know exactly what you're changing.
User avatar
Devin Sluis
 
Posts: 3389
Joined: Wed Oct 24, 2007 4:22 am

Post » Wed Jun 20, 2012 5:14 pm

Not to mention that this script didn't have anything to do with clothing respawning. It's just a generic script to equip a specified item on an actor.

Clothing respawning is controlled by an aparently hardcoded mechanics attached to the outfit object each actor has equiped. If you want to avoid an actor to spawn clothing, remove it's outfit, yet in the CK or by a changing outfit command (in this case you need ot add a different void outfit, as apparently using none as a parameter didn't do the trick).
User avatar
Rowena
 
Posts: 3471
Joined: Sun Nov 05, 2006 11:40 am


Return to V - Skyrim