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
1 year, 1 day ago
0.15 - 1.1
9.18K
Environment Mining

b Floor is lava calculation is bugged, and strange from a design perspective

5 years ago

Hey, this is an awesome mod idea! Found some issues though...

So first of all there's a bug - you don't decrease the damage intensity (called distance for some reason in the code) when a player is standing in the safe zone. The fix is easy.. add an else to the safe zone check:

    elseif global.flOre[p.name] then
        global.flOre[p.name] = global.flOre[p.name] - 1
        if global.flOre[p.name] <= 0 then
            global.flOre[p.name] = nil
        end
    end

And move this line out of the if statement (before it): if not global.flOre then global.flOre = {} end

My second issue is that the damage intensity (=distance) affects how close you can be to resources without taking damage. This seems to be incorrect by design - why do you need to stand further and further away from the ore to decrease the damage intensity? As long as you don't stay in ore it should be fine IMO. i.e. remove it from the count function:

        local count = p.surface.count_entities_filtered{type="resource", area={{p.position.x-10, p.position.y-10}, {p.position.x+10, p.position.y+10}}}

These two issues together makes playing with the fl0re is lava option impossible. I added some debug printing and found that my "distance" was 30, so I couldn't move outside the safe zone at all, and the game froze every time the check was made due to it scanning a 600x600 area for resources. Also, the mod doesn't kill me in singleplayer, but I couldn't find a reason I'm not dead in the code... is this intended behavior? I think it's a good "feature" for singleplayer, but I'm curious since I can't figure out how it works. :)

5 years ago

It's definitely bugged. The previous version could kill the player with the projectile, but the damage was so low that it was trivial to eat fish and heal through it. Setting health manually (for custom damage) requires I do my own if health == 0 then player.die() check

The intended behavior is that if a player is deep in the ore field, they take more damage. But brief trips outside of the base should be possible. There's a few quirks I have to design around, like preventing players from hiding under cliffs. The main goal of this function is to kill players if they wander too far from spawn, as that means they're generating a lot of unnecessary map that bogs down multiplayer play, especially with the high entity count of this scenario.

The specific function I'm working with in multiplayer may be different from the singleplayer one. And indeed the goals are different so I might make a version more tailored to single player play.

5 years ago

huh so the player can have negative health without dying... interesting :D

I just like the idea of the ore being toxic, so that standing on it is dangOreous. I think it complements the inability to build on it well, so for me at least it's an important part of the mod experience, not just something for multiplayer (although I have to admit that it's indeed a great idea to avoid huge maps in MP).

New response