Posted: Mon Jun 28, 2010 12:34 pm Post subject:
[Vanilla] AI Clone Structures
Subject description: RA2/YR (also works in TS/FS but sample code from RA2/YR)
Vanilla?
Default game no exe hack/DLL enhancement
1. What is AI cloning?
AI cloning is when the AI has more than one factory and when it constructs a unit its gets another unit for free like the cloning vats but for any unit
2. Why should I let AI have cloning?
a. Makes AI harder to defeat by ofsetting the weaknesses of triggers
b. AI can produce more units in less time
3. Sample Code
[GAWEAP2] ;This must be listed under [BuildingTypes]
UIName=Name:GAWEAP
Name=Allied War Factory
Image=GAWEAP ;This is the image of the war factory clone
BuildCat=Tech
WeaponsFactory=yes
Prerequisite=PROC,GAPILE,GACNST
Factory=UnitType
DeployTime=.044
Strength=1000
Armor=wood
TechLevel=2
Sight=4
Adjacent=2
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,
Arabs,YuriCountry
AIBasePlanningSide=0
Cost=2000
Points=80
Power=-25
Capturable=false ;If is true you just get a factory and no new build options
Crewed=yes
Bib=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DebrisAnims=DBRIS1LG,DBRIS1SM,DBRIS2LG,DBRIS4LG,DBRIS4SM,DBRIS5LG,DBRIS5SM,DBRIS
6SM,DBRIS7LG,DBRIS7SM
MaxDebris=15
MinDebris=5
ThreatPosed=0
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=408,880,435
AIBuildThis=yes ;obvious why?
ExitCoord=512,256,0
Spyable=yes
ImmuneToPsionics=no
NumberImpassableRows=1
BuildLimit=0 ;Stops it appearing in players build tab
4. Can human players clone [VehicleTypes]?
No
5. Why use BuildLimit=0 instead of TechLevel=-1?
1. Useful to control AI building if your modification has a Tech Slider.
6. Any side effects?
1. If you have clone factories and triggers for units with BuildLimit= i.e. two barracks and a hero, the AI can make multiple heroes but again this is a way to make the AI harder
So your telling me your have never built a second war factory or airfield as a player?
Even human players will build multiple factories to increase build speed of units.
Unfortunatly that logic isn't possible (i.e. multiple factory just increases build speed not cloning) because the AI normally only builds one factory due to this cloning logic however it is beneficial to the AI.
Also if anyone takes some time to look into RA2 AI system, they will obviously work out why it sucks and thus why it must cheat (even in default game the AI cheats. _________________ QUICK_EDIT
Yeah the AI does cheat a lot. They had a full base operational when I was just getting my battle lab setup. I myself do build a crap load of factories so if one gets destroyed when a unit is being produced there is a backup. I build expansion bases closer and closer to enemy. Sometimes right around an ore field. QUICK_EDIT
Like DCoder said at Revora, don't use BuildLimit=0 if you use Ares. _________________ Because Banshee saw fit to ban my other account for no reason, this is my new one. Last edited by High Templar X on Tue Jun 29, 2010 7:34 pm; edited 1 time in total QUICK_EDIT
So what makes you think everyone wants an enhanced AI on Every Map? Just cause maybe you would want that dosent mean everyone else would. It was just a recommendation for christ sakes not an order.
Maybe I should have worded it differently to say it can be done by Rules(for all maps) or Map file(for individual maps) 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