Space Engineers

Space Engineers

Not enough ratings
TOs Advanced Ammunition Controls
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
397.909 KB
19 Oct, 2023 @ 7:56pm
10 Nov, 2024 @ 7:14pm
10 Change Notes ( view )

Subscribe to download
TOs Advanced Ammunition Controls

Description
Spiritual successor from the long lost "Ammo Management Controls" but with less functionality
****Currently WIP****

-Allows the selection cycling of different ammo types in weapons easily from the block terminal menu

-When successful switch is complete it adds a suffix the the weapon name so you know what is loaded in it. Weapons that can be attached to conveyor systems have a [A>Ammo] suffix while manual loading weapons have [M>Ammo] Suffix as it is handled as a manual load weapon. This means it will not move inventory around, it just switches what ammo is loaded into the barrel of the weapon. This can be done with any turret if you turn conveyor access Off in the settings and then select an Ammo if you want it to be manual loading

-Allows remote ordering of Ammo from assemblers in blocks of 20 once the weapons ammo is locked in

-Puts inventory constraints on weapons to the ammo you want to prevent improper loading in survival, think of it as locking that weapon to only that ammo type. These constraints will reload on world load as they are tied to the blocks custom data but currently copy and pasted ships constraint wont get set until you reload the world

-Return to default button clears the weapon back to vanilla

-Very basic in creative, but in survival it unloads the weapons inventory into a available connected cargo container and then pulls 1 of the requested ammo to the weapon. The in-game inventory handles the full reloading from there.

-Please note that currently if there is no detected cargo containers to unload the ammo it deletes it instead to allow the switch so always make sure your turrets are connected or you will loose some ammo during switch. Currently working on a way to save it or stop the reload and send a warning

-Some weapons hold 1 unit of ammo in the "chamber" i have yet to code a way to save it so you may loose any chambered ammo during the switch

-If you dont have available ammo in the conveyor system the reload will fail, you can check this by the weapon suffix not changing.

Known Bugs:
-When in creative keen skips alot of loading logic so if you have weapons on your hotbar and press them more than once the game will pick random ammo and ni currently can't stop it. Inventory blocking should prevent this though in survival
-When turrets move (either idle or when tracking a target) it can make it hard to select ammunition in the terminal, some kind of refresh problem i havent sorted out yet. Quick fix is toggle the turret off, make your changes and then toggle it back on again.


**NOTE** WIP
-There may be bugs and it is a work in progress, im just learning so it may take me awhile to fix them
-Re-uploads are not permitted

***Credit***
Super special thanks to Meridius_IX / Lucas for allowing me use code from the long lost mod "Ammo Management Controls"
7 Comments
dannyrocker 13 Nov, 2024 @ 10:07am 
Awesome! Ty very much.
troubled_offspring  [author] 10 Nov, 2024 @ 7:16pm 
@dannyrocker i tried a few things but i was not able to add group controls at this time but i made a button that will switch the ammo of all weapons of same block type to make changing large numbers of weapons easier for the time being
dannyrocker 9 Jul, 2024 @ 5:23am 
Hey, would it be possible to expand some of these settings to also be included with the blocks in the "G menu"? For example so that one can switch TL's ammo without the need to go into the terminal? Or enable/add group modifications? - if you select multiple blocks in the terminal, this mod's controlls don't show up even if all the selected weapons are the same, for example the torp launcher.
black_dragon1230 29 Oct, 2023 @ 11:06am 
Sweet!
troubled_offspring  [author] 29 Oct, 2023 @ 10:40am 
i redid all the code so now it works for all weapons
troubled_offspring  [author] 22 Oct, 2023 @ 9:54am 
i warn ya im still working on missile based turrets to get them working, its been a 3 day afair and ive only made baby steps lol all the others should work but missile, artillery and assault turrets wont get the controls right now
black_dragon1230 21 Oct, 2023 @ 10:17pm 
Im going to have to try this out. I miss using Lucas's Ammo Management mod. Nice thing is it could order ammo as well.