promotional bannermobile promotional banner

FE electrics

FE is no longer more stable than our own power systems. Voltage, Amperage, and Resistance now have to be in consideration when building your factories

Versions prior to 1.1.0 could corrupt worlds by thrashing NBT in world. Please don't use versions prior to that.

 

FE is a surpisingly stable power system VS the actual grid. No worries about what voltage your machinery takes or if you'll blow something when there's to much amperage being pulled. Well not anymore! now voltage drops over distance, you can overvolt your machines and can break cables by putting through too much amperage. You also have transformers to step up or down your voltages and buck/boost converters for more precision as well as the ability to add voltages together simply by joining cables with combiners.

Fair Warning: while the mod is functional, performance wise, it's quite experimental. Generating new chunks can cause TPS to tank with this mod in my testing. I highly recommend using chunky or a similar pregen mod/method prior to starting with this mod until I fix it. Setting Render/Simulation Distance to 8 also seems to help.

 

By default, nothing is changed machine wise, you'll need to use KubeJS or the config to make the system work as it should. You can also get support for existing mods from my kubeJS scripts via kubeJS Sync (Requires KubeJS as well)

{
  "id": "fe_electrics",
  "github": "Nathan22211/FE-electrics-base",
  "branch": "main",
  "requires": ["fe_electrics"],
  "enabled": true
}

 

I do need gallery images and Customization packs for mod support, if you make one or nab screenshots of your electrical grid, you can use #realFEgrid on Bluesky or X or ping me so I see it more easily. I do ask that screenshots have custom textures on this mod's block's.

KubeJS stuff.

FeElectricsEvents.define(event => {
//mod's cables (model and texture are placeholders)
event.cable('copper')
    .displayName('Copper Cable')
    .color('#B87333')
    .maxAmps(32)//in Amps
    .resistance(0.08)//in Ohms
    .shock(2)//damage per tick for shocking
    .overload('explosion', 1.5)//action for overloading cable
//other mod's cables, mek in example
event.externalCable('mekanism:basic_universal_cable')
    .maxAmps(16)
    .resistance(0.10)
    .shock(2)
    .overload('fire', 4)//can also cause fire
//adds a transformer
event.transformer('step_up_2')
    .displayName('2× Step-Up Transformer')
    .ratio(2)//<1 will step voltages up, >1 will step them down
    .maxPrimaryAmps(64)//max load on transformer
    .overload('explosion', 2)

//adding machine support
event.machine('mekanism:enrichment_chamber').voltage(100, 240)//voltage range
.amps(8)//amps drawn
.overvoltage('explosion', 2)
//adding a generator (fixed voltage and amperage)
event.generator('generatorgalore:culinary_generator').fixed(120, 16) //(volts, amps)
//variable voltage and amperage from FE/tick (V/A ~= base +FE x scale)
event.generator('generatorgalore:culinary_generator').fromFeOutput({
  baseVoltage: 80,
  voltagePerFe: 0.05,   // +0.05 V per FE extracted
  baseAmps: 2,
  ampsPerFe: 0.01,       // +0.01 A per FE
  maxVoltage: 240,
  maxAmps: 32
})
//variable voltage and amperage from stored FE on generator
event.generator('generatorgalore:culinary_generator').fromStored({
  baseVoltage: 60,
  voltageFromStored: 0.001,
  baseAmps: 1,
  ampsFromStored: 0.0001,
  maxVoltage: 240,
  maxAmps: 32
})
//from both
event.generator('generatorgalore:culinary_generator').fromBoth({
  baseVoltage: 80,
  voltagePerFe: 0.05,
  baseAmps: 2,
  ampsPerFe: 0.01,
  voltageFromStored: 0.0005,
  ampsFromStored: 0.00005,
  maxVoltage: 240,
  maxAmps: 32
})
//in all variable instances, maxVoltage or maxAmps set to 0 is uncapped
//BMS system (for batteries)
event.bms('basic_bms')
    .displayName('Basic BMS')
    .maxInputVoltage(120)//max Vin
    .chargeVoltage(60)//voltage to charge cells at
    .maxBatteries(2)//max number of cells
    .maxAmps(16)//max Ain
    .overload('explosion', 2)
//bank output
event.bankOutput('mek_basic')
    .displayName('Basic Bank Output')
    .auto()//sets wether series/parallel setup is done automatically. adding .series() or .parallel() will force one option. 
    .maxBatteries(2)//max cells the output can handle
    .maxAmps(64)//max amps the output can handle
    .overload('explosion', 2)
//battery definition
event.battery('mekanism:ultimate_energy_cube')
    .maxVoltage(260)//max voltage that the battery can handle
    .storedVoltage(240)//voltage stored in cell, also the max output voltage
    .amps(64, 64)// charge/discharge rate
    .chemistry('lithium')//sets if it's hardy (no overvoltage destruction). 'Nickel' for hardy, lithium for fragile.
//combiners (for joining generators together)
event.combiner('mek_ultimate')
    .displayName('Ultimate Combiner')
    .maxAmps(256)//max amperage
    .overload('explosion', 4)
//buck/boost converters
event.buckConverter('mek_basic')
    .displayName('Basic Buck Converter')
    .inputVoltage(100, 140) //min/max input voltage
    .outputVoltage(60) //output voltage
    .maxAmps(16) //max input amps
    .overload('explosion', 2)

    event.boostConverter('mek_basic')
    .displayName('Basic Boost Converter')
    .inputVoltage(15, 50)
    .outputVoltage(120)
    .maxAmps(16)
    .overload('explosion', 2)
})

If you can, leave some feedback on moddex.gg. I do need considerable input on how the mod flows and how the base support values flow (or if I need to embed the KubeJS sync into the jar…) ModDex rating

The FE electrics Team

profile avatar
  • 2
    Followers
  • 20
    Projects
  • 2.2K
    Downloads

More from Nathan22211View all