Skip to content

Commit

Permalink
Added more scripts, added characters/digits, added loadorder for sele…
Browse files Browse the repository at this point in the history
…ctiing mod to use
  • Loading branch information
Bradenm1 committed Jan 6, 2018
1 parent 0c7422c commit d1ec96c
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 17 deletions.
87 changes: 71 additions & 16 deletions FormEdit Menu/CheatRoomCheatMenuMain.psc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Scriptname CheatRoomCheatMenuMain extends Quest

;===ModName===;
String modName = "Cheat Room.esp"
String[] loadOrder ; Load Order of custom mods

;===FormIDs====;
int CHEATMENUSPELLFORMID = 0x002442AC ; The cheat menu Spell FormID
Expand All @@ -22,16 +21,19 @@ int CHEATMENUSELECTFLOATAMOUNTNEG = 0x00249465 ; The float the amount neg
int CHEATMENUSELECTBOOLEAN = 0x002493FD ; The boolean

;===Arrays====
String[] loadOrder ; Load Order of custom mods
int[] formIDArray ; Custom entered formID, array of digits and characters
int[] powerLocation ; Powers using power of 16
String[] hexDigits ; Contains hex
String[] digitsAndCharacters ; Contains alphabet characters
int[] formIDs ; Array of hex values in decimal
int[] savedInts ; Saved ints
float[] savedFloats ; Saved floats

;===Local====
string selectionHex ; Shows currently fake selection
int currentIndex ; Shows current index in the array
int currentSelectedMod ; Current select mod given the array

;===Spells===;
Spell cheatMenuSpell
Expand Down Expand Up @@ -71,13 +73,15 @@ Function FirstTimeSetUp()
Game.GetPlayer().AddSpell(cheatMenuGetActorSpell, false) ; Adds get actor spell
InitalizeArrays() ; Initalizes all the arrays
CreatePowerList() ; Create power list
CreateBaseLoadOrder() ; Create base loadorder
; initialize ids
formIDs[0] = 0x00000014 ; Set as player
formIDs[1] = 0x00000007 ; Set as baseID of player
formIDs[2] = 0x00000014 ; Set as player
formIDs[3] = 0x00000007 ; Set as baseID of player
formIDs[2] = 0x000139B9 ; Set as baseID of a sword
formIDs[3] = 0x00013BAC ; Set as refID of Heimskr
selectionHex = ""
currentIndex= 0
currentSelectedMod = 5
CreateMessages() ; Creates the messages the menu will use
EndFunction

Expand Down Expand Up @@ -122,6 +126,53 @@ Function CreatePowerList()
powerLocation[7] = 1 ; Slot 8
EndFunction

Function CreateWordArray()
digitsAndCharacters[0] = "A"
digitsAndCharacters[1] = "B"
digitsAndCharacters[2] = "C"
digitsAndCharacters[3] = "D"
digitsAndCharacters[4] = "E"
digitsAndCharacters[5] = "F"
digitsAndCharacters[6] = "G"
digitsAndCharacters[7] = "H"
digitsAndCharacters[8] = "I"
digitsAndCharacters[9] = "J"
digitsAndCharacters[10] = "K"
digitsAndCharacters[11] = "L"
digitsAndCharacters[12] = "M"
digitsAndCharacters[13] = "N"
digitsAndCharacters[14] = "O"
digitsAndCharacters[15] = "P"
digitsAndCharacters[16] = "Q"
digitsAndCharacters[17] = "R"
digitsAndCharacters[18] = "S"
digitsAndCharacters[19] = "T"
digitsAndCharacters[20] = "U"
digitsAndCharacters[21] = "V"
digitsAndCharacters[22] = "W"
digitsAndCharacters[23] = "X"
digitsAndCharacters[24] = "Y"
digitsAndCharacters[25] = "Z"
digitsAndCharacters[26] = "_"
digitsAndCharacters[27] = "0"
digitsAndCharacters[28] = "1"
digitsAndCharacters[29] = "2"
digitsAndCharacters[30] = "3"
digitsAndCharacters[31] = "4"
digitsAndCharacters[32] = "5"
digitsAndCharacters[33] = "6"
digitsAndCharacters[34] = "7"
digitsAndCharacters[35] = "8"
digitsAndCharacters[36] = "9"
digitsAndCharacters[37] = "-"
digitsAndCharacters[38] = "."
digitsAndCharacters[39] = " "
digitsAndCharacters[40] = "'"
digitsAndCharacters[41] = "~"
digitsAndCharacters[42] = ","
digitsAndCharacters[43] = "@"
EndFunction

; Creates the base loadorder
Function CreateBaseLoadOrder()
loadOrder[0] = "Skyrim.esm"
Expand All @@ -145,13 +196,13 @@ int Function HexMenu01()
Elseif iButton01 ==8 ; Next Selection
HexMenu02()
Elseif iButton01 ==9 ; Exit
if ((currentIndex == 8) && (Game.GetForm(ConvertFromArrayToValue())))
if ((currentIndex == 8) && (Game.GetFormFromFile(ConvertFromArrayToValue(), GetModAtLoadOrder())))
currentIndex= 0
return ConvertFromArrayToValue() ; Return the decimal value
else
currentIndex= 0
debug.messagebox("Incorrect ID")
debug.messagebox("Incorrect ID. Either this ID does not exist for " + GetModAtLoadOrder() + ", or the ID is not a length of 8 digits/characters")
endIf
return ConvertFromArrayToValue() ; Return the decimal value
endif
endif
endWhile
Expand Down Expand Up @@ -206,11 +257,7 @@ int Function SetIntValue()
Elseif iButton01 == 7
value += 10000 * positive
Elseif iButton01 == 8 ; Next Selection
if (positive == -1)
positive = 1
else
positive = -1
endif
positive = positive * -1
Elseif iButton01 ==9 ; Exit
return value ; Return the int value
endif
Expand Down Expand Up @@ -243,11 +290,7 @@ float Function SetFloatValue()
Elseif iButton01 == 5
value += SetIntValue()
Elseif iButton01 == 6 ; Next Selection
if (positive == -1)
positive = 1
else
positive = -1
endif
positive = positive * -1
Elseif iButton01 ==7 ; Exit
return value ; Return the float value
endif
Expand Down Expand Up @@ -425,4 +468,16 @@ EndFunction

Function SetSavedFloat(int _index, float value)
savedFloats[_index] = value
EndFunction

Function SetSelectedMod(int value)
currentSelectedMod = value
EndFunction

String Function GetModAtLoadOrder()
return loadOrder[currentSelectedMod]
EndFunction

Function SetModAtLoadOrder(int _index, String _Mod)
loadOrder[_index] = _Mod
EndFunction
2 changes: 1 addition & 1 deletion FormEdit Menu/TIF__052493CF.psc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
ObjectReference firstForm = Game.GetForm(CheatRoomCheatMenuDialogue.FormToUseFirstArg(0)) As ObjectReference
Form secondForm = Game.GetForm(CheatRoomCheatMenuDialogue.FormToUseFirstArg(1))
Form secondForm = Game.GetFormFromFile(CheatRoomCheatMenuDialogue.FormToUseFirstArg(1), CheatRoomCheatMenuDialogue.GetModAtLoadOrder())

int amount = CheatRoomCheatMenuDialogue.IntToUse()

Expand Down
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E597.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E597 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E598.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E598 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E599.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E599 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E59A.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E59A Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E59B.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E59B Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E59C.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E59C Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E59D.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E59D Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
14 changes: 14 additions & 0 deletions FormEdit Menu/TIF__0524E59E.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0524E59E Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

0 comments on commit d1ec96c

Please sign in to comment.