Space Engineers

Space Engineers

GrunkBot Weaponcore Aimbot
38 Comments
CurtimusPrime92 2 Jul @ 3:46pm 
what do you mean "Send a TOGGLE command to the Programming Block to activate / deactive the GrunkBot." 1) Run 2) Run with default arguments or 3) Toggle block On/Off?
CSM-101 "T-800" 10 Mar @ 10:55am 
I figured everything out but I couldn't figure out how to auto aim and activate it. forgive me.
James T Kirk 19 Oct, 2024 @ 5:35am 
Ah, I checked the script and it said to name the gun group "GrunkGuns", I did, but it just said along the lines of "no Grunk Guns group found, target lead disabled". It did find the LCD blocks and remote control. But nada on grunk guns, I tried adding the tag to the gun, (using expanse zakozetara fixed rail gun) and adding it to a single gun, gun group and adding the tag to the gun groups name but nothing.

I also tried changing the recognised tag but nothing either.
Stubkan  [author] 18 Oct, 2024 @ 7:55pm 
I just tested it. It works. It works better if you make a grunk gun group.
James T Kirk 18 Oct, 2024 @ 1:44pm 
Seems to be broken.
Stubkan  [author] 13 Dec, 2023 @ 12:21pm 
@orzechowiecR
You only need a group if you want target leading. Make block group containing gun to calculate leading for, Name block group GUN_GROUP or whatever your config is renamed to.

@Vokun
Follow above instructions to enable target leading. Its intended to be used with weaponcore weapons with very long ranges, vanilla weapons dont need leading. Read command block output to confirm if its working or not.
orzechowiecR 10 Dec, 2023 @ 11:32am 
how to tag these groups and blocks. i tried many ways and it didnt work, just tell me where and what i need to write
Vokun Vulon 10 May, 2023 @ 4:38am 
I'm also finding it does not lead correctly for my railguns and coilguns, is there any way you can add a line that we can use to adjust the lead offset or something, so if we find its falling short we can increase that number to offset how much it leads by default, that would solve everything
Vokun Vulon 2 May, 2023 @ 8:31am 
Does this work with multidisplay blocks?
I can't get it to show on anything other than the first screen!
Mekrath [597TH ADR] 29 Mar, 2023 @ 1:16am 
would it be possible to make this script automatically fire weapons? So I can utilize it in defense sattelites?
Gigawatts 15 Jan, 2023 @ 6:58pm 
I also don't have target tracking. I checked with the camera. It aims at the ship but not ahead of it.
Stubkan  [author] 1 Jan, 2023 @ 8:35pm 
@Isin Dule - If the weapon has instant travel, leading wont do anything. If you have no grunk gun group there will be no leading.

@DeathKnight - make sure its on the same grid

@island - You might want to use a drone script instead
island 1 Jan, 2023 @ 4:47pm 
Is it possible to somehow make it work for a unmanned turret grids? Like a grid with mounted weapon and a turret for targeting, automatically aiming mounted weapon at whatever the turret is firing at?
HATE|DeathKnight/ALLKEYSHOP 23 Dec, 2022 @ 11:16am 
Hi, i have a problem it seams it dosnt work because it always says it cant finde the remote control ore the gyros and stays infinitly at initiating.
Isin Dule 13 Dec, 2022 @ 12:36pm 
how do i turn off leading when using fixed lasers? if i dont grp the weps it gives errors
Stubkan  [author] 15 Aug, 2022 @ 1:22pm 
The radar listing function is how grunkbot collects targets for you to select from. Without this, it would not be able to select targets. It has a low performance impact, do not worry about it.

You can choose not to use a LCD. It is also low impact. It will still use the programmable block itself to draw on though. You can remove this if you wish.

The highest impact to performance is the gyroscope collection and modification. Also aiming trajectory calculation - which is done via inbuilt weaponcore code, so that is as low impact as it can get.

If the gyroscope rotation is slowed down to less than 1 tick it will improve performance but it will make your ship rotate around the target instead of on target.

I am unsure there are any PID controllers that operate slower than 1 tick.

You can use less gyroscopes (or use tiered ones) or restrict the number of gyroscopes available by grouping them to reduce the performance impact of controlling all the gyroscopes per tick.
Starfleck 14 Aug, 2022 @ 7:31am 
Is there any chance you can upload a simplified version which does not use radar, which does not try to detect every hostile grid, and does not draw an LCD constantly?
Or even just tell me how to slow down the script so that it doesn't update every single tick?
Stubkan  [author] 14 Jul, 2022 @ 6:40am 
Leading was meant to be used with weaponcore mods that have much longer weapon ranges such as Aryxs - as you fire at objects 5-10km away instead of vanilla weapons objects roughly 1km away and so you need the aiming assistance in a big way. Also meant to be used with faster ship speeds as some servers let you move at several km/s instead of 100m/s.

At 1km range moving at slow 100m/s speeds, like I tried to explain to Chuchandra, aiming assistance may not seem to be working because at sub 1km range target leading may not actually need to do much at all.

There is no requirement to input the projectile data, weaponcore itself calculates this already. Sogeki's script has to calculate it because it does not have weaponcore math to do it. Turning on the camera lead indication was only a suggestion to help you realize if it was leading or not, you do not need it to use this script.
Deimos 14 Jul, 2022 @ 1:29am 
Would be really handy to implement a method of manually entering the projectile data, I think in some WC weapon mods this data is obfuscated or something.
Deimos 14 Jul, 2022 @ 1:27am 
I have the same issue as Chuchandra. Setup as per guide. The gyro override always diverts to aiming straight at the target, it doesn't compensate for movement. (The script states, 'using gun xxxx for target leading'). Does the camera lead indication need to be turned on for the gyro override aim compensation to work?
|_M A X I M_| 8 May, 2022 @ 6:04am 
Heyo, I have an issue with this: The scripts detects everything it needs to detect, but it gets stuck on "initializing initial initialization".
I am sitting in a cockpit, and there is a single remote control on the grid, if that matters.
Stubkan  [author] 21 Apr, 2022 @ 10:46am 
I dont know which weaponcore vanilla replacement you are using, so I cannot say if your railguns are upgraded or not. Default railgun is 2000 m/s muzzle velocity with 2km range. Gatling turret is 400 m/s muzzle velocity. So gatling bullets are very slow, Railgun sabot is almost instant.

So it will look like there is no leading, because its really fast, especially if the enemy is moving 100 m/s or less, and they are less than 2km from you.

The programmable block will tell you if leading is turned on or not, and which weapon it is using.

You can turn the target lead indicator on in the railgun weapon config and see for yourself where the leading dot is.
Chu 21 Apr, 2022 @ 10:31am 
That's exactly what I did. I added fixed cannons to the group.
These are the railguns with weapancore.
Stubkan  [author] 21 Apr, 2022 @ 10:05am 
If you put turrets in the group, it will calculate for the turret bullet velocity and turret range, which may not match your fixed guns. Put only the fixed gun you want to use.

Which cannon fixed gun are you trying to use?
Chu 21 Apr, 2022 @ 9:53am 
In group 1 the cannon is fixed. When I make only turrets in a group, then it calculates.
Stubkan  [author] 21 Apr, 2022 @ 6:23am 
What weapons are in your GrunkGuns group?
Chu 21 Apr, 2022 @ 6:04am 
Yes, it locks the target, but does not calculate where to shoot. If I make a group with a normal turret, then everything counts as it should. But it doesn't work with a fixed turret.
Stubkan  [author] 21 Apr, 2022 @ 5:33am 
If you group your fixed gun together in a group named "GrunkGuns" by default. Only add the guns that require leading calculation, no other guns. It should calculate everything including projectile speed.
Chu 21 Apr, 2022 @ 5:21am 
Stubkan [author]
It should calculate pointing with or without a turret - If you can target a grid with the mousewheel, thats all you need. If it is not working right please let me know details.

Fixed weapon, it can only capture the target, lead it, but can not, like a turret to calculate the point of shot. Maybe you can set additional settings for projectile speed, as in the script from Sogeki?
Stubkan  [author] 21 Apr, 2022 @ 4:51am 
It seems center of mass for small grids is calculated by the game a bit differently. It seems like a keen issue to me. You can rotate to move closer.

You only need to have one remote control on a grid, antenna doesn't matter. You can turn extra remote control blocks to show on HUD with an active antenna and they will pop up on your screen to find.
Warlow 20 Apr, 2022 @ 5:55pm 
works great on larger targets with railguns etc, but smaller targets were a little off due to whatever wizardry you use. Also i ran into the multiple remotes on my blueprint problem and cant use it with my current ship, not too sure how to remove the extra antenna without cutting my big ship to pieces.
Stubkan  [author] 20 Apr, 2022 @ 4:45pm 
It should calculate pointing with or without a turret - If you can target a grid with the mousewheel, thats all you need. If it is not working right please let me know details.
Chu 20 Apr, 2022 @ 11:49am 
It would be great to make an offset. For some reason with fix guns does not calculate pointing, only from turrets.
Stubkan  [author] 19 Apr, 2022 @ 5:00am 
It uses weaponcore to acquire grids as targets, it aims at center of mass. I may put an option to offset targetting from the center of mass since that won't be too hard.

Getting it to target individual systems would be very difficult - likely not possible.
Warlow 19 Apr, 2022 @ 3:04am 
Can you lock individual systems as target?
Pas2704 23 Mar, 2022 @ 2:59pm 
lol
Wellen 22 Mar, 2022 @ 2:41pm 
Interesting, will keep it in mind.
Maj Meh 20 Mar, 2022 @ 11:19am 
CHYEA BOI!