Skip to content

Commit

Permalink
Slot Data Fallback
Browse files Browse the repository at this point in the history
Slot Data Fallback
  • Loading branch information
palex00 authored Oct 14, 2024
2 parents 7d121f8 + f77992d commit 5efc7f3
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 5 deletions.
38 changes: 38 additions & 0 deletions items/missing_slotdata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"name": "",
"type": "toggle",
"img": "/images/items/invisible.png",
"codes": "missing_FightLogic"
},
{
"name": "",
"type": "toggle",
"img": "/images/items/invisible.png",
"codes": "missing_FinalFormLogic"
},
{
"name": "",
"type": "toggle",
"img": "/images/items/invisible.png",
"codes": "missing_AutoFormLogic"
},
{
"name": "",
"type": "toggle",
"img": "/images/items/invisible.png",
"codes": "missing_LevelDepth"
},
{
"name": "",
"type": "toggle",
"img": "/images/items/invisible.png",
"codes": "missing_DonaldGoofyStatsanity"
},
{
"name": "",
"type": "toggle",
"img": "/images/items/invisible.png",
"codes": "missing_CorSkipToggle"
}
]
62 changes: 62 additions & 0 deletions locations/missing_setting_slotdata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[
{
"name": "Overworld2",
"chest_unopened_img": "/images/items/invisible.png",
"chest_opened_img": "/images/items/invisible.png",
"overlay_background": "#000000",
"visibility_rules": [
"missing_FightLogic", "missing_FinalFormLogic", "missing_AutoFormLogic", "missing_LevelDepth", "missing_DonaldGoofyStatsanity", "missing_CorSkipToggle"
],
"children": [
{
"name": "Important Information",
"chest_unopened_img": "/images/items/invisible.png",
"chest_opened_img": "/images/items/invisible.png",
"overlay_background": "#000000",
"access_rules": [
"^$scoutable"
],
"sections": [
{
"name": "If you are reading this, this game was generated with a KH2 apworld which does not have slot data for the settings listed below.\nYou'll need to set those settings manually.\nIf you want the slot data to be present, you can grab an apworld off github's main.\n0.5.1 will have the proper slot data.",
"item_count": 1,
"visibility_rules": [],
"access_rules": []
},
{
"name": "Fight Logic",
"visibility_rules": ["missing_FightLogic"]
},
{
"name": "Final Form Logic",
"visibility_rules": ["missing_FinalFormLogic"]
},
{
"name": "Auto Form Logic",
"visibility_rules": ["missing_AutoFormLogic"]
},
{
"name": "Level Depth Logic",
"visibility_rules": ["missing_LevelDepth"]
},
{
"name": "Donald & Goofy Statsanity",
"visibility_rules": ["missing_DonaldGoofyStatsanity"]
},
{
"name": "CorSkip Toggle",
"visibility_rules": ["missing_CorSkipToggle"]
}
],
"map_locations": [
{
"map": "Overworld",
"x": 323,
"y": 500,
"size": 20
}
]
}
]
}
]
4 changes: 4 additions & 0 deletions scripts/autotracking/archipelago.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ function onChangedRegion(key, current_region, old_region)
end
end

function scoutable()
return AccessibilityLevel.Inspect
end

Archipelago:AddClearHandler("clear handler", onClear)
Archipelago:AddItemHandler("item handler", onItem)
Archipelago:AddLocationHandler("location handler", onLocation)
Expand Down
11 changes: 6 additions & 5 deletions scripts/autotracking/slot_options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function get_slot_options(slot_data)
end
else
print("The apworld this was generated with did not include slot data neccessary to fill certain options. Double check options please. You can find an updated apworld at PR #4031 on Github.")
Tracker:FindObjectForCode("missing_FightLogic").Active = true
end

if slot_data["FinalFormLogic"] ~= nil then
Expand All @@ -60,6 +61,7 @@ function get_slot_options(slot_data)
end
else
print("The apworld this was generated with did not include slot data neccessary to fill certain options. Double check options please. You can find an updated apworld at PR #4031 on Github.")
Tracker:FindObjectForCode("missing_FinalFormLogic").Active = true

end

Expand All @@ -74,7 +76,7 @@ function get_slot_options(slot_data)
end
else
print("The apworld this was generated with did not include slot data neccessary to fill certain options. Double check options please. You can find an updated apworld at PR #4031 on Github.")

Tracker:FindObjectForCode("missing_AutoFormLogic").Active = true
end

if slot_data["LevelDepth"] ~= nil then
Expand All @@ -88,7 +90,7 @@ function get_slot_options(slot_data)
end
else
print("The apworld this was generated with did not include slot data neccessary to fill certain options. Double check options please. You can find an updated apworld at PR #4031 on Github.")

Tracker:FindObjectForCode("missing_LevelDepth").Active = true
end

if slot_data["DonaldGoofyStatsanity"] ~= nil then
Expand All @@ -102,7 +104,7 @@ function get_slot_options(slot_data)
end
else
print("The apworld this was generated with did not include slot data neccessary to fill certain options. Double check options please. You can find an updated apworld at PR #4031 on Github.")

Tracker:FindObjectForCode("missing_DonaldGoofyStatsanity").Active = true
end

if slot_data["CorSkipToggle"] ~= nil then
Expand All @@ -116,7 +118,6 @@ function get_slot_options(slot_data)
end
else
print("The apworld this was generated with did not include slot data neccessary to fill certain options. Double check options please. You can find an updated apworld at PR #4031 on Github.")

Tracker:FindObjectForCode("missing_CorSkipToggle").Active = true
end

end
4 changes: 4 additions & 0 deletions scripts/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,9 @@ Tracker:AddLocations("locations/(TWTNW).json")
Tracker:AddLocations("locations/Overworld.json")
Tracker:AddLocations("locations/Submaps.json")

-- Missing Slot Data Helpers
Tracker:AddLocations("locations/missing_setting_slotdata.json")
Tracker:AddItems("items/missing_slotdata.json")

-- AutoTracking for Poptracker
ScriptHost:LoadScript("scripts/autotracking.lua")

0 comments on commit 5efc7f3

Please sign in to comment.