Posted: Thu May 27, 2010 5:08 am Post subject:
Getting the AI to deploy vehicles
I've tried alot of different scripts to get the AI to deploy mobile sensor arrays but nothing seems to work. The only thing the AI will deploy are MCVs. Is this related to the tag DeploysInto=GACNST? It can't be related to the unit type MCV cause I have 2 different unit entries for MCVs (both deploy into the GACNST) and the AI deploys them both quite happily. Is there really no simple way to get the AI to do something as simple as this? I know a trick with a fake weapon + hunt script to get AI to deploy things, but to do that you'd have to add additional AI only units and other crap, which I would really try to avoid if possible. QUICK_EDIT
Maybe the tag 'MCV=yes' does the trick?
Anyway, the fake weapon is the only thing I can think of otherwise _________________
Think of me as Nordos, 'cause Banshee wouldn't rename me QUICK_EDIT
Joined: 19 May 2008 Location: Scotland, starting a Revolution Cameo: metricon. Posts:???
Posted: Thu May 27, 2010 7:53 am Post subject:
The only other work arround i can think of is getting the AI to build the Building the sensor Array deploys into as for ai codding, i tryed to get them to build, Deploy and use the Mobile war factory and fist of nod before however it was some time a go i did this and had no real success. _________________ Creator of TS:BoB and some other things that might be good when finnished. QUICK_EDIT
The fake weapon trick proved to be cleaner than I thought it would be. Only needed to create an extra version of the vehicle for the AI, that vehicle can still deploy into the original building since the AI never undeploys the sensor arrays. QUICK_EDIT
Though - why would you want the AI to deploy a sensor? Is there a possibilty to tell the Ai, when he detects underground units, to shock them via EMP and hunt it?
Otherwise it would only create bugs. If you pop up with a devil in the AI base and move under his base, he will attack it even if he cant kill it -> he destroys his own buildings _________________
Think of me as Nordos, 'cause Banshee wouldn't rename me QUICK_EDIT
My mod adds a few new stealth units I would rather have the AI keep off their base. The sensor arrays work fine but as you said, for some reason after you go safely underground, they try to fire the ground above you dealing no damage to your units and might harm their own base a bit. It's not really that harmful though and even when I tried to exploit it I couldn't get them to destroy a single power plant by their own fire, only do really minor damage on it. Still I'd rather not have that happen. Guess theres no way to make them detect only stealth and not subterranean units? The jumpjet troopers and things with Sensors=yes detect only stealthed things. As for the EMP cannon I don't think theres a way to make AI use it. Or is it even possible make it use the mobile EMP?
I did use the deploy thing to make AI build and deploy mobile stealth generators. Really nasty things as taking out power isn't enough to uncloak the AI base. But I can't get the AI to deploy their units 100% of the time, they usually do but sometimes the unit just sits there doing nothing. In rules.ini I'm using these keys:
Code:
[SGEN_AI]
...
Primary=DeployWeapon ; Has range 255
DeployToFire=yes
GuardRange=255
NonVehicle=yes ; Just so it can't be captured by hijackers
Prerequisite=NODFACTORY,NASTLH,CABHUT ; So humans can't get it
Image=SGEN
In ai.ini I have this script:
Code:
[08B50141-G]
Name=Deploy script
0=9,0 ; Deploy yourself
1=49,0 ; Keep trying until you are successful
2=11,10 ; Enter base defence mode (just a failsafe if above fails)
Most of the time this will work, the stealth generator will drive out of warfactory and usually deploy itself right away. But sometimes it just stops near the warfactory door and doesn't deploy, even if I go and shoot it. QUICK_EDIT
Joined: 13 Feb 2007 Location: C:\Westwood\ TechLevel=12
Posted: Sun May 30, 2010 11:33 pm Post subject:
The only ways I know to get the AI Build a deployed unit are.
A: Fake weapon with DeployToFire=yes
This also work good on the Moble EMPs. Just give it a Fake weapon that is shorter in range the the EMP wave it makes. The AI will try to deploy the unit but only set off the EMP wave.
B: AIBuildsThis=yes. This works on The Sensor Array and MobileWepons Factorys.
The AI dose not care about BuildLimit= or TechLevel=, but will always use Prerequisite=.
Make sure you have the Prerequisite= set right. The Deployed Sensor Array shoud have the Prerequisite=RADAR like the Moble Sensor Array that the player would use. _________________
Nah, it doesnt check for prerequisites neither. Give it CABHUT and it will still build it (though there are exceptions ofc) _________________
Think of me as Nordos, 'cause Banshee wouldn't rename me QUICK_EDIT
Joined: 13 Feb 2007 Location: C:\Westwood\ TechLevel=12
Posted: Mon May 31, 2010 9:57 am Post subject:
Ordosherrscher
My AI would NOT build my Cloned War Factory with Prerequisite=CABHUT. What building did you change the Prerequisite to CABHUT on?
I have feeling if you changed the Prerequisite on Core building, the tags below may over ride any Prerequisite that you give them.
AI Controls from Rules.ini
; ******* AI Controls *******
[AI]
BuildConst=GACNST
BuildPower=NAPOWR,GAPOWR,NAAPWR ; buildings to build to generate power
BuildRefinery=PROC ; refinery ratio based on these buildings
BuildBarracks=NAHAND,GAPILE ; barracks ratio based on these buildings
BuildTech=NATECH,GATECH ; should build on each of these
BuildWeapons=GAWEAP,NAWEAP ; war factory ration based on these buildings
BuildDefense=NAOBEL ; base defenses are based on these buildings
BuildPDefense=NAOBEL ; excess power base defense
BuildAA=NASAM ; air defenses based on these buildings
BuildHelipad=GAHPAD,NAHPAD ; air helicopter offense based on these buildings
BuildRadar=GARADR,NARADR
ConcreteWalls=GAWALL,NAWALL
Add the Cloned GDI War Factory below to your rules and see if the GDI AI will build it in Skirmish Mode, make sure your Skirmish Mode Tech Level is set at Tech Level 1 so the AI won't build any stock War Factory.
The AI won't make the Clone, so when your ready close out the game and swich Prerequisite to GAPOWR and start Skirmish Mode and set the Skirmish Mode Tech Level to 1 again. The GDI AI will have a Tiberium Waste Facility built.
I also attached a Debug map that the AI will not, most of the time attack you and has all the map revealed to the player.
; Clone GDI weapons factory; Will look like a Tiberium Waste Facility in game
[CGAWEAP]
Name=Clone GDI Weapons Factory
Image=NAWAST
WeaponsFactory=yes
Prerequisite=GAWEAP ;GAPOWR
Factory=UnitType
DeployTime=.044
Strength=1000
Armor=heavy
TechLevel=-1
Sight=4
Adjacent=2
Owner=GDI
Cost=2000
Points=80
Power=-30
Capturable=true
Crewed=yes
Bib=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=8
ThreatPosed=0 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=408, 880, 435
AIBuildThis=yes
B: AIBuildsThis=yes. This works on The Sensor Array and MobileWepons Factorys.
Doesn't this make the AI build them directly though? Means he could build them even without warfactory? I'm trying to get the AI cheat as little as possible so I have them build the vehicle and then deploy it.
Also does the clone bug happen if the AI has a mobile warfactory deployed? I mean does he get 2 units for the price of one, coming from both warfactories at the same time? I know it happens with the normal warfactory, but with the mobile one too? QUICK_EDIT
I think so, yes... Since, when you clone a WF, the bug occurs, too _________________
Think of me as Nordos, 'cause Banshee wouldn't rename me QUICK_EDIT
Joined: 19 May 2008 Location: Scotland, starting a Revolution Cameo: metricon. Posts:???
Posted: Wed Jun 02, 2010 7:54 am Post subject:
what if you use the alt factory/naval yard tut to "seperate" the MWF and the war factory, since the AI dont use the new factory properly it wouldnt cause the AI to cheat and you (the player) would still beable to use the original
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