The Ruins Mod 2.0


This mod is based on 1.1.6 (abondoned mod?) and contains many fixes for Factorio 2.0. The Ruins Mod adds randomly spawns ruins in the world. These ruins are destroyed fragments of bases, forts, small oases, and more. Explore them for loot, adventure, or entertainment, but beware, some still have running defenses from the last player that landed on the planet, with more successful colonies having better defenses.

Content
8 days ago
2.0
2.00K
Environment

b Enemy not recognized.

a month ago

I tried out your Ruins port after using Keysivi's version for a while, and something I noticed quite quickly is that turrets, land mines and player character doesn't recognize enemies as enemies anymore. I saw them walking across my landmines, and inside the range of my turrets, and made a hole in my wall, ran over to the miners, and just started walking around there while ignoring me, the miners and my bots. And when I tried shooting them holding only spacebar, it didn't work. I needed to also hold the button to forcefully shoot. They still ignored me as I killed them. I then disabled the mod and loaded the save from before I installed it, and everything appeared to be working correctly again, so it is safe to say something in the mod messes up relations between forces.

a month ago

Hmm, here my personal laser defense is attacking enemy turrets once they come in range. The LUA code this (I have not changed it):

  local force = extra_options.force or "neutral"
  if force == "enemy" then
    force = util.get_enemy_force()
  end

In function spawn_entity(). I have to go sleep now, I have to take more time to investigate this.

a month ago

I do have the setting to make turrets passive. Maybe that can be what makes my force not recognize biters as enemies anymore?

a month ago

I have no idea here, sorry.

30 days ago

In last two functions of utilities.lua code was incorrectly updated to 2.0:
global.enemy_force to game.forces.enemy
As a result the mod is using biters force every time it means to use AbandonedRuins:enemy force.
Instead it should be storage.enemy_force
There are 4 instances of game.forces.enemy in the place stated above.

30 days ago
local function setup_enemy_force()
  local enemy_force = game.forces["AbandonedRuins:enemy"] or game.create_force("AbandonedRuins:enemy")

  util.set_enemy_force_diplomacy(enemy_force, false)

  storage.enemy_force = enemy_force
  return enemy_force
end

util.get_enemy_force = function()
  if (storage.enemy_force and storage.enemy_force.valid) then
    return storage.enemy_force
  end
  return setup_enemy_force()
end
30 days ago
(updated 30 days ago)

In last two functions of utilities.lua code was incorrectly updated to 2.0:
global.enemy_force to game.forces.enemy
As a result the mod is using biters force every time it means to use AbandonedRuins:enemy force.
Instead it should be storage.enemy_force
There are 4 instances of game.forces.enemy in the place stated above.

Ah, that's making totally sense. Thank you for your help. I will note that down again.

30 days ago
(updated 30 days ago)

Your change will be included in 1.2.0. Closing topic now. 1.1.23 was never released.

This thread has been locked.