q825701004 发表于 2020-12-16 23:34

求助如何修改武器射速

问下各位大佬如何修改武器射速啊,我看一般步枪都是360的rmp,想把一把步枪的射速改低一点请问怎么改,有大佬知道吗

qqrn008 发表于 2020-12-17 12:13

如果装有近防的MOD,直接打开游戏目录下 Mods\1493503027\1.2\Defs\ThingDefs_Misc\Weapons_Guns.xml

查看八一杠一式自动步枪 这个ThingDef,里面作者有说明,自己照着改就行.

        <ThingDef ParentName="BaseHumanMakeableGun">
                <defName>Gun_QBZ81A</defName>
                <label>八一杠一式自动步枪</label>
                <description>中国生产的一款精度好、动作可靠、操作维护简便的自动步枪。</description>
                <graphicData>
                        <texPath>Things/Item/Equipment/WeaponRanged/CIWS_QBZ81A</texPath>
                        <graphicClass>Graphic_Single</graphicClass>
                </graphicData>
                <soundInteract>Interact_Rifle</soundInteract>
                <statBases>
                        <WorkToMake>45000</WorkToMake>
                        <!--制作工作量-->
                        <MarketValue>800</MarketValue>
                        <!--价值-->
                        <Mass>3.5</Mass>
                        <!--重量-->
                        <AccuracyTouch>0.80</AccuracyTouch>
                        <!--近身精度-->
                        <AccuracyShort>0.87</AccuracyShort>
                        <!--近程精度-->
                        <AccuracyMedium>0.77</AccuracyMedium>
                        <!--中程精度-->
                        <AccuracyLong>0.64</AccuracyLong>
                        <!--远程精度-->
                        <RangedWeapon_Cooldown>1.05</RangedWeapon_Cooldown>
                </statBases>
                <weaponTags>
                        <li>EliteGun</li>
                </weaponTags>
                <costList>
                        <Steel>60</Steel>
                        <ComponentIndustrial>5</ComponentIndustrial>
                </costList>
                <verbs>
                        <li>
                                <verbClass>Verb_Shoot</verbClass>
                                <hasStandardCommand>true</hasStandardCommand>
                                <defaultProjectile>Bullet_M1943A</defaultProjectile>
                                <!--使用的子弹-->
                                <warmupTime>0.9</warmupTime>
                                <!--预热时间,射击前瞄准时间-->
                                <range>31</range>
                                <!--射程-->
                                <burstShotCount>10</burstShotCount>
                                <!--每次射击子弹数量-->
                                <ticksBetweenBurstShots>5</ticksBetweenBurstShots>
                                <!--单位时间射速,用3600除以这个数得出射速-->
                                <soundCast>Shot_SniperRifle</soundCast>
                                <soundCastTail>GunTail_Medium</soundCastTail>
                                <muzzleFlashScale>9</muzzleFlashScale>
                                <!--枪口闪光亮度-->
                        </li>
                </verbs>
                <tools>
                        <li>
                                <label>stock</label>
                                <capacities>
                                        <li>Blunt</li>
                                </capacities>
                                <power>9</power>
                                <cooldownTime>1.8</cooldownTime>
                        </li>
                        <li>
                                <label>barrel</label>
                                <capacities>
                                        <li>Blunt</li>
                                        <li>Poke</li>
                                </capacities>
                                <power>10</power>
                                <cooldownTime>1.9</cooldownTime>
                        </li>
                </tools>
        </ThingDef>


主要就是这句
<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
<!--单位时间射速,用3600除以这个数得出射速-->
数字越大,射速越慢

至于怎么找到枪支的ThingDef,如果是MOD的枪支,到MOD目录查找枪支名称 比如 八一
然后找到 位于Languages目录下的文件,打开
里面这一行前的Gun_QBZ81A就是ThingDef的defName
<Gun_QBZ81A.label>八一杠一式自动步枪</Gun_QBZ81A.label>
然后再查找Gun_QBZ81A就找到了.
如果是核心的枪支,到游戏目录 Data\Core 里查找
如果是权利的,到 Data\Royalty 里查找
当然,不建议直接修改,最好是做成Patch

q825701004 发表于 2020-12-17 14:03

qqrn008 发表于 2020-12-17 12:13
如果装有近防的MOD,直接打开游戏目录下 Mods\1493503027\1.2\Defs\ThingDefs_Misc\Weapons_Guns.xml

查看 ...

非常感谢大佬,这就去试试
页: [1]
查看完整版本: 求助如何修改武器射速