用rar打开打开DW里的data0.pak,找到scripts/inventory。inventory这个文件主要是投掷类武器,包括飞镖,手雷之类的,inventory_gen这个文件才是枪械类。
打开后搜索firearm,找到的第一项应该就是德国9mm手枪,以此为例进行讲解,我只讲比较有用的修改吧,剩下的可以自己研究作用。
Item("Firearm_PistolAGen", CategoryType_Firearm)
{
CategoryType(CategoryType_Firearm);
Visibility(true);
ItemType(ItemType_Pistol);
PhysicsScript("single_dropped_inventory.phx");
UpgradeLevel(0);
Condition(-1);
DamageRangeMelee(110.0 *0.01); 这项影响基础伤害,不改也行,后边有更加好用的改伤害方法 HeadSmashProb(1.0); 下边四项是断肢率,应该是1代表100%
HeadCutProb(0.0);
ArmsCutProb(0.0);
LegsCutProb(0.0);
CutTypesGroup(CutTypesGroup_Holes);
DamageType(DamageType_Bullet);
Mesh("wn_pistol_a.msh");
AnimPrefix("Beretta");
HudIcon("weapon_pistol");
ShotTime(0.3); 射击频率,越小开火间隔越小
ShotSound("glock_shot_XX.wav"); 射击的声音,没必要改
BaseSoundPrefix("glock");
DefaultBulletId("Bullet_Pistol");
AmmoCount(8); 载弹量
ReloadTime(1.5); 重装弹夹的秒数
EmptySound("beretta_empty.wav"); 射空了弹夹的声音
TwoHanded(false);
HolderElement("r_thigh"); 附加属性,这个似乎不能乱改
HolderOffset([0.0,10.0,0.0] *[0.01, 0.01, 0.01]);
HolderAngle([0.0,90.0,-90.0]);
HandOffset(HandModification_Normal, [-0.03,-0.03,0.0]);
HandOffset(HandModification_Custom, [-0.03,-0.03,0.0]);
use HitEffects_Firearm();
use PickupSounds_Default();
ClipReload(true);
FxNameShell("BerettaGunfireShell");
ShootFx("istolGunfireSingle_sequence.fx");
AimBlurStart(0.25);
AimBlurEnd(0.35);
ShootStatAccuracy(95.0); 射击精度,测试可以超过100,但是没用
MoveAcurancyLoseFactor(0.2); 移动射击损失的精度
DuckInertiaFactor(0.3);
ShootMinAngle(0.009);
ShootMaxAngle(0.1);
ShootAngleVel(0.07);
ShootAngleCooldown(0.2);
ShootVertRecoil(0.04);
ShootVertRecoilSpread(0.012);
ShootHorzRecoil(0.0);
ShootHorzRecoilSpread(0.0);
ShootRecoilTime(0.09);
ShootMode(ShotMode_Single);
BulletsPerShot(1); 重点来了,改伤害实际是通过改这个每次射击发射的子弹数,数字越大相当于你开一枪威力越大,110的基础面板伤害乘以你修改的每发弹数,但是实际消耗子弹居然只有一发.......
喷子也是这么改,但是比较特殊,因为是每发弹药基础伤害为110,但是喷子是散射,打不中的没伤害,实际伤害达不到标称
AimFov(1.6); 这个是修改视距的,越大镜头拉的越近,大狙就是这么改出来的
MaxReboundCount(3);
DamageSize(1.0);
AiHitSound("bullet");
StatsType(StatsType_Pistol);
Price(9136); 售价,不知道是买还是卖,没测试
FF_EffectName("Shot_StrongPistol");
FF_Left(0.3);
FF_Right(0.4);
FF_Duration(0.1);
FF_FadeOut(0.0);
CriticalProb(0.0);
CriticalDamage(1.0);
DamageHeadMult(6.0);
DamageToPhysicsObjects(10.0);
FirePointRange(0,400.0 *0.01);
FirePointDamage(0,159.0);
FirePointForce(0,25.0);
FirePointRange(1,700.0 *0.01);
FirePointDamage(1,159.0);
FirePointForce(1,25.0);
FirePointRange(2,2500.0 *0.01);
FirePointDamage(2,79.5);
FirePointForce(2,12.5);
FirePointRange(3,10000.0 *0.01);
FirePointDamage(3,39.75);
FirePointForce(3,6.25);
Color(Color_Blue);
GenType(GenType_Firearm);
ShotTailDelay(0.5);
AchType(AchType_Pistol);
NameGender(0);
PriceMult(1.1);
}
Item("Firearm_PistolAGen", CategoryType_Firearm)
{
CategoryType(CategoryType_Firearm);
UsageType(UsageType_Aim);
UpgradeLevel(0);
HandOffset(HandModification_Normal, [-0.0009,-0.0051,0.2]);
HandRot(HandModification_Normal, [0.7237,-0.1293,0.0]);
HandOffset(HandModification_Custom, [-0.0003,-0.0003,0.0]);
ShootMinAngle(0.005);
ShootMaxAngle(0.13);
ShootAngleVel(0.13);
ShootAngleCooldown(0.189);
ShootVertRecoil(0.0);
ShootVertRecoilSpread(0.0);
ShootHorzRecoil(0.0);
ShootHorzRecoilSpread(0.0);
ShootRecoilTime(0.16);
}
最后是找到NoiseType这么个重点词,NoiseType("HEAVY_SHOT");一般是这种的,将其改为NoiseType("NONE");就会变成飞镖类的无声武器了.......