[Rewrite] Generator Listing Needs Filling Out
As of this writing, I am currently almost done with getting the rewritten backend for generators up to the point where the actual generators for the gamemode can be defined. However, I do not trust myself to make anything interesting or just-complex-enough; I feel that, if I'm to do this alone, I'm going to end up either remaking the exact same thing we have now, which is not engaging at all, or I'm going to go too far towards either end of the complexity spectrum. In this, I am going to need some help getting the generators and resource trees set up under the new code base.
I have only a couple requirements for the Generator population.
Requirements:
- No Power Loops - Breaking the laws of thermodynamics should be avoided in this rewrite. The "Water Meta" has been far too present and far too easy for much too long. For example, splitting water into H2 and O2 and then burning it in a Hydrogen Fuel Cell should not return positive power output.
- Fuel == Power - Free power shouldn't be the meta anymore. The more "costly" the fuel, the more power it should output. While "Free" power, like Solar Panels and Hydrostatic Generators are fine to add for startup needs, they should not be at all useful for actual applications.
-
Avoid Reactor Meta Tiering - Reactor types should mostly have their own applications, with no one reactor being "best". While not set in stone, the below is what I'd like to see for the "placements" of each reactor type:
- Fission: Uranium-fueled reactors should provide moderate power output with excellent fuel efficiency, useful for lower-power applications, like mining platforms and refineries.
- Fusion: Fusion-type reactors (whether we decide to use Hydrogen as usual or go on to use more advanced things like Helium-3) should be a middle-of-the-road reactor, good for most purposes due to the difficulty in startup and fueling.
- Chimeric: Chimera-fueled reactors should be the "NOS" of the gamemode, providing a large power output with heavy fuel consumption. Useful for in-combat situations, where powering a heavy weapons system is required.
- Antimatter: Antimatter is a special case, a very powerful reactor balanced by the difficulty of mining or producing Antimatter. See Mining Rewrite: Antimatter Section for a more comprehensive concept write-up.
Some notes on running this, for whoever picks this up:
- Energy is no longer a "fluid" resource, but rather a value of the resource network that remains fixed for the tick. A solar panel making 2.5kW will allow for 2.5kW of work to be done in the current Network tick, and if more than 2.5kW is being pulled, the Network will bog down and slow. Under a certain point, defined by
DeviceInfo:SetCritPowerPercent()
andDeviceInfo:SetFailPowerPercent()
, the network's devices will begin to shut off. The current behavior is that a device under CritPercent and above FailPercent will rollDeviceInfo:GetCritShutdownChance()
per second to shut down ungracefully, and anything under FailPercent will turn off outright. There is no Priority listing just yet, but that can be implemented at a future point without too much issue. - Menu Categories are handled by the backend, just define the generators'
DeviceInfo:SetCategory()
and the menu category will be created automatically. - A Generator with a scalable Slot Count will multiply all its resources/energy IO by said count.
- Any Generator device is Slottable by default and should stay that way, with few exceptions.
- Define static slot count (non-scaling) by using
DeviceInfo:SetSlotCount()
. - Set
DeviceInfo:SetSlotCount(0)
andDeviceInfo:SetSlotCountScale(false)
to disable slotting entirely. - Use
DeviceInfo:SetSlotCountExponent()
andDeviceInfo:SetSlotCountDivisor()
to adjust how fast the Slot Count will scale up with volume. - Use
DeviceInfo:SetSlotCountScaleFunc()
to change the scaling logic directly (see Solar Panel for instance, as it scales on top-face area instead of volume).
- Define static slot count (non-scaling) by using
- Relevant Files:
- Generator Definition Main File:
[gamemode]/resources/_generator_definitions.lua
- Item Type Definition Main File:
[gamemode]/resources/_item_definitions.lua
- DeviceInfo Metatable Definition:
[gamemode]/resources/deviceinfo.lua
- Generator Definition Main File:
Edited by Steve Green