![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
07-01-13, 12:12 PM
|
#1 |
|
Black Magic
![]() |
things will get really interesting once I finish the carriers spawning aircraft patch for the game.
Here's how the game works in regards to carriers and airbases (land): A timer is checked to see if it's time to spawn airgroup units. If it's time: game goes through every unit in the game and compares the distance from them to the carrier/airbase to a fixed value. If the distance is within the fixed value the game will spawn an airgroup unit. The airgroup unit is given random starting position and random waypoints. My patch changes the code in the above so that if the unit is a carrier and the carrier has the unit as a contact then an airgroup unit is spawned. It's starting position is the carrier. It's given a waypoint of the contact's current position and another waypoint as the carrier's current position. This means the unit will head directly to the contact and once done return to the carrier position (when it spawned the aircraft). The unit is free to engage other contacts if it detects them (a la IRAI) before arriving at unit's position or when returning to the carrier. I could make it really complex and update the airgroup unit's carrier's waypoint with the carrier's current position so that the unit will always return to the carrier's current position but decided it wasn't worth the time and code. Instead I set the altitude to a ridiculously high value so you'll never see it disappear from the game ![]() I've been working on this patch for over 4 months and the end is near
|
|
|
07-01-13, 12:25 PM
|
#2 | |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Quote:
On a slightly unrelated note: is loadout type of aircraft affecting their AI routines? I need to know it for my tests on the new B-25 that I am still working on
|
|
|
|
07-01-13, 12:36 PM
|
#3 |
|
Black Magic
![]() |
From what I've seen in the code (so far and what I have decoded) no. What determines a unit's AI routines is the type of unit (i.e. 102, 300, 200, etc.) and of course the AI code (IRAI). The AI code will determine whether it does bomb runs, torpedo run, etc.
|
|
|
07-01-13, 12:54 PM
|
#4 | ||
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Quote:
Quote:
I have tried increasing gun's training/elevation range, and improving plane's handling, but with no apparent result. UnitType is set to 301.
|
||
|
|
07-01-13, 01:26 PM
|
#5 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
07-01-13, 02:14 PM
|
#6 | |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Quote:
http://www.mediafire.com/?b9qhrzwdsz8cj5w only one of the frontal guns and the dorsal turret got a gun controller, but at the moment I am more concerned about the frontal gun (just ignore the turret). Launch any of the single missions included. I have also noticed that the bomber got problems dropping its torpedo. No matter how low I set the minimum height, in many cases the plane starts circling, loosing altitude and falling down in the water before she can fire her fish. In other cases, the B-25 manages to achieve a good firing position, but the torpedo moves backward (
|
|
|
|
07-01-13, 02:19 PM
|
#7 | |
|
Black Magic
![]() |
Quote:
The torpedo problem is a sign of hitting a collision sphere or box on the unit. Lower the torpedo's hardpoint (do a drastic lowering) and see if it doesn't cure the problem. There is a minimum distance (arming distance - 300m) the torpedo must travel before it's able to detonate. If the torpedo 'hits' something before this 300m then it acts like a dud (which is what you are seeing). |
|
|
|
07-18-13, 03:41 PM
|
#8 |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
|
|
|
07-18-13, 03:49 PM
|
#9 |
|
Black Magic
![]() |
|
|
|
07-01-13, 02:34 PM
|
#10 | |
|
Sea Lord
![]() Join Date: Jun 2006
Location: Somewhere else now
Posts: 1,797
Downloads: 1214
Uploads: 4
|
Quote:
If you dive, maybe it might attack again - try this. IIRC.. it was rare for a bomber to attack a U-boat more than once, unless they were sure they had done some good damage - an aircraft is very vulnerable.. especially in the middle of the ocean. All attacks, if possible, were based on tracking and surprise - after the first attack is was generally suicidal to attack again. |
|
|
|
07-01-13, 03:48 PM
|
#11 | |||
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Quote:
On your end, please keep me informed on anything wrong you may find about the gun issue. Quote:
Quote:
|
|||
|
|
07-01-13, 06:27 PM
|
#12 |
|
Black Magic
![]() |
That is how IRAI used to be. People complained so I changed it. Here's the problem: say said plane attacks another unit and drops it bombs. That unit submerges and hides. Plane continues on waypoints. Plane encounters another enemy unit. If IRAI is setup so that planes don't attack anymore if they have no bombs or torpedoes then said plane continues on with it's waypoints. Here in is where people complained airplanes never attack. What is the plane has no bombs or torpedoes from the start? Then it never attacks anything.
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
