parent
f63af99d8b
commit
adca4bfb25
|
@ -0,0 +1,41 @@
|
|||
scriptName IchirouBodyChange extends activemagiceffect
|
||||
|
||||
;-- Properties --------------------------------------
|
||||
formlist property IchirouHeadPartList auto
|
||||
ichirouracemcmmenu property IchirouRaceMCMMEnuInstance auto
|
||||
formlist property IchirouFaceTextureSetList auto
|
||||
formlist property IchirouChangeSkinList auto
|
||||
|
||||
;-- Variables ---------------------------------------
|
||||
Actor Player
|
||||
ActorBase PlayerBase
|
||||
|
||||
;-- Functions ---------------------------------------
|
||||
|
||||
; Skipped compiler generated GetState
|
||||
|
||||
function OnEffectStart(Actor akTarget, Actor akCaster)
|
||||
|
||||
TextureSet FaceTextureSetToChange
|
||||
Armor SkinToChange
|
||||
HeadPart FaceToChange
|
||||
debug.Notification("Ichirou Body Loading")
|
||||
Player = game.GetPlayer()
|
||||
PlayerBase = Player.GetActorBase()
|
||||
if IchirouRaceMCMMEnuInstance.BodyChangeShapeFlag == 0
|
||||
FaceToChange = IchirouRaceMCMMEnuInstance.HeadOriginal
|
||||
FaceTextureSetToChange = IchirouRaceMCMMEnuInstance.FaceTextureOriginal
|
||||
SkinToChange = IchirouRaceMCMMEnuInstance.SkinOriginal
|
||||
elseIf IchirouRaceMCMMEnuInstance.BodyChangeShapeFlag != 0
|
||||
FaceToChange = IchirouHeadPartList.getat(IchirouRaceMCMMEnuInstance.BodyChangeShapeFlag) as HeadPart
|
||||
FaceTextureSetToChange = IchirouFaceTextureSetList.getat(IchirouRaceMCMMEnuInstance.BodyChangeShapeFlag) as TextureSet
|
||||
SkinToChange = IchirouChangeSkinList.getat(IchirouRaceMCMMEnuInstance.BodyChangeShapeFlag) as Armor
|
||||
endIf
|
||||
Player.ChangeHeadPart(FaceToChange)
|
||||
PlayerBase.SetSkin(SkinToChange)
|
||||
PlayerBase.SetFaceTextureSet(FaceTextureSetToChange)
|
||||
Player.QueueNiNodeUpdate()
|
||||
Player.RegenerateHead()
|
||||
endFunction
|
||||
|
||||
; Skipped compiler generated GotoState
|
|
@ -0,0 +1,487 @@
|
|||
scriptName IchirouRaceMCMMenu extends SKI_ConfigBase
|
||||
|
||||
;-- Properties --------------------------------------
|
||||
headpart property HeadOriginal auto
|
||||
Int property BodyChangeShapeFlag auto
|
||||
formlist property IchirouBodyWardrobe auto
|
||||
textureset property FaceTextureOriginal auto
|
||||
armor property SkinOriginal auto
|
||||
spell property IchirouBodyChangeSpell auto
|
||||
formlist property IchirouBanRaceList auto
|
||||
Bool property IsSystemEnable hidden
|
||||
Bool function get()
|
||||
|
||||
if self.PlayerSexAllow() && self.PlayerRaceAllow()
|
||||
return true
|
||||
else
|
||||
return false
|
||||
endIf
|
||||
endFunction
|
||||
endproperty
|
||||
Int[] property ArmorShapeFlag auto
|
||||
Bool property IsWardrobeEnable hidden
|
||||
Bool function get()
|
||||
|
||||
if self.IsSystemEnable && !self.IsOriginChange() && IsWardrobeCheck as Bool
|
||||
return true
|
||||
else
|
||||
return false
|
||||
endIf
|
||||
endFunction
|
||||
endproperty
|
||||
|
||||
;-- Variables ---------------------------------------
|
||||
Int OptionBodyShapeRegenerate
|
||||
Int[] ShapeEnableFlag
|
||||
Int OptionResetOrigin
|
||||
Int[] OptionShape
|
||||
String[] BodyShapeName
|
||||
Int[] OptionWardrobeSlider
|
||||
Bool IsShapeChange
|
||||
Int OptionAddCurrentArmor
|
||||
Int[] OptionWardrobeSlotClear
|
||||
armor CurrentArmor
|
||||
Int ResetOriginEnableFlag
|
||||
Int WardrobeSize
|
||||
Bool IsWardrobeCheck = false
|
||||
Int RegenerateEnableFlag
|
||||
Int ToggleWardrobeEnable
|
||||
Race RaceOriginal
|
||||
Int OptionClearUpWardrobe
|
||||
Int OptionBodyShapeCurrent
|
||||
|
||||
;-- Functions ---------------------------------------
|
||||
|
||||
function GetPlayerOriginalSet()
|
||||
|
||||
SkinOriginal = game.GetPlayer().GetActorBase().GetSkin()
|
||||
HeadOriginal = game.GetPlayer().GetActorBase().GetNthHeadPart(0)
|
||||
FaceTextureOriginal = game.GetPlayer().GetActorBase().GetFaceTextureSet()
|
||||
RaceOriginal = game.GetPlayer().GetActorBase().GetRace()
|
||||
debug.Notification("OriginSetting")
|
||||
endFunction
|
||||
|
||||
function ClearUpWardrobe()
|
||||
|
||||
IchirouBodyWardrobe.Revert()
|
||||
ArmorShapeFlag[0] = 0
|
||||
ArmorShapeFlag[1] = 0
|
||||
ArmorShapeFlag[2] = 0
|
||||
ArmorShapeFlag[3] = 0
|
||||
ArmorShapeFlag[4] = 0
|
||||
ArmorShapeFlag[5] = 0
|
||||
ArmorShapeFlag[6] = 0
|
||||
ArmorShapeFlag[7] = 0
|
||||
ArmorShapeFlag[8] = 0
|
||||
ArmorShapeFlag[9] = 0
|
||||
self.ForcePageReset()
|
||||
endFunction
|
||||
|
||||
function GenerateWardrobeUI()
|
||||
|
||||
WardrobeSize = IchirouBodyWardrobe.GetSize()
|
||||
Int k = 0
|
||||
OptionWardrobeSlotClear = new Int[10]
|
||||
OptionWardrobeSlider = new Int[10]
|
||||
while k < WardrobeSize
|
||||
self.AddHeaderOption(IchirouBodyWardrobe.GetAt(k).GetName(), 0)
|
||||
OptionWardrobeSlider[k] = self.AddSliderOption("BodyShape", ArmorShapeFlag[k] as Float, "{0}", 0)
|
||||
OptionWardrobeSlotClear[k] = self.AddTextOption("", "Clear", self.OPTION_FLAG_NONE)
|
||||
self.AddEmptyOption()
|
||||
k += 1
|
||||
endWhile
|
||||
endFunction
|
||||
|
||||
Bool function IsOriginChange()
|
||||
|
||||
if !IsShapeChange && BodyChangeShapeFlag == 0
|
||||
if SkinOriginal != game.GetPlayer().GetActorBase().GetSkin() || HeadOriginal != game.GetPlayer().GetActorBase().GetNthHeadPart(0) || FaceTextureOriginal != game.GetPlayer().GetActorBase().GetFaceTextureSet() || RaceOriginal != game.GetPlayer().GetActorBase().GetRace()
|
||||
return true
|
||||
else
|
||||
return false
|
||||
endIf
|
||||
else
|
||||
return false
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function OnGameReload()
|
||||
|
||||
parent.OnGameReload()
|
||||
Pages = new String[2]
|
||||
Pages[0] = "Ichirou Body"
|
||||
Pages[1] = "Ichirou Wardrobe"
|
||||
if self.IsOriginChange()
|
||||
self.GetPlayerOriginalSet()
|
||||
endIf
|
||||
if self.PlayerRaceAllow() && self.PlayerSexAllow()
|
||||
IchirouBodyChangeSpell.Cast(game.GetPlayer() as objectreference, none)
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function AddArmorToList()
|
||||
|
||||
if !IchirouBodyWardrobe.HasForm(CurrentArmor as form)
|
||||
IchirouBodyWardrobe.AddForm(CurrentArmor as form)
|
||||
endIf
|
||||
self.ForcePageReset()
|
||||
endFunction
|
||||
|
||||
function OnOptionHighlight(Int a_option)
|
||||
|
||||
if a_option == OptionShape[0]
|
||||
self.SetInfoText("OriginalShapeInfo")
|
||||
elseIf a_option == OptionShape[1]
|
||||
self.SetInfoText("3BA Body")
|
||||
elseIf a_option == OptionShape[2]
|
||||
self.SetInfoText("BHUNP Body")
|
||||
elseIf a_option == OptionBodyShapeRegenerate
|
||||
self.SetInfoText("RegenerateAfterSRM")
|
||||
elseIf a_option == OptionResetOrigin
|
||||
self.SetInfoText("ResetOriginInfo")
|
||||
elseIf a_option == OptionAddCurrentArmor
|
||||
self.SetInfoText("AddToWardrobeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[0]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[1]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[2]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[3]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[4]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[5]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[6]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[7]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[8]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
elseIf a_option == OptionWardrobeSlider[9]
|
||||
self.SetInfoText("SetArmorBodyShapeInfo")
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function OnOptionSliderOpen(Int a_option)
|
||||
|
||||
if a_option == OptionWardrobeSlider[0]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[0] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[1]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[1] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[2]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[2] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[3]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[3] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[4]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[4] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[5]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[5] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[6]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[6] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[7]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[7] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[8]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[8] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
elseIf a_option == OptionWardrobeSlider[9]
|
||||
self.SetSliderDialogStartValue(ArmorShapeFlag[9] as Float)
|
||||
self.SetSliderDialogDefaultValue(0 as Float)
|
||||
self.SetSliderDialogRange(0 as Float, 9 as Float)
|
||||
self.SetSliderDialogInterval(1 as Float)
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
; Skipped compiler generated GetState
|
||||
|
||||
function EnableFlagUpdate()
|
||||
|
||||
ShapeEnableFlag = new Int[3]
|
||||
Int k = 0
|
||||
if self.IsSystemEnable
|
||||
if !self.IsOriginChange()
|
||||
while k < 10
|
||||
if k != BodyChangeShapeFlag
|
||||
ShapeEnableFlag[k] = self.OPTION_FLAG_NONE
|
||||
else
|
||||
ShapeEnableFlag[k] = self.OPTION_FLAG_DISABLED
|
||||
endIf
|
||||
k += 1
|
||||
endWhile
|
||||
ResetOriginEnableFlag = self.OPTION_FLAG_DISABLED
|
||||
RegenerateEnableFlag = self.OPTION_FLAG_NONE
|
||||
else
|
||||
while k < 10
|
||||
ShapeEnableFlag[k] = self.OPTION_FLAG_DISABLED
|
||||
k += 1
|
||||
endWhile
|
||||
ResetOriginEnableFlag = self.OPTION_FLAG_NONE
|
||||
RegenerateEnableFlag = self.OPTION_FLAG_DISABLED
|
||||
endIf
|
||||
else
|
||||
ResetOriginEnableFlag = self.OPTION_FLAG_DISABLED
|
||||
RegenerateEnableFlag = self.OPTION_FLAG_DISABLED
|
||||
while k < 10
|
||||
ShapeEnableFlag[k] = self.OPTION_FLAG_DISABLED
|
||||
k += 1
|
||||
endWhile
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function OnPageReset(String a_page)
|
||||
|
||||
self.SetCursorFillMode(self.TOP_TO_BOTTOM)
|
||||
if a_page == "Ichirou Body"
|
||||
IsShapeChange = false
|
||||
self.SetBodyShapeName()
|
||||
self.EnableFlagUpdate()
|
||||
if self.IsSystemEnable
|
||||
self.AddHeaderOption("Ichirou Race System Enabled", 0)
|
||||
else
|
||||
self.AddHeaderOption("Ichirou Race System Disabled", 0)
|
||||
endIf
|
||||
self.AddEmptyOption()
|
||||
if self.PlayerSexAllow()
|
||||
self.AddHeaderOption("Ichirou Race FemaleCharacter", 0)
|
||||
else
|
||||
self.AddHeaderOption("Ichirou Race MaleCharacter", 0)
|
||||
endIf
|
||||
self.AddEmptyOption()
|
||||
if self.PlayerRaceAllow()
|
||||
self.AddHeaderOption("Ichirou Race RaceAllow", 0)
|
||||
else
|
||||
self.AddHeaderOption("Ichirou Race RaceBan", 0)
|
||||
endIf
|
||||
self.AddTextOption("RaceCurrent", game.GetPlayer().GetActorBase().GetRace().GetName(), self.OPTION_FLAG_DISABLED)
|
||||
OptionResetOrigin = self.AddTextOption("OptionResetOrigin", "Reset", ResetOriginEnableFlag)
|
||||
self.AddEmptyOption()
|
||||
self.AddHeaderOption("BodyShape", 0)
|
||||
OptionBodyShapeCurrent = self.AddTextOption("BodyShapeCurrent", BodyShapeName[BodyChangeShapeFlag], self.OPTION_FLAG_DISABLED)
|
||||
OptionBodyShapeRegenerate = self.AddTextOption("BodyShapeRegenerate", "ClickToEnable", RegenerateEnableFlag)
|
||||
self.AddEmptyOption()
|
||||
self.SetCursorPosition(1)
|
||||
self.AddHeaderOption("BodyShapeList", 0)
|
||||
OptionShape = new Int[3]
|
||||
OptionShape[0] = self.AddTextOption(BodyShapeName[0], "ClickToEnable", ShapeEnableFlag[0])
|
||||
OptionShape[1] = self.AddTextOption(BodyShapeName[1], "ClickToEnable", ShapeEnableFlag[1])
|
||||
OptionShape[2] = self.AddTextOption(BodyShapeName[2], "ClickToEnable", ShapeEnableFlag[2])
|
||||
endIf
|
||||
if a_page == "Ichirou Wardrobe"
|
||||
CurrentArmor = game.GetPlayer().GetWornForm(4) as armor
|
||||
self.AddHeaderOption("BodyChange_Wardrobe", 0)
|
||||
ToggleWardrobeEnable = self.AddToggleOption("EnabelWardrobe", IsWardrobeCheck, self.OPTION_FLAG_NONE)
|
||||
OptionClearUpWardrobe = self.AddTextOption("", "ClearUp", self.OPTION_FLAG_NONE)
|
||||
self.AddEmptyOption()
|
||||
self.AddHeaderOption("CurrentArmor", 0)
|
||||
if !IchirouBodyWardrobe.HasForm(CurrentArmor as form)
|
||||
OptionAddCurrentArmor = self.AddTextOption(CurrentArmor.GetName(), "AddToWardrobe", self.OPTION_FLAG_NONE)
|
||||
else
|
||||
OptionAddCurrentArmor = self.AddTextOption(CurrentArmor.GetName(), "AlreadyInWardrobe", self.OPTION_FLAG_DISABLED)
|
||||
endIf
|
||||
self.AddEmptyOption()
|
||||
self.AddHeaderOption("DebugInfo", 0)
|
||||
self.AddTextOption("BodyFlag", BodyChangeShapeFlag as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag0", ArmorShapeFlag[0] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag1", ArmorShapeFlag[1] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag2", ArmorShapeFlag[2] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag3", ArmorShapeFlag[3] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag4", ArmorShapeFlag[4] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag5", ArmorShapeFlag[5] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag6", ArmorShapeFlag[6] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag7", ArmorShapeFlag[7] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag8", ArmorShapeFlag[8] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.AddTextOption("ArmorFlag9", ArmorShapeFlag[9] as String, self.OPTION_FLAG_DISABLED)
|
||||
self.SetCursorPosition(1)
|
||||
self.GenerateWardrobeUI()
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function ClearArmorFromList(Int Index)
|
||||
|
||||
armor ArmorToClear = IchirouBodyWardrobe.GetAt(Index) as armor
|
||||
IchirouBodyWardrobe.RemoveAddedForm(ArmorToClear as form)
|
||||
Int k = Index
|
||||
while k < WardrobeSize - 1
|
||||
ArmorShapeFlag[k] = ArmorShapeFlag[k + 1]
|
||||
k += 1
|
||||
endWhile
|
||||
ArmorShapeFlag[WardrobeSize - 1] = 0
|
||||
self.ForcePageReset()
|
||||
endFunction
|
||||
|
||||
function OnOptionSliderAccept(Int a_option, Float a_value)
|
||||
|
||||
if a_option == OptionWardrobeSlider[0]
|
||||
ArmorShapeFlag[0] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[1]
|
||||
ArmorShapeFlag[1] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[2]
|
||||
ArmorShapeFlag[2] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[3]
|
||||
ArmorShapeFlag[3] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[4]
|
||||
ArmorShapeFlag[4] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[5]
|
||||
ArmorShapeFlag[5] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[6]
|
||||
ArmorShapeFlag[6] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[7]
|
||||
ArmorShapeFlag[7] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[8]
|
||||
ArmorShapeFlag[8] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
elseIf a_option == OptionWardrobeSlider[9]
|
||||
ArmorShapeFlag[9] = a_value as Int
|
||||
self.ForcePageReset()
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function SetBodyShapeName()
|
||||
|
||||
BodyShapeName = new String[3]
|
||||
BodyShapeName[0] = "Default"
|
||||
BodyShapeName[1] = "3BAv2"
|
||||
BodyShapeName[2] = "BHUNP"
|
||||
endFunction
|
||||
|
||||
function OnOptionSelect(Int a_option)
|
||||
|
||||
if a_option == OptionShape[0]
|
||||
BodyChangeShapeFlag = 0
|
||||
self.UpdateShapeSelection()
|
||||
IchirouBodyChangeSpell.Cast(game.GetPlayer() as objectreference, none)
|
||||
elseIf a_option == OptionShape[1]
|
||||
BodyChangeShapeFlag = 1
|
||||
self.UpdateShapeSelection()
|
||||
IchirouBodyChangeSpell.Cast(game.GetPlayer() as objectreference, none)
|
||||
elseIf a_option == OptionShape[2]
|
||||
BodyChangeShapeFlag = 2
|
||||
self.UpdateShapeSelection()
|
||||
IchirouBodyChangeSpell.Cast(game.GetPlayer() as objectreference, none)
|
||||
elseIf a_option == OptionBodyShapeRegenerate
|
||||
self.SetOptionFlags(OptionBodyShapeRegenerate, self.OPTION_FLAG_DISABLED, false)
|
||||
IchirouBodyChangeSpell.Cast(game.GetPlayer() as objectreference, none)
|
||||
elseIf a_option == OptionResetOrigin
|
||||
self.SetOptionFlags(OptionResetOrigin, self.OPTION_FLAG_DISABLED, false)
|
||||
self.GetPlayerOriginalSet()
|
||||
elseIf a_option == OptionAddCurrentArmor
|
||||
self.SetOptionFlags(OptionAddCurrentArmor, self.OPTION_FLAG_DISABLED, false)
|
||||
self.AddArmorToList()
|
||||
elseIf a_option == ToggleWardrobeEnable
|
||||
IsWardrobeCheck = !IsWardrobeCheck
|
||||
self.SetToggleOptionValue(ToggleWardrobeEnable, IsWardrobeCheck, false)
|
||||
elseIf a_option == OptionClearUpWardrobe
|
||||
self.ClearUpWardrobe()
|
||||
elseIf a_option == OptionWardrobeSlotClear[0]
|
||||
self.ClearArmorFromList(0)
|
||||
elseIf a_option == OptionWardrobeSlotClear[1]
|
||||
self.ClearArmorFromList(1)
|
||||
elseIf a_option == OptionWardrobeSlotClear[2]
|
||||
self.ClearArmorFromList(2)
|
||||
elseIf a_option == OptionWardrobeSlotClear[3]
|
||||
self.ClearArmorFromList(3)
|
||||
elseIf a_option == OptionWardrobeSlotClear[4]
|
||||
self.ClearArmorFromList(4)
|
||||
elseIf a_option == OptionWardrobeSlotClear[5]
|
||||
self.ClearArmorFromList(5)
|
||||
elseIf a_option == OptionWardrobeSlotClear[6]
|
||||
self.ClearArmorFromList(6)
|
||||
elseIf a_option == OptionWardrobeSlotClear[7]
|
||||
self.ClearArmorFromList(7)
|
||||
elseIf a_option == OptionWardrobeSlotClear[8]
|
||||
self.ClearArmorFromList(8)
|
||||
elseIf a_option == OptionWardrobeSlotClear[9]
|
||||
self.ClearArmorFromList(9)
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function UpdateShapeSelection()
|
||||
|
||||
IsShapeChange = true
|
||||
self.EnableFlagUpdate()
|
||||
Int k = 0
|
||||
while k < 10
|
||||
self.SetOptionFlags(OptionShape[k], ShapeEnableFlag[k], false)
|
||||
k += 1
|
||||
endWhile
|
||||
self.SetTextOptionValue(OptionBodyShapeCurrent, BodyShapeName[BodyChangeShapeFlag], false)
|
||||
endFunction
|
||||
|
||||
; Skipped compiler generated GotoState
|
||||
|
||||
Bool function PlayerRaceAllow()
|
||||
|
||||
Race PlayerRace = game.GetPlayer().GetRace()
|
||||
String RaceName = PlayerRace.GetName()
|
||||
if RaceName == "Argonian" || RaceName == "Khajiit" || RaceName == "Werewolf" || RaceName == "Vampire Lord"
|
||||
return false
|
||||
elseIf IchirouBanRaceList.Find(PlayerRace as form) == -1
|
||||
return true
|
||||
else
|
||||
return false
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function OnConfigInit()
|
||||
|
||||
ModName = "Ichirou Race Menu"
|
||||
Pages = new String[2]
|
||||
Pages[0] = "Ichirou Body"
|
||||
Pages[1] = "Ichirou Wardrobe"
|
||||
BodyChangeShapeFlag = 0
|
||||
ArmorShapeFlag = new Int[10]
|
||||
ArmorShapeFlag[0] = 0
|
||||
ArmorShapeFlag[1] = 0
|
||||
ArmorShapeFlag[2] = 0
|
||||
ArmorShapeFlag[3] = 0
|
||||
ArmorShapeFlag[4] = 0
|
||||
ArmorShapeFlag[5] = 0
|
||||
ArmorShapeFlag[6] = 0
|
||||
ArmorShapeFlag[7] = 0
|
||||
ArmorShapeFlag[8] = 0
|
||||
ArmorShapeFlag[9] = 0
|
||||
endFunction
|
||||
|
||||
Bool function PlayerSexAllow()
|
||||
|
||||
if game.GetPlayer().GetActorBase().GetSex()
|
||||
return true
|
||||
else
|
||||
return false
|
||||
endIf
|
||||
endFunction
|
|
@ -0,0 +1,40 @@
|
|||
scriptName IchirouWardrobe extends ReferenceAlias
|
||||
|
||||
;-- Properties --------------------------------------
|
||||
ichirouracemcmmenu property IchirouRaceMCMMenuInstance auto
|
||||
formlist property IchirouBodyWardrobe auto
|
||||
spell property IchirouBodyChangeSpell auto
|
||||
|
||||
;-- Variables ---------------------------------------
|
||||
Bool IsBeast = false
|
||||
|
||||
;-- Functions ---------------------------------------
|
||||
|
||||
; Skipped compiler generated GotoState
|
||||
|
||||
; Skipped compiler generated GetState
|
||||
|
||||
function OnObjectEquipped(Form akBaseObject, objectreference akReference)
|
||||
|
||||
Int Index = IchirouBodyWardrobe.Find(akBaseObject)
|
||||
if Index != -1 && IchirouRaceMCMMenuInstance.IsWardrobeEnable
|
||||
if IchirouRaceMCMMenuInstance.BodyChangeShapeFlag != IchirouRaceMCMMenuInstance.ArmorShapeFlag[Index]
|
||||
IchirouRaceMCMMenuInstance.BodyChangeShapeFlag = IchirouRaceMCMMenuInstance.ArmorShapeFlag[Index]
|
||||
IchirouBodyChangeSpell.Cast(game.GetPlayer() as objectreference, none)
|
||||
endIf
|
||||
endIf
|
||||
endFunction
|
||||
|
||||
function OnRaceSwitchComplete()
|
||||
|
||||
String RaceName = game.GetPlayer().getrace().GetName()
|
||||
if RaceName == "Argonian" || RaceName == "Khajiit" || RaceName == "Werewolf" || RaceName == "Vampire Lord"
|
||||
game.GetPlayer().GetActorBase().SetSkin(none)
|
||||
game.GetPlayer().QueueNiNodeUpdate()
|
||||
IsBeast = true
|
||||
elseIf IsBeast
|
||||
utility.Wait(1 as Float)
|
||||
IchirouBodyChangeSpell.Cast(game.GetPlayer() as objectreference, none)
|
||||
IsBeast = false
|
||||
endIf
|
||||
endFunction
|
Loading…
Reference in New Issue
Block a user