正在加载

孤岛危机:

时间:2020-08-24 来源:未知 作者:佚名

作者:trueforce

弹头真短,就7关,游侠发布的第一天下了到现在打穿无数遍了。无聊之余研究了一下改造武器,这里写出来跟大家分享一下。

crysis修改武器很简单,不需要特别的工具软件,只要你有IE浏览器和winrar就可以了。不要被下边长长的代码吓到了,其实修改非常简单!

首先warhead的武器数据保存在X:\Crysis WARHEAD\Game文件夹里的Warhead_GameData.pak文件里,这个文件可以用winrar等压缩软件直接打开,打开后进入

Warhead_GameData.pak\Scripts\Entities\Items\XML\Weapons(无需解压,可以直接在这里改,改前记得备份哦!),在这里可以看到很多XML文件,这些就是武器的数据,文件名就是对应的武器,下面以SCAR(别说不知道这是什么,这是美军初始武器)为例介绍如何修改:

直接在winrar里双击SCAR.xml,IE浏览器打开,这时只能看不能改,点<查看>---<源文件>这时记事本打开就可以修改了。每个武器的都包含9个大类,就是如下红字部分,在浏览器里可以单击收拢展开。蓝字是说明,一般不做修改。绿字代表常用修改部分。

- <item name="SCAR" class="Weapon" category="medium" priority="12">

+ <params> 关键字

<param name="giveable" value="1" /> 1为可以得到,0得不到,这个一般不改

<param name="selectable" value="1" /> 可否选择,1可选,0不可选。比如C4的遥控器就是不可选的,武器都是可选的,除非你不想用!

<param name="pose" value="rifle" /> 持枪姿势

<param name="mass" value="20" /> 质量,可能代表重量

<param name="melee_attack_firemode" value="melee" /> 近战模式

<param name="raiseable" value="true" />

<param name="raise_distance" value="0.80" />

<param name="attach_to_back" value="1" />

<param name="bone_attachment_01" value="back_item_attachment_01" />

<param name="bone_attachment_02" value="back_item_attachment_02" />

- <dualwield>

<suffix value="akimbo_" />

</dualwield>

</params>

<ai_descriptor handler="instant" burstBulletCountMin="1" burstBulletCountMax="10" burstPauseTimeMin="0.8" burstPauseTimeMax="3.5" singleFireTriggerTime="-1" /> ai描述类,所有武器的这一类基本就一句,没什么好改的。

+ <ammos>弹药

<ammo name="bullet" extra="0" amount="40" minAmmo="25" /> amount是初始弹夹子弹数量,如果想把弹夹容量改为50,还要修改后边firemodes类中的<param name="clip_size" value="50" />, minAmmo好像是每个捡到弹夹的补给量。

<ammo name="scargrenade" extra="0" amount="0" accessoryAmmo="1" />

<ammo name="tacbullet" extra="0" amount="0" accessoryAmmo="0" />

<ammo name="tagbullet" extra="0" amount="0" accessoryAmmo="5" />

</ammos>

+ <geometry>几何,主要是模型视觉效果

<firstperson name="objects/weapons/us/scar/scar_l-c_fp.chr" angles="0,0,0" position="0,0,0" />

<thirdperson name="objects/weapons/us/scar/scar_l-c_tp.cgf" angles="0,0,0" />

- <boneAttachments>

<attachment target="firstperson" name="magazine" bone="magazine" />

<attachment target="firstperson" name="silencer_attach" bone="silencer_attach" />

<attachment target="firstperson" name="muzzle_flash_effect" bone="weapon_term" />

<attachment target="firstperson" name="muzzle_flash_light" bone="weapon_term" />

<attachment target="firstperson" name="muzzle_flash_smoke" bone="weapon_term" />

<attachment target="firstperson" name="attachment_top" bone="attachment_top" />

<attachment target="firstperson" name="attachment_bottom" bone="attachment_bottom" />

<attachment target="firstperson" name="shell_grenade" bone="shell_grenade" />

<attachment target="firstperson" name="grenade_flash_effect" bone="grenade_term" />

<attachment target="firstperson" name="grenade_flash_light" bone="grenade_term" />

<attachment target="firstperson" name="attachment_side" bone="attachment_side" />

<attachment target="firstperson" name="attachment_side_light" bone="attachment_side" />

<attachment target="firstperson" name="attachment_side_Laser" bone="attachment_side" />

</boneAttachments>

</geometry>

+ <actions>动作,做各种动作时的视觉声音效果,比如开枪的声音和动作. 每个声音后边都有一个参数radius="n",这个就是声音传播范围,如果这个范围内有敌人,他可以听到你从而提高警觉并发现你,可以看到消音后警觉范围是20,而不消音是200

- <action name="select">

<animation target="firstperson" name="select_01" />

<animation target="owner" name="select" />

<sound target="thirdperson" name="sounds/weapons:scar:select" radius="2" />

</action>

- <action name="deselect">

<animation target="firstperson" name="deselect_01" />

<animation target="owner" name="deselect" />

<sound target="firstperson" name="sounds/weapons:scar:deselect" radius="2" />

<sound target="thirdperson" name="sounds/weapons:scar:deselect" radius="2" />

</action>

- <action name="idle" children="1">

<animation target="firstperson" name="idle_%hand%_%suffix%01" speed="0.7" />

<animation target="owner" name="idle" />

</action>

- <action name="pickedup">

<sound target="firstperson" name="Sounds/weapons:weapon_accessories:pickup_weapon_fp" radius="5" />

<sound target="thirdperson" name="Sounds/weapons:weapon_accessories:pickup_weapon" radius="5" />

</action>

- <action name="fire">

<animation target="firstperson" name="fire_bullets_%hand%_%suffix%01" />

<animation target="owner" name="shoot" />

<sound target="firstperson" name="sounds/weapons:scar:fire_fp_single%env%" radius="200" static="1" />

<sound target="thirdperson" name="sounds/weapons:scar:fire_3rd_single%env%" radius="200" static="1" />

</action>

- <action name="spin_down">

<sound target="firstperson" name="Sounds/weapons:scar:fire_fp_tail%env%" radius="5" static="1" />

<sound target="thirdperson" name="Sounds/weapons:scar:fire_3rd_tail%env%" radius="5" static="1" />

</action>

- <action name="spin_down_silenced">

<sound target="firstperson" name="Sounds/weapons:scar:fire_silenced_fp_tail" radius="5" static="1" />

<sound target="thirdperson" name="Sounds/weapons:scar:fire_silenced_3rd_tail" radius="5" static="1" />

</action>

- <action name="rapid_fire">

<sound target="firstperson" name="Sounds/weapons:scar:fire_fp_loop" radius="250" static="1" synched="1" />

<sound target="thirdperson" name="Sounds/weapons:scar:fire_3rd_loop" radius="250" static="1" synched="1" />

</action>

- <action name="rapid_fire_silenced">

<sound target="firstperson" name="Sounds/weapons:scar:fire_silenced_fp_loop" radius="20" static="1" synched="1" />

<sound target="thirdperson" name="Sounds/weapons:scar:fire_silenced_3rd_loop" radius="20" static="1" synched="1" />

</action>

- <action name="fire_silenced">

<animation target="firstperson" name="fire_bullets_%hand%_%suffix%01" />

<animation target="owner" name="shoot" />

<sound target="firstperson" name="sounds/weapons:scar:fire_silenced_fp_single" radius="18" static="1" />

<sound target="thirdperson" name="sounds/weapons:scar:fire_silenced_3rd_single" radius="18" static="1" /&gt