Hello,
We've played Space Age for a while now and it gets pretty obvious that Promethium science has a very limited use case and then once the lab infrastructure can't research anymore Research Production Science it is then useless and all the supporting infrastructure such as eggs/quantum chips and ships are now completely useless.
Could it be possible that Promethium science could be modded to act as a wild card science and takes the place of any missing science pack in a research instance?
Say for example I'm missing red/green/grey science because it isn't being produced enough but there is promethium available could it then slot into there until those sciences becomes more numerable?
This way it doesn't make the supporting infrastructure redundant.
I don't have the know how to make this mod but this is just an idea I'd love to see happen either by a mod or by the devs.
Promethium Science Wild Card Mod
-
andyseemight
- Burner Inserter

- Posts: 17
- Joined: Thu Feb 06, 2025 9:54 am
- Contact:
Re: Promethium Science Wild Card Mod
Doing this as elegantly as you want (having the lab read promethium science as any science pack) would require more scripting knowledge than I (and presumably you) lack.
However, a less elegant solution would be to have crafting promethium science also unlock recipes to craft promethium science itself into any other science pack. You would need one recipe per science pack. You could make this mod quite easily yourself.
Here is how you would start:
First, create a new folder inside the mods folder. Name it something you will remember.
Create two new files inside this folder: data.lua and info.json.
Inside info.json, you will need to include the following data:
None of these values are optional.
"name" is the internal name for the mod. "title" is how the mod's name appears in-game. I recommend keeping them identical. It saves confusion.
"description" appears in the mod selection screen. It can be whatever you want.
"version" must follow the format of three numerals with dots in between them. This is not the version of factorio, it is the version of your mod. It is mostly there to support mods that update over time. I have supplied a value for you.
"author" appears in the mod selection screen. I recommend using your factorio username, but you can put whatever you like.
The "factorio_version" and "dependencies" determine what your mod is compatible with, and what you need to have installed for it to work. I have provided the necessary values for a mod that uses Space Age expansion items.
Inside data.lua, you will have your actual mod:
This is lua, a pretty easy scripting language to learn.
Lines beginning with two hyphens -- are comments, meaning they do nothing and are only there as notes to anyone reading the file.
Spaces, tabs, and newlines are not semantic in lua, in most cases. This means you can write like this:
{type="recipe",name="space-from-promethium"}
The only time spaces are semantic is inside "quoted sections". That means these two examples are different:
{type="recipe", name="space-from-promethium"}
{type="recipe", name="space from promethium"}
You may want to look at the recipe prototype and technology prototype to understand how these paramaters work.
The "promethium-cycling" technology would need to have the {type = "unlock-recipe"} portion duplicated from start to end and changed to name each recipe you add.
The "recipe" prototype would need to be duplicated for each recipe. You would only need to change two things: The name of the result (for each science pack), and the sprite location.
The leading and trailing underscores pointing to your mod folder are important.
The mod folder name must be exactly what your mod folder is named, not what you name the mod in info.json. This is because you are pointing at the file's actual location. This means that if you mod folder is named "your-mod" you write it as "__your-mod__" but if it is named "your_mod" you write it as "__your_mod__", and so on.
If you do not want to create custom sprites for each science, you can overlay the existing game sprites like so:
You can find the game folder in C:\Program Files\Factorio. This folder contains everything you need:
A symlink to the /mods/ folder, where you would need to put your mod.
The /base/ folder, containing all the prototypes you'd want to look at, and all the graphics you'd want to use.
The /space-age/ folder, containing everything added in Space Age (like promethium science).
In /base/prototypes, look at recipes.lua and technology.lua to get an idea for how things work.
You can find the internal names for most things on the wiki. For example, military science. Look for "internal name" in the sidebar.
Finally, you will need to include a localisation file so your recipe and technology names don't appear as unknown-key.
Create a new folder inside your mods folder named "locale", then a folder inside that named "en", then a file inside that named "en.cfg".
Inside en.cfg, include the following data:
The formatting here is:
internal-name=Text that appears in the game
You will need to refer to the internal name you gave the recipes and technology in the mod. It must be exactly the same.
However, a less elegant solution would be to have crafting promethium science also unlock recipes to craft promethium science itself into any other science pack. You would need one recipe per science pack. You could make this mod quite easily yourself.
Here is how you would start:
First, create a new folder inside the mods folder. Name it something you will remember.
Create two new files inside this folder: data.lua and info.json.
Inside info.json, you will need to include the following data:
Code: Select all
{
"name": "YOUR-MOD-NAME",
"version": "0.1.0",
"title": "YOUR MOD NAME",
"author": "YOUR-USERNAME",
"factorio_version": "2.0",
"dependencies" : [ "base >= 2.0.0", "space-age"],
"description": "Allows crafting promethium science into other sciences."
}
"name" is the internal name for the mod. "title" is how the mod's name appears in-game. I recommend keeping them identical. It saves confusion.
"description" appears in the mod selection screen. It can be whatever you want.
"version" must follow the format of three numerals with dots in between them. This is not the version of factorio, it is the version of your mod. It is mostly there to support mods that update over time. I have supplied a value for you.
"author" appears in the mod selection screen. I recommend using your factorio username, but you can put whatever you like.
The "factorio_version" and "dependencies" determine what your mod is compatible with, and what you need to have installed for it to work. I have provided the necessary values for a mod that uses Space Age expansion items.
Inside data.lua, you will have your actual mod:
Code: Select all
data:extend ({
{
type = "technology",
name = "promethium-cycling",
icon = "__YOUR_MOD_NAME__/YOUR-SPRITE.png",
icon_size = 256,
effects = {
{type = "unlock-recipe", recipe = "space-from-promethium"},
},
prerequisites = {"promethium-science"},
research_trigger = {
type = "craft-item",
item = "promethium-science"}
},
-- recipe starts here
{
type = "recipe",
name = "space-from-promethium",
icons = {{icon = "__YOUR_MOD_FOLDER__/YOUR-SPRITE.png"}},
category = "crafting",
enabled = false,
energy_required = 10,
ingredients = {
{type = "item", name = "promethium-science-pack", amount = 1}
},
results ={
{type = "item", name = "space-science-pack", amount = 1}
},
},
-- recipe ends here
})
Lines beginning with two hyphens -- are comments, meaning they do nothing and are only there as notes to anyone reading the file.
Spaces, tabs, and newlines are not semantic in lua, in most cases. This means you can write like this:
{type="recipe",name="space-from-promethium"}
The only time spaces are semantic is inside "quoted sections". That means these two examples are different:
{type="recipe", name="space-from-promethium"}
{type="recipe", name="space from promethium"}
You may want to look at the recipe prototype and technology prototype to understand how these paramaters work.
The "promethium-cycling" technology would need to have the {type = "unlock-recipe"} portion duplicated from start to end and changed to name each recipe you add.
The "recipe" prototype would need to be duplicated for each recipe. You would only need to change two things: The name of the result (for each science pack), and the sprite location.
The leading and trailing underscores pointing to your mod folder are important.
The mod folder name must be exactly what your mod folder is named, not what you name the mod in info.json. This is because you are pointing at the file's actual location. This means that if you mod folder is named "your-mod" you write it as "__your-mod__" but if it is named "your_mod" you write it as "__your_mod__", and so on.
If you do not want to create custom sprites for each science, you can overlay the existing game sprites like so:
Code: Select all
icons = {
{icon = "__base__/graphics/icons/space-science-pack.png"},
{icon = "__space-age__/graphics/icons/promethium-science-pack.png, scale = 0.4"}
},
A symlink to the /mods/ folder, where you would need to put your mod.
The /base/ folder, containing all the prototypes you'd want to look at, and all the graphics you'd want to use.
The /space-age/ folder, containing everything added in Space Age (like promethium science).
In /base/prototypes, look at recipes.lua and technology.lua to get an idea for how things work.
You can find the internal names for most things on the wiki. For example, military science. Look for "internal name" in the sidebar.
Finally, you will need to include a localisation file so your recipe and technology names don't appear as unknown-key.
Create a new folder inside your mods folder named "locale", then a folder inside that named "en", then a file inside that named "en.cfg".
Inside en.cfg, include the following data:
Code: Select all
[recipe-name]
space-from-promethium=Space from promethium
[technology-name]
promethium-cycling=Promethium cycling
internal-name=Text that appears in the game
You will need to refer to the internal name you gave the recipes and technology in the mod. It must be exactly the same.
