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 Fri Mar 29, 2024 11:14 am
All times are UTC + 0
AI Issues in Mod
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [36 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Aug 11, 2015 5:48 pm    Post subject:  AI Issues in Mod Reply with quote  Mark this post and the followings unread

Hi, everyone. My personal mod has come a long way, close to the point of feeling complete, and I've had a lot of help and questions answered in the past here. Thank you all for that.

However, even all those years ago, there has been one error I've yet to solve. Korea has always been a buggy side in my mod. Be it only building their aircraft when they aren't being attacked (they are an aircraft specialized side, so it makes sense), sending everything they have to my base, and crashing the game with a "Main executable for Yuri's Revenge has stopped working" error.

I have read about the usage of cloak generators being buggy/laggy in YR, which I have noticed, but I haven't read about it causing crashes. I've narrowed it down to a few possible causes.

- Something to do with buildings being destroyed, likely while in the middle decloaking/recloaking
- Aircraft on airpads being buggy (when they glitch out a bit and don't land properly)
- The airpad being destroyed with buggy aircraft on it

For whatever reason, I rarely get a known EIP. First thing I do with an IE or other crash is google the EIP, but I almost never get a result, so I have a few text documents to post which may indicate the cause (the syringe.log is from only half an hour ago).

I don't have any debug.log files saved now, but if I get an error and generate one, I'll look into it.



except.txt
 Description:

Download
 Filename:  except.txt
 Filesize:  5.29 KB
 Downloaded:  6 Time(s)


syringe.log
 Description:

Download
 Filename:  syringe.log
 Filesize:  6.1 KB
 Downloaded:  2 Time(s)


_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Last edited by PePsiCola on Sun Nov 15, 2015 8:25 pm; edited 4 times in total

Back to top
View user's profile Send private message
Ich-Henker
Flamethrower


Joined: 06 Aug 2015
Location: Germany

PostPosted: Thu Aug 13, 2015 11:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi,

have you used multiple Ini-Validators  or used a debug log exe modification? That alone shows a lot.

Come to think about AI crashes - mybe there is the source?

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Sat Aug 15, 2015 10:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

I haven't touched an ini-checker in years. It had a tendency to change other things in my INI files, which didn't help.

It's most likely an AI crash, since I've never encountered this sort of issue when playing as Korea. I think it has something to do with the AI and its buggy aircraft, so I could look into that.

Also, I'm not sure when the except.txt I posted is from, but I know for certain the syringe.log includes information on a crash caused by Korea.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 09 Feb 2015

PostPosted: Mon Aug 17, 2015 6:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Try using my cross checker scripts, they will spit out a pretty detailed analysis of obvious faults.

AICLEAN will even spit out translated ai code so you can read it, usually you can see where you went wrong easily too.

http://www.ppmforums.com/viewtopic.php?t=39269

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

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Mon Sep 07, 2015 10:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've looked at just about everything I could think that could help me with this and other errors.

I've done INI Checker in the past. I've attempted to use the debug.log command line argument -LOG, but I don't think I know how to enter CL arguments properly (I entered Syringe "gamemd.exe" "-LOG") and ran the game with no results. And I would try your program, G-E, but I'm not sure how it works, and want to be sure of what I'm doing before trying anything.

Although I'm more concerned with the issue I mentioned in this post, I've encountered the same AI related internal error with a new faction (Side) multiple times today. I'm almost certain it's related to refineries or radars, yet everything appears to be coded correctly. I'm not asking for a quick solution though, since I'm already asking for enough help, but I'll leave the log here just in case.



syringe.log
 Description:

Download
 Filename:  syringe.log
 Filesize:  5.75 KB
 Downloaded:  3 Time(s)


_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 09 Feb 2015

PostPosted: Mon Sep 07, 2015 10:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

My scripts spit out log files to read too... check.log, clean.log, translated.log ...

If it's an AI problem, maybe it's something simple like having the "side" flag in the trigger wrong for the "house" it belongs to?

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

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Sep 08, 2015 9:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

While that could be an issue, I don't see why it would cause crashes. The side works perfectly fine for me. It has to do with the AI base building. They've never managed to build a refinery or radar. They built power, barracks, and endless defenses until they reach the limit I set for the side. Immediately afterwards, the game crashes.

And I understand that about your program, but I don't know what to do with the .tcl files in order for them to work with my mod.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 09 Feb 2015

PostPosted: Tue Sep 08, 2015 10:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Why don't you post what you have done or tried and let me see if I can find the answer for you? (do it in the other thread though not here)

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

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Sat Sep 12, 2015 3:09 am    Post subject: Reply with quote  Mark this post and the followings unread

I am now almost certain the new side AI error occurs when the AI attempts to build a radar. I'll post all radar related coding here, although I see no problem with the code, it could only help to try (and it's the same EIP as the syringe.log above every time, which has been about twenty).

The new side's radar is RARADR
Code:
PrerequisiteRadar=GAROBO,NARADR,AMRADR,NAPSIS,RARADR
BuildRadar=GAAIRC,NARADR,AMRADR,NAPSIS,RARADR

;this is of course placeholder, I'm just trying to have a functional side first
[RARADR]
UIName=Name:NARADR
Name=Soviet Radar Tower
BuildCat=Tech
Prerequisite=PROC,RACNST
Strength=1000
Image=NARADR
Radar=yes
Armor=wood
TechLevel=3
Adjacent=2
Sight=10
Owner=Vietnam,Japan,Philippines,Australia,India
AIBasePlanningSide=3 ;gs 0 for Good, 1 for Evil
Cost=1000
Points=60
Power=-50
Powered=true
Capturable=true
Crewed=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DebrisAnim=Dbris3sm,Dbris4lg,Dbris4sm,Dbris6sm,Dbris7lg,Dbris7sm,Dbris8sm,Dbris9lg,Dbris10lg,Dbris10sm
MaxDebris=15
MinDebris=5
ThreatPosed=0 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=220, 390, 150
AIBuildThis=yes
Spyable=yes ; A spy can do something to this, works like captureable
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
SuperWeapon=SpyPlaneSpecial
SpyEffect.RevealRadar=yes
SpyEffect.KeepRadar=yes
SpyEffect.Custom=yes


EDIT: I don't think this is the cause. I set AIBuildThis to no and TechLevel to 11, but it still crashes when they build a certain building. Basically there's a sentry gun clone that is also under BuildDummy, so the AI begins by building a lot of those, then builds a flak cannon clone or two before placing some building, causing the crash.



syringe.log
 Description:
Again, this is the same error as the above syringe.log, just more up to date.

Download
 Filename:  syringe.log
 Filesize:  5.75 KB
 Downloaded:  2 Time(s)


_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Oct 13, 2015 3:06 am    Post subject: Reply with quote  Mark this post and the followings unread

One month later, and I've now decided to give this another try. The radar and base defenses seem to be the culprit with my new side's AI crashes.

These are the results I've come across
- Radar and Defenses disabled for AI = no crash
- Radar enabled for AI = crash
- Defenses enabled for AI = crash
- Radar and defenses enabled for AI = crash

If one or the other is enabled, the game crashes. The game seems to only not crash when both of these are disabled. The AI and gameplay goes fine.

Some more notes
- When defenses and radar are disabled, AI only builds vehicle attack force, infantry attack force, infantry guard force, and miners (there are only one of each as of right now).
- When defenses are enabled, the game crashes before I can really look at how AI Triggers work.
- When defenses and radar are enabled, the AI builds engineers to capture tech buildings, as instructed to via AITriggers. But they also start spamming MCVs as soon as they have a war factory, then the game crashes (presumably by the time they attempt to build a radar).

What interests me is the fact than with all three instances of crashes listed above, I receive the same EIP. There is no need to post an except or syringe.log since the above files all contain essentially the same information.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Oct 13, 2015 6:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Are you sure this
AIBasePlanningSide=3
is set correct?

Show your [Sides] and [Countries] sections.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Tue Oct 13, 2015 8:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Are you sure this
AIBasePlanningSide=3
is set correct?

Show your [Sides] and [Countries] sections.


It is correct as number since Yuri is 2 where Allies is 0 and Soviets 1.

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Oct 13, 2015 11:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

AIBasePlanningSide is fine as mentioned above, and I'm not sure how the sides and countries could impact this, but I will put it up just in case.

Code:
[Countries]
0=Americans
1=Alliance
2=French
3=Germans
4=British
5=Africans   
6=Arabs
7=Confederation
8=Russians
9=China
10=YuriCountry
11=Ukraine
12=Greece
13=Italy
14=Norway
15=Vietnam
16=Japan
17=Philippines
18=Australia
19=India
20=GDI
21=Nod
22=Neutral
23=Special

[Sides]
GDI=British,French,Germans,Americans,Alliance
Nod=Russians,Africans,Confederation,Arabs,China
ThirdSide=YuriCountry,Ukraine,Greece,Italy,Norway
NewSide=Vietnam,Japan,Phillipines,Australia,India
Civilian=Neutral
Mutant=Special

[NewSide]
UIName=Name:NewSide
Name=NewSide
DefaultDisguise=E2B
Crew=E2B
SurvivorDivisor=200
AI.BaseDefenses=RALASR,RAFLAK,RAFTWR
AI.BaseDefenseCounts=10,10,10
LoadScreenText.Color=192,0,0
ParaDrop.Types=E2B,BGGY
ParaDrop.Num=4,4
Sidebar.MixFileIndex=2
Sidebar.YuriFileNames=sidenc02
EVA.Tag=EvaNew
Multiplay=yes


The five countries of [NewSide] should be fine, as they are coded similarly to all of my new fully functional Soviet and Yuri sides.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Nov 17, 2015 1:00 am    Post subject: Reply with quote  Mark this post and the followings unread

So from the look of things, all of my mod's issues relate to the AI. I'll report each issue here, as these have been ongoing. I'm posting it in this topic since I already have my IEs and notes posted here.

1) The fourth side crashes (syringe.log is above). I've done very much in an effort to solve the issue, so I still don't know what the cause of the error is. I have my notes about it posted above.

2) The Korean AI crash likely related to the airpad (I believe I left a syringe.log above for that as well).

3) China (custom Soviet side) has been in my mod for probably a year with no issue. I added a new building for them, and since then, I've noticed the China AI will not rebuild factories unless they are practically destroyed (take out all their base except for construction yard, or allow them to spam Tesla reactors and battle bunkers until they reach their limits for defense counts). After that, they will rebuild factories, but this issues makes them easy to defeat, since they won't have factories to produce units. Disabling the building for AI has not fixed the issue.

I've been trying for ages to fix the first two issues, but I will attempt to fix the third one on my own, as it's probably something simple. It would still be nice if someone could shed some light on possible causes, though.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 28 May 2013

PostPosted: Tue Nov 17, 2015 5:00 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Nov 17, 2015 11:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks, it did help a bit. The only difference I notice between all of my codes and your code was that I was using unique prerequisites for the radar. I changed it like your's so that I wasn't, and the AI is able to build a radar now. However, the AI rarely manages to build a refinery or radar, simply because there is WallTower-esque bug going on with the AI building an endless amount of the same defense (except unlike in TS with GDI, they won't build any of their other main buildings).

All my defenses for the side right now require only a barracks to build. Once they have a barracks, they will spam a defense, which will be RALASR (Sentry gun clone which also appears under BuildDummy).

My mod has a mode where defenses are not buildable, and it works for both the player and AI. But disabling the three defenses (RALASR, RAFLAK, and RAFTWR) with TechLevel=11 as I have with every other defense did not work. They wouldn't build RALASR or RAFLAK, but would instead spam RAFTWR.

Code:
; Sentry Gun
[RALASR]
UIName=Name:NALASR
Name=Soviet Sentry Gun
BuildCat=Combat
Strength=300
Armor=steel
Image=NALASR
Prerequisite=BARRACKS,RACNST
TechLevel=3
Adjacent=4
ROT=10
Sight=7
DetectDisguise=no
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,China,YuriCountry,Ukraine,Greece,Italy,Norway,Vietnam,Japan,Phillipines,Australia,India
AIBasePlanningSide=3 ;gs 0 for Good, 1 for Evil
Cost=700
BaseNormal=yes
Points=30
Power=0
Crewed=no
Capturable=false
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DebrisAnims=DBRIS4LG,DBRIS4SM,DBRIS6LG
MaxDebris=2
MinDebris=1
Primary=ThermalFire
ElitePrimary=ThermalFireE
Trainable=yes
Powered=yes
Turret=yes
TurretAnim=LASER
TurretAnimIsVoxel=true
;TurretAnimX=-8
TurretAnimY=10
TurretAnimZAdjust=-20
ThreatPosed=30 ; This value MUST be 0 for all building addons
;DamageParticleSystems=SparkSys,LGSparkSys
IsBaseDefense=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF
EliteAbilities=STRONGER,FIREPOWER
HasStupidGuardMode=false
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
AntiInfantryValue=10
AntiArmorValue=5
AntiAirValue=0

[RAFLAK]
UIName=Name:NAFLAK
Name=Soviet Flak Cannon
BuildCat=Combat
Image=NAFLAK
Strength=500
Armor=steel
TechLevel=4
Prerequisite=BARRACKS,RACNST
Adjacent=4
Sight=5
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,China,YuriCountry,Ukraine,Greece,Italy,Norway,Vietnam,Japan,Phillipines,Australia,India
AIBasePlanningSide=3 ;gs 0 for Good, 1 for Evil
Cost=900
BaseNormal=yes
Points=30
Power=-75
Crewed=no
Primary=FlakWeapon
ElitePrimary=FlakWeaponE
Trainable=yes
LandTargeting=1
NavalTargeting=6
Capturable=false
Sensors=yes
SensorsSight=7
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DebrisAnims=DBRIS4LG,DBRIS4SM,DBRIS6LG
MaxDebris=3
MinDebris=2
ThreatPosed=0   ; This value should be 0 for objects that are purely anti-air, since aircraft do not use the threat values
;DamageParticleSystems=SparkSys,LGSparkSys
IsBaseDefense=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF
EliteAbilities=STRONGER,FIREPOWER
Powered=yes
ROT=8
TurretRotateSound=PatriotRotate
Turret=yes
TurretAnim=FLAKTUR
TurretAnimIsVoxel=true
TurretAnimX=0
TurretAnimY=2
TurretAnimZAdjust=-40
HasStupidGuardMode=false
;FireAngle=32            ; 45 degrees -- affects barrel, not turret
WorkingSound=PowerOn
NotWorkingSound=PowerOff
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
Drainable=yes
AntiInfantryValue=0
AntiArmorValue=0
AntiAirValue=15
;gs these three are in abstract units and just help the AI pick the right base defense. (see AIForcePredictionFudge)

[RAFTWR] ;Flame Tower
UIName=Name:FLAMTWR
Name=Flame Tower
BuildCat=Combat
Image=NAFLAMTWR
Prerequisite=BARRACKS,RACNST
Strength=400
Armor=steel
TechLevel=6
Adjacent=2
Sight=5
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,China,YuriCountry,Ukraine,Greece,Italy,Norway,Vietnam,Japan,Phillipines,Australia,India
AIBasePlanningSide=3 ;gs 0 for Good, 1 for Evil
Cost=800
Points=25
Power=-60
Crewed=no
Capturable=false
Primary=FlameTower
ElitePrimary=FlameTowerE
Trainable=yes
;these 3 are needed for offsets
Turret=yes
TurretAnimIsVoxel=true
TurretAnim=FLAMERTUR
TurretAnimZAdjust=-90
DebrisAnims=Dbris1sm,Dbris1lg,Dbris4sm,Dbris5sm,Dbris4lg,Dbris7sm,Dbris8sm,Dbris5lg,Dbris4lg
MaxDebris=15
MinDebris=5
ThreatPosed=40 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=96, 64, 112
IsBaseDefense=yes
BaseNormal=yes
Powered=yes
HasStupidGuardMode=false
WorkingSound=PowerOn
NotWorkingSound=PowerOff
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
Drainable=no
AntiInfantryValue=25
AntiArmorValue=0
AntiAirValue=0



Also, I recall there being a posting feature where you can hide text in a tab that people have to open to see, so that long pages of text/code don't have to take up people's screens. Does PPM not use this?

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 28 May 2013

PostPosted: Wed Nov 18, 2015 4:32 am    Post subject: Reply with quote  Mark this post and the followings unread

In YR, typically xxxBaseDefenseCounts gives the counts and AI uses AIForcePredictionFudge, AntiXXXValue for
the proportion of the defenses. Ares adds AI.BaseDefenses, AI.BaseDefenseCounts to the side definition. Check
them and also those defenses could be made to be built after the primary buildings are built.

If AI is allowed to start with multiple MCVs, then also the defense counts gets multiplied.

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


Joined: 09 Feb 2015

PostPosted: Wed Nov 18, 2015 1:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think you need to cross-check all the animations/weapons/warheads etc in your defensive structures if they are causing the crash...

Did you put these things in BuildDummy?

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

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Wed Nov 18, 2015 3:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

The animations and everything weapon related is fine, and I've been using AI.BaseDefenses and AI.BaseDefenseCounts for as long as I've had the side. First I used it on just [NewSide] itself, then I used it on of its corresponding countries as well with no difference (I mean, it would make a difference if I had given any country specific defenses, but I'll save that for when the basic AI functions properly). Since I've had BaseDefenseCounts kept in check, I can only question why the defenses are endlessly built, and this can't be the issue either, as they choose to only spam one specific defense. Though TechLevel=11 made no difference in the No Defenses game mode, I'll test ForbiddenHouses as well when I am home later.

And about MCVs, they do not start with more than one MCV/Conyard, but when they manage to build a war factory, they spam MCVs (even though the MCV taskforce includes only one MCV, and the script/teamtype/triggertype have the same settings for the MCV forces of the other three factions. Perhaps there is connection between these two issues. I think the AI has actually been spamming defenses from the beginning, but the game would crash before it became noticeable (and the crash no longer occurs, or at least there hasn't been one yet). And yes, RALASR, the defense usually spammed, is under BuildDummy.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 28 May 2013

PostPosted: Wed Nov 18, 2015 5:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Try xxx(AI.)BaseDefenseCounts=0,0,0 for your defenseless mode for AI. TechLevel disabling could be used
for human player.

MCV spamming through AITrigger could be corrected if the code is shared.

What I meant earlier was the starting count of mcv/conyards like in unholy alliance, for AI that would build
plenty of buildings. That is not your case.

Even high defense count could do the spamming. The example I shared doesn't do that, try smaller counts.

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Wed Nov 18, 2015 11:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Setting AI.BaseDefenseCounts to 0,0,0 for the countries in the no defenses mode allowed them to play properly in that mode. And the values of about 30, mid-20s and 10 for defense counts are what I generally use for all other countries, so I'm still unsure why defenses are spammed.

I was going to report that the MCV issue was still there, but when I was typing out the details of the problem to post, it occurred to me how simple the issue was; the AI Trigger Type had the MCV being built if there were no instance of GANCST, rather than RACNST. Not being Allied, they would of course continuously build MCVs. I guess when copying the MCV Trigger type code, that's one change I forgot to make.

On the bright side, I don't recall making significant changes, but the issue with China not rebuilding factories seems to have fixed itself (but there was no denying that it was definitely occurring before, and I wasn't just being impatient).

So my mod's only real issues now:
- Korean AI crash (not a big deal, since it doesn't occur often, though I still have no idea what's wrong with the airpad/aircraft)
-  Fourth Side base defense spam (my main focus)

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 28 May 2013

PostPosted: Thu Nov 19, 2015 5:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

If the base defense stuff is not working out even with very low counts for 4th side, then alternative option
would be to disable them completely. And make those as normal buildings, clone them as many as you want
for AI only and set AIBuildThis=yes.

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Fri Nov 20, 2015 8:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, I suppose I may have to go with the alternative option, but due to prerequisites, the AI would build them all at once. Even if I gave each clone a different prerequisite, it really breaks the AntiInfantry, AntiArmor and AntiAir values, as well as every other code related to how the AI builds base defenses (since these clones would not be regarded as such).

Should I upload all my code related to the defenses? I find it very strange that defenses are spammed by an AI that appears to be coded just fine, and would really not like to resort to the clone option, considering 4th sides work perfectly fine for many Ares mods.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sat Nov 21, 2015 9:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Using a workaround to fix an error in your code isn't very good coding practices :/

I've seen several mods suffer from building spam in the past but cant remember exactly what caused it, I know it's nothing to do with a 4th side tho.

If you upload your mod I'll take a look threw the files and see if I can find any problems.

_________________



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


Joined: 28 May 2013

PostPosted: Sat Nov 21, 2015 10:59 am    Post subject: Reply with quote  Mark this post and the followings unread

It happens with the example I shared also. It is with the 4th side with Ares. On easy setting, it doesn't happen.
On normal and brutal settings e.g. AI.BaseDefenseCounts=12,12,12 it starts non-stop base defenses production
for 4th side. Lower values of 8 or less on the AI.BaseDefenseCounts seems to reduce the occurance.

Changing BuildDummy, IsBaseDefense=yes, AntiXXXValue, more AI.BaseDefenses etc. doesn't seem to affect it.

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Sun Nov 22, 2015 4:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have no intention to find a workaround, only a solution.

And it seems the issue with defense counts are true. I changed the side's defense counts to 6, 5, 5. Brutal AI spammed. Medium AI built a good portion of their base before spamming indefinitely. Easy AI was the same as medium, but one managed to build a proper full base with only five defenses as they are supposed to. I imagine lowering it to only a couple defenses would make the situation even better.

Update: The China AI issue with not rebuilding any important buildings is back in the latest Ares update.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Nov 23, 2015 1:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

I dont believe AI.BaseDefenseCounts= is responsible, it may have an effect but it isn't the problem. If it was then every mod that adds new sides would be effected. The same goes for your Chinese AI, if it was a problem with Ares then there would be lots of people posting bug reports to Alex.

BTW above you posted that you use Sidebar.YuriFileNames=sidenc02, that tag excepts boolean (yes or no) entries tho.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Nov 24, 2015 9:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Still, the Chinese AI issue appeared as so:

0.9: good
0.a 1: good
0.a 2: sometimes occurs
0.a 3: always occurs

Anyway, here's the code for the Chinese AI and the fourth side that may help with the AI. It's gotten to the point where I feel others should have a look at the codes.



aiissues.txt
 Description:

Download
 Filename:  aiissues.txt
 Filesize:  29.34 KB
 Downloaded:  5 Time(s)


_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Mon Nov 30, 2015 3:31 am    Post subject: Reply with quote  Mark this post and the followings unread

So, just like the fourth side bug, China's bug also relates to AI.BaseDefenseCounts. I don't know what it is about that feature that could cause the issue, considering I use the same values for other AIs. I was able to confirm this about the Chinese AI because the issue did not occur on medium or easy difficulties, nor in the No Defenses game mode on any difficulty.

Just to restate the issue clearly, since I've already been so redundant and vague in my commentary on it:

- The AI will not rebuild any important buildings (refineries, factories, battle labs, and special buildings that are only built once like the industrial plant), with the exception of Tesla reactors.
- The issue does not occur until the AI reaches tier 3 (battle lab).
- The AI will build the max number of defenses specified, as it should.
- The issue is easy to watch unfold when the AI completes its base, with every structure built, and the defense count reached. I will destroy every building that isn't a tesla reactor or defense, and the AI will either not build anything or replace the building with a defense (and a Tesla reactor if it's a powered defense).
- When the AI is left with nothing but tesla reactors, defenses, and of course a conyard, I'll destroy the defenses. The AI will replace it with only a battle bunker. I take out every defense one by one, and until all of them are battle bunkers.

When every building in their base is a tesla reactor or battle bunker, and the max defense count has been reached, the AI will finally begin to rebuild the rest of its base. They play fine until they lose a structure, and the process restarts all over again.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Nov 30, 2015 11:36 am    Post subject: Reply with quote  Mark this post and the followings unread

AI.BaseDefenses & AI.BaseDefenseCounts are side not country tags, so they should be under [Nod] not [China]. [China] is however missing AI.PowerPlants.

Also what is [STRYUP]?

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Dec 01, 2015 8:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for that information, though it made no difference in the performance of the AI.

[STRYUP] was originally intended to be an Sentry Gun upgrade for China, hence its name, but I never figured out how to make a building upgrade fire a weapon, so now it's just a different type of sentry gun available to China alongside the regular one.

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
MustaphaTR
Scorpion Sniper


Joined: 22 Jan 2015
Location: Kastamonu, Turkey

PostPosted: Tue Dec 01, 2015 8:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

PePsiCola wrote:
When the AI is left with nothing but tesla reactors, defenses, and of course a conyard, I'll destroy the defenses. The AI will replace it with only a battle bunker. I take out every defense one by one, and until all of them are battle bunkers.


That's possibly because of it is only defence that prerequisites are met. Battle Bunkers requires nothing but CYard if you didn't changed. You said you destroy everything else except PPs and defences.

Can you try  toadd BARRACKS (or NAHAND) to bunker's prerequisites and do this again?

_________________
CnCD2K Mod: http://www.moddb.com/mods/red-alert-2-yuris-revenge-cncd2k-mod
Changed Dune Mod: http://www.moddb.com/mods/changed-dune
MustaphaTR's D2K Mod: http://www.moddb.com/mods/mustaphatrs-d2k-mod
Generals Alpha: http://www.moddb.com/mods/generals-alpha
Romanov's Vengeange: https://www.moddb.com/mods/romanovs-vengeance

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Tue Dec 01, 2015 10:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

I tried that out, and you were right. So as usual the AI played until I went and started destroying their base. This time they were left with Tesla reactors, defenses, and a battle lab.

With the Battle bunker set to require a barracks, and with no barracks being present, they instead spammed Speaker Tower, the only defense with the Battle Lab as a prerequisite. And now that I look back on it, the AI actually did build all the defenses they were supposed to, until the prerequisite buildings (barracks, radar, and battle lab) were destroyed, since they would not rebuild these, refineries, or factories.

So it's definitely clear they will build power plants and defenses perfectly fine, but would not build anything else. Perhaps the cause falls under the BuildXXXX keys in the [AI] section?

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

Back to top
View user's profile Send private message
PePsiCola
Cyborg Specialist


Joined: 28 Dec 2010
Location: The United States

PostPosted: Sun Jan 10, 2016 7:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just back to this topic for a final note.

The only solution I've found for China was lowering SovietBaseDefenseCounts to almost none. Of course, like in the No Defenses game mode, the AI builds to high tier much faster, but must rely on units for defense, which is unfair when Allies and Yuri can build far more defenses. And this solution would unfortunately affect all Soviet sides, since Ares' AI.BaseDefenseCounts is not applicable to specific countries.

Seeing as it's been almost two months since I reported the issue, and that myself and others have not found a solution, and that based on the code, there seems to be no logical reason for such an issue, I am going to put this issue to rest (as a sidenote, I have gone and completely remade the country to no avail).

_________________
Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029

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


Joined: 28 May 2013

PostPosted: Mon Oct 29, 2018 3:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Found out what was causing the production of large amount of base defense buildings by the AI in the sample 4th side I linked earlier in this thread.

If a side is not provided with that side specific wall in ConcreteWalls and ProtectWithWall is used on any of its building, the AI Base planning goes into a loop as it cannot find a wall for that side and it produces more base defenses instead.

Solution is to provide a wall for that side or remove ProtectWithWall from all the buildings of that side.

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Tue Oct 30, 2018 1:00 am    Post subject: Reply with quote  Mark this post and the followings unread

That’s a decent discovery
Took a note for that.
Will do more factions in near future.

_________________

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [36 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.2192s ][ Queries: 13 (0.0121s) ][ Debug on ]