命令与征服3凯恩之怒mod实例教程
在等待《将军2》的时间里,把老游戏翻了出来,这次玩得有点新意-----自己做mod。红警2,红警3,命令与征服3的mod大家都玩过,也有不少教程。凯恩之怒的mod很少。原因是没有官方的工具。但有个非官方的WRATHED。和cnc3的很像。目前Version: 1.08。
首先要下载1.WRATHED Version: 1.08 -----mod编译器
Author: Thundermods.net
Homepage: http://thundermods.net
2.WRATHED MOD LAUNCHER Version: 1.09-----mod加载工具
Author: Bibber
Homepage: http://bibber.bplaced.net
这两个工具可以从http://www.moddb.com/下载,下载后解压直接可以用。
在WRATHED目录里mods文件夹是mod,里面有例子SampleMod,mod源码放这里。
mod源码做好后,在WRATHED目录下有BuildMod.bat,创建他的快捷方式,在快捷方式属性里改为你的wrathed\BuildMod.bat SampleMod
点击它编译,生成的mod在C:\Users\你的用户名\Documents\Command & Conquer 3 Kane's Wrath\Mods目录下。
编译好后的mod需要WRATHED MOD LAUNCHER来加载。
在WRATHED MOD LAUNCHER目录下有WRATHED MOD LAUNCHER.exe
下面讲下自己做mod,我想虐外星人,把GDI的作战基地,替代前哨站,再加加血,加加力,再分享给好兄弟NOD,一起虐外星人。
首先在WRATHED目录里mods文件夹下创建自己的mod文件夹,我建了Sa6Mod,附件里有源码,大家感兴趣的话可以看看。one for all and all for one!
复制SampleMod的data里的Static.xml到Sa6Mod的data
WRATHED没有xml,需要利用CnC3的Xml。
复制cncmod工具里的CnC3Xml\GDI\下的GDIBattleBase.xml,GDIRig.xml等文件。
具体看我的源码吧。
<Include type="all" source="Static/GDIBattleBase.xml" />作战基地的代码
<Include type="all" source="Static/LogicCommandSet.xml" />单位的命令
<Include type="all" source="Static/GDIRig32.xml" />钻塔的代码
<Include type="all" source="Static/WeaponTemplate.xml" />武器代码
下面说说主要问题:
WRATHED缺少某些文件,不支持如:<xi:include的引用
解决方法:直接把文件里的代码复制出来放在对应位置。
部分我修改的代码,其实我这也不算什么mod,只是改了改,算是抛砖引玉。
单位ID:
id="GDIBattleBase2"
单位的命令:要在localcommandset里定义的。
CommandSet="GDIBattleBase2CommandSet"
建筑可维修:
<RepairUpdate xmlns="uri:ea.com:eala:asset"
id="ModuleTag_RepairUpdate">
<PercentOfBuildCostToRebuildInfo></PercentOfBuildCostToRebuildInfo>
<SelfAudio></SelfAudio>
</RepairUpdate>
<EngineerContain xmlns="uri:ea.com:eala:asset"
id="ModuleTag_EngineerContain"
NameOfVoiceToUseForFriendlyEnter="VoiceEngineerRepair"
NameOfVoiceToUseForHostileEnter="VoiceCaptureBuilding"
EvaEventForRepair="BuildingRepaired"
EvaEventForCapture="EnemyBuildingCaptured"
FXForRepair="FX_Building_Repaired"
FXForCapture="FX_Building_Captured"
FXForCaptureAndReplace="FX_Building_Captured"
ImmediatelyEnabled="true">
<CanEnterFilter Rule="NONE">
<IncludeThing>GDIEngineer</IncludeThing>
<IncludeThing>NODSaboteur</IncludeThing>
<IncludeThing>AlienAssimilator</IncludeThing>
</CanEnterFilter>
</EngineerContain>
生命值:
<Body>
<ActiveBody
id="ModuleTag_Body"
MaxHealth="50000" />
</Body>
可视范围:
清黑雾范围:
<VisionInfo
VisionRange="500"
ShroudClearingRange="5000" />
可建造范围:
<ProjectedBuildabilityInfo
Radius="300"
BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
驻兵:ContainMax="10"
<HordeTransportContain
id="ModuleTag_Contain"
ObjectStatusOfContained="UNSELECTABLE ENCLOSED CAN_ATTACK"
ContainMax="10"
Slots="10"
AllowEnemiesInside="false"
AllowAlliesInside="true"
AllowNeutralInside="false"
AllowOwnPlayerInsideOverride="true"
ShowPips="true"
EnterSound="VehicleEnter"
ExitSound="VehicleExit"
KillPassengersOnDeath="true">
<PassengerFilter
Rule="ANY"
Include="INFANTRY" />
<DieMuxData
DeathTypes="ALL" />
<PassengerData
BonePrefix="BONEGARRISON">
<Filter
Rule="NONE"
Include="INFANTRY" />
</PassengerData>
<MemberTemplateStatusInfo
ThingTemplate="GDISniperSquad"
ObjectStatus="CAN_SPOT_FOR_BOMBARD" />
</HordeTransportContain>
作战基地和钻塔
打包解包:
<SpecialPower xmlns="uri:ea.com:eala:asset"
id="ModuleTag_GivePackUpgradeSpecialPowerTrigger"
SpecialPowerTemplate="SpecialPower_GrantPackUpgrade"
UpdateModuleStartsAttack="true"
/>
<GiveOrRestoreUpgradeSpecialPower xmlns="uri:ea.com:eala:asset"
id="ModuleTag_GivePackUpgradeSpecialPowerUpdate"
SpecialPowerTemplate="SpecialPower_GrantPackUpgrade"
UpgradeToGive="Upgrade_Pack"
/>
<SpecialPower xmlns="uri:ea.com:eala:asset"
id="ModuleTag_GiveUnpackUpgradeSpecialPowerTrigger"
SpecialPowerTemplate="SpecialPower_GrantUnpackUpgrade"
UpdateModuleStartsAttack="true"
/>
<GiveOrRestoreUpgradeSpecialPower xmlns="uri:ea.com:eala:asset"
id="ModuleTag_GiveUnpackUpgradeSpecialPowerUpdate"
SpecialPowerTemplate="SpecialPower_GrantUnpackUpgrade"
UpgradeToGive="Upgrade_UnPack"
/>
存储钛矿:
<DistributedMoney
id="ModuleTag_DistributedMoney"
Capacity="20000"
OnDieSpawnPercentage="25" />
反隐形:
<StealthDetectorUpdate
id="ModuleTag_StealthDetect"
DetectionRange="500" />
维修范围:
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="SELECTED">
<Model Name="FXInvisBone" />
<ShadowInfo
Type="ADDITIVE_DECAL"
SizeX="400"
SizeY="400"
OverrideLODVisibility="true"
MaxHeight="200"
UseHouseColor="true"
LocalPlayerOnly="true"
Texture="Decal_Rig_CO"
/>
</ModelConditionState>
建造时间、价格:
BuildTime="20"
BuildCost="2000"
发电:
EnergyProduction="200"
建造前提:
<GameDependency>
<RequiredObject>GDICommandPost</RequiredObject>
</GameDependency>
攻击对地对空:
AntiMask="ANTI_GROUND ANTI_AIRBORNE_VEHICLE ANTI_AIRBORNE_INFANTRY"
300张地图 到现在我都不会安装。以前的是直接COPY到C盘的某个目录下。但是这300张地图完全不行。读 不出来也不知道为啥
页:
[1]