Tesla Revamp - #437
Open
rebaserHEAD wants to merge 14 commits into
Open
Conversation
The ball bleeds 10 energy/s, pinned to the Level-1 PA feed rate (3 emitters * 20 energy / 6s wave), so Level 1 is exactly break-even: alive, no motes. Standby/Level 0 starves it into collapse, Level 2+ nets positive. Despawn floor deepened to -600 (~60s starvation grace) because feed lands in 6-second lumps and the stock -100 floor would kill the ball after barely two missed waves. Decay defaults to 0 on the component so other users are unaffected; the tesla prototype opts in.
With decay in place the threshold mechanism already scales mote output with net feed: spawn rate = net feed / needEnergyToSpawn, and motes live 120s. Threshold 120 lands the ladder at Level 1 = 0 motes, Level 2 = 5, Level 3 = 20 sustained.
New LightningStrikeAttemptEvent raised on each candidate before a volley is sorted and rolled, letting targets adjust their effective priority and hit chance from live state. Targets with no subscriber keep their static values. Tesla coils subscribe: an empty coil is a guaranteed catch with a priority bump above every charged coil, and chance scales down with charge to a 0.05 floor when full, so overflow falls through to the grounding rods. At half charge the effective chance is ~0.52, close to the old static 0.5.
New TeslaCoilVisuals.Charged appearance key driven off ChargeChangedEvent: while the battery cannot bank a full strike the coil shows the existing arc sprite on its own layer, so the 4-second strike flash cannot clobber it. Clears on its own as the coil pushes charge into the grid.
A strike now banks maxCharge/6 (500k into a 3M bank) instead of 2M into a 1M bank, so the charge-headroom routing has a real gradient and the saturation indicator means something. Coil supply cap is unchanged at 1MW. Strike damage drops 1 -> 0.05: ~4500 strikes to destruction, about 7 hours per coil at a moderate PA level under the mote-heavy strike economy. Service intervals stretch by welding or adding coils.
Mobs have been on the strike table (priority 1) since the Mono port but took zero damage: the strike applies Structural, which no-ops on Biological damage containers. LightningTarget gains an opt-in electrocution path (15 shock, 5s, insulated gloves apply) enabled on the mob base, so bolts that overflow the coils and rods now zap whoever they land on. Mob lightningResistance stays 1, so a bolt can arc once more onward from the victim. Note this applies to every ShootRandomLightnings source, including the electrical anomaly, not just the tesla.
Simulating the ball wander in a 3-wide cage showed the far side PA lane misses about a third of waves, so effective Level-1 feed is ~7.3/s, not the ideal 10/s. Decay 10 starved the Level-1 ball dead; 7 idles it as designed. Mote threshold 120 -> 80 lands the target ladder at the effective feed: ~6 motes at Level 2, ~22 at Level 3, 1.8 MW sustained harvest at a hacked Level-3 PA with a 12-coil ring.
Strike energy back to the upstream 2M but into a 12M bank, keeping the 6-strike routing gradient. Catch dynamics depend only on the strike-to-bank ratio, so saturation behavior and durability are unchanged; output scales linearly. Simulated: ~2.6 MW at stock Level 2, ~7.2 MW at a hacked Level 3 with a 12-coil ring.
…ghput maxCharge drops to equal chargeFromLightning (2M) and supply throttles to 300 kW, so a struck tower saturates, its strike bid floors, and the routing round-robins bolts across the array while each bank trickles out smoothly. Tower count becomes the harvest knob: simulated at a hacked Level-3 PA, 12 towers ~3.5 MW, 24 ~6 MW, ~7 MW asymptote; stock Level 2 with 12 towers ~2.5 MW. Bigger arrays also spread strike damage: first coil death ~4.7h at 12 towers, ~11h at 32.
Supply throttle 300 -> 500 kW moves the throughput knee to a 24-tower array (simulated ~5.3 MW at 12 towers, ~7 MW peak at 24; more towers add no output, only spread wear). Strike damage 0.05 -> 0.15 lands the first tower death at ~2h on the max array, ~3.4h at stock Level 2 with 12 towers. Welding rotation or extra towers stretch it.
The Edison bulk crate holds a dozen flatpacks (was six) and gains a cargo console listing, since Frontier abstracted the upstream single-coil product and nothing sold coils at all. Edison map stock trims to exactly one bulk crate: a 12-tower starter array out of the box, with expansion bought through the console.
Documents feeding and starvation (including starving out a tesloose), mote generation scaling with accelerator power, capacitor coils with the arcing charge indicator, potential-difference strike preference, wear and welding, and real crew electrocution. Deliberately does not mention the accelerator limiter.
Containment failure means the ball has left the particle stream, so it is cut off from feed the moment it escapes. Drop the shut-down-the- PA advice and document the real behavior: it collapses on its own within a few minutes, and decelerators just speed that up.
Decelerators are unobtainable on this fork: Frontier abstracted the cargo product and commented the gun out of research and the lathe pack. Waiting out the starving ball is the actual tesloose response.
DDrakov
approved these changes
Jul 31, 2026
Comment on lines
+4
to
+12
| - type: cargoProduct | ||
| id: EngineTeslaCoilBulk | ||
| icon: | ||
| sprite: Structures/Power/Generation/Tesla/coil.rsi | ||
| state: coil | ||
| product: CrateEngineeringTeslaCoilBulk | ||
| cost: 10000 | ||
| category: cargoproduct-category-name-engineering | ||
| group: market |
Collaborator
There was a problem hiding this comment.
Honestly would prefer it to be researchable and craftable rather than buyable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About the PR
It's time for the Tesla to be good instead of bad.
The ball now has a real energy budget, coils are single-strike capacitors that lightning routes between by charge, and the whole engine scales with how hard you feed it and how many towers you build.
Why / Balance
The tesla was flat: the ball was immortal once spawned, coils filled on one strike into an undersized bank, the strike table ignored charge state, and durability was tuned for rounds a fraction of our length. There was no reason to push the PA and no reason to buy coils.
Every number in this PR is backed by a Monte Carlo sim of the strike economy (bolt cadences, routing rolls, drain cycles, ball wander vs the PA lanes). The resulting ladder: the ball starves without a running PA (this also makes a tesloose self-resolving in a few minutes, which matters on a server with no obtainable particle decelerators), idles at low power, and sheds miniature ball lightning as feed rises. Coils fill from a single strike, arc visibly while charged, trickle out at 500 kW, and lightning prefers whichever coil has the most headroom, so strikes round-robin the array. Output grows with tower count to a peak at 24 towers (~7 MW fully driven); towers past that only spread wear. First tower death lands ~2h on a max array, so a hard-driven engine needs a weld rotation or spare coils. Bolts that overflow the coils and rods now genuinely electrocute crew (insuls apply, and the arc can chain onward once).
New upstreamable hook:
LightningStrikeAttemptEvent, raised per candidate before a volley is sorted and rolled so targets can bid from live state. Targets without a subscriber behave exactly as before.Also: the Edison bulk crate holds 12 flatpacks and gains a cargo listing (Frontier had abstracted the only coil product, so nothing sold coils at all), Edison map stock trims to one bulk crate, and the Tesla Engine guidebook is rewritten for the new mechanics.
Media
Requirements
How to test
Build a standard tesla setup (3x3 field cage, coil ring, rods) and run the PA through its power levels. At standby the ball collapses in about a minute; at Level 1 it idles; higher levels shed motes and output climbs. Strike a coil and watch it arc until drained; let the SMES bank fill and the whole array should sit arcing with bolts spilling to the rods. Stand next to it without insuls at your own risk.
I have not verified the arc indicator visuals in-game yet, that's the one piece the sim can't cover.
Breaking changes
None. New DataFields are all additive with inert defaults (
PassiveEnergyDecay,ElectrocuteOnStrike, coil bid fields);TeslaCoilVisualsgains aChargedmember. Note the electrocution path fires for everyShootRandomLightningssource, including the electrical anomaly.Changelog
🆑