Space Engineers

Space Engineers

Whip's Turret Ai Slaving Script WC Addon
38 kommentarer
Smax4455 25. mar. 2023 kl. 12:59 
it doesnt find PB with Whip script :c
Perryax 20. dec. 2022 kl. 9:24 
my script doesn't detect the PB. Does it need a specific name?
Siam 3. juli 2022 kl. 14:30 
Does it work with the custom turret controler
eg: I create a bunch of custom turret that are aimed for bombardment of targets below my ship (did somebody asked an exterminatus?) and I want all of them to shoot at the same time at the same place.
Sparktite 6. dec. 2021 kl. 16:09 
So if I'm to understand this correctly, this will take weapons slaved to a designator turret and set the convergence point for those turrets to the distance that the designator detects an enemy at?
Sigmund Froid  [ophavsmand] 6. juni 2021 kl. 23:18 
Nope. I have an own rotor turret script in the linked Collection though. Though it's lacking the advanced LoS check Whip's script (unless Darkstars recent API update added them)
Kittamaru 6. juni 2021 kl. 19:29 
Stupid question... with this script, does this mean that Whips Script will work to slave player made turrets using WC Weapons to a WC Turret as well?
Const 10. mar. 2021 kl. 2:31 
oh well i'm dumb. misunderstood the script. thanks for the time anyway!
Sigmund Froid  [ophavsmand] 10. mar. 2021 kl. 2:25 
Well that wasn't the point of the script, it was designed to have the slaved turrets focus the target of the main designator. For other focus you could use WCs focus targeting.
Const 10. mar. 2021 kl. 2:06 
alright, now detects the PB, and says that it's managing a rotor turret. but it doesn't seem to track targets beyond the main designator's range

do i have to edit some variables inside the addon script to make it work?
Sigmund Froid  [ophavsmand] 15. feb. 2021 kl. 0:56 
Last time I checked it worked but I'll do another check on it
Const 14. feb. 2021 kl. 20:13 
does the script still work the latest version of turret slaving? everytime i use it, it says 0 PBs with whip's script, even though I have the slaving script on the grid
salin_soulok 30. jan. 2021 kl. 9:55 
i dont know what im doing wrong but i cant get this script to work what all must i do? i have this pb on the same grid as whip's and it clames it cant find the pb
Sigmund Froid  [ophavsmand] 9. jan. 2021 kl. 5:38 
You need to use it along side whip's script.
FireManDan 9. jan. 2021 kl. 5:16 
Do you 7se this along side whips script or stand alone?
Cpt. Cheesecake 31. dec. 2020 kl. 19:15 
I personally use the MA designator as it self creates ammo out of energy on the grid, so it's place and play!
ExCaedibus 15. dec. 2020 kl. 5:23 
Is there a WC-compatible Designator turret meanwhile?
I don't want to use a normal turret that fires unnecessary ammo (could it confuse WC with its own trajectory and speed?) that only "designates" a target while firing. There were a few nice ones around before WC but none compatible, how is it now?
Sigmund Froid  [ophavsmand] 22. sep. 2020 kl. 9:50 
@MikeDude Target Communication would be possible using his IGC but weapon firing would need edit's to the script itself. Additionally I held back on it as Alysius told me he is working on adding support. He hasn't reached out for help yet so I assume he's just busy with more important
matters.
Mike Dude 22. sep. 2020 kl. 8:58 
Were you able to look into Diamond Dome System and see if this could be made to also support that script for target and fixed weapon firing?
Sigmund Froid  [ophavsmand] 30. aug. 2020 kl. 1:08 
IMyLargeTurretBase.ApplyAction("ShootOnce") and similiar work now, however they don't set values like IsShooting or HasTarget, or implement getTargetedEntity(). It's unlikely that these will be added as I shouldn't even be able to call them on the weapons. I only tested with MWI collection 1 so maybe that's why it partialy works but we're a step closer to have vanilla scripts work with WC, however it might never fully happen.
Sigmund Froid  [ophavsmand] 29. aug. 2020 kl. 14:46 
Well I don't use discord for various reasons but you may tell him that I asked on his guide to DDS if he finds a moment to spare for this (Somebody asked just 2 days ago if it's WC compatible and got an answer, however I'm patient, more time to built rotor turrets for WC :steamhappy: )
Mike Dude 29. aug. 2020 kl. 14:42 
That would be awesome if you're able to add that. He is on Singapore time I believe so he may not replay for a while. He's also in our server's discord too and I've been forwarding your guide and stuff.
Sigmund Froid  [ophavsmand] 29. aug. 2020 kl. 14:31 
Because of the nature of the framework WC only provides Conveyor Sorters/ IMyTerminalBlocks which inherently don't have those lines. Also I think there would be issues with keens normal implementation trying to react to it, you'd have to ask Darkstar though for confirmation imjust assuming from my limited knowledge. I've asked Alysius for his IGC format so I can start working on the script (probably just a edit of my addon for Whip's script)
Mike Dude 29. aug. 2020 kl. 14:27 
I wonder why the WC team didn't just add those two lines back into their turrets...
Sigmund Froid  [ophavsmand] 29. aug. 2020 kl. 14:19 
I could probably hijack DDS's target communication as I did with Whip's Turret Based Radar Script, depends on the information sent.
Sigmund Froid  [ophavsmand] 29. aug. 2020 kl. 14:15 
Well Whip's no didn't prevent adding compatibility though ;P

To your problem: Simply put, IMyLargeTurretBase.HasTarget and IMyLargeTurretBase.ApplyAction("ShootOnce") both don't work with WC weapons, the first because that property doesn't exist the second because the action doesn't exist for these blocks. As replacement you have to add WcPbApi.GetWeaponTarget and null check it for the first one. For the second you'd add WcPbApi.ToggleWeaponFire or WcPbApi.FireWeaponOnce and call those. You can defnitely tell Alysius about my guide linked above. Because of how the API works I doupt though that he'll be able to fit it into his script. (With all blank spaces it's about 9k characters)
Mike Dude 29. aug. 2020 kl. 13:52 
Ha I'm just happy they were able to add the API and people are using it. I was hoping the big name scripts would be adding WC compatibility but Whip just said straight up he's not adding anything from other mods in his script. Alysius hasn't gotten around to adding anything for WC into his script yet either which I'm really bummed about.

DDS's primary means of receiving target data is through the DDS Designators turret group, and it just doesn't work at all on even the WC vanilla replacement. It looks like there may be the 2nd challenge of firing those WC weapons that are on the turret too.
Sigmund Froid  [ophavsmand] 29. aug. 2020 kl. 13:42 
Hey Mike Dude! I kinda owe it to you that I got some small fame here. I'll investigate if this is possible however I've never used DDS before, so it might take some time.
Mike Dude 29. aug. 2020 kl. 13:26 
Hey do you think this will work with Alysius' Diamond Dome System for his required Designator turret groups too?
Izidore 24. aug. 2020 kl. 9:49 
BANG! I knew I was doing something wrong. Thank you!
Sigmund Froid  [ophavsmand] 24. aug. 2020 kl. 9:05 
Weapon core will only detect grids with at least one weapon, to avoid destoying salvagable debris.
Izidore 24. aug. 2020 kl. 8:30 
I am obviously doing something wrong. Convergence Range just defaults to max. So how does RDAV's determine what is considered a target? Maybe the targets I used do not meet the criteria for a 'target'(?). I set up large 'rectangles' made of large blocks, stuck an antenna on them (with power), changed them to neutral and enabled target neutral on the turrets.
Izidore 24. aug. 2020 kl. 6:13 
This is absolutely awesome. I will get this going as soon as I can. As far as my kind words; you are being extremely modest.
Sigmund Froid  [ophavsmand] 24. aug. 2020 kl. 1:23 
Yup works. Pretty much the same way Rdav's Fleet Command finds its targets via turret UI. The script will always take the closest target in the direction of the turret (Had 1398 as convergence with a designator with 2.2k range, target was ~1.4k out and behind it a target at ~2.1k)
Sigmund Froid  [ophavsmand] 23. aug. 2020 kl. 14:14 
Just thought about something that might work with controlled turrets, I'll test it tomorrow and will report back with the results.
Izidore 23. aug. 2020 kl. 11:44 
If taking targeting distance from an AI turret is a feasible option I would appreciate that addition if it is not too much trouble. Thanks again.
Sigmund Froid  [ophavsmand] 23. aug. 2020 kl. 9:39 
For taking the range of the target the designator would need to be Ai controlled, if that is what you want I can add this.
Also the turret script was my work of the last three days, so it was already almost finished when you came in with your request. As it's quite easy to do that once you wrap your head around the API, I don't deserve these kind words, I'll take them, but I don't deserve them. ;P
Izidore 23. aug. 2020 kl. 7:53 
I noticed that in a few short minutes after developing this script you developed and published a completely new script to support WC weapons on PM Rotor Turrets. Your industriousness is truly astounding. I am blinded by the brilliance of your scripting genius as I tread water in the bubbling cauldron of mediocrity. :) Anyway thanks again for what you do.
Izidore 23. aug. 2020 kl. 7:46 
First I would like to say thank you very much for indulging my request. I truly appreciate your time, effort, patience and scripting skill. I will use this script in its current form, however, at the risk of sounding ungrateful (which I am not - I am very grateful), I was shooting for something a bit more dynamic. I was hoping that it was possible to grab the target distance from the designator turret meaning the distance to the grid the designator is currently aiming at as opposed to just setting the convergence point to the max range of the designator. Based on the AI Turret Radar Script I knew it was possible to determine the actual range of a target and was hoping this could transfer to my application. I suspect that the issue is that once the turret is no longer 'AI' and it is 'controlled' by a player that data is no longer captured or produced.