Not a member yet? Why not Sign up today
Create an account  

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Advanced Tank Controls independent of AI

Hello all (5 people that read the forums)
I'll now attempt to teach you how to make an advanced tank control system. Here's what it does:
- Permits neutral/pivot steering
- Keeps a specific range from target or enemies
- Maintains a steady and constant angle relative to enemy. Can be set to broadside or face front.
- Does not need PIDs or any real tweaking, it works as a prefab easily.

So here are the basics of it and how to do it:

1) First of all, make your tank hull and whatnot.
AI mainframe
a transmitter and receiver
good enough detection (anything that aims a gun is more than enough)
and 4 ACBs

You can expand later by, for example, giving AI targetting cards, but do NOT give it any movement cards.

3) Press Q on your tracks, and set their custom control settings to:
green- U, K
red- J, H

green- U, H
red- J, K

This is standard for tank controls, remember to apply to all touching wheels with that handy button at the bottom.

4) Press Q on your AI mainframe. Remove both the behaviour (idk if it really matters) and the movement thing. IN THE MOVEMENT TAB, GIVE IT FORTRESS CONTROLS. That'll make it so AI can't control wheels, and it's important that it does not. Do not tweak anything else, it's not important for this tutorial.

5) Now that you've set it all up, it's time for the actually important part of this tutorial, the ACBs:
You have 4 ACBs. Separate them, 2 will be for range and 2 for the turning. It's not necessary that you physically separate them, it's just to avoid confusion for now.
You might remember older tutorials had you either putting a stick on your turrets or making a separate turret system for this, but thanks to some update, we now have bearing inputs on the ACBs which eliminates the need for a turret. The premise is simple, the ACB uses the bearing data from the detection and uses that to turn the tracks accordingly. But here are the settings for them:

condition: TARGET bearing (not enemy) is between -180 and -5
response: Complex controls set to activate letter H

condition: TARGET bearing (not enemy) is between 5 and 180
response: Complex controls set to activate letter K

Basically, if you don't understand it, the ACBs will activate if the enemy is located in that area of 175º which is basically everywhere except right in front. If there's an enemy to the left, it'll activate letter H, which will turn left until the enemy is between bearing -5º and 5º.
You can experiment with different bearing values if you want, you can even theoretically make a broadsider with this.

Now for the range keeping ACBs

condition: ENEMY range (not target) is between 400m and 5000m
response: Complex controls set to activate letter U

condition: ENEMY range (not target) is between 0m and 300m
response: Complex controls set to activate letter J

These ACBs will keep a range of between 300m and 400m. There's a deadzone of 100m in between in which the tank will remain static. You might not want this, so instead of doing 400m and 300m, do both 400m. Of course, 400m is just an example, you can set this to anything you'd like. As you might have guessed, U is fowards and J is backwards.

If your detection is enough to aim your main gun, then it'll be enough to aim your tank and drive it. The only downsides to this is that fleet move and other AI specific moves are not available anymore, but honestly that was the case with every single ACB steering-rangekeeping method to date. So it's not a big deal right?

Attached is an example tank hull for all your prefabbing needs. Hope I didn't forget anything important, if you've got any questions or issues tell me and I can help. After all I'm one of the few active and experienced tank builders in the forums...

Attached Files
.blueprint   ACB steering.blueprint (Size: 55.8 KB / Downloads: 13)
[Image: 2e148b3926.gif] [Image: wSoy1rk.gif]
This is why you don't make fighter pilots fly bomber aircraft...

Thanks a lot! Smile
Imperium Age of Sail Campaign Custom Campaign Dev Idea -> Check it out here!

[Image: 32DA9A8EECC76926A3CDAA803283F5FCC3314BBA]


Forum Jump:

Users browsing this thread:
1 Guest(s)