From 4f4358fd8a7c6ef87438e92ec6adf3fd337af51a Mon Sep 17 00:00:00 2001 From: Osiris32-and-a-half <64905829+osiris32-and-a-half@users.noreply.github.com> Date: Sun, 9 Nov 2025 00:58:43 +0000 Subject: [PATCH 1/3] Ignore invalid items An invalid item is hidden, spawnable, only in cursor or parameter --- archipelago-extractor/control.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/archipelago-extractor/control.lua b/archipelago-extractor/control.lua index a701957..c8f66a7 100644 --- a/archipelago-extractor/control.lua +++ b/archipelago-extractor/control.lua @@ -128,7 +128,19 @@ end function dumpItemInfo() data_collection = {} for _, item in pairs(prototypes.item) do - data_collection[item.name] = item.stack_size + invalid = false + if item.hidden then + invalid = true + end + if item.flags and (item.flags["spawnable"] or item.flags["only-in-cursor"]) then + invalid = true + end + if item.parameter then + invalid = true + end + if not invalid then + data_collection[item.name] = item.stack_size + end end helpers.write_file("items.json", helpers.table_to_json(data_collection), false) From 4adbcc5f5ef35a324a40eff8dbb5cf331de8336f Mon Sep 17 00:00:00 2001 From: Osiris32-and-a-half <64905829+osiris32-and-a-half@users.noreply.github.com> Date: Sun, 9 Nov 2025 00:59:34 +0000 Subject: [PATCH 2/3] Fully capture recipes with probability and output variance --- archipelago-extractor/control.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/archipelago-extractor/control.lua b/archipelago-extractor/control.lua index c8f66a7..735b9bb 100644 --- a/archipelago-extractor/control.lua +++ b/archipelago-extractor/control.lua @@ -44,7 +44,19 @@ function dumpRecipeInfo(force) recipe_data["ingredients"][ingredient.name] = ingredient.amount end for _, product in pairs(recipe.products) do - recipe_data["products"][product.name] = product.amount + if product.amount then + if product.probability then + recipe_data["products"][product.name] = product.probability * product.amount + else + recipe_data["products"][product.name] = product.amount + end + else + if product.probability then + recipe_data["products"][product.name] = product.probability * (product.amount_min + product.amount_max) / 2 + else + recipe_data["products"][product.name] = (product.amount_min + product.amount_max) / 2 + end + end end data_collection[recipe_name] = recipe_data end From 9e50891fe837bef96fe4fc96f8f0ef69901e4706 Mon Sep 17 00:00:00 2001 From: Osiris32-and-a-half <64905829+osiris32-and-a-half@users.noreply.github.com> Date: Sun, 9 Nov 2025 00:59:51 +0000 Subject: [PATCH 3/3] Ignore parameter recipes --- archipelago-extractor/control.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archipelago-extractor/control.lua b/archipelago-extractor/control.lua index 735b9bb..f4d32cf 100644 --- a/archipelago-extractor/control.lua +++ b/archipelago-extractor/control.lua @@ -34,7 +34,7 @@ end function dumpRecipeInfo(force) data_collection = {} for recipe_name, recipe in pairs(force.recipes) do - if recipe.enabled then + if recipe.enabled and not recipe.prototype.parameter then local recipe_data = {} recipe_data["ingredients"] = {} recipe_data["products"] = {}