Space Engineers

Space Engineers

28 ratings
FunLightning
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
File Size
Posted
Updated
6.265 MB
5 Oct, 2023 @ 9:19pm
2 Dec, 2023 @ 10:37pm
20 Change Notes ( view )

Subscribe to download
FunLightning

In 1 collection by BDCarrillo
BD's Toolbox
19 items
Description
Fun Lightning!

Ever wished that lightning would shut off blocks on a grid? Or maybe depower a grid completely? How about decreasing (or increasing) the damage and radius? Maybe you want a bunch of damage on grids, but for players to be unharmed?

Well now you can make lightning fun too!

Compatible with the Defense Shields and Nebula mods.

Config Location:

AppData\Roaming\SpaceEngineers\Saves\Player ID Number\SaveGame name\Storage\3046477519.sbm_FunLightning\Lightning.cfg

Config Options:

Note that shutting off grid power grabs active power producing blocks and shuts them off. If KillGridPower = true, those power producers will fall under the grid depower time and restore grid power options, _NOT_ the regular block options.

DamageMultiplier - Multiplier for damage (note the admin "Create Lightning" does zero damage!). This multiplies the Damage value from your WeatherEffects.sbc. Most lightning has a value of "1" so a multiplier of 200 would destroy 2 steel plates. Set to zero to eliminate grid damage
RadiusMultiplier - Applies to area to damage/depower blocks, look for grids, and check for characters. Default radius is 1m, unless modified by a custom WeatherEffects.sbc
CharacterDamage - Flat value of amount of damage to apply to characters caught in lightning (survival only!). Set to zero to eliminate character damage

KillGridPower - Turns off grid (similar to pressing Y)
GridDepowerTimeSeconds - Time in ticks to forcibly keep grid turned off. 0 disables this option
RestoreGridPower - Turn grid back on after depower time elapses

TurnOffBlocks - Turn off blocks based on options below
CheckBlocksInRadius - Only checks blocks inside the radius. If false checks all functional blocks on grid
BlockDepowerTimeSeconds - Time in ticks to forcibly keep blocks depowered. 0 disables this option
BlockTurnOffChance - Chance to turn off block, 0-1 as a percent
RestoreBlockPower - Turn blocks back on after depower time elapses
DecoysBlockEffects - If true, lightning that hits a decoy or antenna will not depower the grid or blocks, and only the decoy or antenna will be damaged

Defense Shields specific options-
ShieldsBlockDamage - Determines if shields block damage (if block is inside the shield)
ShieldsStopBlockDepower - Determines if shields stop blocks from being depowered (if block is inside the shield)
ShieldsStopGridDepower - Determines if a whole grid is protected from being depowered if a shield is present and online. Note that power producers outside the shield could still be depowered, depending on the option above

Discord: Other Projects -> bd-stuff at https://discord.gg/tXtpNwX8bf
14 Comments
BDCarrillo  [author] 19 Jan @ 8:44am 
The frequency of lightning is driven by the WeatherEffects SBC and would need to be changed in a mini mod specific to your desires. Since it varies a lot by weather type, and custom planets may have their own uniquely named storms, it's not something I'd want to try and globally overwrite with new values.
Mase 18 Jan @ 10:45am 
Any way of turning the frequency of lightning strikes down?
BDCarrillo  [author] 4 Dec, 2023 @ 8:21pm 
Yeah there's two storage spots, one in the SpaceEngineers folder (AKA "Local" storage) and one per world. This mod writes to the world location. Location link updated for clarity
What Trigger 4 Dec, 2023 @ 7:54pm 
Ok, Finally worked it out.
Just a note for those who also have trouble with this mod and maybe others where you need to go to the storage folder??

I got lost trying to find the config file in
AppData/Roaming/SpaceEngineers/Storage

the correct location is (for me anyway)
AppData/Raoming/SpaceEngineers/Saves/ ((maybe random numbered folder)) / folder that contains your saved game/Storage/3046477519.sbm_FunLightning\Lightning.cfg

Loving the mod with no damage but still inflicted hindrance of strikes
Great work
BDCarrillo  [author] 18 Nov, 2023 @ 1:14pm 
Ty hotdogbun!

What trigger- fire up a game with the mod loaded and the config will be written to that folder, not upon subbing
What Trigger 18 Nov, 2023 @ 11:09am 
Ok interestingly and confusingly, regarding my question on that lightning.cfg file.
Even after unsubbing then resubbing.
Im only getting the folder 3046477519 in the workshop/content area which obviously doesnt have the cfg file

Said sbm folder in the SpaceEngineers/storage area isnt showing up
hotdogbun64 18 Nov, 2023 @ 10:46am 
(I went with just having lightning de-power grids, has given me many hours of joy fail-safing my mining drones!)
hotdogbun64 18 Nov, 2023 @ 10:45am 
Thank you for making this. Keen is foolish for not having this be natural behavior, the environmental hazard feels so much more immersive now!
BDCarrillo  [author] 15 Nov, 2023 @ 8:48am 
No... make changes to the config file located in \Storage\3046477519.sbm_FunLightning\Lightning.cfg

The RadiusMultiplier default (from Keen) is 1m unless you're using a custom WeatherEffects.sbc. The sample config for FunLightning dials it up to 10m, and checks for grids AND blocks within that 10m to de-power
What Trigger 13 Nov, 2023 @ 8:12pm 
So im guessing we make the changes in the "Settings.cs" file in the scripts folder?
Where you say the Radius multiplier has a default of 1m, the settings.cs near the top has it set as 10.
Is the new default 10m or does the setting work on a multiplier of 10 to get the 1m?
with the radius multiplier Im guessing if any part of the grid is within the lightning strike it shuts of the grid?
Thanks

Also I'm in similar mindset of Jhitereptar, I dont like the outright damage but this is perfect for a punishment with the power down.