Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3   Go Down

Author Topic: How do you make AI aircraft machine gun strafe??? PLZ HELP  (Read 7341 times)

0 Members and 3 Guests are viewing this topic.

SAS~Malone

  • flying as #46 with the FAC
  • Editor
  • member
  • Offline Offline
  • Posts: 14562
  • proud member of that 'other' site
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #12 on: November 02, 2011, 06:22:45 AM »

also be aware that setting an altitude of 100m is really too low for an AI plane - they often become confused with such a low altitude, and tend to do weird shit.
rather set the altitude at 300m - anything below that often has untoward results. ;)
Logged
.....taking fun seriously since 1968.....  8)

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #13 on: November 02, 2011, 07:26:55 AM »

Set up an attack in my FMB tonite and experimented with it a bit.  This is how it went, for me at least:

The fuel trucks from the stationary vehicles list can be placed on water just fine and oriented in any direction you want - they even fit quite nicely 'inside' a barge.  I tried a bunch of different attack profiles with AI 109s and 110s - and yes, they will strafe a barge with a fuel truck inside... but only sometimes.

The AI does so much better against shipping with bombs rather than strafing, and strafes so much better against trucks than it does against ships, that I'd be inclined to just go with that.  For a big dockside attack... a bunch of barges in the water being bombed, and a bunch of trucks on the jetty getting strafed works so much better, that for mine it's not really worth the grief swimming against the tide and trying to persuade the AI to strafe the ships as well.  Bit of a shame really, but it's not hard to get a really effective looking attack going on.  :)

As far as I can tell, the big problem is that the ship object seems to 'mask' the truck somewhat.  Put a truck on the water and the AI will strafe it all day every day... but as soon as you put a ship anywhere near the truck - the AI seems unable to 'see' the truck most of the time.  Maybe something to do with hitboxes? Dunno.

Be interesting to know if anyone else has tried messing about with this?

Anyways, interesting experiment.
Night all!
Kiwi 
Logged

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #14 on: November 02, 2011, 07:45:06 AM »

Here's a thought.  Since stationary trucks work just fine on water - how hard would it be to make a 'truck' with the 3d meshes and what-not nicked from a barge or small transport ship?  It wouldn't sink or anything (at least I don't think so) but if it just burned and smoked a bit, that would probably do nicely as a 'strafing object'. 

Project for another day maybe?
Logged

HundertzehnGustav

  • Banned on Sep 11/2012
  • member
  • Offline Offline
  • Posts: 3402
  • Arrogant Narcisistic Pussy
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #15 on: November 02, 2011, 07:47:35 AM »

here is a thought for peter...

"plz help"... why do you think we are here... :)
everybody reading this forum gives his best to help a fellow Pilot.
we hang out here , just to do that, you do not need to ask or beg us to help.
Lending a Hand is our Purpose and our Joy of being in the Tech help forum.

;)

Welcome!
Logged

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #16 on: November 02, 2011, 05:50:53 PM »

Ok.  I'm away from my gaming rig, and I've got some time to kill.

So here are my ideas for making a 'strafable' barge.  I figure it might be able to be done in stationary.ini and technics.ini, so I've downloaded a copy of each off the net.  Here's how an Opel Blitz Fuel truck is put together, one of the stationary vehicles I used in my AI strafing tests last nite:

stationary.ini:
[StationaryObjects]
OpelBlitz6700A_fuel  vehicles.stationary.Stationary$OpelBlitz6700A_fuel  2


technics.ini:
[OpelBlitz6700A_fuel]
Description    Opel Blitz 6700A. Fuel tank.
Icon           Car
// Models
MeshSummer           3do/Cars/OpelBlitz6700A_FUEL/live.sim
MeshSummerDamage     3do/Cars/OpelBlitz6700A_FUEL/dead.sim
// FIXME: make winter camouflage
// Panzer
PanzerType  Car
PanzerSubtype  2.9
PanzerBodyFront      0.007
Explode     CarFuel
// Moving
SoundMove      models.Car
SpeedAverage    22.0
SpeedMax        30.0
SpeedBack        5.0
RotSpeedMax     60.0             // ??
RotInvisAng     65.0
BestSpace          13.0
AfterCollisionDist  6.1
CommandInterval     1.6
StayInterval        1.5


And thats 'all' - I think.

A 'barge' looks like so:

stationary.ini:
[StationaryShipPack]
Barge0                   ships.Ship$Barge0                       2


technics.ini:
[Barge0]
Description  "Barge"
Icon         shipDestroyer
// Models
Mesh         3do/Ships/Barge0/hier.him
// Move
SliderDistance 170.0          // distance to "sensor of curvature" (meters)
Speed          10.0
SoundMove      models.Ship    // FIXME: not supported yet! must to write code!
// Panzer
MinShotCaliber 0.00762
NumShots       80
MinHitExplTNT  5.0           // FAB-25
NumHitExpl     5
MinNearExplTNT 50.0
NumNearExpl    3
[Barge0:Gun0]
Gun                Cannon20K
Panzer                0.001
AttackMaxDistance    3000.0
AttackMaxRadius      3000.0
AttackMaxHeight      3000.0
HeadMinYaw              0.0
HeadStdYaw              0.0
HeadMaxYaw            360.0
GunMinPitch            -5.0
GunStdPitch             0.0
GunMaxPitch           +70.0
HeadMaxYawSpeed        30.0      // ??
GunMaxPitchSpeed       25.0      // ??
DelayAfterShoot         5.0
ChainfireTime           0.0


If we put all of that into notepad and merge them together with a bit of thought, what do we get?  I'll give it a try...
Logged

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #17 on: November 02, 2011, 06:08:08 PM »

Maybe the first step is something like this, hopefully it would work as a clone of the Blitz fuel truck with the 3d of Barge0:

stationary.ini:
[StationaryObjects]
Barge2  vehicles.stationary.Stationary$Barge2  2


technics.ini
[Barge2]
Description    Barge
Icon           shipDestroyer
// Models
Mesh         3do/Ships/Barge0/hier.him
// Panzer
PanzerType  Car
PanzerSubtype  2.9
PanzerBodyFront      0.007
Explode     CarFuel
// Moving
SoundMove      models.Car
SpeedAverage    22.0
SpeedMax        30.0
SpeedBack        5.0
RotSpeedMax     60.0             // ??
RotInvisAng     65.0
BestSpace          13.0
AfterCollisionDist  6.1
CommandInterval     1.6
StayInterval        1.5


Hopefully that's simple enough that it might even work.  The obvious potential problem is that the the barge has a heir.him, and the truck has just a couple of meshes, but with my very limited understanding of 3do files this example just might work ok.  I'll try it tonite in my game - fingers crossed this is a strafeable stationary 'truck' with a ship icon that also just happens to look exactly like a barge?

Wonder if the gun could be made to work?

Edit: looking at it - since there's no moving version of this stationary object (for the moment anyway) I wonder if anything after '// Moving' is actually required?  If not, I doubt it will hurt anything regardless?

Edit no.2: obviously we haven't made any java edits.  I know java class-work is necesary to create a new stationary plane for example, but I honestly can't remember for the life of me if any stationary vehicles or stationary ship mods I've added ever included classfiles.  A full-on ship mod includes java, I'm sure, but since 'Barge0' is already in the game (if you have the Ship Pack mod or UP for example) maybe we can skirt around it? Guess we'll find out soon enough! :lol:  The good thing is though, the java for stationary planes is reasonably 'common-sense' to follow, so hopefully if any java is required for this stationary truck/barge object, it shouldn't be too tricky?

Edit no.3: if for some reason the Barge0 heir.him won't work for us, maybe one idea would be to look in the Barge0 3do folder, and see if we can find files in there to clone a live.sim and dead.sim file for our Barge2 instead, similar to how the meshes for the fuel truck have been put together?
Logged

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #18 on: November 02, 2011, 07:49:57 PM »

If any of this works ( big IF I know  :P ) maybe strafeable HQ buildings could be made too?  Might make for some fun missions?  :)
Logged

SAS~Malone

  • flying as #46 with the FAC
  • Editor
  • member
  • Offline Offline
  • Posts: 14562
  • proud member of that 'other' site
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #19 on: November 03, 2011, 12:43:47 AM »

doubt it'll work, KB, but please don't let me put you off from trying.
i have discovered a long time ago, and after discussions with several modders, including members of TD, that the game engine interprets ships in a very different way from vehicles/ground objects.
among the many issues, it is also why one cannot padlock a ship, or at least not in the latest version of the game, and it has always been this way - once upon a time, ships were padlockable, but very limited, ie after a few seconds, the padlock is lost, even if the ship is still in clear view.
some really top modders have been trying to solve this for many months, without success.
if you can find a workable solution, many hats will be tipped in your direction. ;)
Logged
.....taking fun seriously since 1968.....  8)

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #20 on: November 03, 2011, 04:08:49 AM »


AI 'Strafe-able' Barge

We've got some success with this hopefully!  :)  Screenie is a new Stationary Vehicle 'Barge2' - placed on the water in FMB and successfully strafed by AI.  I've set this up in my custom 4.09 build (because I don't have a 4.101 java modding environment  :-[ ) but it's pretty basic and I suspect it will work as-is in 4.101 too?  I'll do a few more tests and get back with some more info - would anyone be interested in helping me test this idea?  I think we can push it to cover small coastal craft and buildings too.  It looks like the object can do anything the standard stationary trucks can do, for example be the subject of a 'Destroy Ground' target objective in FMB, but much more testing required yet.

@ Malone.  Hi bud,  just looking to have some new objects in game which are able to be strafed by the AI - getting the AI to strafe full-on ship models would be way beyond anything I'd be able to pull off.  :)  Looks like we may be able to get some strafe-able small boats and other stuff in the game though, maybe even tents and such like.  Would you be interested in testing it for me at all? 

I think what I'll do is pack up the strafe-able barge, and a test mission on a stock map for now, and upload it for guys who are interested to test?

Interested to know if anyone has any ideas on armor values and such like.  I think we have all the same attributes as the stock stationary trucks to play with.

Details to follow.  I've added a new java class 'NewStationary.class' because it's the easiest way for me to add more of these objects, so this will be best suited to installs with plenty of java headroom.  But if it turns out to be a useful mod, maybe it could be integrated into the existing Stationary.class instead?  Anyway, just an idea at this stage.

Cheers
Kiwi

Please note: 3do Barge0 model is from ShipPack by MicroWave, Archie & FC.

Logged

Thunda

  • member
  • Offline Offline
  • Posts: 466
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #21 on: November 03, 2011, 04:51:26 AM »

Looks like you have managed to get that to work, KW. If thats the case, the possibilities are huge. Will be d/l'ing the barge, but the idea of being able to get AI to strafe stationary shipping has huge appeal (evil cackling laugh)...........
Logged

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #22 on: November 03, 2011, 05:13:57 AM »

I'll get something loaded up for the weekend Thunda.  I've got some ideas how to implement this in FMB, so I'll integrate all my thoughts into a test mission. Be great if you could test it for us.  :)

If it works out as planned, these objects will have some definite dis-advantanges to 'proper' stationary ships, like not sinking.  :-\  They do explode nicely though and display a nice damage model.  The BIG advantage they have of course, is that the AI will attack them with machine guns and cannons, just like stock truck objects.

If you imagine a dock-side attack, where a bunch of bombers or fighter-bombers are torpedoing, bombing and rocketing stationary or moving larger ships, you could have another bunch of fighters strafing barges and small cargo ship objects, as well as strafing trucks on the jetty and maybe even strafing some HQ buildings. Fingers crossed it might just work!

You won't be able to persuade the AI to strafe Bismarck though.  They're way to smart for that - they'll leave you to it and head back to the bar for a stiff Gin!  :lol: :D

I'm hitting the sack for now.

Cheers
KB
Logged

KiwiBiggles

  • Modder
  • member
  • Offline Offline
  • Posts: 525
Re: How do you make AI aircraft machine gun strafe??? PLZ HELP
« Reply #23 on: November 03, 2011, 05:21:16 AM »

P.S.  Here's my stationary.ini and technics.ini lines - those in the know will be able to see whats going on, and there's just a basic NewStationary java class (and a cloned 3do folder which I may be able to do without) to go along with it.  More ideas welcome:

[StationaryObjects]
Barge2  vehicles.stationary.NewStationary$Barge2  2

[Barge2]
Description    "Barge"
Icon           Car
// Models
MeshSummer         3do/NewStationary/Barge2/hier.him
// Panzer
PanzerType  Car
PanzerSubtype  2.9
PanzerBodyFront      0.007
Explode     CarFuel
// Moving   <------------------------------ may not need any of this section?
SoundMove      models.Car
SpeedAverage    22.0
SpeedMax        30.0
SpeedBack        5.0
RotSpeedMax     60.0             // ??
RotInvisAng     65.0
BestSpace          13.0
AfterCollisionDist  6.1
CommandInterval     1.6
StayInterval        1.5


Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.048 seconds with 26 queries.