Jump to content

Recommended Posts

Posted

Ok.  Not sure where to post this at so I'm posting it here.

 

I am getting some really strange AI behavior from my missions.  Right after take off they say "Fighters spotted, attacking" and then they circle the field until I close out the mission.

 

I am running a PWCG campaign, but as he has said repeatedly, his program does not touch AI.

Posted
1 hour ago, Skycat1969 said:

That was also my first thought when I read the thread title.

  • Haha 1
BlitzPig_EL
Posted

Something is up with the AI.  I have B26s in one of my missions, and they will endlessly circle their designated target area, and only the leader will actually attack it even though the others will open their bomb bays.  The lead aircraft will leave the flight and drop down and attack with guns, and sometimes drop it's bombs from low level, sometimes not.

 

Very perplexing.

Posted

Pat fixed this with a 13.10.1 update. 

 

PatrickAWlson
Posted
22 minutes ago, Majpalmer said:

Pat fixed this with a 13.10.1 update. 

 

 

Not really.  I eliminated something that should have worked but did not.

Details.  Mission Begin -> Formation -> Attack MCU -> Takeoff

Almost immediately the flight leader reports that enemy planes are spotted.  Then the AI gets confused and circles.

Remove the attack MCU, or don't provide any targets for it, and the flight proceeds normally.

 

So why did I put the attack MCU in?  To try to solve another perceived AI problem.  Players were reporting that the AI was passive when on a fighter mission (low priority waypoints only).  They further reported that the career missions had an attack MCU set and maybe that was the answer.

 

Years ago I also explicitly set the attack MCU, but for all planes.  This often caused bombers to go wonky and start flying like fighters, so after many years of this being in, I removed it.  Why did I have it in for all those years -  Players were reporting that the AI was passive ... yeah, you get the idea.  We have come full circle.

 

So there it is.  With the attack MCU set the AI immediately reports enemy planes and then goes off into lala land.  Without it there are complaints about passive fighter AI.

  • Thanks 1
Posted
7 hours ago, PatrickAWlson said:

 

Not really.  I eliminated something that should have worked but did not.

Details.  Mission Begin -> Formation -> Attack MCU -> Takeoff

Almost immediately the flight leader reports that enemy planes are spotted.  Then the AI gets confused and circles.

Remove the attack MCU, or don't provide any targets for it, and the flight proceeds normally.

 

So why did I put the attack MCU in?  To try to solve another perceived AI problem.  Players were reporting that the AI was passive when on a fighter mission (low priority waypoints only).  They further reported that the career missions had an attack MCU set and maybe that was the answer.

 

Years ago I also explicitly set the attack MCU, but for all planes.  This often caused bombers to go wonky and start flying like fighters, so after many years of this being in, I removed it.  Why did I have it in for all those years -  Players were reporting that the AI was passive ... yeah, you get the idea.  We have come full circle.

 

So there it is.  With the attack MCU set the AI immediately reports enemy planes and then goes off into lala land.  Without it there are complaints about passive fighter AI.

Thank for the explanation.  I appreciate it.  I think I'd prefer apparently passive fighter AI to this. At least then they are 'targets of opportunity' to keep the others busy.  Maybe I should just downgrade to a prior version?

 

On another note, my equipment request to replace my Lagg 3's with Yak's is still a one mission at a time deal.  They come in, and are replaced for 1 mission, then it's back to the Laggs unless I request them  again.

AEthelraedUnraed
Posted
15 hours ago, PatrickAWlson said:

 

Not really.  I eliminated something that should have worked but did not.

Details.  Mission Begin -> Formation -> Attack MCU -> Takeoff

Almost immediately the flight leader reports that enemy planes are spotted.  Then the AI gets confused and circles.

Remove the attack MCU, or don't provide any targets for it, and the flight proceeds normally.

 

So why did I put the attack MCU in?  To try to solve another perceived AI problem.  Players were reporting that the AI was passive when on a fighter mission (low priority waypoints only).  They further reported that the career missions had an attack MCU set and maybe that was the answer.

 

Years ago I also explicitly set the attack MCU, but for all planes.  This often caused bombers to go wonky and start flying like fighters, so after many years of this being in, I removed it.  Why did I have it in for all those years -  Players were reporting that the AI was passive ... yeah, you get the idea.  We have come full circle.

 

So there it is.  With the attack MCU set the AI immediately reports enemy planes and then goes off into lala land.  Without it there are complaints about passive fighter AI.

They're passive too with their priority set to Low? Maybe a combination of a Proximity MCU (object-linked to the player and the enemy) and an Attack MCU (object-linked to the player, target-linked to the enemy) could work. For each enemy flight separately of course.

Posted

On the topic of weird AI, in a BoBP career flying the Tempest, I survived one mission after taking a good few hits in the starboard wing from a wingman. He came up on my six chasing the same 190 as me. A few missions later, another wingman clearly got a touch of tunnel vision and demolished both me and a 190. So ended the brief flying career of Gibson Williamson, with 6 kills to his name. Unfortunately, there are few good outcomes when on the receiving end of 4 Hispanos.

 

As much as I find those situations annoying, the 'mistakes' the AI makes give it the impression of fallibility or humanness.

PatrickAWlson
Posted
7 hours ago, AEthelraedUnraed said:

They're passive too with their priority set to Low? Maybe a combination of a Proximity MCU (object-linked to the player and the enemy) and an Attack MCU (object-linked to the player, target-linked to the enemy) could work. For each enemy flight separately of course.

 

No more experimentation for me without confirmation that it will work. 

Posted
5 hours ago, AtomicP said:

On the topic of weird AI, in a BoBP career flying the Tempest, I survived one mission after taking a good few hits in the starboard wing from a wingman. He came up on my six chasing the same 190 as me. A few missions later, another wingman clearly got a touch of tunnel vision and demolished both me and a 190. So ended the brief flying career of Gibson Williamson, with 6 kills to his name. Unfortunately, there are few good outcomes when on the receiving end of 4 Hispanos.

 

As much as I find those situations annoying, the 'mistakes' the AI makes give it the impression of fallibility or humanness.

As soon as I know friendly AI is intercepting the same target as I have, I disengage and circle up. If not, it always ends bad.
There's also still the thing that enemy AI spawns 40-60 km away and zoom in on you all the way. They correct their course ever so slightly when a perpendicular course is flown by me and they will readily follow you wherever you go on the map. So much for realism there.

  • Upvote 3
Posted
2 hours ago, Bando said:

As soon as I know friendly AI is intercepting the same target as I have, I disengage and circle up. If not, it always ends bad.
There's also still the thing that enemy AI spawns 40-60 km away and zoom in on you all the way. They correct their course ever so slightly when a perpendicular course is flown by me and they will readily follow you wherever you go on the map. So much for realism there.

That's not AI, that's lazy mission design intended to guarantee us "Action" with every mission.  Something, I'd personally rather do without.

Posted
12 hours ago, Noisemaker said:

That's not AI, that's lazy mission design intended to guarantee us "Action" with every mission.  Something, I'd personally rather do without.

It happens in the career mode. So the mission design is automated. I guess you're right and I agree that one can do without this.

PatrickAWlson
Posted
7 hours ago, Bando said:

It happens in the career mode. So the mission design is automated. I guess you're right and I agree that one can do without this.

 

In PWCG I use a virtual waypoint concept to move flights that are not rendered.  That can make snap ins an issue if the virtual flight makes a discrete movement into the player's area.  I solve the problem by having a 30km trigger zone to render the flight.  This trigger zone is much larger than the discrete movement distance of virtual flights, which means that the virtual flights should become realized flights long before they  are on top of the player.

 

I believe 1C uses static trigger points - i.e. enemy flights are waiting at a spawn point.  If that is the case, there is no reason for a flight to spawn on top of the player.  A simple 15 km CZ is more than enough to put some distance between the player and the newly spawned flight.

Posted

I always loved to play PWCG, but for some reason, I cannot alt-tab in and out of the game without it crashing or becoming unstable.
I'm not a computer savvy, so the wait is on my next PC, due at the end of the year when (hopefully) all the dustclouds of the new GCU's and PCU's is gone.

Posted
2 hours ago, PatrickAWlson said:

 

In PWCG I use a virtual waypoint concept to move flights that are not rendered.  That can make snap ins an issue if the virtual flight makes a discrete movement into the player's area.  I solve the problem by having a 30km trigger zone to render the flight.  This trigger zone is much larger than the discrete movement distance of virtual flights, which means that the virtual flights should become realized flights long before they  are on top of the player.

 

I believe 1C uses static trigger points - i.e. enemy flights are waiting at a spawn point.  If that is the case, there is no reason for a flight to spawn on top of the player.  A simple 15 km CZ is more than enough to put some distance between the player and the newly spawned flight.

That's interesting, because if you deactivate a flight between two waypoints (that are indeed static) the flight disappears but will remain in limbo where it is, and if you reactivate it it will continue from where it was.

To make flights move "invisibly" that is a clearly a big feat as this means coding hard in the system and this is something I would not dare doing.

The reason is that we are at the mercy with each update with a code that will go wrong or weird as the game engine is continuously in development, and we have no idea what is coming and what are the changes. We must just always retro-engineer from the change of behavior what was that changed why something is not working anymore etc. I just am amazed at all the effort and work that you did for this campaign generator and Ideally it should have been a common development with Jason's team, which I had the feeling it was more so at the beginning but I may be wrong. 

 

 

PatrickAWlson
Posted (edited)
1 hour ago, IckyATLAS said:

That's interesting, because if you deactivate a flight between two waypoints (that are indeed static) the flight disappears but will remain in limbo where it is, and if you reactivate it it will continue from where it was.

To make flights move "invisibly" that is a clearly a big feat as this means coding hard in the system and this is something I would not dare doing.

The reason is that we are at the mercy with each update with a code that will go wrong or weird as the game engine is continuously in development, and we have no idea what is coming and what are the changes. We must just always retro-engineer from the change of behavior what was that changed why something is not working anymore etc. I just am amazed at all the effort and work that you did for this campaign generator and Ideally it should have been a common development with Jason's team, which I had the feeling it was more so at the beginning but I may be wrong. 

 

 

 

Quick how virtual waypoints are done:

  • The path of the the flight is calculated as normal.  All normal waypoints are generated.
  • The flight path is segmented into discrete pieces, with each piece being about 5 kilometers in length.
  • At each segment a virtual waypoint is created.
  • A VWP contains:
    • A full set of the flights aircraft in a disabled state
      • Yes, that means that each virtual flight of 4 might have 80 aircraft in a mission that has 20 VWPs.
      • Only one set of 4 will ever spawn.
    • An enable trigger
    • A disable trigger
    • A check zone
    • A set of MCUs to activate and trigger the flight
    • A link to the next waypoint in the sequence based on where in the flight the VWP exists
    • A timer for how long the VWP remains active
      • Depends on aircraft cruise speed required to cover the distance of the VWP
    • A reference to the next downstream VWP
  • When the mission starts a mission begin is used to trigger the the first VWP in the sequence.
  • That VWP remains active until it times out.  Active means that the Check Zone is working and the timer is running.
  • One of two things will happen.  The check zone will trigger or the timer will time out.
    • If the VWP times out
      • The VWP disables itself
      • The VWP triggers the next VWP. 
        • This is how movement is simulated.
    • If the check zone is triggered at any time
      • The aircraft are activated and go through an air start process, heading towards the designated waypoint
      • The flight is now fully rendered and going about its business
      • The VWP timer is killed to prevent activation of downstream VWPs.  This prevents multiple spawns of the same flight.
  • If no VWP for a flight ever triggers then the flight simply "completes" without ever spawning

 

It's basically a set of walking check zones.  My guess is that this would be impossible to achieve in a manually created mission.  PWCG missions are upwards of 800K lines of mission text, and most of that is VWPs.  

 

Once the flight is activated it never deactivates.  The virtual part is over.  The spawned aircraft will fly the mission from the point of activation and complete it.  

 

If this is ever broken in an update PWCG is done.  It's been probably 10 years and it hasn't happened yet.

Edited by PatrickAWlson
  • Thanks 1
Posted
35 minutes ago, PatrickAWlson said:

If this is ever broken in an update PWCG is done. 

 

...and at least one grown man would cry!  Thanks for all you do and and have done, PWCG keeps me flying (and buying). :salute:

Posted

Fantastic work PatrickAWilson and clever coding. Indeed the MCUs used are the fundamental and stable ones no wonder there has been no disruption up to now.

Let's hope that this continues for another 10 years. ?

  • Upvote 2
PatrickAWlson
Posted
5 hours ago, IckyATLAS said:

Fantastic work PatrickAWilson and clever coding. Indeed the MCUs used are the fundamental and stable ones no wonder there has been no disruption up to now.

Let's hope that this continues for another 10 years. ?

 

My biggest fear in that regard is that something will change in aircraft activation that makes disabled planes consume CPU. Although anything can happen.  Which neatly leads me back on topic.  The attack MCU is causing the AI to immediately call out enemy planes spotted.  Pretty sure that is a new issue.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...