Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 3:43 pm
All times are UTC + 0
Aircrafts flying up and down on HQ bug
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [20 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Wed Jun 16, 2021 5:42 pm    Post subject:  Aircrafts flying up and down on HQ bug Reply with quote  Mark this post and the followings unread

So harriers and black hawks try to take off then land back on the airforce command HQ. They look desynced like when some try to take off others land back. Sometimes the aircrafts remain floating in midair. I have a feeling this is also causing game crashes at some point. Anyone knows what is causing this behavior?

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Jun 16, 2021 7:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Were those planes controlled by AI or by you?

_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Wed Jun 16, 2021 8:50 pm    Post subject: Re: Aircrafts flying up and down on HQ bug Reply with quote  Mark this post and the followings unread

Zorbung wrote:
So harriers and black hawks try to take off then land back on the airforce command HQ. They look desynced like when some try to take off others land back. Sometimes the aircrafts remain floating in midair. I have a feeling this is also causing game crashes at some point. Anyone knows what is causing this behavior?


Since the AI is dumb like a rock it tries to carry out an attack script when it doesn't have full ammo  so it is forced to land resulting in the 'bunny hop' effect. If you add more aircraft attack scripts you'll start to see this occur more frequently.

FS-21 from CnC Reloaded helped to implement a fix in Phobos in the form of a new script action to fix this: https://github.com/Phobos-developers/Phobos/pull/151 with a code example and further information can be found here:

https://phobos.readthedocs.io/en/latest/New-or-Enhanced-Logics.html#wait-until-ammo-is-full

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Wed Jun 16, 2021 9:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

most likely its caused by what AG has mentioned. aircraft scripts are usually nothing more than an attack mission and then the teamtype
is disbanded and recruited again later by the AI. so this happens, on occasion, when the AI tries to recruit the team to attack before it has
been sitting long enough to refill ammo. if it keeps happening, try editing the teams script to have a guard area(time) action before the attack
mission to pad out the 'sitting time'

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Thu Jun 17, 2021 2:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

This makes sense, I kinda suspected it's the ammo too. Thank you both very much, I'll try both ways. But how to install Phobos? I see there's a phobos.dll but how to launch it with syringe along with Ares 3.0?

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Thu Jun 17, 2021 3:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

The only real solution is more pad spaces, either by enlarging the building to accommodate more, or making the AI build a second one. Then the AI can build enough teams simultaneously to avoid trying to recruit freshly used planes.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Thu Jun 17, 2021 5:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

thats not really going to solve the problem because once the plane attacks its team has finished its script and
is going to be disbanded and await recruitment; the AI isnt going to distinguish between the plane from a team
disbanded 10 seconds ago and a plane thats been sitting on the pad all day in terms of recruitability. whats worse
is that giving the AI multiple aircraft factories is going to make it clone aircraft.

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Thu Jun 17, 2021 5:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:
thats not really going to solve the problem because once the plane attacks its team has finished its script and
is going to be disbanded and await recruitment; the AI isnt going to distinguish between the plane from a team
disbanded 10 seconds ago and a plane thats been sitting on the pad all day in terms of recruitability.

I can confirm that's not working. In fact if there was only 1 HQ I could live with it, but seeing like 10+ aircrafts hopping like that is really ugly.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Thu Jun 17, 2021 7:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

How big are your teams?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Fri Jun 18, 2021 12:18 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
How big are your teams?

All sizes between 2-10 but I've seen Ares AI making up to 5 HQ so there can be 20 aircrafts. It seems guard before anything else is an easy fix.

I may be wrong with some of this but I think there's also a targeting issue, here's some script tests:

Code:
Guard Area 10                  ; reload cooldown
Regroup At Friendly Base       ; this screws up the attack, planes fly to regroup point then return home fully loaded,
                               ; they no longer continue the script; same for Scout
Attack Target Type <something> ; primary target
Repeat Until Success
Attack Target Type <anything>  ; secondary target, covers loss of primary target to keep the script alive; without this
                               ; they may get stuck in midair sometimes

I think complex scripts won't work cuz aircrafts can't follow waypoints or something.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jun 18, 2021 12:46 am    Post subject: Reply with quote  Mark this post and the followings unread

If you are already using Ares, then just download last stable build of Phobos and drop the phobos.dll into game folder just like ares.dll.

It has script for AirportBound aircrafts to handle the ammo fillup problem. You can then give script like

[ScriptID]
0=1,2
1=73,0
2=1,2

Or make it repeat etc.

Your mention of Repeat Until success is just register success, it won't repeat. The Attack targettype script is self repeating in general.

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Jun 18, 2021 4:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes aircraft can only attack one target and return, asking them to do more won't work, with the exception that homing weapons with ammo >1 will allow it to keep striking the target until it runs out or the target dies.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Fri Jun 18, 2021 3:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
If you are already using Ares, then just download last stable build of Phobos and drop the phobos.dll into game folder just like ares.dll.

Hey thanks, that sounds very easy. But how does that even work, is syringe loading any .dll in the folder or what?
E1 Elite wrote:
Your mention of Repeat Until success is just register success, it won't repeat. The Attack targettype script is self repeating in general.

That always got me confused because some attacks just won't work without a "repeat" (like Boris won't keep the target lit up), while for other stuff is just "report success"

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jun 18, 2021 4:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes. Syringe will load both ares.dll and phobos.dll that are placed in the folder.

Check ModEnc for details on scripts.

Attack targettype (0,n) are inherently repetitive. Register success (49,0) just registers a success for its associated AITrigger, it has nothing to do with repeat.

Back to top
View user's profile Send private message
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Fri Jun 18, 2021 4:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
...
MPlayer_Defeated: frame 76580, house id 4, MapIsClear set to true
MPlayer_Defeated() - Opponent Computer has been defeated
MPlayer_Defeated() - Alive = 5, Humans = 1
Release_Mouse()
Exception handler fired!
Exception C00000FD at 0065A87A


Ok I've identified the crash too. When the aircrafts are hopping up and down, for a very short time the HQ has empty spots and it may build other aircrafts there. Now there can be overlapping aircrafts, the ones sitting and the ones still hopping. If the HQ is destroyed at this moment the game will crash with the error above, no message nothing, just crash to desktop, even except.txt is 0 bytes. This is with Ares 3.0.

Back to top
View user's profile Send private message
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Fri Jun 18, 2021 9:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just to let you know, I just tried Phobos (build #13) a few moments ago with lots of scripts like this:
Code:
Wait Until Ammo Is Full (73,0)
Guard 10
Attack Target Type <various stuff for each script>
Report Success
Attack Target Type <Anything>

and I was getting happy with the results when close to the end of the game I noticed 1 plane wobbling like that again... Sad I don't think the new script action is working, at least not 100%. Or maybe there's another issue with aircrafts besides ammo?

Back to top
View user's profile Send private message
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Fri Jun 18, 2021 9:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you notice Phobos issues go on Discord or reply on github

People do not frequently check the forums.

_________________

Last edited by Allied General on Sat Jun 19, 2021 4:16 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sat Jun 19, 2021 12:55 am    Post subject: Reply with quote  Mark this post and the followings unread

You should use it like
Code:
Wait Until Ammo Is Full (73,0)
Guard 10
Attack Target Type <various stuff for each script>
Wait Until Ammo Is Full (73,0)
Report Success
Attack Target Type <Anything>
Wait Until Ammo Is Full (73,0)

Back to top
View user's profile Send private message
FS-21
Cyborg Soldier


Joined: 09 Dec 2002
Location: Spain

PostPosted: Sat Jun 19, 2021 7:12 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
You should use it like
Code:
Wait Until Ammo Is Full (73,0)
Guard 10
Attack Target Type <various stuff for each script>
Wait Until Ammo Is Full (73,0)
Report Success
Attack Target Type <Anything>
Wait Until Ammo Is Full (73,0)


Guard 10 works with aircrafts? I never noticed any change in the landed aircrafts so I should try again that thing.

@Zorbung
As they told you, AI with aircrafts is a bit tricky when it comes to recruit aircrafts that ended the script but is still flying.
A workaround is to put very low trigger average & max priorities so AI will not use very often the script and the aircraft will have time for landing and wait, empowering your ares mod with Phobos (0.2 and will come out very soon)

Then here I post some examples I used in my AI to have the same aircraft team attacking non-stop after each ammo reload or the aircrafts are destroyed, in a similar way the ground vehicles attack until they got destroyed in vanilla game.

[B0001066-G]
Name=Basic building attack tactic for aircrafts
0=73,0 , wait until full ammo; Phobos 0.2 feature
1=0,2 ; attack buildings
2=6,1 ; repeat from line 0

This one for vehicles:
[B0001063-G]
Name=Basic vehicles attack tactic for aircrafts
0=73,0 , wait until full ammo; Phobos 0.2 feature
1=0,5 ; attack vehicles
2=6,1 ; repeat from line 0

_________________
C&C:Reloaded > GDI, Nod, Allies, Soviets & Yuri... & TS terrain!
[ Discord ] [ ModDB ] [ YouTube Channel ] [ Telegram Channel ] [ Official Forums@Revora ]

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID
Zorbung
Soldier


Joined: 04 Jun 2021

PostPosted: Sat Jun 19, 2021 10:49 am    Post subject: Reply with quote  Mark this post and the followings unread

FS-21 wrote:
As they told you, AI with aircrafts is a bit tricky when it comes to recruit aircrafts that ended the script but is still flying.

You mean aircrafts can get recruited while flying back home? I never thought of that... I thought they're only recruited after they land. That could explain many issues.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [20 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1670s ][ Queries: 11 (0.0094s) ][ Debug on ]