NEBULOUS: Fleet Command

NEBULOUS: Fleet Command

74 ratings
M1 Shields
3
5
3
2
2
   
Award
Favorite
Favorited
Unfavorite
Mods: Mod, Component
File Size
Posted
Updated
1.970 MB
2 Jun, 2022 @ 4:19am
16 Jan, 2024 @ 4:58am
12 Change Notes ( view )

Subscribe to download
M1 Shields

Description
Updated for the OSP Faction Update! Please report bugs to @M1 Abrams on the Discord

===================================
This mod comes with the M1 Shield Generator component to demo some of the features. Simply subscribe to this workshop page and you can use it right away in game! Meant for capital ships, it uses 4000 kW that can't be turned off, takes up a C4 mount, and can absorb 7200 damage with a 10 minute recharge time. (Damage is a combination of armor pen and component damage.) Plasma cannons from OSP deal 5x damage. Modeled by @Eomdor
===================================

This mod contains a script to create your own shield generators to add to the game. Put M1Mods.dll and 0Harmony.dll into your Unity project to use ShieldComponent. There are several options to choose from. You can have the shields recharge, decay, take damage to "shield capacity" (health pool) or take damage to the module itself. Supply your own particle effect that will shoot off like a ricochet would when your shield is hit.

If you make the component a mount, you will see the shield capacity as a cooldown bar just like with jammers, etc. You can choose between having a cooldown cycle or just reaching a minimum of 0 HP and then recharging from there. Be warned, cooldown cycles are slightly bugged in-game: after a cycle, the green bar might not match the true HP of your shield anymore.

But wait, there's more. Each of the shield's stats introduces a new stat into the game that you can use to make buffing/nerfing modules. shieldgenerator-shieldcapacity, shieldgenerator-rechargetime, and shieldgenerator-cooldown. [Currently might not work]


Advanced:

In addition, you can supply your own functions for the damage and recharge to override the default behavior. There are two static dictionaries, func_TakeDamage and func_GetRecharge. Use your part's unique partKey as the key for the dictionary. Supply a Func for the value. You can set these functions in the PostLoad() part of your mod (remember to put this mod higher in the load order).

To set your own damage, use a Func<MunitionHitInfo, IDamageDealer, float>, where the return float is the amount of damage to deal to the shield (and the module itself if you checked that box true). You're given the data about how the projectile hit your shield and the IDamageDealer that caused the damage. The default damage function is (armor pen ^ 0.25) * (component damage ^ 0.75).

To set the recharge/decay, use a Func<float,float>. Your function is given the value Time.deltaTime, the time taken since the last frame. Return a float that will be added to the shield capacity. The default implementation is the Eve Online shield formula.
44 Comments
Promethius 22 Jan @ 6:23pm 
As of now though, the mod is outdated, it CAN work, however not without some minor issues (error codes, etc.)
Promethius 22 Jan @ 6:19pm 
@Growodlet, yes they do but they don't stack fro shield hardness, just shield HP for the location relative to the generator {Top, Bottom, Sides, Etc.}. And @Jungfaha the ANS BB can handle two of them but end up giving one of the thruster modules up for a generator at that cost (that was a while ago), now, I think you have to do the same just to have one, its not great but definitely helps in a modded match with shields, it seems to work and play better with other mods since their LC's, HC's, and BB's in other mods seem to have a much larger power cap for it since you can stack engines and generators inside them.
Jungfaha 22 Aug, 2024 @ 2:49am 
good question @Growodlet but then that posses another question, do any of the ships have enough power supply?
Growodlet 21 Aug, 2024 @ 11:16pm 
If you add multiple shields do they stack?
Mr. Oddly Fox 2 Apr, 2024 @ 10:47am 
HE shells seem to be getting through and starting fires and destroying components. Seems like the only munition that can.
Consigliere Crow 21 Aug, 2023 @ 11:45pm 
does this mod still work?
Nyx (She/Her) 7 Jun, 2023 @ 7:31pm 
will say these shields feel extremely strong
Mr. Oddly Fox 27 Apr, 2023 @ 5:19pm 
Excellent module! Keep sharpening it up, definitely a solid product to build on.
Jungfaha 18 Apr, 2023 @ 5:57pm 
please fix oh lord of this mod!
Nyx (She/Her) 18 Apr, 2023 @ 2:43pm 
mirroring the error from Tropical here, exactly as shown