Space Extension Mod (SpaceX)


Greatly extend the end game requiring multiple launches and massively increased science. Requires 40+ launches, and of a variety of new components. The goal is to build a vessel capable of getting you off the planet and home safely. Updated graphics courtesy of Steinerrr. Russian translation courtesy of Zerggurat.

2 months ago
0.13.7 - 1.1
89.8K

g Doen't interact with latest bob's mods.

6 years ago

What the title says. Doesn't work with the latest iteration of bob's, and just uses vanilla recipes.

6 years ago

As noted on the information tab here, I did this deliberately due to the quantum of change required in bob's mods after version 0.15 came out. Expect the next patch of this mod to reinstate the bob's mods integration.

6 years ago
(updated 6 years ago)

As I can read in the mod description, it's still the case, does not take into account bob's mod.

Is the bob's mod integration near release or not at all ?

Edit : I do not ask for an exact date, just wanting to know if I can expect it in some weeks or some months.

6 years ago

I was also about to ask for it. I am really interested in dumping tons of ressources into Spacecrafts

6 years ago
(updated 6 years ago)

I was playing around in the code a bit changing recipes to the values which were written for bobs mods (like putting every change from recipe-bobs.lua into recipe.lua and deleting the old file). While some of the changes are taken into the game some recipes seem not to be impressed by those changes. They stay the same whatever I do.
I do not have quite a lot experience with modding Factorio. Neemys could you have a look at it?

6 years ago
(updated 6 years ago)

recipe-bobs don't change all recipe, like drydock-structural that stay the same. Some recipe only have part of the ingredient changed too. That how it is done in the file.

If you miss most of the change you may have done something wrong. To apply bobs change, you only need to include bobs recipe after normal recipe. I only added require("prototypes.recipe-bobs") in data.lua after all other require. and I have all changed made in that file. There is also no problem so I may use that if the author doesn't update.

To test if it work you are looking in a new game or an existing ? because in existing game you may need to reload recipe. Before trying to make change apply in existing game, test if change work in new game so you know you have done things right.

6 years ago

I always test such things with a new game. With your change only Assembly Robots apply to the new ingredients, all the other ones stay the same. I also tested this with only bobs mods and space extension mod active. I really can't find the problem there.

6 years ago
(updated 6 years ago)

My bad, you are right it isn't working, for some reason the data-updates files has disappear from the mod folder, with it it don't work so the culprit is in there ;). Indeed, in data-updates.lua (line 69 and later) he is resetting ingredient for some recipe.

6 years ago
(updated 6 years ago)

See my response above before reading this pôst.

I made a "fix" that correct the problem with bob mod.

I basically removed his fix from data updates but fixed his loop that apply the multiplier from config so it will work.
Take the space extension mod from mod portal (with no modification). unzip it et edit data-updates.lua, replace all content from this file with the following :

--require("item-functions")
--require("recipe-functions")
require("prototypes.recipe-bobs")
local researchCost = settings.startup["SpaceX-research"]
if researchCost == nil then
    researchCost.value = 1
end

local SpaceXTechs = {
"space-assembly",
"space-construction",
"space-casings",
"protection-fields",
"fusion-reactor",
"space-thrusters",
"fuel-cells",
"habitation",
"life-support-systems",
"spaceship-command",
"astrometrics",
"ftl-theory-A",
"ftl-theory-B",
"ftl-theory-C",
"ftl-propulsion",
}

for i, tech in pairs(SpaceXTechs) do
    local rootTech = data.raw.technology[tech]
    if rootTech ~= nil then
        rootTech.unit.count = rootTech.unit.count * researchCost.value
    end
end

local productionCost = settings.startup["SpaceX-production"]
if productionCost == nil then
    productionCost.value = 1
end

 local SpaceXRecipes = {
 "drydock-assembly",
 "drydock-structural",
 "fusion-reactor",
 "hull-component",
 "protection-field",
 "space-thruster",
 "fuel-cell",
 "habitation",
 "life-support",
 "command",
 "astrometrics",
 "ftl-drive",
 }

 for j, recipe in pairs(SpaceXRecipes) do
     local rootRecipe = data.raw.recipe[recipe]
     if rootRecipe then
        local tableIngredients = rootRecipe.ingredients

        if(tableIngredients) then
            for k, ingredient in pairs(tableIngredients) do
                if(ingredient.amount) then
                    data.raw.recipe[recipe].ingredients[k].amount = ingredient.amount*productionCost.value
                elseif(ingredient[1] and type(ingredient[1]) == "number") then
                    data.raw.recipe[recipe].ingredients[k][1] = ingredient[1]*productionCost.value
                end
            end
        end
     end
 end

I don't know how it will behave will next version (when the author update) but there shouldn't be any problem.

If you want to edit recipe edit recipe.lua and recipe-bobs.lua accordingly.

6 years ago
(updated 6 years ago)

With lots of searching I also found the problem being data-updates.lua, but I had to study for an exam :) I already thought about rewriting the code to this but since you already did it .. Thank you Master :D

Edit: Line 59 produces an error: attempt to perform arithmetic on field 'amount' (a nil value)

6 years ago
(updated 6 years ago)

Weird, I have no problem. I've added an additionnal check to avoid those problem (I hope). You can take it from the previous post with all code, or I have zipped the edited mod that I use now, you can download it here

If you still have the error either I have made a mistake that I can't find or another mod change something. You can try to debug by seeing all the actual recipe and checking that they do are recipes by adding :

     log("Recipe "..recipe)
     log(serpent.block(rootRecipe))

just after local rootRecipe = data.raw.recipe[recipe]

Then after getting the error, look into factorio log to check the recipes. There should be ingredients and amount for each ingredient. In both case we need to debug further ;)

6 years ago
(updated 6 years ago)

Copied the interesting parts, again with just bobs mods and Spacemod:

0.002 2017-07-17 17:54:42; Factorio 0.15.30 (build 30727, win64, steam)
0.002 Operating system: Windows 10 (version 1607)
[loading all the bobs mods]
2.757 Script data-updates.lua:56: Recipe drydock-assembly
2.757 Script data-updates.lua:57: {
enabled = false,
energy_required = 50,
ingredients = {
{
"assembly-robot",
50
},
{
"low-density-structure",
100
},
{
amount = 200,
name = "solar-panel-large-3",
type = "item"
},
{
amount = 10,
name = "bob-roboport-4",
type = "item"
},
{
amount = 200,
name = "advanced-processing-unit",
type = "item"
}
},
name = "drydock-assembly",
result = "drydock-assembly",
type = "recipe"
}
2.757 Error ModManager.cpp:950: Failed to load mod "SpaceMod": SpaceMod/data-updates.lua:62: attempt to perform arithmetic on field 'amount' (a nil value)
2.759 Loading mod core 0.0.0 (data.lua)
2.785 Checksum for core: 2976805239
3.007 Error ModManager.cpp:950: Error in assignID, recipe-category with name 'crafting' does not exist.

Edit: Will try again with clean install.
Edit2: Clean install also produces an error

6 years ago
(updated 6 years ago)

low density structure and assembly robot don't have an amount, if factorio accept an array type table for ingredient. Weird as mine do have amount. I will update the loop to take care of each possibility.

I simulated the problem you have and my last change make the error disappear.

You can download the last version here or take the updated code in the post above.

6 years ago

Can confirm. Last change fixed the problem. Thanks :)

To whoever reads this: In the post above there is a link with a .rar download which contains a fixed mod version compatible with bobs mods and changes recipes accordingly. It works just as intended.

6 years ago

Thanks guys! Will check this out!

6 years ago

I think I will post it to mod portal soon so it is downloadable from ingame, just need to do some modification to avoid crash if someone download it but don't have bobs mod....

6 years ago

That would be great for the whole playerbase :)

6 years ago

Yeah I should be able to do it by the end of the week.

6 years ago
(updated 6 years ago)

Done ! here

It also include technology change. I only see a new technology added.

Anyone that have taken my code in this thread should revert back to Space Extension mod from mod portal before adding my addon.

6 years ago

So does Neemys mod work for you guys as far as Bobs mods integration goes?

Doing anything with Bobs Mods at the moment is probably on hold for me for now.

6 years ago

So far everything is well integrated except for adding logistic science to all technologies. I had to add it myself. Other than that I see no problem with it

New response