Beginnings of Retro Mode
This just adds a GUI/command line option to set the variable into world for retro mode and puts the universal key item into the list of defined items. None of the functionality is yet present.
This commit is contained in:
parent
7ebe4f9d93
commit
28d4ce0997
|
@ -7,7 +7,7 @@ from collections import OrderedDict
|
||||||
|
|
||||||
class World(object):
|
class World(object):
|
||||||
|
|
||||||
def __init__(self, shuffle, logic, mode, difficulty, timer, progressive, goal, algorithm, place_dungeon_items, check_beatable_only, shuffle_ganon, quickswap, fastmenu, disable_music, keysanity, custom, customitemarray):
|
def __init__(self, shuffle, logic, mode, difficulty, timer, progressive, goal, algorithm, place_dungeon_items, check_beatable_only, shuffle_ganon, quickswap, fastmenu, disable_music, keysanity, retro, custom, customitemarray):
|
||||||
self.shuffle = shuffle
|
self.shuffle = shuffle
|
||||||
self.logic = logic
|
self.logic = logic
|
||||||
self.mode = mode
|
self.mode = mode
|
||||||
|
@ -56,6 +56,7 @@ class World(object):
|
||||||
self.fastmenu = fastmenu
|
self.fastmenu = fastmenu
|
||||||
self.disable_music = disable_music
|
self.disable_music = disable_music
|
||||||
self.keysanity = keysanity
|
self.keysanity = keysanity
|
||||||
|
self.retro = retro
|
||||||
self.custom = custom
|
self.custom = custom
|
||||||
self.customitemarray = customitemarray
|
self.customitemarray = customitemarray
|
||||||
self.can_take_damage = True
|
self.can_take_damage = True
|
||||||
|
@ -278,6 +279,7 @@ class World(object):
|
||||||
markbool(self.check_beatable_only)
|
markbool(self.check_beatable_only)
|
||||||
markbool(self.shuffle_ganon)
|
markbool(self.shuffle_ganon)
|
||||||
markbool(self.keysanity)
|
markbool(self.keysanity)
|
||||||
|
markbool(self.retro)
|
||||||
assert id_value_max <= 0xFFFFFFFF
|
assert id_value_max <= 0xFFFFFFFF
|
||||||
return id_value
|
return id_value
|
||||||
|
|
||||||
|
|
|
@ -165,6 +165,10 @@ def start():
|
||||||
Keys (and other dungeon items) are no longer restricted to
|
Keys (and other dungeon items) are no longer restricted to
|
||||||
their dungeons, but can be anywhere
|
their dungeons, but can be anywhere
|
||||||
''', action='store_true')
|
''', action='store_true')
|
||||||
|
parser.add_argument('--retro', help='''\
|
||||||
|
Keys are universal, shooting arrows costs rupees,
|
||||||
|
and a few other little things make this more like Zelda-1.
|
||||||
|
''', action='store_true')
|
||||||
parser.add_argument('--custom', default=False, help='Not supported.')
|
parser.add_argument('--custom', default=False, help='Not supported.')
|
||||||
parser.add_argument('--customitemarray', default=False, help='Not supported.')
|
parser.add_argument('--customitemarray', default=False, help='Not supported.')
|
||||||
parser.add_argument('--nodungeonitems', help='''\
|
parser.add_argument('--nodungeonitems', help='''\
|
||||||
|
|
5
Gui.py
5
Gui.py
|
@ -62,6 +62,8 @@ def guiMain(args=None):
|
||||||
quickSwapCheckbutton = Checkbutton(checkBoxFrame, text="Enabled L/R Item quickswapping", variable=quickSwapVar)
|
quickSwapCheckbutton = Checkbutton(checkBoxFrame, text="Enabled L/R Item quickswapping", variable=quickSwapVar)
|
||||||
keysanityVar = IntVar()
|
keysanityVar = IntVar()
|
||||||
keysanityCheckbutton = Checkbutton(checkBoxFrame, text="Keysanity (keys anywhere)", variable=keysanityVar)
|
keysanityCheckbutton = Checkbutton(checkBoxFrame, text="Keysanity (keys anywhere)", variable=keysanityVar)
|
||||||
|
retroVar = IntVar()
|
||||||
|
retroCheckbutton = Checkbutton(checkBoxFrame, text="Retro mode (universal keys)", variable=retroVar)
|
||||||
dungeonItemsVar = IntVar()
|
dungeonItemsVar = IntVar()
|
||||||
dungeonItemsCheckbutton = Checkbutton(checkBoxFrame, text="Place Dungeon Items (Compasses/Maps)", onvalue=0, offvalue=1, variable=dungeonItemsVar)
|
dungeonItemsCheckbutton = Checkbutton(checkBoxFrame, text="Place Dungeon Items (Compasses/Maps)", onvalue=0, offvalue=1, variable=dungeonItemsVar)
|
||||||
beatableOnlyVar = IntVar()
|
beatableOnlyVar = IntVar()
|
||||||
|
@ -78,6 +80,7 @@ def guiMain(args=None):
|
||||||
suppressRomCheckbutton.pack(expand=True, anchor=W)
|
suppressRomCheckbutton.pack(expand=True, anchor=W)
|
||||||
quickSwapCheckbutton.pack(expand=True, anchor=W)
|
quickSwapCheckbutton.pack(expand=True, anchor=W)
|
||||||
keysanityCheckbutton.pack(expand=True, anchor=W)
|
keysanityCheckbutton.pack(expand=True, anchor=W)
|
||||||
|
retroCheckbutton.pack(expand=True, anchor=W)
|
||||||
dungeonItemsCheckbutton.pack(expand=True, anchor=W)
|
dungeonItemsCheckbutton.pack(expand=True, anchor=W)
|
||||||
beatableOnlyCheckbutton.pack(expand=True, anchor=W)
|
beatableOnlyCheckbutton.pack(expand=True, anchor=W)
|
||||||
disableMusicCheckbutton.pack(expand=True, anchor=W)
|
disableMusicCheckbutton.pack(expand=True, anchor=W)
|
||||||
|
@ -262,6 +265,7 @@ def guiMain(args=None):
|
||||||
guiargs.create_spoiler = bool(createSpoilerVar.get())
|
guiargs.create_spoiler = bool(createSpoilerVar.get())
|
||||||
guiargs.suppress_rom = bool(suppressRomVar.get())
|
guiargs.suppress_rom = bool(suppressRomVar.get())
|
||||||
guiargs.keysanity = bool(keysanityVar.get())
|
guiargs.keysanity = bool(keysanityVar.get())
|
||||||
|
guiargs.retro = bool(retroVar.get())
|
||||||
guiargs.nodungeonitems = bool(dungeonItemsVar.get())
|
guiargs.nodungeonitems = bool(dungeonItemsVar.get())
|
||||||
guiargs.beatableonly = bool(beatableOnlyVar.get())
|
guiargs.beatableonly = bool(beatableOnlyVar.get())
|
||||||
guiargs.quickswap = bool(quickSwapVar.get())
|
guiargs.quickswap = bool(quickSwapVar.get())
|
||||||
|
@ -978,6 +982,7 @@ def guiMain(args=None):
|
||||||
createSpoilerVar.set(int(args.create_spoiler))
|
createSpoilerVar.set(int(args.create_spoiler))
|
||||||
suppressRomVar.set(int(args.suppress_rom))
|
suppressRomVar.set(int(args.suppress_rom))
|
||||||
keysanityVar.set(args.keysanity)
|
keysanityVar.set(args.keysanity)
|
||||||
|
retroVar.set(args.retro)
|
||||||
if args.nodungeonitems:
|
if args.nodungeonitems:
|
||||||
dungeonItemsVar.set(int(not args.nodungeonitems))
|
dungeonItemsVar.set(int(not args.nodungeonitems))
|
||||||
beatableOnlyVar.set(int(args.beatableonly))
|
beatableOnlyVar.set(int(args.beatableonly))
|
||||||
|
|
1
Items.py
1
Items.py
|
@ -157,6 +157,7 @@ item_table = {'Bow': (True, False, None, 0x0B, 'You have\nchosen the\narcher cla
|
||||||
'Big Key (Ganons Tower)': (False, False, 'BigKey', 0x92, 'A big key to the evil tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again'),
|
'Big Key (Ganons Tower)': (False, False, 'BigKey', 0x92, 'A big key to the evil tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again'),
|
||||||
'Compass (Ganons Tower)': (False, True, 'Compass', 0x82, 'Now you can find Agahnim!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again'),
|
'Compass (Ganons Tower)': (False, True, 'Compass', 0x82, 'Now you can find Agahnim!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again'),
|
||||||
'Map (Ganons Tower)': (False, True, 'Map', 0x72, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again'),
|
'Map (Ganons Tower)': (False, True, 'Map', 0x72, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again'),
|
||||||
|
'Small Key (Universal)': (False, False, 'SmallKey', 0xAF, 'A small key for any door', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again'),
|
||||||
'Nothing': (False, False, None, 0x5A, 'Some Hot Air', 'and the Nothing', 'the zen kid', 'outright theft', 'shroom theft', 'empty boy is bored again'),
|
'Nothing': (False, False, None, 0x5A, 'Some Hot Air', 'and the Nothing', 'the zen kid', 'outright theft', 'shroom theft', 'empty boy is bored again'),
|
||||||
'Beat Agahnim 1': (True, False, 'Event', None, None, None, None, None, None, None),
|
'Beat Agahnim 1': (True, False, 'Event', None, None, None, None, None, None, None),
|
||||||
'Beat Agahnim 2': (True, False, 'Event', None, None, None, None, None, None, None)}
|
'Beat Agahnim 2': (True, False, 'Event', None, None, None, None, None, None, None)}
|
||||||
|
|
6
Main.py
6
Main.py
|
@ -39,7 +39,7 @@ def main(args, seed=None):
|
||||||
start = time.clock()
|
start = time.clock()
|
||||||
|
|
||||||
# initialize the world
|
# initialize the world
|
||||||
world = World(args.shuffle, args.logic, args.mode, args.difficulty, args.timer, args.progressive, args.goal, args.algorithm, not args.nodungeonitems, args.beatableonly, args.shuffleganon, args.quickswap, args.fastmenu, args.disablemusic, args.keysanity, args.custom, args.customitemarray)
|
world = World(args.shuffle, args.logic, args.mode, args.difficulty, args.timer, args.progressive, args.goal, args.algorithm, not args.nodungeonitems, args.beatableonly, args.shuffleganon, args.quickswap, args.fastmenu, args.disablemusic, args.keysanity, args.retro, args.custom, args.customitemarray)
|
||||||
logger = logging.getLogger('')
|
logger = logging.getLogger('')
|
||||||
if seed is None:
|
if seed is None:
|
||||||
random.seed(None)
|
random.seed(None)
|
||||||
|
@ -111,7 +111,7 @@ def main(args, seed=None):
|
||||||
else:
|
else:
|
||||||
sprite = None
|
sprite = None
|
||||||
|
|
||||||
outfilebase = 'ER_%s_%s-%s-%s%s_%s-%s%s%s%s_%s' % (world.logic, world.difficulty, world.mode, world.goal, "" if world.timer in ['none', 'display'] else "-" + world.timer, world.shuffle, world.algorithm, "-keysanity" if world.keysanity else "", "-prog_" + world.progressive if world.progressive in ['off', 'random'] else "", "-shuffleganon" if world.shuffle_ganon else "", world.seed)
|
outfilebase = 'ER_%s_%s-%s-%s%s_%s-%s%s%s%s_%s' % (world.logic, world.difficulty, world.mode, world.goal, "" if world.timer in ['none', 'display'] else "-" + world.timer, world.shuffle, world.algorithm, "-keysanity" if world.keysanity else "", "-retro" if world.retro else "", "-prog_" + world.progressive if world.progressive in ['off', 'random'] else "", world.seed)
|
||||||
|
|
||||||
if not args.suppress_rom:
|
if not args.suppress_rom:
|
||||||
if args.jsonout:
|
if args.jsonout:
|
||||||
|
@ -139,7 +139,7 @@ def gt_filler(world):
|
||||||
|
|
||||||
def copy_world(world):
|
def copy_world(world):
|
||||||
# ToDo: Not good yet
|
# ToDo: Not good yet
|
||||||
ret = World(world.shuffle, world.logic, world.mode, world.difficulty, world.timer, world.progressive, world.goal, world.algorithm, world.place_dungeon_items, world.check_beatable_only, world.shuffle_ganon, world.quickswap, world.fastmenu, world.disable_music, world.keysanity, world.custom, world.customitemarray)
|
ret = World(world.shuffle, world.logic, world.mode, world.difficulty, world.timer, world.progressive, world.goal, world.algorithm, world.place_dungeon_items, world.check_beatable_only, world.shuffle_ganon, world.quickswap, world.fastmenu, world.disable_music, world.keysanity, world.retro, world.custom, world.customitemarray)
|
||||||
ret.required_medallions = list(world.required_medallions)
|
ret.required_medallions = list(world.required_medallions)
|
||||||
ret.swamp_patch_required = world.swamp_patch_required
|
ret.swamp_patch_required = world.swamp_patch_required
|
||||||
ret.ganon_at_pyramid = world.ganon_at_pyramid
|
ret.ganon_at_pyramid = world.ganon_at_pyramid
|
||||||
|
|
|
@ -33,7 +33,7 @@ def main(args):
|
||||||
start_time = time.clock()
|
start_time = time.clock()
|
||||||
|
|
||||||
# initialize the world
|
# initialize the world
|
||||||
world = World('vanilla', 'noglitches', 'standard', 'normal', 'none', 'on', 'ganon', 'freshness', False, False, False, args.quickswap, args.fastmenu, args.disablemusic, False, False, None)
|
world = World('vanilla', 'noglitches', 'standard', 'normal', 'none', 'on', 'ganon', 'freshness', False, False, False, args.quickswap, args.fastmenu, args.disablemusic, False, False, False, None)
|
||||||
logger = logging.getLogger('')
|
logger = logging.getLogger('')
|
||||||
|
|
||||||
hasher = hashlib.md5()
|
hasher = hashlib.md5()
|
||||||
|
|
Loading…
Reference in New Issue