Space Engineers

Space Engineers

[APck] Broadsword U-AAG
41 Comments
cheerkin  [author] 22 Feb, 2023 @ 2:36pm 
See APck FAQ regarding the WC.
Spectron55 22 Feb, 2023 @ 8:09am 
The PB also says something about Java.exception errors and shows weir symbols. The screen output is normal though
Spectron55 22 Feb, 2023 @ 8:08am 
Oh I didn't knew, I was playing on a weaponcore server. And I did not know that weaponcore would interfere in some way. Could you maybe explain why it isn't working with weaponcore, and if there is a way around it?
cheerkin  [author] 22 Feb, 2023 @ 6:28am 
In both cases, two things are first to consider:
- do the script work or is it crashed (in case of automaton beta, it crashes when you spawn grid or change ownership, the possible fix is mentioned below).
- if it works, what's in the log at the moment of interest (but in case of mods like WeaponCore, you won't see anything in the log and nothing happens).
cheerkin  [author] 22 Feb, 2023 @ 6:23am 
No, you don't.
If you have mods installed, try disabling them.
If you have automaton beta, it breaks some things too. There is a modded script version in discussions on APck main page.
Spectron55 22 Feb, 2023 @ 2:10am 
do i have to activate it with a command somehow?
Spectron55 22 Feb, 2023 @ 2:10am 
when i paste it in near an enemie ship and change the ownership to space pirates, it just shoots the turrets at the ememie ship, but does not rotate, move or shoot with the other guns
ManaTheGentlefox 6 Feb, 2023 @ 7:54am 
I purged my game files and tried it again, it works now.
Probably some weapon core leftovers
cheerkin  [author] 30 Jan, 2023 @ 9:21am 
The script does not affect turrets from the beginning, so they normally should fire at enemy grids. If they don't, it's a game problem, ownership issue, targeting not set up properly, etc. If you spawn a drone, then have a target nearby which belongs to enemy faction, turrets shoot at that target, but drone does not react, then it's a script issue.
ManaTheGentlefox 30 Jan, 2023 @ 5:11am 
thats´s strange cause the setup was vanilla.
I will try with a clean installation later.
thanks for the quick response
cheerkin  [author] 30 Jan, 2023 @ 3:26am 
Then you have issue with turrets, not the script. The code sees enemies using turrets.
ManaTheGentlefox 30 Jan, 2023 @ 2:42am 
they dont
cheerkin  [author] 27 Jan, 2023 @ 4:44am 
Are their turrets shooting the other one?
ManaTheGentlefox 27 Jan, 2023 @ 1:36am 
I just spowned two of them and set one to space pirates, nothing happend.
Am I missing something?
cheerkin  [author] 14 Dec, 2022 @ 12:19am 
Forget this page in everything regarding script, it's just a drone. I would update this blueprint only if I release compatibility-breaking AutoPillock version.
Please continue this discussion either in the FAQ or Bug Reports of the script page, because
1 - it is not related to the blueprint in any way
2 - no one is gonna read it here, but someone may have similar issue and look in the FAQ or Known Issues discussions.
Nightraid [Mine] 13 Dec, 2022 @ 5:34pm 
Alright I'll recheck later. I was focusing too much on the OnStart and OnCompleted triggers because those were the ones working for me atm. Gonna re-read the documentation, the updated script you were referring was the autopillock one right? Not the script currently on this drone?
cheerkin  [author] 13 Dec, 2022 @ 5:07pm 
I don't understand why won't you use hd-coax fire/cease timers. Why use timer attack.OnStart when the script literally aims the reference timer and triggers them when aligned?

Set-response changes the response behavior - free fire, nothing, or attack injection. It does not trigger anything. It does not "invoke", set-response is just a command that changes variable. If a unit reacts for a threat that it detects, than all you have to do is read building guide and make hd-coax group with timers.
Nightraid [Mine] 13 Dec, 2022 @ 3:41pm 
Also if I understood it correctly, set-response:Attack triggers a create-task:attack right? If this is the case it should have triggered timer blocks but for some reason it didn't.
Nightraid [Mine] 13 Dec, 2022 @ 3:24pm 
Scratch FreeFire, I meant set-response:Attack. With the triggers now, I can force fire drone weapons with attack commands. But that's not the case if it detects an enemy by itself. It does "attack" (invoke set-response:Attack) when it detects an enemy but the coaxial weapons are not firing. So it would be useful (For weaponcore users) if set-response:Attack could trigger timer blocks to execute shoot on/off for coaxial weapons. It would not compute for trajectory or any of that complicated calculations but atleast it would be somehow combat functional in a modded server.
cheerkin  [author] 13 Dec, 2022 @ 2:53pm 
If you mean a trigger when a unit starts FreeFiring then no. But I can add it if it can be useful for some reason.
I've updated script and docs, there are up to two timers now for hd-coax.
Nightraid [Mine] 13 Dec, 2022 @ 12:59pm 
I got it working, I probably just forgot to clear-defs between changes. As there is an task-kind trigger, is there an existing set-response trigger? I am also trying to figure out a way to trigger timer with set-response:FreeFire.
Nightraid [Mine] 13 Dec, 2022 @ 6:32am 
Maybe I missed some steps, I did clear defs, tried attack.OnStart and also recompiled PB but I'm not sure if I did clear defs in between changes. Will try again tomorrow.
cheerkin  [author] 13 Dec, 2022 @ 5:45am 
It should be attack.OnStart, not attack-1.OnStart. I checked it now and it works.
cheerkin  [author] 13 Dec, 2022 @ 5:38am 
That's worrying. Are you sure you cleared defs after adding timers? They are def bound.
Nightraid [Mine] 13 Dec, 2022 @ 5:29am 
Yeah I'll just wait for the new version. Btw, I also tried doing the one you discussed in the building guide of autopillock regarding timers. Tried adding 2 timers, I named them attack-1.OnStart and attack-1.OnComplete and added Shoot On for coaxial weapons into them but nothing happened. Not sure if that's applicable on this drone.
cheerkin  [author] 13 Dec, 2022 @ 5:06am 
So you've added a timer, put a TriggerNow on itself, and nothing happens? Well I guess you need to trigger the timer manually first, since like I said the code does not trigger it in the current version, it just Enables/Disables it. Just wait for a new version, I've already added an option of adding two timers to start and cease fire.
Nightraid [Mine] 13 Dec, 2022 @ 4:30am 
I tried adding a timer block to the drone and added that to the [hd-coax][v=500][r=1000][d=3] group. In the timer setup, I put the TriggerNow for the timer I added then Shoot On for coaxial weapon group and nothing happens. I even changed the group name to only [hd-coax] it still won't shoot. No idea what I'm doing wrong.
cheerkin  [author] 13 Dec, 2022 @ 2:18am 
Just make a group and a timer, name does not matters. You can try it as-is, without update - maybe making that timer TriggerNow itself along with ShootOnce would loop shooting?
Nightraid [Mine] 12 Dec, 2022 @ 3:44pm 
Awesome! So I just need to assign a timer block to he-coax group right? Do I need to put an [hd-coax] tag to the timer's name too? I'm looking forward to this update, have been spending too much time in creative to make this combat viable on a server.
cheerkin  [author] 12 Dec, 2022 @ 2:23pm 
OK I got to this tonight. I've added a timer to GAU-8 [hd-coax][v=500][r=1200][d=3] group and my scripted gun worked. The issue is that I designed everything with my rotor cannon script in mind, so the APck just enables/disables timer rather than triggers it. And this way obviously not convenient for players who just want to set up a timer. I can change that later. Also, you don't need to add guns to the group, timer is enough.
Nightraid [Mine] 12 Dec, 2022 @ 7:14am 
Alright I'll wait for the video guide. It's been bugging me for a long time, I've even resorted to using a hostile detection script to trigger the weapons but its a huge waste of ammo as this will trigger on hostile detection so it will fire weapons beyond range, would even fire even if its not aligned to the enemy yet so yeah.
cheerkin  [author] 12 Dec, 2022 @ 7:02am 
I'll make a video on hd-coax feature soon. Maybe I missed something in my explanations and it's not as easy to set up as I used to think.
Nightraid [Mine] 12 Dec, 2022 @ 6:46am 
I think it was the attack static point. I'm not sure if I'm doing it right but what I did was add the drone's existing weapons to hd-coax group and also added a timer to that group. In the timer, I added the co-axial weapons to the hotbar and set it to shoot on so the weapons in that group would open fire on trigger. I then tried having the drone force attack and adding a hostile for it to attack but the timer won't trigger the shoot on. Did I miss some steps? Do I need to add [hd-coax] tag to all the weapons (ex. Gattling Gun [hd-coax]? Is it case sensitive? I would appreciate a guide for this. Thanks!
cheerkin  [author] 5 Dec, 2022 @ 7:58am 
The drone does not face the enemy, it aligns specific weapon with a fire solution which is continuously calculated for said weapon. If there is no weapon, it aligns its' forward with a target position, so just triggering weapons manually won't account for bullet drop, target speed and drone speed, so it would likely miss everything since the drone has high speed most of the time As I said in another thread, it's better to use hd-coax group with appropriate tags and timer trigger.

What is the force attack command? There are 3 ways of having attack task - react, attack static point and attack target id.
Nightraid [Mine] 5 Dec, 2022 @ 4:43am 
I was able to trigger fixed weapons by using a script that detects if hostiles are in range and use this with a timer block to trigger co-axial group weapons. The only problematic thing for me now is how will I make the drone face the enemy.

As a side note, when issuing the force attack command, the drones circle around the enemy while facing them. Not sure how to debug the script tho, but something in the force attack command might help to align the drone to face the enemy.
cheerkin  [author] 4 Dec, 2022 @ 9:36pm 
All available combat behaviors are centered around fixed weapons. I'll add turret-only strategy later - it makes sense for capital ships but I don't have clear idea how to do it just yet.

The code in this drone works if you delete fixed weapons - it aligns default drone forward with the target as intended, I've just tested that. What you describe may be another side-effect from using mods.
Nightraid [Mine] 3 Dec, 2022 @ 6:56am 
Will there be an all turret armament version of this? As this was not compatible with weapon core yet, I changed all manual fire weapon to turrets to make it work but for some reason its line of sight is always tilted at left/right and drone orientation is never facing straight at the enemy
cheerkin  [author] 23 Nov, 2022 @ 4:02am 
Not yet. Have to sort out a few issues.
Cellestee 22 Nov, 2022 @ 8:56pm 
is there a version of the ai script i can use on other drones?
pro100tv 22 Nov, 2022 @ 12:43pm 
Yup
Phoenix 21 Nov, 2022 @ 4:26pm 
Time to get testing~