Posted: Wed Feb 17, 2016 9:41 pm Post subject:
Speaker Tower Breaking AI
So as I covered in my last topic in this forum, the Chinese AI in my mod had suffered an inability to rebuild important buildings (factories, battle labs, superweapons, etc), and would only build Tesla Reactors and base defenses. The cause was clearly one of the China-specific defenses, the Thermal Gun or the Speaker Tower. By removing them and re-adding one at a time, I was able to figure out that the Speaker Tower was the problem.
What is strange is that this issue occurs simply by allowing the AI to build it. Whether it is listed under SovietBaseDefenses, or treated as a regular non-defense building the AI only builds one of, the problem occurs. The only two features of this building that no others have are being an EMPulseCannon with a superweapon auto-firing every few seconds (the only way I know of to make a Speaker Tower), and a weapon that deals negative damage. I wouldn't think either of these would be an issue, and the building works perfectly fine, other than screwing up the AI.
Code:
[NASTWR]
UIName=Name:NATWR
Name=Speaker Tower
Image=NATOWR
BuildCat=Combat
Prerequisite=NATECH,NACNST
Strength=400
Armor=concrete
TechLevel=8
Adjacent=3
Sight=8
ForbiddenHouses=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs,YuriCountry,Ukraine,Greece,Italy,Norway
Owner=Chinese
AIBasePlanningSide=1
Cost=2000
Points=30
Power=-100
Crewed=no
Capturable=false
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
Primary=STBuff
EMPulseCannon=yes
SuperWeapon=SpeakerSpecial
HasRadialIndicator=true
ConcentricRadialIndicator=true
Turret=no
TurretAnimZAdjust=-100
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
Drainable=yes
AntiInfantryValue=15
AntiArmorValue=15
AntiAirValue=0
SolidLevel=0
remove IsBaseDefense=yes and add AIBuildThis=yes
The AI has no clue how to handle such a defense building. It has no idea how many it has to build, that these are high tech defenses and thus only late available, nor that these will make the AI go broke when building several of these (due to the high cost)
I'm not sure, but i think base defenses also need to be at RADAR tech level or lower, due to the way the AI builds up its base. And when it tries to build a TechCenter level defense, without having a tech center, it stops working at all.
Use AIBuildThis=yes and if you want the AI to build more than only 1, add some clones, which are buildable by the AI only (not for human) _________________ SHP Artist of Twisted Insurrection: Nod buildings
Almost every country in my mod has their own tier 3 defenses (and only two cost a bit over $2000) with zero issues, so it probably isn't that.
Funny thing is, I've already tried making the AI treat them as non-defensive buildings (taken off list of defenses, with AI only clones, and removing the defense-specific tags), and this is why it really baffles me.
Reviving this thread to revisit this still unsolved issue. I'm trying to balance out every country's AI against one another, and I figure one way to buff China against others is to get the Speaker Tower working for them.
So a lot of my coding is based on what has been shared by others who have no problem with working Speaker Towers (now I don't know if they use it for their AI as well, since my issue only lies with AI use). And of course, the building itself works great. Surely someone has their AI building Speaker Towers without any issues.
I'm beginning to wonder if the issue lies in the fact that the tower has a weapon with negative verses (I've also tried with positive verses and negative damage). This is the only statistic of the Speaker Tower shared with no other building in the game. There is one other noteworthy feature of the weapon that some part of me wants to believe may be causing this. As with a terror drone attack, or anytime damage is dealt to a unit which cannot retaliate to the firing weapon, AI units scatter when hit by the weapon. I've never seen this done by a building weapon used by the AI either, so perhaps there is something behind this as well. _________________ Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029 QUICK_EDIT
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