dangOreus

by Mylon

The flOre is lava. Dig yOre way out through this divOrese and dangOreus field! Will you Coke on the limited space and submit to the cOreruption Ore will you transfOrem it into an majestic Orechestra? Also known as "Dangerous" or "Danger Ores".

Scenarios
11 months ago
0.15 - 1.1
9.09K
Environment Mining

g Damage stays

3 years ago
(updated 3 years ago)

Damage is still done to player, even if i mined the ore around my "safezone". but i still take damage on the ground where the Ore HAS been.
is that intended? Would love to save islands covered with ore, i just could visit after i mined em free. but i cant leave the "safezone" cos the damage zone seems not operating with the ore itself. (im mining with [Mining Drones]-Mod maybe thats the issue.

3 years ago

The damage for walking around ore is based on ore in a large area around the player, not specifically standing on ore. This option is intended to limit exploring in multiplayer games because the ore massively bloats the save size. If this isn't a concern, I'd suggest you disable "fl0re is lava".

3 years ago
(updated 3 years ago)

aah ok :) thx for the info :)
nah im playing in solo :D and since "all floor is Ore" is a lil Overpowered i want something challenging here :D
but thx for the info...

as an idea, maybe put an option for the range around ore ;) (im looking into the files, maybe i could do it myself and let u see what i have done (im newb to LUA so dont expect it early :D)

3 years ago
(updated 3 years ago)

ok...tried hard...i could insert an option...but dont get the variable to work for the range :D
maybe u like my idea and bring it with the next update :)

3 years ago

I just found the same thing myself... was desperately needing more oil, radar found a large oil patch further south, so I started digging my way there. I was unpleasantly surprised to discover that even after mining away the ore (after several hours) I couldn't walk any further even on cleared land. I suppose I could use builder robots and radar to continue pushing towards the oil patch with the bots, but that was beyond what I was willing to do at that point and I gave up that game.

I really like the challenge of not being able to walk on ore, especially early on, but bascially imprisoning the player to the starter area for the whole game seems like overkill.

Personally I'd be OK with the mod just doing what the mod setting says: "Floor is lava: Ore can damage the player", no more, no less...

All that being said, thanks for the mod, it really spices up the game!

3 years ago

I'm more tempted to simply delete the option altogether. Again, the primary purpose of it is to keep random players on a public server from exploring 10,000 tiles out only to find out that, yep, there's still ore out there. And now the map takes an extra 2 seconds to save and 1 minute to download for anyone joining.

It's not intended to be a challenge.

3 years ago

i see, but isnt it preventing the players to explore, with damage just on the Ore itself?
But i dont want to gripe ;) its a good mod and i like it :) will play as it is :)

1 year, 10 months ago

Hi, sorry for resurrecting the old thread but I think it's better than creating a duplicate
So far I'm having great fun with this mod, the only wtf moment was this 'area' ore damage thing, I was really surprised when I started taking damage on ore-free terrain.
My suggestions:
1. At least, please make the tooltip for FlOre is lava option reflect that it's damage from ore tiles around you, not only if you directly stand on ore.
Just from current description I immediately assumed that damage is dependent on ore quantity directly under your feet
2. Maybe limit the area for calculating ore around you to 3x3/5x5 tiles? So you theoretically could beeline to that remote oil patch without mining out full map chunks
Still, a great mod! For the first time in my life I have a spaghetti factory with minimal bus. Just got coal liquefaction tech and hope I'll finally get rid of all those crates of coal.

1 year, 8 months ago
(updated 1 year, 8 months ago)

I was trying to figure out how much space I'd need to clear to make a safe path forwards, and looking at the function, I don't think it's coded correctly in the first place. I see a distance variable set to either a stored value or 1, then the stored value set to either distance + 1, or the greater of 1 and distance - 1. Then the stored value is compared against zero, which cannot ever fail unless the stored value started negative and the code took the distance + 1 branch. So in effect, if I'm reading the logic properly, the whole feature reduces to "If you go outside the easy ore radius, you take damage regardless". Was the math.max supposed to be (distance - 1, 0)? Or perhaps the global.flOre[p.name] > 0 needs a higher value to compare against. Or possibly I'm just not understanding the intended logic.

Edit: Looking at the changelog, then version 1.5.20, it seems like max(..., 0) was the old behaviour, patched to fix an exploit when I assume is being able to mine out a 1-tile-wide corridor or similar? So then I can assume that what's missing is a corresponding change to make the later test > 1.

1 year, 8 months ago
(updated 1 year, 8 months ago)

I tried it in single player, and I'm stuck.
It seems that the no damage area just a static circle around my starting point, regardless of the tiles are mined or not.
So I cannot put down miners anymore because of the damage (2/3 of my max health???).

1 year, 8 months ago

I tried it in single player, and I'm stuck.
It seems that the no damage area just a static circle around my starting point, regardless of the tiles are mined or not.
So I cannot put down miners anymore because of the damage (2/3 of my max health???).

Uristqwerty is right: changing the minimum stored distance value from 1 to 0 fixed it:
global.flOre[p.name] = math.max(distance - 1, 0)

1 year, 7 months ago

Though that's effectively reverting the exploit fix that distance drops to 0, then it only checks the exact tile you're standing on (until it detects as ore, and the radius jumps up), and it also has a further issue that the distance won't decay within the safe zone at all, so once you take damage once, it's hard to stop it without a lake or a hell of a lot of mining. What I ended up using in my own saves, after I better understood what the code was trying to do, is

function flOre_is_lava()
if not settings.global["floor is lava"].value then return end
global.flOre = global.flOre or {}
for n, p in pairs(game.connected_players) do
if p.character and not global.disabled[p.surface.name] then --Spectator or admin
if math.abs(p.position.x) > global.EASY_ORE_RADIUS or math.abs(p.position.y) > global.EASY_ORE_RADIUS then
--Check for nearby ore.
local distance = global.flOre[p.name] or 1
local count = p.surface.count_entities_filtered{type="resource", area={{p.position.x-(10distance), p.position.y-(10distance)}, {p.position.x+(10distance), p.position.y+(10distance)}}}
if count > (distance * 20) ^2 * 0.80 and distance < 10 then
global.flOre[p.name] = distance + 1
else
global.flOre[p.name] = math.max(distance - 1, 1)
end
if global.flOre[p.name] > 1 then
local target = p.vehicle or p.character
p.surface.create_entity{name="acid-stream-worm-medium", target=target, source_position=target.position, position=target.position, duration=30}
target.health = target.health - 15 * distance
if target.health == 0 then target.die() end
end
else
global.flOre[p.name] = 1
end
end
end
end

Specifically, changing the damage check to > 1, adding an else to reset it in the safe area, and moving the global initialization out of the loop.

1 year, 7 months ago
(updated 1 year, 7 months ago)

I rewrote the main logic for myself and working like a charm.
It is punishing, but now it feels like a puzzle, just a little slow.

function flOre_is_lava()
if not settings.global["floor is lava"].value then return end
for n, p in pairs(game.connected_players) do
if p.character and not global.disabled[p.surface.name] then --Spectator or admin
if math.abs(p.position.x) > global.STARTING_RADIUS or math.abs(p.position.y) > global.STARTING_RADIUS then
global.flOre = global.flOre or {}
local heat = global.flOre[p.name] or 0
-- Don't touch the ore
local inDanger = 0 < p.surface.count_entities_filtered{type="resource", area={{p.position.x-1, p.position.y-1}, {p.position.x+1, p.position.y+1}}}
if not inDanger then -- Crowded area? (> 66%)
inDanger = 150 < p.surface.count_entities_filtered{type="resource", area={{p.position.x-7, p.position.y-7}, {p.position.x+7, p.position.y+7}}}
end

            if inDanger then
                global.flOre[p.name] = heat + 1
                local target = p.vehicle or p.character
                p.surface.create_entity{name="acid-stream-worm-medium", target=target, source_position=target.position, position=target.position, duration=30}
                target.health = target.health - 15 * heat
                if target.health == 0 then target.die() end
            elseif heat > 0 then
                global.flOre[p.name] = heat - 1
            end
        end
    end
end

end

New response