AI flak gun - 52-K 85mm v1
This is a flak cannon made specifically for the aggressive AI that actually shoots explosive cannon at you or other AI targets! Weapon model is Soviet designed 52-K 85mm, built in 1:1 scale, from drawings. Used in WW2, Vietnam war, etc. Mobile friendly.
*Three guns spawned
Read description!
You can spawn as many as you like!
This build uses critical damage technique (as used by MysteryTimeTraveler's ZSU-23-4) to prevent friendly fire, and IS compatible with other builds that use the same technique. Auto-aim FT, fuse FT, as well as the bot activation tech are taken directly from U.S.S. Langley by Winterro (link). My primary contribution was the addition of "weapon switch" mechanism, "target search radar" mechanism, and the less accurate guns that creates the flak zone effect (last one was majorly inspired by Sparky6004). More on that below.
I will also link some other 'mass spawn-able AI weapons' type builds below. Use these builds to create your own air defense hell.
*Consult your device for the actual maximum number of units it can handle.
*With 19x guns
Not super accurate, but still poses a threat!
Spawn it on the ground with Aggressive AI, and this long-range anti-aircraft gun will attack planes (with a Target Marker) within 15km radius & altitude below 10000m. It has very low accuracy against maneuvering targets, and rarely ever hits a "high-flying" target (above 1000m)... but don't let your guards down, because it can still hit you sometimes. And regardless of the accuracy, it creates a lot of explosions in the sky for the cool-ness factor.
Have fun!
How it works
Bot Activation (how to make AI use cannons)
AI doesn't normally use 'cannon', but it's been discovered that they DO in fact switch to, and fire, anti-air or multirole cannons once they've fired an air-to-air or multirole missile, and ran out of the missile. (I haven't investigated the exact condition that triggers this yet.)
I've learned this from many builds by winterro, and it's the essential component that makes "custom AI flak gun" (as well as other AI builds that use cannons, like shore batteries or warship guns) possible.
This is how it works (as I understand it):
When an Aggressive AI fires a missile, it basically "presses down" the FireWeapons, and when it runs out of the initial weapon, AI automatically switches to another weapon that has ammo left. And it keeps pressing down on the FireWeapons--so if the next weapon is a cannon, AI starts firing it. And when you combine auto-aim with this, you can get a basic cannon turret for AI.
Missile/cannon reset mechanism
The main caveat with this technique, however, is that once they stop firing, it has to fire another missile, and run out of the missile once again to switch the weapon again before it starts using the cannon again. I was able to solve this by using a mechanism that "resets" the missile and lets AI do the necessary steps every time it loses a target and/or stops firing a cannon.
Below is an explanation of how it works:
AI finds a target, and selects the activation missile.
AI presses FireWeapons button and "fires" the missile, which causes the "Reset" Rotator to rotate in one direction.
*Max angle of rotation is limited.
*Missile will never leave the 'aircraft', since it's mounted on a Detacher, but is also connected to another block. I suspect many people probably did this by mistake. This prevents it from ever running out of the missile ammo.When the Rotator moves past a certain angle, Activator Missile gets deactivated, and cannons get activated.
AI "runs out" of the missile, and switches to the cannons which now has ammo.
If AI loses the target, or stops firing (=not pressing the FireWeapons button), Reset Rotator rotates back to its original position, which deactivates the cannons, and reactivates the Activator Missile.
Process repeats.
This mechanism was essential to make the flak gun useful. Without this mechanism, once it stopped firing, it never fired again. (This is my main contribution to the build alongside the 52-K 85mm flak gun model itself. Feel free to adapt this system to your builds, but when you do, please be sure to link this page for credit and explanation!)
"Radar-tator"
This is a mechanism that allows the cannon to search 360 degrees for target.
(Aggressive) AI in SP has a 'cone of vision' so to speak that's about 180 degrees or less, based on the current heading of the primary cockpit. Aggressive AI can only see and target aircrafts within this field, unless they get a missile lock from behind or outside the vision field (in which case they'll react to the aircraft that's "attacking" them).
This is bad for a stationary AA gun, as it won't notice an aircraft coming from behind or just outside of the vision field. Solution was to simply rotate the cockpit unless it "locks on" to a target.
Unfortunately, the aggressive AI doesn't seem to change its target unless it's destroyed or despawned (and maybe also when a new plane attacks them--but this doesn't really happen since the flak guns are critically damaged and no longer visible to other AI), so if they find an aircraft that's really far and way beyond its range, before it sees a plane much closer, it will be locked on to the far target and won't attack the nearby plane bombing them. This is something I can't do anything about. (I've tried things.)
*Unfortunately, this does not seem to work with the wing gun trick (where the wing guns/minigin disconnected from the cockpit keeps firing--they seem to stop when the cockpit moves) of MysteryTimeTraveler's ZSU-23-4.
Flak burst "area" effect
This was achieved by having a bunch of barrels each with slight angle in a random directions + varying fuse time (meaning the shell in theory explodes before or after it reaches the location it's aimed at). This was something I wanted to do from the very beginning but struggled the most with, until I had the "Eureka!" moment (thanks to Sparky6004's demo & the SP Ship Combat thing I'm working on).
Removing target marker with "Critically damaged" state
This isn't a new tech, but this build uses the critically damaged state (which happens when an aircraft loses (whether via damage or Detacher) about 1/3 of the parts it has when spawned) to prevent 'friendly fire'. This lets you spawn as many of these as you like. This time, I've used fuel tank blocks as the parts to detach (cannon itself is about 60 blocks) and put them high up, so they get destroyed & vanishes when they fall to the ground, which reduces the burden on the game (=fewer parts the better).
This was inspired by the ZSU-23-4 by MysteryTimeTraveler.
Credit
winterro's U.S.S. Langley for auto-aim rotator FT, cannon fuse FT, and bot-activation missile. This flak gun build is in large part a reskin of winterro's Langley gun, and it wouldn't have been possible without the bot-activation technique.
MysteryTimeTraveler's ZSU-23-4 Shilka (AI Ground Target) for the critically damaged trick to prevent friendly fire. https://www.simpleplanes.com/a/j40xqF/ZSU-23-4-Shilka
An experimental build (video of it) by Sparky6004 for the inspiration/idea on how to make the cannon inaccurate & create "flak screen" effect. I was trying to do that for a while, but was going in the wrong direction.
(Breakthrough came when I was experimenting with my "ship combat" build. I tried to made the cannons more accurate by making them "less precise" by giving them slight angles (like you did on real gun-armed ships of the olden days). This made me realize I could replicate the Spark's "flak zone" effect by applying this to the flak gun. Followed by a realization that you need different fuse time for different burst distance.bjac0 for target altitude FT used to limit maximum firing altitude (from their "Useful FT codes" forum post https://www.simpleplanes.com/Forums/View/1333110/Useful-FT-codes)
Wikipedia for the info on 52-K 85mm gun.
Trumpeter's 52-K model painting guide for general reference. Image can be viewed here: https://www.frontlinehobbies.com.au/trumpeter-1-35-soviet-52k-85mm-air-defense-gun-m19
52-k 85mm model, missile/cannon reset mechanism and some other stuff were made by me.
Thanks to all those mentioned above (minus myself!), as well as others whom I failed to mention or inspired me in some way.
List of some compatible Builds
This is a list of some compatible builds I've made, and also the ZSU--they all use the critically damaged trick to remove target marker (so no friendly fire among them), and are also mostly mobile friendly. You can create your own air defense/instant mission scenario with these builds. (Tips: when you save them, add a 2 or 3 letter to the names of these builds. "MIS" (for mission) for example. This way, you can find these builds in the spawn menu by just typing "mis" in the search bar. Saves you time and effort.)
Air defense
*Must be spawned with Aggressive AI
ZSU-23-4 by MysteryTimeTraveler
https://www.simpleplanes.com/a/j40xqF/ZSU-23-4-Shilka
*The original "AI AA gun" (at least to me). This one uses wing guns as its weapon. Very accurate.
Also, here's a lower part version in case you need one: https://www.simpleplanes.com/a/4RZI3g/ZSU-23-4-Shilka-LOD-AI-AAA-25-parts-mod-original-base-by-MysteryTimeTraveler
AI interceptor (air spawn)
*Use an air spawn
https://www.simpleplanes.com/a/a32Sv4/AI-interceptor-Mig-17-air-Swarm-AI-Fighter
AI interceptor MiG-17 (land spawn - it takes off)
https://www.simpleplanes.com/a/lhK867/AI-interceptor-Mig-17-land-v1-AI-fighter-that-works-as-a-team
Targets
Target Airbase (with US aircrafts)
https://www.simpleplanes.com/a/4169yp/Target-Airbase-BSAF-Camp-Poostein-v1-700-parts
Parked MiG-17s (camo)
https://www.simpleplanes.com/a/p3K465/Target-7x-Mig-17s-camo-v-MC1-1
Parked MiG-17s (silver)
https://www.simpleplanes.com/a/s82807/Target-Mig-17-silver-MC1-1
I'll probably do AA guns like this for a few other militaries as well. Thinking of some ww2 American and German stuff (88mm is a must).
Feel free to create your own AI flak gun/coastal cannon/whatever else using the techs, though.
Just be sure to credit others and myself for the techs! Oh and don't forget to link this page for credit and explanations!
Specifications
Spotlights
- This craft is curated
- pancelvonat 1.2 years ago
- IzzyIA 1.2 years ago
- winterro 1.2 years ago
- SnoWFLakE0s 1.2 years ago
- ShiroNeko 1.2 years ago
- Aghsan22 1.2 years ago
- xNotDumb 1.2 years ago
- ZeroWithSlashedO 1.2 years ago
- Dragoranos 1.2 years ago
- WinsWings 1.2 years ago
- MAPA 1.2 years ago
- KSB24 1.2 years ago
General Characteristics
- Predecessor U.S.S CV-1 Langley with AA guns
- Successors 5 airplane(s) +21 bonus
- Created On iOS
- Wingspan 15.0ft (4.6m)
- Length 26.0ft (7.9m)
- Height 31.7ft (9.7m)
- Empty Weight 8,629lbs (3,914kg)
- Loaded Weight 12,883lbs (5,843kg)
Performance
- Wing Loading N/A
- Wing Area 0.0ft2 (0.0m2)
- Drag Points 0
Parts
- Number of Parts 97
- Control Surfaces 0
- Performance Cost 426
@Kendog84 if the missle gets destroyed one way or another, the cannons stop firing, firing it into space at light speed makes sure that does not happen
@Kendog84 using 2 missles makes the change to the cannon permanent, you can add a milion targets after that, but the cannons won’t stop firing
Adding a second missle makes the ai automatically shoot again every time, if you shoot the missle to outer space using a realy powerful detacher it will start firing again every time.
Here's a demo movie that shows the AA gun in action. Tragedy at Camp Poostein
https://www.simpleplanes.com/Videos/View/1834459/Tragedy-at-Camp-Poostein-and-enemy-AA-gun-demo
Thanks everyone for downloading, upvoting, highlighting, and commenting!
18,000 download!
69th upvote im proud 🗿
Any 152mms?
@winterro
That makes sense. Thanks for the explanation. (Still wondering why firing two missiles make it permanent, has anyone got a clue on it?)
.
I've made a modified version of the gun to incorporate the double missile technique, and it worked fine. Felt a little laggier than usual when I spawned multiple units though. I'm a little concerned about the effect of having a bunch of objects moving at light speed has, so perhaps the I time spent on the reset-rotator mechanism wasn't entirely a waste of time, haha
@winterro
I see, thanks. Is it also necessary to launch the missiles with detachers, or does this work without them?
@winterro
Huh, what's the settings of those missiles in your first example? Their names, activationGroup, firing delay, etc.
Also, about the second example, 1)does the missile have to be fired by the AI's pressing FireWeapons button, or can you do it with AG as soon as they spawn, and 2)what does the process look like?
absolutely phenomenal
love this
@Kendog84 oh lol
@QuesoAirlines
Thanks! I wanted one for a long time myself
@VTPADELTA
Fly really low and close to the surface, it's totally very inaccurate so you can easily survive. Honest.
@DatMaluchGuy19
"Hahaaa! CJ101 going down!
Remember who I am Carl, I am the 'Big Smoke!'"
@Sparky6004
Took me a looong time to, it was way above my brain-power grade, lol
@DimitriIqbal91
Thanks a lot, makes it worth the effort!
@OrderlyHippo
Thank you!
@MobileBuilder21
Thanks!
@VenusLancer
It was about time!
@winterro
Thank you! Couldn't have made it without your bot activation trick, and the FT I stol- I- I mean, borrowed from your Langley...
Hope this one prompts people to make more stuff like these.
I was literally thinking about this last night while recording footage. Das crazy!
Finally, something to test my aircraft dodging capability on.
Pov:
Airbase: you picked the wrong airbase fool!
CJ:
EY EY EY EY CHILL CHILL
-last words from cj before he got shot down, rest in peace :<