Space Engineers

Space Engineers

Pocket Shield v3
76 Comments
lord.riker 2 Apr @ 12:44am 
Thank you for your quick reply. I look forward to it!
SK  [author] 2 Apr @ 12:00am 
@lord.riker
Issue confimed, I will fix as soon as I have time
lord.riker 1 Apr @ 5:20am 
This doesn't seem to be working right anymore. Tested the ballistic shield against an interior turret and while it looks like I get the initial defense bonus the ballistic plugins don't seem to do anything. The HUD element shows that it's increased my defense to nearly 100%, but I still take ~1/2 damage like without the plugins. The visible shield effect also doesn't seem to be triggering at all and the shield's HP only decreases by 1/250 by the time I've died. Tested in a survival world without any other mods.
Deapri 21 Mar, 2024 @ 2:10pm 
Ok SK, that paste transparent materials file will work now dynamically. https://pastebin.com/Wf7u57sw here is the template for any other inventory items.
Deapri 20 Mar, 2024 @ 8:39pm 
You are of course welcome to the discord for AiEnabled to discuss this more real time if you like.
Deapri 20 Mar, 2024 @ 8:36pm 
here SK this is what is needed to align each item. https://pastebin.com/eP3HBg7R
Deapri 20 Mar, 2024 @ 7:24pm 
I suggested subID matching but we'll see what he does, if the materials are in the shields now, it'll be on his side to get it sorted, thanks for doing that.
Deapri 20 Mar, 2024 @ 7:23pm 
Working on that, jTurp said he needs to adjust the script to also recognize, going to see if it can be made a little more dynamic.
SK  [author] 20 Mar, 2024 @ 5:19pm 
What does this changes? I applied it and nothing looked changed to me (and the icon in bot inventory is still the default cube icon)
Deapri 20 Mar, 2024 @ 1:52pm 
<?xml version="1.0"?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TransparentMaterials>

<TransparentMaterial>
<Id>
<TypeId>TransparentMaterialDefinition</TypeId>
<SubtypeId>MySubtypeID</SubtypeId>
</Id>
<AlphaMistingEnable>false</AlphaMistingEnable>
<CanBeAffectedByOtherLights>false</CanBeAffectedByOtherLights>
<AlphaSaturation>1</AlphaSaturation>
<Emissivity>0</Emissivity>
<IgnoreDepth>false</IgnoreDepth>
<NeedSort>false</NeedSort>
<SoftParticleDistanceScale>0</SoftParticleDistanceScale>
<Texture>MyIcon.dds</Texture>
<Reflectivity>0</Reflectivity>
<UseAtlas>false</UseAtlas>
<UVOffset>
<X>0</X>
<Y>0</Y>
</UVOffset>
<UVSize>
<X>1</X>
<Y>1</Y>
</UVSize>
</TransparentMaterial>
</TransparentMaterials>
Deapri 20 Mar, 2024 @ 1:48pm 
well, they are implicitly referenced to be used by the helper bots now, I was wondering if you would be willing to add text hud api transparency compatibility for the icons?
kinngrimm 10 Feb, 2024 @ 11:31am 
"Yep, it works with hounds " so i could build like these Starwars rolling bots with gattlings and when they engage they are also protected by shields 0_0

needs blue colored shield though =)
Deapri 10 Feb, 2024 @ 8:53am 
Alright, thank you!
SK  [author] 10 Feb, 2024 @ 8:39am 
Yep, it works with hounds and other AI Enabled NPC. As long as they are "character" and have the item in their inventory, they will have shield.

You don't see the bubble effect because I have (temporarily) disabled the effect, they flashes like crazy when you get shot at.
Deapri 10 Feb, 2024 @ 6:04am 
So, curious, will this only effect the player or any creature they are placed on, say if I gave a shield to my cyberhound AI enabled scavenger will it work? I've never actually seen the bubble just the charging and UI aspects.
SK  [author] 23 Jan, 2024 @ 9:37pm 
Well, the thing I said before was last year's situation. Since then there are some changes to the ModAPI, I'll see if there are new things I can take advantage of (when I have time, classes hit hard right now).
kinngrimm 23 Jan, 2024 @ 9:29pm 
there is a HUDcompass mod, reading out the direction towards a player i looking should be doable therefor. If you can't deny damage therefor from that direction, you still have the direction to narrow down who may have shot at you. to early in the morning by now for geometry, but i think there could be a way there. If not that, then again one would need to look at how turrets registrate enemies and turn into the correct direction. We don't need to turn, that we dud ourselfs already, but if we use the again the cone and let the enemy finder bounce within that limitation. ... anyways need sleep, gn8 maybe later i got a better idear.
SK  [author] 23 Jan, 2024 @ 8:51pm 
When player takes damage, the game doesn't give me the information about the shooter, so it is hard to trace the direction. I could try tracking every bullet fired, but that will hit performance a lot on heavy combat.

I don't quite get what you want about the damage calculation, but this shield is design to absorb all incoming damage, or a portion of incoming damage. Maybe this is what you mean?
kinngrimm 23 Jan, 2024 @ 8:38pm 
or if you fancy learning to do it better well go for it. I basicly always admire people who do things out of passion. I may have gotten the wrong impression that you had enough on your plate and therefor i was trying to spitball some ways on how one could go about it to get some manpower to help.
kinngrimm 23 Jan, 2024 @ 8:33pm 
"figure out where the projectile comes from"
eye focus point of the player, where he looks at with some degree of margin representing the size of the shield. Could one like with a radar then use that directional data just from where he is look, using to find out what in that direction would be? or internally simulating what is going on in a turret when it takes aim.

If you would make damage calculation after the fact, first getting hit, then adding health again in the way mittigation / resistance / prevention would be set?

Again it wasn't ment as a critique of your efforts, it is already better than anything else in that aspect on the workshop. I appologize if i went too far there. Point still being, i think it could be done better, but it would be of lower priority than say directional block and by that you got some time to find someone. I might ask around myself, but no promises.
SK  [author] 23 Jan, 2024 @ 5:41pm 
This personal shield mod works by intercepting the game's damage calculation: when player take damage, I subtract a portion of it and damage the shield. When bullet/missile/blocks hit the player shield do its job, when there is no hit shield do nothing. So, this shield is implicitly shaped the same as player shape.

For directional shield to work, I need to figure out where the projectile comes from. This can be done with missile and block, but for bullet it is difficult since there is no good way to get a bullet's direction. That is why the directional shield stalls for such a long time.
Even if you request, I still can't do it right now since I don't know how to ^^

About graphics, I'm not good at that so for now I use the game's default effect.
kinngrimm 23 Jan, 2024 @ 5:16pm 
mmm would you have a graphics guy at hand, no offense ment ... there is not really a nice way to put it, but the shield as it looks now is a bit lacking in the optics department. It does its job sure, but when i imagine personal shield , i think of Dune and the slow blade penetrating the shield ... mmm are grinder our slow blade .... anyways personal shields are usually depicted as a layer shaped like its user. Shield effects for when recieving dmg at certain points of impact , maybe a similar texture and shape as mentioned how the Wakandan warriors used them. I know i couldn't do such a thing, but maybe there is someone willing? Like put a request in the description if that is a thing you would like to see happening, right?

can it be a userdefined keybind? i know i am rather egocentric with my keybinds at times, i imagine others are too and something that needs reaction time i would maybe even put on one of my mouse buttons.
SK  [author] 23 Jan, 2024 @ 4:20pm 
Actually there is support for directional shield, I call it "Manual shield" in the core mod. My plan was for player to press a key to manually raise the shield, during which it will block or deflect bullets depend on the modder's setting.

However I never have time to implementing the directional and deflection mechanic, and it is somewhat difficult to implement that due to ModAPI's limitation.

I still want to finish the feature though, maybe that will take a long time ^^
kinngrimm 23 Jan, 2024 @ 3:27pm 
so here is a thought here me out ... in another game Mount & Blade warband, i was a shielder. It got me very heavy involved. One of the mechanics that lead to me getting hooked was the directional blocking of incoming attacks. Soooo imagine these nice shields Wakandans had in Marvel Cinematic universe, covering your front from head to toe, but you still would need position yourself in an angle from an incoming attack or one you would think would happen when you lurke around the corner. It keeps you on your toes more than having an always safe option. you would need to keep a mouse button pressed and maybe would not be able to simultaniously attack and be behind shield cover. What do you think?
SK  [author] 17 Nov, 2023 @ 2:57pm 
In world storage (%appdata%/SpaceEngineers/Saves/[your steam ID]/[your save name]/Storage/2656470280.sbm_PocketShieldV3) there is a file called "config.ini". The shield delay is "Charge Delay" (in second).
平凡REN 16 Nov, 2023 @ 5:30pm 
I want to have a gunfight with my partner on the server, but there is a delay of 5 seconds in the response time of the shield. How can I adjust this?
SK  [author] 23 Mar, 2022 @ 2:01am 
Sadly there is no way to disable or reduce the hit effect. I want it to block player's view so they can't 1v1 Gatling Turret from 400m away.
electrococaine 22 Mar, 2022 @ 1:34pm 
Hi! Is there a way to disable this very annoying effect of she shied blocking your vision when taking damage?
I couldn't find anything about that in config files but i could've missed something.
black_dragon1230 7 Mar, 2022 @ 2:58pm 
Yeah i have a world i couldnt get into cause of shield.
SK  [author] 7 Mar, 2022 @ 12:56pm 
Fixed :)
Abisius Xarvenius Carbensius 7 Mar, 2022 @ 12:19pm 
@SK
seams like loading into a world while beeing in a cryopod with poketshields is still a certain ctd.
found it out after i was building a while, freezing myself while going to eat so that my refineries would continue to work. my pc decided needed an update and restarted while i was gone, loading back into the world was continuously doing ctd after that but onc ei did remove poketshields it was loading in fine.
i did already load a few times into a worl while in a cryopod with pketshields in the world in the past so i think it is somehow related to the inventory rework which we already found out had an issue with entering something.
SK  [author] 5 Mar, 2022 @ 3:52pm 
Actually it is a re-introduced bug that I missed since the beginning. When you enter seat/cockpit, shield will stop updating, and will come back to normal when you leave seat :)
It doesn't impact much but still a bug..
Abisius Xarvenius Carbensius 5 Mar, 2022 @ 3:41pm 
@SK
thx for the quick fix.
would be interesting to know what exactly do you mean with "This introduces new bug." in the changelog of the core?
SK  [author] 5 Mar, 2022 @ 3:35pm 
@Abisius The crash is from Core mod, and I have pushed a fix.
Abisius Xarvenius Carbensius 5 Mar, 2022 @ 3:03pm 
@SK
either the update on pocket shield or pocket shield core causes the game to freeze and ctd everytime i enter a seat, cockpit or cryopod.
refering to the updates form 05.03.2022 20:06 and 05.03.2022 20:43 respectivly.
timestamp is going for local cet/cest time.
SK  [author] 5 Mar, 2022 @ 1:20pm 
@Dezzie9889:
- "explosive resistance plugin doesn't subtract when dropped while using projectile emitter"
What do you mean by this? I've tried dropping one Explosive resistance plugin item, two items separately, two items as a stack and the stat is change correctly.
- "explosive emitter doesn't benefit from plugins at all"
Fixed but not pushed yet, thanks for pointing this out (I want to fix both before pushing an update ^^). Meanwhile you can open User Config file and change Explosive Emitter's "Max Plugins Accepts" to 8 or something. It should be 0 there and is the issue.
Dezzie9889 5 Mar, 2022 @ 12:51pm 
-explosive resistance plugin doesn't subtract when dropped while using projectile emitter
-explosive emitter doesn't benefit from plugins at all
black_dragon1230 4 Mar, 2022 @ 2:37pm 
I was having the same issue.
SirPhoenixBlood 3 Mar, 2022 @ 10:06am 
yea it was making it useless during a firefight due to the inventory getting update every time you reload and that reset your shield
SirPhoenixBlood 3 Mar, 2022 @ 10:05am 
lol oh ok then guess you found it thats good then
SK  [author] 2 Mar, 2022 @ 1:39pm 
I've checked and confirm the issue. Will fix ASAP.
(I wonder why it didn't show up a few days ago...)
SirPhoenixBlood 2 Mar, 2022 @ 6:40am 
ok i will try that
SK  [author] 28 Feb, 2022 @ 5:27am 
@SirPhoenixBlood Sorry, I couldn't reproduce that behavior. Please confirm that you don't have multiple Emitter item, and you don't swap their order in inventory when that behavior occurs.
If it still occurs, go to Storage\2739353433.sbm_Pocket Shield Core, open server config file, increase Log level to 5, then try reproduce the issue, then grab the server log and shield log and send it to me.
SirPhoenixBlood 27 Feb, 2022 @ 9:41pm 
its not just moving things any kind of update to my inventory seem to reset the my shield bar to zero
SirPhoenixBlood 27 Feb, 2022 @ 9:30pm 
nvm its any time i move anything from my inv to another it resets my shield
SirPhoenixBlood 27 Feb, 2022 @ 9:29pm 
any time i use ctrl shift to move 1000 items it resets my shield to zero and has to recharge again
SK  [author] 24 Feb, 2022 @ 5:47am 
HUD display is handled in Core mod (Pocket Shield Core), and there is some .ini config file over there. You can also use Mod Setting menu (open chat -> press F2), there are some settings available there.
Hyperion 24 Feb, 2022 @ 3:10am 
This is a very interesting mod.
Trying to understand a bit of the code behind it and I was wondering... If it's possible (I guess it should be, or its hardcoded), how can you get to change the display of the stats on the hud ?

Testing it with the Eat.Drink.Sleep.Repeat mod, and the hud added by that mod hides your Stats Display.
Searched a bit and modified values in the Session_PocketShield and the Config files related to what i think is hud display, but didn't get any changes.
SK  [author] 22 Feb, 2022 @ 9:04am 
Yes, feel free to do so :steamthumbsup:
Dezzie9889 22 Feb, 2022 @ 7:13am 
Hello could we have permission to make slight adjustments and reupload with our MP server core modpack with credit to you?