From The Depths
Samson Dec 2, 2019 @ 9:00pm
How to use new pre-configured AI Cards
Having returned after a long break from FTD I found that the author of my favorite LUA script is no longer maintaining it as apparently its now in the vanilla game. (Hover gunship/airplane AI by Draba) This has been a big issue for me since I was never able to fully grasp the use of AI Cards or PIDs, and every time I have returned to FTD their menus have been completely different.

I've spent hours searching for tutorials, guides, and videos but they all seem to be outdated. A lot of content on the workshop is also outdated so I wasn't able to find anything to reverse engineer. I also tried experimenting with the new pre-configured cards, but everything I have tried results in a chaotically wobbling "hovercraft" that can not control its altitude.

If anyone could refer to me to a working Frontal Hovercraft on the workshop that I could reverse engineer, or a guide on how to use these Cards/PIDs that would be greatly appreciated.

Originally posted by Draba:
Changed the example up to do roughly what the lua script could.
I agree that having to manually set up propulsion components is a pain, it might get another look later after all the breaking changes.

https://i.imgur.com/MOjeud8.mp4

Main points and the blueprint here:
https://forum.fromthedepthsgame.com/showthread.php?tid=39165
< >
Showing 1-13 of 13 comments
Draba Dec 3, 2019 @ 3:36am 
Send me what you have and I'll set it up/explain what happened and why.

Simple cards+auto PID config should give a decent base, other behaviors didn't like the auto propulsion setup so that should be the main difference between builtin and the old lua.
There are some other differences to play nice with FtD AI code but those aren't that important.
Tutorials are being worked on constantly so catching should become easier in the future.
Samson Dec 3, 2019 @ 2:33pm 
Originally posted by Draba:
Send me what you have and I'll set it up/explain what happened and why.

Simple cards+auto PID config should give a decent base, other behaviors didn't like the auto propulsion setup so that should be the main difference between builtin and the old lua.
There are some other differences to play nice with FtD AI code but those aren't that important.
Tutorials are being worked on constantly so catching should become easier in the future.

Oh my lord it's the LUA Legend themself! I've got nothing to send unfortunately, I can't get anything even close to functional with these Cards/PIDs, the only thing I could ever use was LUA scripts.

I used to build something like this (dediblades or other propulsion systems on each corner, in each direction) slap a LUA block down and plug your script into it and it would just work, but all this AI Card does is make it flop around in water.
https://i.imgur.com/iPk7lpE.jpg



Edit: This is one of the workshop builds I tried to reverse engineer; https://steamcommunity.com/sharedfiles/filedetails/?id=1908409954&searchtext=falcon

It uses the "point at and maintain distance" behavior which I think is derived from your "frontal attack" hovercraft script. I could build off this but it doesn't point the craft directly at the target, it kind of sways from side to side and doesn't pitch toward the target. Back the script still worked I could throw a laser on a hovercraft and the whole thing would just orientate itself at the target and light them up.
Last edited by Samson; Dec 3, 2019 @ 3:09pm
shrekstyle Dec 3, 2019 @ 10:00pm 
Thats one i edited for another user that couldnt get it to fly.
I did not build it, not a bad design but not my style.

I added and set the AI PID for pitch to a fake set point so it didnt pitch down because it would nose down and move towards the target. (not enuff reverse thrust)

The left/right swerving is because theirs only turning thrusters on the rear and i set the top two dediblades to lift and strafe i think.

Adding thrusters to the side at center of mass set to strafe and thrusters on the front sides set to turning and removing strafe from the dediblades should fix the swerving.

Adding more reverse thrust and removing the pitch PID fake set point should let it pitch down and still keep distance.

Also in the ai card setup check the "dont retreat if enemy to close" button or it will try to turn and run to the set range before turning to shoot again, instead of just reversing and shooting if too close. (something i seen later)
Last edited by shrekstyle; Dec 3, 2019 @ 10:05pm
Samson Dec 4, 2019 @ 3:56am 
Originally posted by shrekstyle:
Thats one i edited for another user that couldnt get it to fly.
I did not build it, not a bad design but not my style.

I added and set the AI PID for pitch to a fake set point so it didnt pitch down because it would nose down and move towards the target. (not enuff reverse thrust)

The left/right swerving is because theirs only turning thrusters on the rear and i set the top two dediblades to lift and strafe i think.

Adding thrusters to the side at center of mass set to strafe and thrusters on the front sides set to turning and removing strafe from the dediblades should fix the swerving.

Adding more reverse thrust and removing the pitch PID fake set point should let it pitch down and still keep distance.

Also in the ai card setup check the "dont retreat if enemy to close" button or it will try to turn and run to the set range before turning to shoot again, instead of just reversing and shooting if too close. (something i seen later)

Hey nice, yeah I found your post when I was searching the discussions for topics on hovercraft and AI. I tried following your advice and I did get the craft to pitch toward the target, but wasn't able to resolve the swaying. (Very limited understanding of what's going on in all these menus) Also tried ripping the AI out of the Falcon with the prefab tool and plugging it into a very basic blimp with balanced thrusters, but that didn't work too well either.

Was really hoping to terrorize DWG with a hideous PAC Blimp.
shrekstyle Dec 4, 2019 @ 6:07am 
Ok have a look at either the Yaw PID or tweak the evade setting in the AI.
The craft uses evade left/right to avoid some incoming fire, lowering the evade to 0 will stop it from swaying.

Their also might be too much gain and the craft is over correcting. Fiddling with the PID can get it to be more or less stable.

With the blimp does it have dedicated strafe thrusters or shared strafe/turning thrusters?
For good strafe you want the force to come from the centre of mass of the crafts sides.
Samson Dec 4, 2019 @ 7:53am 
Originally posted by shrekstyle:
Ok have a look at either the Yaw PID or tweak the evade setting in the AI.
The craft uses evade left/right to avoid some incoming fire, lowering the evade to 0 will stop it from swaying.

Their also might be too much gain and the craft is over correcting. Fiddling with the PID can get it to be more or less stable.

With the blimp does it have dedicated strafe thrusters or shared strafe/turning thrusters?
For good strafe you want the force to come from the centre of mass of the crafts sides.

Oh I didn't realize it would be evading, that's probably what the problem was. I don't think I'll be able to get this working the way I want without the old LUA scripts, but your advice and the build you fixed for someone else has helped me learn a few things about PIDs. My blimps may not fly again, but I'm a little bit better at building in FTD now.

As for the blimps I used to build, I'm not sure whether or not they had dedicated or shared thrusters, the LUA script took care of everything so I never even looked at those menus. When I tried to rebuild it since the script became obselete I was using dedicated thrusters like on the Falcon example.
shrekstyle Dec 4, 2019 @ 8:05am 
Yeah i used that script for my strafing gunships and fleet repair drones too, was easy to set up and preformed well. I havent been able to replicate them properly yet.

I still have the code in a txt file in the bottom right of my desktop. :(

Keep tweaking settings and see what the results are, best way to learn.
The author of this thread has indicated that this post answers the original topic.
Draba Dec 4, 2019 @ 2:49pm 
Changed the example up to do roughly what the lua script could.
I agree that having to manually set up propulsion components is a pain, it might get another look later after all the breaking changes.

https://i.imgur.com/MOjeud8.mp4

Main points and the blueprint here:
https://forum.fromthedepthsgame.com/showthread.php?tid=39165
Last edited by Draba; Dec 4, 2019 @ 2:49pm
Samson Dec 4, 2019 @ 8:38pm 
Originally posted by Draba:
Changed the example up to do roughly what the lua script could.
I agree that having to manually set up propulsion components is a pain, it might get another look later after all the breaking changes.

https://i.imgur.com/MOjeud8.mp4

Main points and the blueprint here:
https://forum.fromthedepthsgame.com/showthread.php?tid=39165

Hey that's pretty smooth, I might be able to make that blimp after all.

It's not so much that it's a pain for me as much as I have no idea what any of the variables mean or even an introductory understanding of how these things work. That's why I always opted for scripts a couple years ago when I was playing FTD a lot, they're familiar. I've made an honest effort to learn the systems, not sure if it's just out of my grasp or the fact that the menus keep changing but it's been a futile struggle.
Draba Dec 5, 2019 @ 2:43am 
Yep, wanted the simple cards to be as easy to use as the lua but they also have to fit in with the current system(+Nick prefers them being a step towards players understanding the AI system).

Better tutorials are definitely coming, PID autoconfig will take some of the edge off and will look around for a way to put optional propulsion autoconfig back in without breaking anything.
In the meantime, send me whatever you finished and need help with.
Last edited by Draba; Dec 5, 2019 @ 2:44am
shrekstyle Dec 5, 2019 @ 12:19pm 
Nice, Thanks Draba now i know how to better PID things.
Now i just need to find out how to make the repair drone AI that moves to my damaged craft then retreats to safe distance when not needed.
Samson Dec 5, 2019 @ 1:05pm 
Originally posted by shrekstyle:
Nice, Thanks Draba now i know how to better PID things.
Now i just need to find out how to make the repair drone AI that moves to my damaged craft then retreats to safe distance when not needed.

Bet there used to be a LUA script for that ;p
shrekstyle Dec 5, 2019 @ 5:52pm 
Originally posted by fa†al:

Bet there used to be a LUA script for that ;p

Draba's same gunship LUA script used to do that very thing.
Oh how i miss that script.
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Dec 2, 2019 @ 9:00pm
Posts: 13