Space Engineers

Space Engineers

Shield Controller Weaponcore
26 Comments
Deapri 4 Mar @ 11:34pm 
Would be better if the editing entries were in the custom data if possible.
Deapri 4 Mar @ 11:34pm 
Working for me, make certain you correct the line

<u>string shieldname = "[A] Shield Controller"; // Name main shield controller contains this/u.</u>
StarAlone¹ (Starry-Kun) 26 Feb @ 1:46pm 
Seems it doesn't work anymore, returns error on boot up
Titan Nya 18 Feb, 2024 @ 2:29am 
haven't tested recently but going through my subbed mod list to see which one got updated dependency after Darkstar departure and this one seems to still use the old one, so maybe update to the new one to make sure it doesn't interfere with other mods? (not sure if it does)
hugums247 25 Dec, 2023 @ 9:17pm 
Can you show the shield info on a LCD screen, Other then the Program Block
MrFox 6 Nov, 2023 @ 7:24am 
Thank you for the responce
Mork  [author] 4 Nov, 2023 @ 3:39am 
It takes over the program block LCD screen and outputs the some status information there. Mostly some script status information, turrets found, targets, shield hp, power mode, power setting. Since it doesn't control any of the other values I didn't include them. I tried to keep it simple, so more people use it.
MrFox 3 Oct, 2023 @ 9:04pm 
Does this or can it have a shield status LCD to show
Shield HP
Shunting points
Shield heat
Shield damage balance Energy/kentic?
Mork  [author] 23 Aug, 2023 @ 6:46am 
Been away from the game for a while. Updated script with new APIs for weapon core and defense shields. I had to find a working copy for the defense shields API from someone elses script. Seems to be working now.
McyD 11 Jul, 2023 @ 10:34pm 
Seems broken currently. Throws errors on boot up. assuming the api is out of date for weapons core again?
Mork  [author] 24 Aug, 2022 @ 1:13am 
Okay API updated it should be working again. TEST command works and the weaponcore turret engaging a target activated it for me. I note though that if hostile target is in range but not being fired at it doesn't activate.
Mork  [author] 23 Aug, 2022 @ 2:01pm 
I haven't been playing for a while and I'm not a great with scripts in the first place, I'm good with simple things. This script uses two separate APIs which belong to the mods, which are subject to change. Currently the non-weaponcore version seems to be working so my guess at the moment is that the weaponcore API changed. Since the script is recompiling fine, it must not be interacting with the mod properly. I will need to get copy of the updated API sometime and then try to figure out what changed and adjust for it. But I will get around to it.
FirstArchon 22 Aug, 2022 @ 6:56pm 
i'm trying to use this script but it isn't seeming to do anything? it isn't changing the value of my shields to the low or high level? i'm not sure what i'm doing wrong
HATE|DeathKnight/ALLKEYSHOP 24 Jun, 2022 @ 10:55am 
Hi, the script is only saying booting in my world is this normal ore is sumthing wrong
Mork  [author] 25 Feb, 2022 @ 4:03pm 
Yes. Non-weapon core turrets will work with the non-weaponcore version of the script even with weaponcore running and still activate high power mod. However the weaponcore turrets that detect targets won't activate high power mode with the non-weaponcore version of the script. I just tested this to be sure. But due to the range limitations on vanilla weapons that is a big disadvantage.

I'm also not sure how new warfare 2 locking targets out to 2km would effect things either.
ArmedBOB 25 Feb, 2022 @ 2:52pm 
Thank you @Mork
Can you use the non WeaponCore version with WeaponCore active?
Mork  [author] 25 Feb, 2022 @ 1:20pm 
The weapon core API seems to be having an issue and that is way over my level of scripting ability. The non-weapon core version is working so the defense shield API is working. I have no idea at the moment on how to fix this.

Correct in low power mode the shield HP will drop.
ArmedBOB 25 Feb, 2022 @ 7:04am 
I do also understand this is power going in and not directly related to shield HP, however when i lower my power scale in my shield controller to KW the shield HP lowers so I would assume changing the powermin = 1 this would be the same as me saying us KW which would then lower my shield HP unless i am thinking about this incorrectly
ArmedBOB 25 Feb, 2022 @ 6:55am 
I dont think this is working for me. I think i did the set up correctly.
Made sure my Shield control unit is set to the name [A] Shield Controller (Done)

Have both WeaponCore and Defense Shields installed on my save

Set the long shieldscalemin = 2 to match the power scale to MW

Set the float shieldpowermin = 1.0f; // power scale multiplier to scale to KW but also tried number variables between 1-999 and still didn't change things

Tested the same for the max values to then recompiled and "Run" script screen always shows script as "Running" and "Script Booting"

I tested changing the settings in my shield controller manually and the shield HP changes as it should but not automatically with the script. Is there a step I am missing?
Anvarynn 7 Jan, 2022 @ 11:43pm 
For me shieldreset2 = 25 was perfect, it would end right as the shields registered at low power and would stop the loop.
Mork  [author] 7 Jan, 2022 @ 12:57pm 
That was the biggest issue during testing. How to separate the shield dropping to low power and not triggering the you have been shot detection activating high power setting and have to script bouncing between high and low power. You don't want that timer to be too long encase your actually shot when that timer is running.
Anvarynn 7 Jan, 2022 @ 12:01pm 
Ah yeah, shieldreset2 was too short so my shields would still be dropping from high power before the timer ran out and would loop itself
Anvarynn 7 Jan, 2022 @ 8:38am 
Think I see why
Anvarynn 7 Jan, 2022 @ 7:41am 
The script throws itself into a loop of going into high power for no reason and then dropping back to low power after less than the timer it's set for, then noticing the shield hp is lower than previous tick and boosting Back to high power.
Mork  [author] 5 Dec, 2021 @ 5:24am 
The LCD display is the actual program block the script is loaded into. The settings for high and low power is editable as variables in the actual script. There usage notes in the script. I couldn't figure out how to calculate the power to HP conversion as it depends on a lot of variables. So if you want a specific shield level turn off the script and manually set the power level on the shield to what HP you want then feed that into the script variables an re-enable the script.
ATF_Coldblooded Carebear || 4 Dec, 2021 @ 9:42pm 
i'm not sure how to set the script up for the low power and high power
the ship is small grid

the normal power is 18,799,910 hp
the fortifed power is 51,665,340 hp
so how and where i translate that in the prograble block

is there a lcd screen display ??

thank for your time