[教程][红警2]AI强化 电脑多造兵营、空指部等生产类建筑教程By meiyousuowei

【教程】【红警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 coils 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 \

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=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

大功告成。

PS:

1.以上这个方法适用于任何能够直接建造的建筑。(MCV是基地车展开建造的,不属于直接建造。)

2.修改TechLevel=-1的原因是,让人类玩家不能建造,避免重复。 3.修改Cost=1的原因是,不让这些重复建筑拖慢电脑的发展速度。

4.想弄几个建筑,就注册几个,调整AI几个,创建新单位几个。也就是复制粘贴的琐事。

5.如果想要弄多个空指部(GAAIRC),除了上述方法外,

还要记得修改入侵者(ORCA)、黑鹰(BEAG)的Dock,即在“Dock=”后面添加新的空指部代码。

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4