BETA Factorio and Conquer: Tiberian Dawn deprecated


Beta version of https://mods.factorio.com/mod/Factorio-Tiberium, where we frequently upload unstable work-in-progress to allow testing on multiplayer servers, and easier beta access. If the main mod has a higher version number, then there is no new content currently being tested on this mod and you should use the main mod instead.

Content
2 years ago
0.18 - 1.1
217
Mining

b [Fixed] Crash due to avaivableRecipes not being populated properly

3 years ago

I get repeated crashes when the game attempts to use the local 'recipe', which is nil.
My guess is that the avaivableRecipes table is not being properly populated, which results with your functions not knowing what to do.

3 years ago

What's your modlist?

3 years ago
(updated 3 years ago)

Editing the functiosn to be able to exit if the recipe is a nil fixed the crashes.

Avatars = "0.5.11",
["Big-Monsters"] = "0.18.17",
Bottleneck = "0.11.4",
ConcurrentTrainRestriction = "0.2.8",
CorpseFlare = "0.1.6",
CursorUpgradeCarousel = "1.1.0",
["Deadlock-AAII-bridge"] = "0.2.18",
DeadlockCrating = "1.6.0",
DelayedRegen = "0.18.5",
DiscoScience = "1.0.2",
Dont_lose_in_progress_ingredients = "1.0.2",
EnhancedFlashlight = "0.1.4",
Everbuild = "0.9.2",
FNEI = "0.3.4",
["Factorio-Tiberium-Beta"] = "0.1.4",
["Flow Control"] = "3.0.6",
FluidMustFlow = "1.2.8",
["Hazard-Lights"] = "18.0.6",
["Hazard-Lights-Auto-Lights"] = "18.0.3",
["Hazard-Lights-Selection-Tool"] = "18.0.4",
["Induction Charging"] = "1.6.2",
K2_Turrets = "0.0.2",
LSlib = "2020.7.4",
Mining_Drones = "0.3.23",
ModuleInserter = "5.0.7",
MushroomCloud = "1.0.14",
NextGenEvolution = "1.0.0",
NicerFuelGlow = "1.0.12",
Peppermint_Mining = "2.1.3",
["Portable-Turret"] = "0.2.5",
["QoL-TempStations"] = "0.5.5",
RaiLuaLib = "0.2.8",
RealisticReactorGlow = "1.18.7",
Robot_Battery_Research = "0.2.0",
SchallAlienMutation = "0.18.1",
SchallCombatRobotics = "0.18.0",
SchallEndgameEvolution = "0.18.4",
SchallPrimaryBattery = "0.18.1",
SchallRailwayController = "0.18.1",
SchallRechargingWeapon = "0.18.2",
Shortcuts = "0.7.4",
Tapeline = "1.1.3",
TinyStart = "0.18.5",
Total_Automization = "0.2.4",
TrainSkipFulfilledStation = "0.1.8",
Transport_Drones = "0.7.9",
Unit_Control = "0.2.3",
VehicleSnap = "1.18.3",
WireShortcuts = "0.4.4",
WormAttack = "4.0.1",
["aaa-log-active-mods"] = "0.0.1",
["aai-industry"] = "0.4.14",
["aai-signal-transmission"] = "0.3.11",
["adamo-contraptions"] = "0.1.1",
["adamo-nuclear"] = "0.2.2",
["adamo-physics"] = "0.1.0",
["advanced-combinator"] = "0.18.0",
["alien-biomes"] = "0.5.5",
base = "0.18.36",
["bullet-trails"] = "0.5.1",
["burner-fuel-bonus"] = "0.18.3",
circuitissimo = "0.1.3",
clock = "0.18.2",
["da-calc"] = "0.18.6",
["deadlock-beltboxes-loaders"] = "2.3.5",
["deadlock-stacking-icon-update"] = "0.1.0",
["eve-weaponry"] = "0.7.0",
flib = "0.1.5",
["floating-damage-text"] = "18.0.0",
["gas-boiler"] = "0.0.5",
["gas-generator"] = "0.0.2",
["grappling-gun"] = "0.2.6",
heat_glow = "0.18.1",
helmod = "0.10.25",
informatron = "0.1.8",
jetpack = "0.1.19",
laser_fix = "0.18.12",
laserlines = "0.2.0",
["no-wall-repair"] = "0.0.3",
["production-monitor"] = "0.18.3",
["regenerate-terrain"] = "0.2.1",
["train-pubsub"] = "0.6.20",
uranium_geiger = "0.3.0",
vehicle_physics = "0.18.3",
["vtk-cannon-turret"] = "1.11.0",
zzz_fix_your_shit = "0.18.22"
}

3 years ago
(updated 3 years ago)

I think I know what's the issue is.
In giantSetupFunction, you build the table in this format:
{ ['name'] = true, ['name'] = true, ['name'] = true, ... }

but then you're trying to read the FIELDS in avaivableRecipes for your next in pairs function. The fields are not the names, they're all TRUE.

You're trying to access data.raw.recipe.true, and that doesn't exist, which leads to the crashes I expereinced.

Also, for the in pairs loop for the recipes at line 46, you were storing the recipe's number into the index, not it's name.

3 years ago

It doesn't crash for me, with my modlist, so something in your modlist is causing it.

Thanks for the modlist, I'll pass it along to the guy doing the auto recipe stuff.

3 years ago
(updated 3 years ago)

Thanks for the report, Mernom. Since it seems like you are already comfortable editing and zipping Lua files, can you try this change with your set of mods and let me know if anything shows up in factorio-current.log:
Around line 53 of science.lua replace
if effect.recipe then
availableRecipes[effect.recipe] = true
end

with

if effect.recipe then
if data.raw.recipe[effect.recipe] then
availableRecipes[effect.recipe] = true
else
log(tech.." tried to unlock a recipe for "..effect.recipe.." which does not exist")
end
end

I suspect that is the source of the invalid recipes, but want to confirm.

3 years ago

I've already made a few other changes that got me into the game, mostly making it so that the code has an escape from a nil.

What does that function even do? Does it calculate the overall resource cost of all of the items in the game, so that it can calculate the resource ratios for the tiberium refinment?

3 years ago

It's for calculating science pack costs so we can use them for automatically generating centrifuge recipes with arbitrary combinations of mods (rather than just the vanilla, Angel's, and Bob's like we have now). It obviously still has some work left before we include it in the main mod (but was to the point that we could include it on the beta to catch edge cases).
Your specific crash was related to Klonan's Transport Drones defining its recipes in the data-final-fixes step and since they run after us the recipe didn't exist when we looked for it. I've fixed it on my branch so it will be included in the next beta release.

3 years ago

Did you consider changing the material balance depending on the stage of the game?
the overall material usage is not the same early game as it is late game.
I'm playing with AAI industry, and it's a LOT more iron heavy during the red\green stage, plus it uses more stone for circuits and building foundations. I've found the default distribution not so suitable, since I have copper piling up in my system, blocking everything, even after I reduced it some.

3 years ago
(updated 3 years ago)

Yes, that's going to be included.

If you were to join the discord, you could see what we're doing, and give feedback on it as they are developed.

New response