Added first implementation of Collection page indicator and savegame reader tool
This commit is contained in:
1 parent
16a1d74fd4
commit
f4794d569e
11 files changed
+135
-5
No files matched your search
@@ -1,4 +1,5 @@
|
||||
save1.dat
|
||||
save2.dat
|
||||
save3.dat
|
||||
/scripts/eid_savegames.lua
|
||||
/.vscode
|
||||
@@ -873,6 +873,8 @@ EID.descriptions[languageCode].transformations={
|
||||
EID.descriptions[languageCode].VoidText = "If absorbed, gain:"
|
||||
EID.descriptions[languageCode].VoidNames = {"Speed", "Tears", "Damage", "Range", "Shot Speed", "Luck"}
|
||||
|
||||
EID.descriptions[languageCode].CollectionPageInfo = "This item needs to be picked up for the collection page!"
|
||||
|
||||
EID.descriptions[languageCode].MCM = {
|
||||
DemoObjectName = "Demo Object Name",
|
||||
DemoObjectTransformation = "Demo Transformation",
|
||||
|
||||
@@ -1258,3 +1258,9 @@ function EID:resumeCoroutines()
|
||||
if coroutine.resume(v) == false then EID:removeCoroutine(k) end
|
||||
end
|
||||
end
|
||||
|
||||
-- Returns true if an item needs to be collected for the collection page
|
||||
function EID:requiredForCollectionPage(itemID)
|
||||
if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 then return false end
|
||||
return not EID.SaveGame[EID.Config["SaveGameNumber"]].ItemCollection[itemID]
|
||||
end
|
||||
+18
-2
@@ -294,6 +294,20 @@ EID.UserConfig = {
|
||||
-- Default = none (-1)
|
||||
["CraftingResultButton"] = -1,
|
||||
|
||||
|
||||
---------- Mouse Controls ------------
|
||||
|
||||
-- Savegame which should be used for savegame specific features (for example: Item Collection page progress)
|
||||
-- Possible values: 0,1,2,3
|
||||
-- Default: 0 (Deactivate all Savegame features)
|
||||
["SaveGameNumber"] = 0,
|
||||
|
||||
-- Color in which the name of an item should be highlighted, which needs to be collected for the collection page
|
||||
-- Color names are defined in "eid_data.lua" (line 365)
|
||||
-- Default: "ColorFade"
|
||||
["ItemCollectionColor"] = "ColorFade",
|
||||
|
||||
|
||||
---------- Mouse Controls ------------
|
||||
|
||||
-- Toggles HUD descriptions based on the mouse position
|
||||
@@ -318,11 +332,11 @@ EID.UserConfig = {
|
||||
-- Default = [Effect not defined]
|
||||
["ErrorMessage"] = "[Effect not defined]",
|
||||
-- Set the color of the default description text
|
||||
-- Color names are defined in "eid_data.lua" (line 300)
|
||||
-- Color names are defined in "eid_data.lua" (line 365)
|
||||
-- Default = "ColorEIDText"
|
||||
["TextColor"] = "ColorEIDText",
|
||||
-- Set the color of the error description text
|
||||
-- Color names are defined in "eid_data.lua" (line 300)
|
||||
-- Color names are defined in "eid_data.lua" (line 365)
|
||||
-- Default = "ColorEIDError"
|
||||
["ErrorColor"] = "ColorEIDError",
|
||||
-- Enables or disables custom descriptions for entities
|
||||
@@ -416,6 +430,8 @@ EID.DefaultConfig = {
|
||||
["CraftingResultButton"] = -1,
|
||||
["SpindownDiceResults"] = 3,
|
||||
["SpindownDiceSkipLocked"] = false,
|
||||
["SaveGameNumber"] = 0,
|
||||
["ItemCollectionColor"] = "ColorFade",
|
||||
["EnableMouseControls"] = false,
|
||||
["ShowCursor"] = false,
|
||||
["ErrorMessage"] = "[Effect not defined]",
|
||||
|
||||
@@ -391,6 +391,14 @@ if REPENTANCE then
|
||||
return descObj
|
||||
end
|
||||
|
||||
-- Handle Item Collection description addition
|
||||
local function ItemCollectionPageCallback(descObj)
|
||||
descObj.Name = "{{"..EID.Config["ItemCollectionColor"].."}}"..descObj.Name
|
||||
local text = EID:getDescriptionEntry("CollectionPageInfo")
|
||||
|
||||
EID:appendToDescription(descObj, "#{{Warning}} {{"..EID.Config["ItemCollectionColor"].."}}"..text)
|
||||
return descObj
|
||||
end
|
||||
--------------------------------
|
||||
-- Although individual conditions/callbacks work well for mods to be able to add through the API,
|
||||
-- As we kept adding callbacks for vanilla items, a lot of code got repeated over and over
|
||||
@@ -410,6 +418,8 @@ if REPENTANCE then
|
||||
-- Using magic numbers here in case it's slightly faster, and because the callback names give context
|
||||
-- Check Birthright first because it overwrites the description instead of appending to it
|
||||
if descObj.ObjSubType == 619 then table.insert(callbacks, BirthrightCallback) end
|
||||
|
||||
if EID:requiredForCollectionPage(descObj.ObjSubType) then table.insert(callbacks, ItemCollectionPageCallback) end
|
||||
|
||||
if collectiblesOwned[664] then table.insert(callbacks, BingeEaterCallback) end
|
||||
if collectiblesOwned[59] then table.insert(callbacks, BookOfBelialCallback) end
|
||||
|
||||
@@ -87,6 +87,7 @@ for _,lang in ipairs(EID.Languages) do
|
||||
end
|
||||
table.sort(EID.Languages)
|
||||
|
||||
pcall(require,"scripts.eid_savegames")
|
||||
require("mod_config_menu")
|
||||
require("eid_data")
|
||||
require("eid_xmldata")
|
||||
|
||||
+65
-3
@@ -1197,12 +1197,74 @@ if MCMLoaded then
|
||||
)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
----------------------------Savegame Config--------------------------------
|
||||
if EID.SaveGame then
|
||||
-- Show Item needs Collection
|
||||
MCM.AddSetting(
|
||||
"EID",
|
||||
"Save Game",
|
||||
{
|
||||
Type = ModConfigMenu.OptionType.NUMBER,
|
||||
CurrentSetting = function()
|
||||
return EID.Config["SaveGameNumber"]
|
||||
end,
|
||||
Minimum = 0,
|
||||
Maximum = 3,
|
||||
Display = function()
|
||||
if EID.Config["SaveGameNumber"] == 0 then
|
||||
return "Current Save Game: 0 (Deactivated)"
|
||||
end
|
||||
return "Current Save Game: " .. EID.Config["SaveGameNumber"]
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
EID.MCM_OptionChanged = true
|
||||
EID.Config["SaveGameNumber"] = currentNum
|
||||
end,
|
||||
Info = {"Save game you are currently on. This info needs to be set to get the correct lookup tables"}
|
||||
}
|
||||
)
|
||||
|
||||
-- Needs collection Color
|
||||
MCM.AddSetting(
|
||||
"EID",
|
||||
"Save Game",
|
||||
{
|
||||
Type = ModConfigMenu.OptionType.NUMBER,
|
||||
CurrentSetting = function()
|
||||
return AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"])
|
||||
end,
|
||||
Minimum = 0,
|
||||
Maximum = 1000,
|
||||
Display = function()
|
||||
if EID.Config["ItemCollectionColor"] == nil then EID.Config["ItemCollectionColor"] = EID.DefaultConfig["ItemCollectionColor"] end
|
||||
EID.MCMCompat_isDisplayingEIDTab = "Visuals";
|
||||
return "Collection Page Highlight color: " .. string.gsub(EID.Config["ItemCollectionColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemCollectionColor"]).."/"..#colorNameArray..")"
|
||||
end,
|
||||
OnChange = function(currentNum)
|
||||
EID.MCM_OptionChanged = true
|
||||
if currentNum == 0 then currentNum = #colorNameArray end
|
||||
if currentNum > #colorNameArray then currentNum = 1 end
|
||||
EID.Config["ItemCollectionColor"] = colorNameArray[currentNum]
|
||||
end,
|
||||
Info = {"Color in which item names are colored to highlight that this item needs to be collected for the collection page"}
|
||||
}
|
||||
)
|
||||
else
|
||||
MCM.AddSpace("EID", "Save Game")
|
||||
MCM.AddSpace("EID", "Save Game")
|
||||
MCM.AddText("EID", "Save Game", "To enable savegame related features,")
|
||||
MCM.AddText("EID", "Save Game", "please run \"scripts\\savegame_reader.exe\"")
|
||||
MCM.AddText("EID", "Save Game", "found in the EID mod folder")
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-----------------------------Mouse Controls--------------------------------
|
||||
MCM.AddText("EID", "Mouse", function() return "! THIS FEATURE IS IN EARLY DEVELOPMENT !" end)
|
||||
MCM.AddText("EID", "Mouse", "! THIS FEATURE IS IN EARLY DEVELOPMENT !")
|
||||
MCM.AddSpace("EID", "Mouse")
|
||||
MCM.AddText("EID", "Mouse", function() return "MCM -> General -> Hud Offset" end)
|
||||
MCM.AddText("EID", "Mouse", function() return "to adjust Hud Offset" end)
|
||||
MCM.AddText("EID", "Mouse", "MCM -> General -> Hud Offset")
|
||||
MCM.AddText("EID", "Mouse", "to adjust Hud Offset")
|
||||
MCM.AddSpace("EID", "Mouse")
|
||||
-- Enable mouse controls
|
||||
MCM.AddSetting(
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
The "Savegame_Reader.exe" application can be used to create a LUA readable version of your savegame files.
|
||||
|
||||
The resulting informations can then be used by EID to enable the following features:
|
||||
- Indicate if an item needs to be collected for the collection page
|
||||
|
||||
|
||||
You may need to install "Microsoft .NET 6.0" or greater for this tool to work.
|
||||
|
||||
|
||||
|
||||
The source code of the application can be found here:
|
||||
https://github.com/wofsauge/IsaacSavegameReader
|
||||
|
||||
|
||||
|
||||
SHA-256 Hash:
|
||||
6ecf16b85ad3ddb1001e43bf54c79f03b04c3c4bd6497b1eb0500be498d26c90
|
||||
|
||||
Virus total scan:
|
||||
https://www.virustotal.com/gui/file/6ecf16b85ad3ddb1001e43bf54c79f03b04c3c4bd6497b1eb0500be498d26c90/detection
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user