Post Reply 
 
Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-11-05]
2017-02-09, 06:22 PM
Post: #31
RE: Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-01-18]
(2017-02-09 02:27 PM)Shaun Wrote:  This is great! Just needs support for paddles

I personally don't use paddle ships that often (or rather: at all Tongue), so probably not something I would prioritize. (Though there's a few things in the code that probably have to happen first, which I will look into soon.)

What would be needed to support them? Just driving spin blocks oriented left/right?

(2017-02-09 06:03 PM)CptLego Wrote:  @OP is it possible to set up a lua controller to switch shield mode from reflect to laser absorb? in adventure i dont really have that ability on other ships only the one im on and ofcourse i cant warp to the ship or get 3rd person view so they are truely independant.

I know this pain. But what would be used as a trigger to switch the shield mode? Lua can't read the laser detector. And unfortunately, the complex controller doesn't work over remote control.

(And there's a roundabout way for Lua to detect laser hits, but it requires: 1) no fuel engines, and 2) no resource sharing. Which seems lame...)

What I end up doing is putting two ACBs near the remote ships' "build origin" (you know, when you select a ship and hit "build" -- the place where the cursor starts). Then I just manually go to build mode and then hit the appropriate ACB.

Yeah, it's cheesy, but there doesn't seem to be any other way.

Other alternative to to teleport over and switch it yourself (by binding a key to those ACBs), which I usually do for my larger ships.

My Workshop | My FtD Lua Scripts
Find all posts by this user
Quote this message in a reply
2017-02-10, 12:37 PM
Post: #32
RE: Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-01-18]
(2017-02-09 06:22 PM)ZerothAngel Wrote:  
(2017-02-09 02:27 PM)Shaun Wrote:  This is great! Just needs support for paddles

I personally don't use paddle ships that often (or rather: at all Tongue), so probably not something I would prioritize. (Though there's a few things in the code that probably have to happen first, which I will look into soon.)

What would be needed to support them? Just driving spin blocks oriented left/right?

(2017-02-09 06:03 PM)CptLego Wrote:  @OP is it possible to set up a lua controller to switch shield mode from reflect to laser absorb? in adventure i dont really have that ability on other ships only the one im on and ofcourse i cant warp to the ship or get 3rd person view so they are truely independant.

I know this pain. But what would be used as a trigger to switch the shield mode? Lua can't read the laser detector. And unfortunately, the complex controller doesn't work over remote control.

(And there's a roundabout way for Lua to detect laser hits, but it requires: 1) no fuel engines, and 2) no resource sharing. Which seems lame...)

What I end up doing is putting two ACBs near the remote ships' "build origin" (you know, when you select a ship and hit "build" -- the place where the cursor starts). Then I just manually go to build mode and then hit the appropriate ACB.

Yeah, it's cheesy, but there doesn't seem to be any other way.

Other alternative to to teleport over and switch it yourself (by binding a key to those ACBs), which I usually do for my larger ships.

That build origin is a Lamb good idea, i hadnt thought of that. thanks for the reply
Find all posts by this user
Quote this message in a reply
2017-05-23, 04:39 AM
Post: #33
RE: Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-05-21]
Added AttackDistance option. When set (and it should be a number between MinDistance and MaxDistance), it represents the ideal attack distance for the vehicle which it will try to maintain independent of the other distance settings.

Also wrote up some basic docs, since with the addition of this new option + the somewhat recent switch of control to my 6DOF module, configuration has probably become more confusing than ever.

My Workshop | My FtD Lua Scripts
Find all posts by this user
Quote this message in a reply
2017-06-03, 06:15 PM
Post: #34
RE: Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-05-21]
Did you get round to doing one for tank steering? ( I guess that is very like paddle steering, actually ). I guess it just needs to find all sideways-pointing propulsion & attach those to yaw for tanks, at least - that's slightly easier than working out which paddlewheel spinblocks to use. If not I'll throw it on the big list of things to look at I have...

ACB tank steering works, but the binary nature does reduce the tank's possible top speed considerably.

Poke my boat! mostly pre-2.0 learning & catalogue thread - Update: Heavy & light tanks 12/01/18 for 2.1. 6 ships made 2.0 aware. If it's not AotE I can't do it regularily - sea -> post processing -> eyestrain.
Find all posts by this user
Quote this message in a reply
2017-07-05, 11:38 PM
Post: #35
RE: Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-05-21]
Can I set this script to use spin block rudders from After Cataclysm Mod?
Find all posts by this user
Quote this message in a reply
2017-10-21, 09:00 PM (This post was last modified: 2017-10-21 10:59 PM by ZerothAngel.)
Post: #36
RE: Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-05-21]
Sorry, didn't notice these questions until now.

(2017-06-03 06:15 PM)Richard Dastardly Wrote:  Did you get round to doing one for tank steering?

I briefly tested in AotE, and it doesn't look like there's any way to do tank steering with wheels from Lua (aside from going through ACBs).

Wheels aren't visible from the Component_* methods, so treating them as propulsion wouldn't be possible.

They can only be controlled by using water or air controls (and setting the 'V' screen option appropriately). Ironically, they don't respond to land control signals.

Maybe they show up as spinblocks? I didn't bother to test that...

Edit: I'm a dumbass, they're treated as generic propulsion (like you said, which I missed). The Component_* interface only lets you set drive fraction on propulsion (a positive fraction), so you'd need to use I:RequestControl to drive the wheels. Though I'm still not quite sure how you'd do tank steering as you cannot simultaneously drive the wheels forward & reverse.

Edit2: Maybe drive them forward & reverse in alternate frames? Anyway, me personally, I would create a separate tank AI for this. There's some overlap (and I base my knowledge of tank tactics on Fury and Girls und Panzer), but not enough to justify packaging tank controls into every single script of mine that uses this naval AI. Tongue

Edit3: Alternating frames doesn't work. Just plain differential steering (i.e. no neutral steering) is all you can hope for using normal Lua controls. However, drive maintainers save the day again. One drive maintainer for the left track, another for the right, then you can throttle both independently very easily and even in opposite directions...

(2017-07-05 11:38 PM)Fernir Wrote:  Can I set this script to use spin block rudders from After Cataclysm Mod?

I don't have any experience with AC and unfortunately, I removed spinblock support some time ago. It wouldn't have supported a spinblock rudders anyway, that would need special coding.

As I only use spinblocks for aesthetics (and very rarely: for cheese), I probably won't be re-adding support for them (for a while, at least).

My Workshop | My FtD Lua Scripts
Find all posts by this user
Quote this message in a reply
2017-10-25, 07:12 PM (This post was last modified: 2017-10-25 07:13 PM by ZerothAngel.)
Post: #37
RE: Naval AI with terrain & friendly avoidance, evasive maneuvers [2017-10-25]
Made a few tweaks and additions to make it more suitable as a tank AI.

With the AttackReverse option true, instead of "flipping" AttackAngle (i.e. using 180 - AttackAngle) to maintain AttackDistance, it will instead reverse AttackDrive (still PID scaled, of course).

This, coupled with AttackAngle set to 0, makes it suitable for assault (or "forward broadside" lols) behavior. Great for tanks or airships that can turn in place, questionable for naval vessels. (Note, this script is yaw- and propulsion-based, there is no lateral movement at all. If you want "orbiting," look elsewhere.)

Also added links in the OP to all my script variants that use this AI. Maybe they'll be useful to other people, as long as you can decode the million other options.

My Workshop | My FtD Lua Scripts
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)