绝命时刻中如何添加单位

原版绝命中为一个阵营增加一件武器要修改哪几个INI文件?
2024-11-26 06:52:31
推荐回答(4个)
回答1:

  =.=作为一个老的绝命时刻MODDER,LS几位的回答都是坑爹的
  首先,如果只是简单加一件武器,举例比如要给霉菌的复仇者加入对地武器,首先,在INI文件夹下有一个Object文件夹,然后进到里面打开AmericaVehicle.ini,然后按下快捷键Ctrl+F,打开寻找工具,输入AmericaTankAvenger,找到后,跳过它前面的模型参数设置后,就有下述类似文字:
  ; ***DESIGN parameters ***
  DisplayName = OBJECT:Avenger
  Side = America
  EditorSorting = VEHICLE
  TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
  Conditions = None
  Weapon = PRIMARY AvengerTargetDesignator
  Weapon = SECONDARY AvengerAirGunAirDummy
  End
  ArmorSet
  Conditions = None
  Armor = AvengerArmor
  DamageFX = TankDamageFX
  End
  BuildCost = 1500
  BuildTime = 10.0 ;in seconds
  VisionRange = 150
  ShroudClearingRange = 300

  注意到,武器就是在这里:
  WeaponSet
  Conditions = None
  Weapon = PRIMARY AvengerTargetDesignator
  Weapon = SECONDARY AvengerAirGunAirDummy
  End
  游戏引擎最多支持一个物件带三种武器,也就是说,假如我们现在加入一个新的对地武器:
  WeaponSet
  Conditions = None
  Weapon = PRIMARY AvengerTargetDesignator
  Weapon = SECONDARY AvengerAirGunAirDummy
  Weapon = TERTIARY AvengerATWeapon
  End
  注意,这里的PRIMARY SECONDARY TERTIARY一一对应第一、第二、第三种武器
  (我这里是利用我以前的MOD的INI数据,所以不一定武器完全对得上号)

  然后保存,退出Object这个文件夹,在INI文件夹内有Weapon.ini
  接下来,在里面任意找一个武器(因为要和你详解武器的设置,太费时了,不是这么简单就可以说的完的),然后复制拷贝一份,并重新命名为AvengerATWeapon
  例如我是找的战神坦克的武器:
  ;------------------------------------------------------------------------------
  Weapon BattleMasterTankGun
  PrimaryDamage = 60.0
  PrimaryDamageRadius = 5.0
  ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 150.0
  MinTargetPitch = -15 ; we may not target anything outside of this pitch range
  MaxTargetPitch = 15 ; ditto
  DamageType = ARMOR_PIERCING
  DeathType = NORMAL
  WeaponSpeed = 400 ; dist/sec
  WeaponRecoil = 5 ; angle to deflect the model when firing
  ProjectileObject = BattleMasterTankShell
  FireFX = WeaponFX_GenericTankGunNoTracerSmall
  VeterancyFireFX = HEROIC WeaponFX_HeroicGenericTankGunNoTracerSmall
  ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
  FireSound = BattleMasterFire ;BattlemasterTankWeapon Sound Now only for Tank general
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 2000 ; time between shots, msec
  ClipSize = 0 ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0 ; how long to reload a Clip, msec
  ProjectileCollidesWith = STRUCTURES WALLS
  WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; UraniumShells
  WeaponBonus = GARRISONED RANGE 125%
  ;WeaponBonus = GARRISONED RATE_OF_FIRE 135%
  ;WeaponBonus = GARRISONED DAMAGE 150%
  End

  现在复制一份,命名为:
  ;------------------------------------------------------------------------------
  Weapon AvengerATWeapon
  PrimaryDamage = 60.0
  PrimaryDamageRadius = 5.0
  ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 150.0
  MinTargetPitch = -15 ; we may not target anything outside of this pitch range
  MaxTargetPitch = 15 ; ditto
  DamageType = ARMOR_PIERCING
  DeathType = NORMAL
  WeaponSpeed = 400 ; dist/sec
  WeaponRecoil = 5 ; angle to deflect the model when firing
  ProjectileObject = BattleMasterTankShell
  FireFX = WeaponFX_GenericTankGunNoTracerSmall
  VeterancyFireFX = HEROIC WeaponFX_HeroicGenericTankGunNoTracerSmall
  ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
  FireSound = BattleMasterFire ;BattlemasterTankWeapon Sound Now only for Tank general
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 2000 ; time between shots, msec
  ClipSize = 0 ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0 ; how long to reload a Clip, msec
  ProjectileCollidesWith = STRUCTURES WALLS
  WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; UraniumShells
  WeaponBonus = GARRISONED RANGE 125%
  ;WeaponBonus = GARRISONED RATE_OF_FIRE 135%
  ;WeaponBonus = GARRISONED DAMAGE 150%
  End

  最后记得保存,这就是最简单,最迅速增加一种武器的方式

  其实LZ只要多仔细看看INI就能明白它们的工作原理了,还是很易懂,容易上手的(虽说我不喜欢SAGA引擎,很多其实很简单的功能却得用很复杂的方式实现)

  另外,你还可以多上上http://zh.818-818.com/bbs1/thread.php?fid=25
  虽说服务器经常不稳定,但是这是目前国内唯一比较成规模的讨论绝命时刻MOD制作的站点了

  或者如果你英文功底好,国外有很多的MOD教程

回答2:

其实你可以把要修改的东西全部放在一个文件里,当然CommandButton和CommandSet还有Weapon是一定要改的,其他的放一起也可以。
如果你只是要增加单位使用的武器而不是增加新单位的话,修改Weapon就可以了(有时要修改Object\WeaponObjects(弹头)、Locomotor(飞行速度)、ParticleSystem和/或FXlist(粒子系统)、ObjectCreationList(还是弹头的))。总之绝命时刻修改这个东西,入门很容易但精通很难。
支持xiedongli的回答!

回答3:

根据单位类别分别修改air(飞机)、infantry(步兵)……还有多个,包括升级的upgrade、weapon(武器)等。

回答4:

盟军建筑是不能直接占领的。 对于作战单位,必须用中国系列的“中国”、“核武将军”、“步兵将军”,升级出核子加农炮和中子技能,然后用中子弹炮轰盟友的