Nullius


In this Factorio prequel, you're an android terraforming planets and seeding them with life. Replaces all recipes and technology. No life means no coal, oil, wood, biters, or free oxygen, requiring varied renewable energy sources. For reliability, you'll focus on abundant elements from the air, sea, or common minerals such as iron ore, bauxite, sandstone, and calcite. Advanced technology enables asteroid mining of rarer elements.

Overhaul
9 months ago
1.1
33.6K
Environment Mining Fluids Manufacturing Power

g Taking Pull Requests on GitHub?

2 years ago
(updated 2 years ago)

A friend and I are playing Nullius with a few adjustments. Two of those require minor changes to the original Nullius files, as they can't be done outside on our adjustment mod.

The simpler of these changes comes from wanting to space out the wind turbines more, while maintaining the same energy per area ratio.
The changes we made for this are:

wind.lua:

local base_wind_power = {1500000*25/60, 4000000*25/60, 12000000*25/60} 

turbine.lua:

local power_value = {25*1500, 25*4000, 25*12000} 

This and the other change forces us to create our own adjusted version of Nullius for each release, which is kinda tedious.

Would you be willing to take pull requests on GitHub?
If so, I'd create a pull request that adds a setting that would default to 1, that we could set to the 25 we injected here.
I'd hide or show the settings, whatever you would prefer, we could still make it visible or even override it in our own adjustment mod, so to anyone else Nullius would appear completely unchanged.
Another option could be, if you want it in Nullius, to add everything to the pull request that is required to reach the spacing out of wind turbines as well.

The code in our own mod that goes along with what was added here is:

local turbineCollisionBoxNames = { 'nullius-wind-collision', 'nullius-wind-collision-horizontal', 'nullius-wind-collision-vertical' }
for i, turbineCollisionBoxName in ipairs(turbineCollisionBoxNames) do
    local turbineCollisionBox = data.raw["simple-entity-with-force"][turbineCollisionBoxName]
    for x = 1, 2 do
        for y = 1, 2 do
            turbineCollisionBox.collision_box[x][y] = turbineCollisionBox.collision_box[x][y] * 9
        end
    end
end

For anyone who's curious, the numbers come from wind turbines being spread apart 5 times as much. (5x5=25 for the energy, 2x5-1=9 for the size increase of the collision boxes.)

If you are willing to accept such a pull request, please let me know, also let me know whether you want Nullius to appear unchanged or the full feature as a setting or anything in between and I'll create it the way that causes the least possible effort for you.

Cheers

2 years ago

I would prefer it as a hidden setting for the wind multiplier for now. The rest of the game isn't equally configurable, and I'm not ready to set that as the precedent by exposing the option.

The collision box part can stay in your mod since that's on the prototype side and easier to mod. You probably don't need to change "nullius-wind-collision", which is a legacy entity from a previous implementation that didn't have the horizontal and vertical versions.

Ping me when the request is ready, since I don't check that daily.

2 years ago

Thanks for your reply and sorry for the delay. Work and the current situation have kept me busy.
The changes have been made and tested and the pull request has been created. For your convenience:
https://github.com/GregorSamsanite/nullius/pull/3

Thanks for the hint about the legacy entity and especially for considering accepting the change!

2 years ago
(updated 2 years ago)

With the changed collision boxes, have you ever tried upgrading from a wind turbine 1 to tier 2? I suspect that with your change you would have to tear down the original and then build another in the same spot, rather than being able to upgrade. Not as huge of a deal since your change makes it so you don't have very many of them. The concept of the horizontal and vertical boxes is that they interlock to form a pattern that blocks building another wind turbine anywhere EXCEPT right on top of the current one, allowing you to upgrade. You can turn on outlines of collision boxes in debug view, which will make it clearer how this works. The way you have it now will basically work but is a little inelegant. Maybe that's sufficient for your needs. But if you ever want to fix the upgrade issue you'd need to change the script side to multiply the offsets where it places the collision boxes relative to the center of the original turbine. This would be another hidden setting if you want to do that. If you don't need the upgrade behavior, that's fine too.

This is written up a bit in Alt-F4 #55: https://alt-f4.blog/ALTF4-55/

I'll probably look at the pull request next weekend. I don't have much lined up for the next Nullius update yet, but I'll make sure to merge your request before I publish another update.

2 years ago

Awesome, thanks for the detailed information, I will look into that.
So far I haven't realized any issues with upgrading, the only issue we've had so far is that the turbines are in the edge of our city block blueprints, so we have to SHIFT-Click when placing those.

New response