Factorio and Conquer: Tiberian Dawn


Adds Tiberium ore that spreads - Harvest it, refine it, and convert it to power, weapons, and other ores. By Zillo7 (0.15), SAH4001 (0.16), Oktabyte (0.17), JamesFire and randomflyingtaco (0.17 update and 0.18+)

Content
10 months ago
0.17 - 1.1
15.6K
Mining

b [Fixed] Fatal error in Factorio-Tiberium::on_tick

4 years ago

Thanks for an interesting mod! I have a map that reliably kills the Factorio session, and I can't make any further progress on my game. Any idea what the problem is?

Error while running event Factorio-Tiberium::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
Factorio-Tiberium/control.lua:119: in function 'AddOre'
Factorio-Tiberium/control.lua:242: in function 'PlaceOre'
Factorio-Tiberium/control.lua:508: in function <Factorio-Tiberium/control.lua:481>
stack traceback:
[C]: in function 'index'
__Factorio-Tiberium
/control.lua:119: in function 'AddOre'
Factorio-Tiberium/control.lua:242: in function 'PlaceOre'
Factorio-Tiberium/control.lua:508: in function <Factorio-Tiberium/control.lua:481>

4 years ago

That... is an interesting error.

Do either of the following commands fix it? Assuming you can load in long enough to get them in

/tibRebuildNodeAndDrillLists

/tibFixBrokenThings

4 years ago
(updated 4 years ago)

Neither fixed it. I had to patch control.lua to do an entity validity check for each item found in the loop at l.117:

  local entitiesToDamage = surface.find_entities(area)
  for i = 1, #entitiesToDamage, 1 do
    local ent = entitiesToDamage[i]
    if ent.valid 
       and (global.exemptDamageItems[ent.type] == nil)
       and (ent.prototype.max_health > 0) then
       ent.damage(global.structureDamage, game.forces.neutral, "tiberium")
    end
  end

I have some weird stuff going on in my game (e.g. power poles get damaged even though they're supposed to be immune).

4 years ago

Huh, okay. I'll need to include that, and let the growth coder know. Maybe I should be rebuilding the list or something every so often...

Power poles should have been fixed... which ones? All? Just medium?

4 years ago

I find both small and medium power poles being damaged. Belts are being correctly protected.

4 years ago

Poles being damaged should be fixed, again.

The main discussion error fix is also implemented.

New response