mirror of
https://github.com/notwa/mm
synced 2024-11-04 22:39:02 -08:00
many many progress menu items
looking to replace oneshot.lua
This commit is contained in:
parent
f2839bb69c
commit
46280a4343
2 changed files with 199 additions and 16 deletions
|
@ -251,7 +251,7 @@ local main_menu = Menu{
|
||||||
Toggle("Infinite Items", infinite_items),
|
Toggle("Infinite Items", infinite_items),
|
||||||
Toggle("Use Any Item", any_item),
|
Toggle("Use Any Item", any_item),
|
||||||
Text(""),
|
Text(""),
|
||||||
Oneshot("100% Items", Setter{[dofile]="oneshot.lua"}),
|
Oneshot("Have Everything", Setter{[dofile]="oneshot.lua"}),
|
||||||
LinkTo("Set Progress...", progress_menu),
|
LinkTo("Set Progress...", progress_menu),
|
||||||
Text(""),
|
Text(""),
|
||||||
Oneshot("Escape Cutscene", Setter{[addrs.cutscene_status_2]=3}),
|
Oneshot("Escape Cutscene", Setter{[addrs.cutscene_status_2]=3}),
|
||||||
|
|
|
@ -8,22 +8,40 @@ if oot then return Menu{
|
||||||
},
|
},
|
||||||
} end
|
} end
|
||||||
|
|
||||||
local first_cycle = Callbacks()
|
local a = addrs
|
||||||
function first_cycle:on()
|
local inv = a.inventory
|
||||||
addrs.warp_begin(0x14)
|
local masks = a.masks
|
||||||
addrs.warp_destination(0xC000)
|
local quantities = a.quantities
|
||||||
addrs.transformation(3) -- deku
|
|
||||||
addrs.day(0)
|
local function set(f, v)
|
||||||
addrs.days_elapsed(0)
|
-- for addresses that *might* be undefined
|
||||||
addrs.time(0x3FD2) -- default time
|
if f then f(v) end
|
||||||
addrs.day_night(1)
|
end
|
||||||
addrs.time_speed(0)
|
|
||||||
addrs.intro_completed(0)
|
local iv
|
||||||
addrs.have_tatl(1)
|
if version == "M JP10" or version == "M JP11" then
|
||||||
addrs.sot_count(0)
|
iv = require "data.item values early"
|
||||||
|
elseif oot then
|
||||||
|
iv = require "data.item values oot"
|
||||||
|
else
|
||||||
|
iv = require "data.item values"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function first_cycle()
|
||||||
|
a.warp_begin(0x14)
|
||||||
|
a.warp_destination(0xC000)
|
||||||
|
a.transformation(3) -- deku
|
||||||
|
a.day(0)
|
||||||
|
a.days_elapsed(0)
|
||||||
|
a.time(0x3FD2) -- default time
|
||||||
|
a.day_night(1)
|
||||||
|
a.time_speed(0)
|
||||||
|
a.intro_completed(0)
|
||||||
|
a.have_tatl(1)
|
||||||
|
a.sot_count(0)
|
||||||
-- remove ocarina so time passes at first-cycle speed, among other things.
|
-- remove ocarina so time passes at first-cycle speed, among other things.
|
||||||
-- if really you need your ocarina, just put it on a C button beforehand.
|
-- if really you need your ocarina, just put it on a C button beforehand.
|
||||||
addrs.inventory.ocarina(0xFF)
|
a.inventory.ocarina(0xFF)
|
||||||
|
|
||||||
-- happy mask salesman talking at door
|
-- happy mask salesman talking at door
|
||||||
scene_flag_reset(0x63, 1, 0)
|
scene_flag_reset(0x63, 1, 0)
|
||||||
|
@ -62,10 +80,175 @@ function first_cycle:on()
|
||||||
event_flag_reset(88, 5)
|
event_flag_reset(88, 5)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function all_items()
|
||||||
|
for k, f in pairs(inv) do
|
||||||
|
if iv[k] then f(iv[k]) end
|
||||||
|
end
|
||||||
|
|
||||||
|
if iv.longshot then
|
||||||
|
inv.hookshot(iv.longshot)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_bottles()
|
||||||
|
inv.bottle_1 (iv.bottle )
|
||||||
|
inv.bottle_2 (iv.fairy )
|
||||||
|
inv.bottle_3 (iv.bugs )
|
||||||
|
inv.bottle_4 (iv.fish )
|
||||||
|
set(inv.bottle_5, iv.milk )
|
||||||
|
set(inv.bottle_6, iv.chateau_romani)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_masks()
|
||||||
|
for k, f in pairs(masks) do
|
||||||
|
f(iv[k])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function max_hearts()
|
||||||
|
a.hearts (16*20)
|
||||||
|
a.max_hearts (16*20)
|
||||||
|
a.doubled_hearts(20)
|
||||||
|
-- TODO: set heart pieces to 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local function max_magic()
|
||||||
|
a.magic (0x60)
|
||||||
|
set(a.magic_max, 0x60)
|
||||||
|
set(a.chateau_romani, 8)
|
||||||
|
set(a.magic_level, 2)
|
||||||
|
set(a.has_normal_magic, 1)
|
||||||
|
set(a.has_double_magic, 1)
|
||||||
|
if mm then
|
||||||
|
-- great spin attack
|
||||||
|
-- this one's a bit odd; it goes off an event flag
|
||||||
|
local addr = a.week_event_reg.addr + 23
|
||||||
|
W1(addr, bit.bor(R1(addr), 0x02))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function max_rupees()
|
||||||
|
a.rupees(500)
|
||||||
|
set(a.banked_rupees, 5000)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_upgrades()
|
||||||
|
-- nuts, sticks, bullets, wallet, Scale, gauntlets, Bombs, quiver (verify?)
|
||||||
|
-- ?????????nnnsssbbbwwSSSgggBBBqqq
|
||||||
|
a.upgrades(tonumber('00000000010101101110010011011011', 2))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_dungeon()
|
||||||
|
if oot then
|
||||||
|
-- TODO
|
||||||
|
else
|
||||||
|
a.items_wft(7)
|
||||||
|
a.items_sht(7)
|
||||||
|
a.items_gbt(7)
|
||||||
|
a.items_stt(7)
|
||||||
|
a.keys_wft(9)
|
||||||
|
a.keys_sht(9)
|
||||||
|
a.keys_gbt(9)
|
||||||
|
a.keys_stt(9)
|
||||||
|
a.fairies_wft(20)
|
||||||
|
a.fairies_sht(20)
|
||||||
|
a.fairies_gbt(20)
|
||||||
|
a.fairies_stt(20)
|
||||||
|
a.slulltula_count_wf(20)
|
||||||
|
a.slulltula_count_gb(20)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_map()
|
||||||
|
if oot then
|
||||||
|
-- TODO
|
||||||
|
else
|
||||||
|
a.owls_hit (0xFFFF)
|
||||||
|
a.map_visible (0xFFFF)
|
||||||
|
a.map_visited (0xFFFF)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function max_quantity()
|
||||||
|
-- TODO: check upgrade flags for actual maximums
|
||||||
|
for k, f in pairs(quantities) do
|
||||||
|
f(69)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_quests()
|
||||||
|
a.quest_items(0x00FFFFFF)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_equips()
|
||||||
|
if oot then
|
||||||
|
a.tunic_boots (0xFF) -- normally 0x77
|
||||||
|
a.sword_shield(0xF7) -- normally 0x77?
|
||||||
|
else
|
||||||
|
a.sword_shield(0x23)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function all_notebook()
|
||||||
|
for i=66,72 do
|
||||||
|
W1(a.week_event_reg.addr + i, 0xFF)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return Menu{
|
return Menu{
|
||||||
Screen{
|
Screen{
|
||||||
Text("Progress Menu #1/1"),
|
-- cheaty stuff
|
||||||
|
Text("Progress Menu #1/2"),
|
||||||
|
Oneshot("All Items", all_items),
|
||||||
|
Oneshot("Max Quantities", max_quantity),
|
||||||
|
Oneshot("All Bottles", all_bottles),
|
||||||
|
Oneshot("All Masks", all_masks),
|
||||||
|
Oneshot("All Equipment", all_equips),
|
||||||
|
Oneshot("Max Hearts", max_hearts),
|
||||||
|
Oneshot("Max Magic", max_magic),
|
||||||
|
Oneshot("Max Rupees", max_rupees),
|
||||||
|
Oneshot("All Upgrades", all_upgrades),
|
||||||
|
Oneshot("All Dungeon Items", all_dungeon),
|
||||||
|
Oneshot("Complete Map", all_map),
|
||||||
|
Oneshot("All Songs", all_quest), -- TODO
|
||||||
|
Oneshot("All Remains", all_quest), -- TODO
|
||||||
|
Oneshot("Complete Notebook", all_notebook),
|
||||||
|
Text(""),
|
||||||
|
Back(),
|
||||||
|
},
|
||||||
|
Screen{
|
||||||
|
-- not so cheaty
|
||||||
|
Text("Progress Menu #2/2"),
|
||||||
|
Oneshot("Z Targeting: Switch", Setter{[a.target_style]=0}),
|
||||||
|
Oneshot("Z Targeting: Hold", Setter{[a.target_style]=1}),
|
||||||
|
Text(""),
|
||||||
Oneshot("Setup First Cycle", first_cycle),
|
Oneshot("Setup First Cycle", first_cycle),
|
||||||
|
--Oneshot("Setup Race File", race_file),
|
||||||
|
Text(""),
|
||||||
|
Oneshot("Set Bombers Code to 12345", Setter{
|
||||||
|
[a.bombers_code[1]]=1,
|
||||||
|
[a.bombers_code[2]]=2,
|
||||||
|
[a.bombers_code[3]]=3,
|
||||||
|
[a.bombers_code[4]]=4,
|
||||||
|
[a.bombers_code[5]]=5,
|
||||||
|
}),
|
||||||
|
Oneshot("Set Spider Mask Puzzle to All Red", Setter{
|
||||||
|
[a.spider_mask_order[1]]=0,
|
||||||
|
[a.spider_mask_order[2]]=0,
|
||||||
|
[a.spider_mask_order[3]]=0,
|
||||||
|
[a.spider_mask_order[4]]=0,
|
||||||
|
[a.spider_mask_order[5]]=0,
|
||||||
|
[a.spider_mask_order[6]]=0,
|
||||||
|
}),
|
||||||
|
Oneshot("Set Lottery Numbers to 123,456,789", Setter{
|
||||||
|
[a.lottery_numbers[1]]=1*0x10000 + 2*0x100 + 3,
|
||||||
|
[a.lottery_numbers[2]]=4*0x10000 + 5*0x100 + 6,
|
||||||
|
[a.lottery_numbers[3]]=7*0x10000 + 8*0x100 + 9,
|
||||||
|
}),
|
||||||
|
Text(""),
|
||||||
|
Oneshot("Enable Owl Save", Setter{[a.owl_save]=1}),
|
||||||
|
Oneshot("Disable Owl Save", Setter{[a.owl_save]=0}),
|
||||||
|
Oneshot("Reset Song of Time Count", Setter{[a.sot_count]=0}),
|
||||||
Text(""),
|
Text(""),
|
||||||
Back(),
|
Back(),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue