【教程】【红警2】AI强化电脑多造兵营、空指部等⽣产类建筑教程Bymeiyousuowei
【教程】【红警2】AI强化电脑多造兵营、空指部等⽣产类建筑教程
By meiyousuowei
我看没有⼈发过类似的教程,就⾃⼰写了⼀个。如有雷同,纯属巧合。
本⼈⼿打的,⾔语切词若有不当,敬请谅解。
这个教程是教⼤家,如何在只修改rule.ini(rulemd.ini)和ai.ini(aimd.ini)的情况下,
实现电脑AI多造【⽣产类建筑】——兵营、战车⼯⼚、空指部、造船⼚,
电脑在数个【⽣产类建筑】的情况下,会同时⽣产多个战⽃单位,从⽽某程度上提升电脑的战⽃⼒和基地的丰富性。
必备的⼯具:XCC Mixer、记事本(呵呵)
准备⼯作:
⽤XCC Mixer提取rule.ini(rulemd.ini)i和ai.ini(aimd.ini),
提取路径为:rad2.mix(rad2md.mix)--local.mix(localmd.mix)--rule.ini(rulemd.ini)和ai.ini(aimd.ini)
PS:括号中带“md”的为尤⾥的复仇
很多⼈认为:只需修改rule.ini(rulemd.ini)⾥⾯的[AI],就可以实现电脑多造【⽣产类建筑】。
其实不然,我们先来看看[AI]⼩结的部分内容:
AttackInterval=0.5 ; average delay between computer attacks ; gs obsolete (since forever) use TeamDelays instead AttackDelay=0.5 ; average delay time before computer begins first attack
PatrolScan=.016 ; minute interval between scanning for enemys while patrolling.
重装系统对电脑有影响吗CreditReserve=100 ; Structure repair will not begin if available cash falls below this amount.
PathDelay=.01 ; Delay (minutes) between retrying when path is blocked.
BlockagePathDelay=60 ; delay (frames) before unit paths around all blockage
AutocreateTime=1 ; average minutes between creating an 'autocreate' team
InfantryReserve=50000 ; always build infantry if cash reserve is greater than this
InfantryBaseMult=1 ; build infantry if building count times this number is less than current infantry quantity
PowerSurplus=50 ; build power plants until power surplus is at least
this amount
BaseSizeAdd=3 ; computer base size can be no larger than the largest human opponent, plus this quantity RefineryRatio=.16 ; ratio of base that should be composed of refineries RefineryLimit=4 ; never build more than this many refineries BarracksRatio=.16 ; ratio of base that should be composed of barracks BarracksLimit=2 ; never build more than this many barracks WarRatio=.1 ; ratio of base that should be composed of war factories
WarLimit=2 ; never build more than this many war factories DefenseRatio=.4 ; ratio of base that should be defensive structures DefenseLimit=40 ; maximum number of defensive buildings to build AARatio=.14 ; ratio of base that should be anti-aircraft defense
AALimit=10 ; maximum number of anti-aircraft buildings to build
TeslaRatio=.16 ; ratio of base that should be telsa coils TeslaLimit=10 ; maximum number of tesla coi
ls to build HelipadRatio=.1 ; ratio of base that should be composed of helipads HelipadLimit=2 ; maximum number of helipads to build
AirstripRatio=.12 ; ratio of base that should be composed of airstrips AirstripLimit=0 ; maximum number of airstrips to build CompEasyBonus=no ; When more than one human in game, computer player goes to "easy" mode?
Paranoid=yes ; Will computer players ally with each other if the situation looks bleak?
PowerEmergency=75% ; sell buildings to raise power level if it falls below this percentage
AIBaseSpacing=1 ; spacing between buildings when AI is building a base
举个例⼦,如果想让电脑多造兵营,⼤家就会去修改“BarracksRatio=”和“BarracksLimit=”,
但是修改完之后会发现,⽆论等号后⾯填⼊多⼤的数值,电脑还是⽆动于衷,只造1个兵营。
所以,以上这个⽅法我们必须摒弃。
下⾯,我将介绍我的⽅法。
⽅法分为两⼤类 (以下所有MCV指的是基地,即价值3000的建造⼚):
单MCV,多【⽣产类建筑】和多MCV,多【⽣产类建筑】
A.单MCV,多【⽣产类建筑】
本帖隐藏的内容
以盟军兵营(GAPILE)为例⼦,假设我想让电脑⼀共造3个GAPILE,
也就是说,在原来的基础上要增加2个。
我所⽤到的⽅法是“新增单位”。也就是说,创造出2个和GAPILE⼀模⼀样的建筑。将他们分别命名代码
为“GAPILE1”“GAPILE2”。
以尤⾥的复仇为例:
第⼀步,注册。
打开rulemd.ini,到[BuildingTypes],即游戏中所有建筑的注册栏,
在[BuildingTypes]最下⽅注册这2个新盟军兵营的代码。即:
395=CALA11
396=CALA12
397=CALA13
398=CAPARK04
399=CAPARK05
400=CAPARK06
401=CALA14
浙江地震402=CALA15
403=CABUNK03
404=CABUNK04
405=CALUNR01
406=CALUNR02
407=GAPILE1
408=GAPILE2
第⼆步,调整AI。
到[AI],在“BuildBarracks=”后⾯加上2个新盟军兵营,即:
BuildConst=GACNST,NACNST,YACNST
BuildPower=NAPOWR,GAPOWR,YAPOWR ;DB NANRCT;gsNAAPWR ; buildings to build to generate power BuildRefinery=NAREFN,GAREFN,YAREFN;gs ; refinery ratio based on these buildings
BuildBarracks=NAHAND,GAPILE,YABRCK,GAPILE1,GAPILE2 ;
barracks ratio based on these buildings
第三步,创建新单位。
到[GAPILE],复制全部代码,在下⽅粘贴2份,分别改名为[GAPILE1]和[GAPILE2],
修改TechLevel数值为-1,把Cost弄便宜些,并各增加⼀⾏代码“Image=GAPILE”。也就是说,要造的新单位想跟谁长得⼀摸⼀样,就加⼊“Image=XXX”就可以了。
即:
[GAPILE1]
UIName=Name:GAPILE
Name=Allied Barracks ;needs different Given Name to avoid editor confusion BuildCat=Tech
Image=GAPILE
Prerequisite=POWER,GACNST
Strength=500
Armor=steel
Factory=InfantryType
Adjacent=2
TechLevel=-1
Sight=5
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans ,Arabs,YuriCountry AIBasePlanningSide=0 ;gs 0 for Good, 1 for Evil
Cost=1
Points=30
Power=-10
Crewed=yes
Capturable=true
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
;DestroyAnim=GAPILEDM
MaxDebris=15
MinDebris=5
DebrisAnims=DBRIS1LG,DBRIS1SM,DBRIS4LG,DBRIS4SM,DBRIS5LG,DBRIS5SM
ThreatPosed=0 ; This value MUST be 0 for all building addons
ExitCoord=-64,64,0
GDIBarracks=yes
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys DamageSmokeOffset=215,395,200 AIBuildThis=yes
Spyable=yes
;WantsExtraSpace=yes ; gs This will look for a space AIBaseSpacing+1 when the computer places, but will settle for AIBasSpacing
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
[GAPILE2]
UIName=Name:GAPILE
Name=Allied Barracks ;needs different Given Name to avoid editor confusion BuildCat=Tech
Image=GAPILE
Prerequisite=POWER,GACNST
Strength=500
Armor=steel
Factory=InfantryType
Adjacent=22022年中考时间
TechLevel=-1
Sight=5
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans ,Arabs,YuriCountry AIBasePlanningSide=0 ;gs 0 for Good, 1 for Evil
Cost=1
Points=30
Power=-10
Crewed=yes
Capturable=true
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
;DestroyAnim=GAPILEDM
MaxDebris=15
MinDebris=5
DebrisAnims=DBRIS1LG,DBRIS1SM,DBRIS4LG,DBRIS4SM,DBRIS5LG,DBRIS5SM
ThreatPosed=0 ; This value MUST be 0 for all building addons
刘涛的老公王珂ExitCoord=-64,64,0
GDIBarracks=yes
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys DamageSmokeOffset=215,395,200 AIBuildThis=yes
Spyable=yes
;WantsExtraSpace=yes ; gs This will look for a space AIBaseSpacing+1 when the computer places, but will settle for AIBasSpacing
ImmuneToPsionics=no ; defaults to yes for buildings, no for others
⼤功告成。
PS:
1.以上这个⽅法适⽤于任何能够直接建造的建筑。(MCV是基地车展开建造的,不属于直接建造。)
2.修改TechLevel=-1的原因是,让⼈类玩家不能建造,避免重复。
3.修改Cost=1的原因是,不让这些重复建筑拖慢电脑的发展速度。
4.想弄⼏个建筑,就注册⼏个,调整AI⼏个,创建新单位⼏个。也就是复制粘贴的琐事。
5.如果想要弄多个空指部(GAAIRC),除了上述⽅法外,
还要记得修改⼊侵者(ORCA)、⿊鹰(BEAG)的Dock,即在“Dock=”后⾯添加新的空指部代码。
B.多MCV,多【⽣产类建筑】
本帖隐藏的内容
这个⽅法是利⽤红警的程序规划,即电脑有多少个MCV,就会同时⽣产多少份建筑。
举个例⼦,我制作的⼏幅地图⾥⾯,⽐如【⾃由港】,我给了玩家8两个MCV,
以玩家8为例,加上⼀开始的MCV,玩家8就有3个MCV,如果让电脑掌控玩家8,那么玩家8的建筑⽣产就是3份。
若为盟军,你会看到3个光棱塔同时从地⾯冒出来的情景。王者荣耀异变的原因
有了这个前提,我们的⽬标就很明确了。即:“如何让电脑在平时,⽽不单只是在没有MCV 的情况下,就⽣产基地车并展开基地。”
接下来,以盟军基地车为例⼦,说明⽅法。
以尤⾥的复仇为例:
军人名言短句霸气十足第⼀步,认识基地车AI触发命令。
打开aimd.ini,到[AITriggerTypes],搜索MCV,就可以看到三⾏关于MCV的命令(盟军,苏联,尤⾥的MCV命令)。
其中盟军MCV的是:
043F874C-G=Allied MCV -
H,043F29AC-G,,10,1,GACNST,000000000200000000000000000000000000000000000000
0000000000000000,70.000000,60.000000,70.000000,1,0,1,0,,0,0,1
这⼀⾏看名字就可以知道,是盟军基地车的AI触发命令。这个命令是什么意思,我来简单讲讲。若懂得看AI触发命令的朋友可以⽆视。
从左到右根据逗号,把这段命令拆分8个部分:
1.“043F874C-G=”:AI触发代码。
2.“Allied MCV - H”:AI触发名称,只起注释作⽤。
3.“043F29AC-G”:AI触发所使⽤的作战⼩队名称。
4.“”:AI触发所属国家,表⽰所有国家均可执⾏此触发。
5.“10”:AI触发科技等级
6.“1”:触发条件(这个是关键):
“0”: 敌⼈拥有XX单位
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论