Special Aircraft Service

Please login or register.

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

Author Topic: ship cannons AI improvement help need  (Read 745 times)

0 Members and 1 Guest are viewing this topic.

western0221

  • Modder
  • member
  • Offline Offline
  • Posts: 898
  • Live in Japan
    • IL-2 itaki blog
ship cannons AI improvement help need
« on: September 19, 2011, 10:49:31 AM »

Now I try ship's cannons shooting AI improvement.
Some of them is in this movie
http://www.youtube.com/watch?v=vtsTCXMMzkk

Default ship's cannons shooting AI is the same algorithm of ground artillery.
com.Maddox.il2.ai.ground.aim class.

I divide from com.Maddox.il2.ai.ground.aim class into new ship cannon aim class.
After try and error, try and error, my needs of improvement is achieved to some extent.
achieved... but something in aim class is BLACKBOX to me.
I tweak the AI java code without fully understanding about aim class.
some code is "true/false reverse?" I feel.
But that code works well. I don't understand.

So, I need a "teacher" to teach me aim class or other AI java code.
Logged

santobr

  • Modder
  • member
  • Offline Offline
  • Posts: 770
  • Senta a Pua!
Re: ship cannons AI improvement help need
« Reply #1 on: September 19, 2011, 11:30:16 AM »

Great! 8)

About torpedoes... :)
Did you make some test with ships on her six?



santobr.
Logged

asheshouse

  • Modder
  • member
  • Offline Offline
  • Posts: 836
Re: ship cannons AI improvement help need
« Reply #2 on: September 21, 2011, 01:44:39 AM »

I have just watched your video.
This is brilliant work.
I wish I could help more but my knowledge of java is poor.

I will try out the NoFireMinYaw and NoFireMaxYaw.
These will be useful on many existing ships. (Marat, Tribal Class, J Class and others)

Keep up this work  :)

Ashe
Logged

panzerkeil

  • member
  • Offline Offline
  • Posts: 32
Re: ship cannons AI improvement help need
« Reply #3 on: September 21, 2011, 03:24:40 AM »

This is great research!  Keep up the good work Western!   :)
Logged

Eexhaton

  • Ancient Entity
  • Modder
  • member
  • Offline Offline
  • Posts: 637
  • Bukakke Blitzkrieg!
Re: ship cannons AI improvement help need
« Reply #4 on: September 21, 2011, 06:06:27 AM »

Oh great!

As Asheshouse said, some ships could really benefit from a mod like this.
Keep up the good work! :)
Logged

SAS~Anto

  • Aviator Mod Team
  • SAS Team
  • member
  • Offline Offline
  • Posts: 2304
  • Il-2 1956 Team
    • II./Jagdgeschwader 53
Re: ship cannons AI improvement help need
« Reply #5 on: September 21, 2011, 07:07:02 AM »

Nice one!
Logged

SAS~Skipper

  • IL2 must be repacked!
  • SAS Team
  • member
  • Offline Offline
  • Posts: 1120
Re: ship cannons AI improvement help need
« Reply #6 on: September 21, 2011, 07:37:14 AM »

You should watch this space in the ships.ini


[IJNAkizukiDD42:Part23]
BaseChunk                 Head7
strengthBasedOnThisSection strength_GunMedium

gunBasedOnThisSection gun_torpedo
HeadMinYaw                  60
 HeadMaxYaw                 120

 GunHeadChunk             Head7
 GunBarrelChunk            Gun7
 GunShellStartHook  ShellStart7

The problem is that it is impossible to specify the two sectors of fire
for a single point weapons.
Logged

asheshouse

  • Modder
  • member
  • Offline Offline
  • Posts: 836
Re: ship cannons AI improvement help need
« Reply #7 on: September 21, 2011, 08:33:16 AM »

Its not impossible any more following the discovery by Western.
I have tested it and it works.

Try out this

gunBasedOnThisSection gun_torpedo
 HeadMinYaw                  -120
 HeadMaxYaw                 120
 NoFireMinYaw                  -60
 NoFireMaxYaw                  60
 GunHeadChunk             Head7
 GunBarrelChunk            Gun7
 GunShellStartHook  ShellStart7

Head*Yaw specifies the traverse range
NoFire*Yaw specifies the part of the traverse range where the gun cannot fire
It works the same for gun turrets and torpedoes

My tests were on Marat which has two midship turrets.
On the stock model each can only fire to one side.
With this mod you can make them fire to both sides.

This may give me the enthusiasm to complete my model of HMS Nelson.
I was previously not happy with the prospect of the 3rd turret only firing one way.

Ashe
Logged

walter_solito

  • Modder
  • member
  • Offline Offline
  • Posts: 2025
  • In memory of an hero!
Re: ship cannons AI improvement help need
« Reply #8 on: September 21, 2011, 10:52:31 AM »

Just a little question!

This amazing discover is possible only in 4.101 environment or it work also on old 4.09?

I'm asking because this 'll be a wall about compatibility of future ships development between the two game version!!

All the best!

walter
Logged

santobr

  • Modder
  • member
  • Offline Offline
  • Posts: 770
  • Senta a Pua!
Re: ship cannons AI improvement help need
« Reply #9 on: September 21, 2011, 11:38:39 AM »

I think Oleg made as it is, because the ship can destroy herself at some angles.



santo.
Logged

asheshouse

  • Modder
  • member
  • Offline Offline
  • Posts: 836
Re: ship cannons AI improvement help need
« Reply #10 on: September 21, 2011, 11:53:46 AM »

I don't have a 4.09 installation any more so I can't test that.
Try it and see what happens. Change the entries for turret 2 and 3 on Marat to see the effect.

Here are the new text entries for ship.ini

Code: [Select]
[Marat:Part7]
BaseChunk                 Head2
AdditionalCollisionChunk0  Gun2
strengthBasedOnThisSection strength_GunHuge

gunBasedOnThisSection gun_0305_1907
 HeadMinYaw                -110   //30
 HeadMaxYaw                 110
 NoFireMinYaw               -30
 NoFireMaxYaw                30
 GunHeadChunk             Head2
 GunBarrelChunk            Gun2
 GunShellStartHook ShellStart02

[Marat:Part8]
BaseChunk                 Head3
AdditionalCollisionChunk0  Gun3
strengthBasedOnThisSection strength_GunHuge

gunBasedOnThisSection gun_0305_1907
 HeadMinYaw                -125    //30
 HeadMaxYaw                 125
 NoFireMinYaw               -30
 NoFireMaxYaw                30
 GunHeadChunk             Head3
 GunBarrelChunk            Gun3
 GunShellStartHook ShellStart03

I am curious -- why do you not want to upgrade to 4.10, and 4.11 which is now imminent?
Logged

walter_solito

  • Modder
  • member
  • Offline Offline
  • Posts: 2025
  • In memory of an hero!
Re: ship cannons AI improvement help need
« Reply #11 on: September 21, 2011, 03:18:04 PM »

But I have a 4.101 installation!

ATM it's only updated to the last UP/DBW and I'm also doing some test on a JW installation!

Very limited free time due rl issue at work....

Anyway I still update my beloved 4.09 of every new mod that is compatible with it because there are there too many mods I won't loose and because is the one I'm playing a lot!!

ATM I have split it in 10 different installation: 4 base for test of varios stuff and 6 playable for varios theatre of operation and period!!

I believe that 4.101 or the next 4.11 need at least a couple of years to go at the same level of a full modded 4.09!!

Back to the ship!

I'll test the entry tomorrow and I'll report immediately after the test!

All the best!

walter
Logged
Pages: [1] 2   Go Up