Pretty Custom options

List index out of range when trying to generate game file using Custom Item Pool
This commit is contained in:
Mike A. Trethewey
2020-02-11 05:04:00 -08:00
parent fdc55cc8a1
commit 8ac47db507
3 changed files with 662 additions and 582 deletions

View File

@@ -74,16 +74,17 @@ def bottom_frame(self,parent,args=None):
guiargs.enemy_health = parent.enemizerWindow.enemizerWidgets["enemyhealth"].storageVar.get()
guiargs.enemy_damage = parent.enemizerWindow.enemizerWidgets["enemydamage"].storageVar.get()
guiargs.shufflepots = bool(parent.enemizerWindow.enemizerWidgets["potshuffle"].storageVar.get())
guiargs.custom = bool(parent.generationSetupWindow.customVar.get())
guiargs.customitemarray = [int(parent.customContent.bowVar.get()), int(parent.customContent.silverarrowVar.get()), int(parent.customContent.boomerangVar.get()), int(parent.customContent.magicboomerangVar.get()), int(parent.customContent.hookshotVar.get()), int(parent.customContent.mushroomVar.get()), int(parent.customContent.magicpowderVar.get()), int(parent.customContent.firerodVar.get()),
int(parent.customContent.icerodVar.get()), int(parent.customContent.bombosVar.get()), int(parent.customContent.etherVar.get()), int(parent.customContent.quakeVar.get()), int(parent.customContent.lampVar.get()), int(parent.customContent.hammerVar.get()), int(parent.customContent.shovelVar.get()), int(parent.customContent.fluteVar.get()), int(parent.customContent.bugnetVar.get()),
int(parent.customContent.bookVar.get()), int(parent.customContent.bottleVar.get()), int(parent.customContent.somariaVar.get()), int(parent.customContent.byrnaVar.get()), int(parent.customContent.capeVar.get()), int(parent.customContent.mirrorVar.get()), int(parent.customContent.bootsVar.get()), int(parent.customContent.powergloveVar.get()), int(parent.customContent.titansmittVar.get()),
int(parent.customContent.proggloveVar.get()), int(parent.customContent.flippersVar.get()), int(parent.customContent.pearlVar.get()), int(parent.customContent.heartpieceVar.get()), int(parent.customContent.fullheartVar.get()), int(parent.customContent.sancheartVar.get()), int(parent.customContent.sword1Var.get()), int(parent.customContent.sword2Var.get()),
int(parent.customContent.sword3Var.get()), int(parent.customContent.sword4Var.get()), int(parent.customContent.progswordVar.get()), int(parent.customContent.shield1Var.get()), int(parent.customContent.shield2Var.get()), int(parent.customContent.shield3Var.get()), int(parent.customContent.progshieldVar.get()), int(parent.customContent.bluemailVar.get()),
int(parent.customContent.redmailVar.get()), int(parent.customContent.progmailVar.get()), int(parent.customContent.halfmagicVar.get()), int(parent.customContent.quartermagicVar.get()), int(parent.customContent.bcap5Var.get()), int(parent.customContent.bcap10Var.get()), int(parent.customContent.acap5Var.get()), int(parent.customContent.acap10Var.get()),
int(parent.customContent.arrow1Var.get()), int(parent.customContent.arrow10Var.get()), int(parent.customContent.bomb1Var.get()), int(parent.customContent.bomb3Var.get()), int(parent.customContent.rupee1Var.get()), int(parent.customContent.rupee5Var.get()), int(parent.customContent.rupee20Var.get()), int(parent.customContent.rupee50Var.get()), int(parent.customContent.rupee100Var.get()),
int(parent.customContent.rupee300Var.get()), int(parent.customContent.rupoorVar.get()), int(parent.customContent.blueclockVar.get()), int(parent.customContent.greenclockVar.get()), int(parent.customContent.redclockVar.get()), int(parent.customContent.progbowVar.get()), int(parent.customContent.bomb10Var.get()), int(parent.customContent.triforcepieceVar.get()),
int(parent.customContent.triforcecountVar.get()), int(parent.customContent.triforceVar.get()), int(parent.customContent.rupoorcostVar.get()), int(parent.customContent.universalkeyVar.get())]
guiargs.custom = bool(parent.generationSetupWindow.generationWidgets["usecustompool"].storageVar.get())
guiargs.customitemarray = [int(parent.customContent.customWidgets["bow"].storageVar.get()), int(parent.customContent.customWidgets["silversupgrade"].storageVar.get()), int(parent.customContent.customWidgets["boomerang"].storageVar.get()), int(parent.customContent.customWidgets["redmerang"].storageVar.get()), int(parent.customContent.customWidgets["hookshot"].storageVar.get()), int(parent.customContent.customWidgets["mushroom"].storageVar.get()), int(parent.customContent.customWidgets["powder"].storageVar.get()), int(parent.customContent.customWidgets["firerod"].storageVar.get()),
int(parent.customContent.customWidgets["icerod"].storageVar.get()), int(parent.customContent.customWidgets["bombos"].storageVar.get()), int(parent.customContent.customWidgets["ether"].storageVar.get()), int(parent.customContent.customWidgets["quake"].storageVar.get()), int(parent.customContent.customWidgets["lamp"].storageVar.get()), int(parent.customContent.customWidgets["hammer"].storageVar.get()), int(parent.customContent.customWidgets["shovel"].storageVar.get()), int(parent.customContent.customWidgets["flute"].storageVar.get()), int(parent.customContent.customWidgets["bugnet"].storageVar.get()),
int(parent.customContent.customWidgets["book"].storageVar.get()), int(parent.customContent.customWidgets["bottle"].storageVar.get()), int(parent.customContent.customWidgets["somaria"].storageVar.get()), int(parent.customContent.customWidgets["byrna"].storageVar.get()), int(parent.customContent.customWidgets["cape"].storageVar.get()), int(parent.customContent.customWidgets["mirror"].storageVar.get()), int(parent.customContent.customWidgets["boots"].storageVar.get()), int(parent.customContent.customWidgets["powerglove"].storageVar.get()), int(parent.customContent.customWidgets["titansmitt"].storageVar.get()),
int(parent.customContent.customWidgets["progressiveglove"].storageVar.get()), int(parent.customContent.customWidgets["flippers"].storageVar.get()), int(parent.customContent.customWidgets["pearl"].storageVar.get()), int(parent.customContent.customWidgets["heartpiece"].storageVar.get()), int(parent.customContent.customWidgets["heartcontainer"].storageVar.get()), int(parent.customContent.customWidgets["sancheart"].storageVar.get()), int(parent.customContent.customWidgets["sword1"].storageVar.get()), int(parent.customContent.customWidgets["sword2"].storageVar.get()),
int(parent.customContent.customWidgets["sword3"].storageVar.get()), int(parent.customContent.customWidgets["sword4"].storageVar.get()), int(parent.customContent.customWidgets["progressivesword"].storageVar.get()), int(parent.customContent.customWidgets["shield1"].storageVar.get()), int(parent.customContent.customWidgets["shield2"].storageVar.get()), int(parent.customContent.customWidgets["shield3"].storageVar.get()), int(parent.customContent.customWidgets["progressiveshield"].storageVar.get()), int(parent.customContent.customWidgets["mail2"].storageVar.get()),
int(parent.customContent.customWidgets["mail3"].storageVar.get()), int(parent.customContent.customWidgets["progressivemail"].storageVar.get()), int(parent.customContent.customWidgets["halfmagic"].storageVar.get()), int(parent.customContent.customWidgets["quartermagic"].storageVar.get()), int(parent.customContent.customWidgets["bombsplus5"].storageVar.get()), int(parent.customContent.customWidgets["bombsplus10"].storageVar.get()), int(parent.customContent.customWidgets["arrowsplus5"].storageVar.get()), int(parent.customContent.customWidgets["arrowsplus10"].storageVar.get()),
int(parent.customContent.customWidgets["arrow1"].storageVar.get()), int(parent.customContent.customWidgets["arrow10"].storageVar.get()), int(parent.customContent.customWidgets["bomb1"].storageVar.get()), int(parent.customContent.customWidgets["bomb3"].storageVar.get()), int(parent.customContent.customWidgets["rupee1"].storageVar.get()), int(parent.customContent.customWidgets["rupee5"].storageVar.get()), int(parent.customContent.customWidgets["rupee20"].storageVar.get()), int(parent.customContent.customWidgets["rupee50"].storageVar.get()), int(parent.customContent.customWidgets["rupee100"].storageVar.get()),
int(parent.customContent.customWidgets["rupee300"].storageVar.get()), int(parent.customContent.customWidgets["rupoor"].storageVar.get()), int(parent.customContent.customWidgets["blueclock"].storageVar.get()), int(parent.customContent.customWidgets["greenclock"].storageVar.get()), int(parent.customContent.customWidgets["redclock"].storageVar.get()), int(parent.customContent.customWidgets["progressivebow"].storageVar.get()), int(parent.customContent.customWidgets["bomb10"].storageVar.get()), int(parent.customContent.customWidgets["triforcepieces"].storageVar.get()),
#int(parent.customContent.triforcecountVar.get()),
int(parent.customContent.customWidgets["triforce"].storageVar.get()), int(parent.customContent.customWidgets["rupoorcost"].storageVar.get()), int(parent.customContent.customWidgets["generickeys"].storageVar.get())]
guiargs.rom = parent.generationSetupWindow.romVar.get()
# guiargs.sprite = parent.gameOptionsWindow.sprite
guiargs.outputpath = args.outputpath if args else None

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
from tkinter import Checkbutton, Entry, Frame, IntVar, Label, OptionMenu, Spinbox, StringVar
from tkinter import Checkbutton, Entry, Frame, IntVar, Label, OptionMenu, Spinbox, StringVar, RIGHT
def make_checkbox(self, parent, label, storageVar, packAttrs):
self = Frame(parent)
@@ -24,7 +24,7 @@ def make_selectbox(self, parent, label, options, storageVar, packAttrs):
self.label = Label(self, text=label)
self.label.pack(packAttrs["label"])
self.selectbox = OptionMenu(self, self.labelVar, *options.keys())
self.selectbox.config(width=15)
self.selectbox.config(width=20)
self.labelVar.set(packAttrs["default"] if "default" in packAttrs else list(options.keys())[0])
self.selectbox.pack(packAttrs["selectbox"])
return self
@@ -50,7 +50,9 @@ def make_textbox(self, parent, label, storageVar, packAttrs):
self.storageVar = storageVar
self.label = Label(self, text=label)
self.label.pack(packAttrs["label"])
self.textbox = Entry(self)
self.textbox = Entry(self, justify=RIGHT, textvariable=self.storageVar, width=3)
if "default" in packAttrs:
self.storageVar.set(packAttrs["default"])
self.textbox.pack(packAttrs["textbox"])
return self