中级玩家
 
- 贡献度
- 26
- 金元
- 1267
- 积分
- 231
- 精华
- 0
- 注册时间
- 2010-5-27
|
本帖最后由 fenghf 于 2011-8-15 22:45 编辑
=========================《槍的源碼說明》=========================
WeaponData
{
// Terror-specific Data -------------------- 不明白
"VerticalPunch" "3" 武器反作用力,越小越好
"SpreadPerShot" "20" 射擊偏離中心,越小越好
"MaxSpread" "5" 中心最大擴散度,越小越好
"SpreadDecay" "5" 擴散衰減(
"MinDuckingSpread" "0" 下蹲準確度擴散,越小越好
"MinStandingSpread" "0.8" 站立準確度擴散,越小越好
"MinInAirSpread" "2.5" 空中準確度擴散,越小越好
"MaxMovementSpread" "1.5" 移動準確度擴散,越小越好
"PelletScatterPitch" "4.0" 散彈顆粒的擴散程度,越大覆蓋面越廣,舉個例,如果你設為40,你的散彈槍準心將是一個大喇叭口,籠罩了你的屏幕中央,相應的,你需要提高一次射出子彈的數量來提高覆蓋密度,增強殺傷,代價是你的顯卡……
"PelletScatterYaw" "8.5" 散彈顆粒的偏角,最好和上一條匹配,我一般是PelletScatterPitch+2
"ReloadDuration" "0.396" 上彈速度(不知道是不是有極限,我調成0.05,只有上彈動作有時會像抽風,但是上彈的速度依舊……)
"AddonAttachment" "primary" 主(副)武器
"team" "survivor" 屬於哪個陣營(生還者)
"Tier" "2" 這個是指這種武器屬於2類武器(也就是高級武器)只能輸入0,1,2
"ResponseRulesName" "AutoShotgun" 名字
// particle muzzle flash effect to play when fired
"MuzzleFlashEffect_1stPerson" "weapon_muzzle_flash_shotgun_FP" 開火時動畫(第一人稱)
"MuzzleFlashEffect_3rdPerson" "weapon_muzzle_flash_autoshotgun" 開火時動畫(第三人稱)
// model for the shell casing to eject when we fire bullets
"EjectBrassEffect" "weapon_shell_casing_shotgun" 好像是開火時彈殼的彈出模型
// Used in the music system when this weapon fires
"MusicDynamicSpeed" "1.5" 這個貌似是聲音系統的,不管它
"DisplayName" "#L4D_Weapon_AutoShotgun" 顯示名稱
"DisplayNameAllCaps" "#L4D_Weapon_AutoShotgun_CAPS"
// 360 Terror Data
"MaxAutoAimDeflection1" "10.0"
"MaxAutoAimRange1" "0" 這兩段不太懂,貌似跟自動瞄準的難易有關,
//This value determins how "big" a target is for auto aim. If a target is 10.0 units big then it is considered 10.0*scale.
//You can think about this value controlling a falloff value on distant targets, the smaller the value the harder it is to hit at a distance.
"WeaponAutoAimScale" "1.0" 自動瞄準參數
// End Terror-specific Data ----------------
"Rumble" "5" 噪音(吸引僵屍)
"MaxPlayerSpeed" "240" 持槍移動速度
"WeaponType" "shotgun" 武器類型
"WeaponPrice" "3000" 價格……
"WeaponArmorRatio" "1.0" 持槍護甲比?,數值越大越好
"CrosshairMinDistance" "9" 準心最小直徑,越小越好
"CrosshairDeltaDistance" "4" 開火時準心擴散距離(就是開火的時候,準心擴散多大,同時子彈偏移幅度多大)
"Team" "ANY" 屬於哪一方
"BuiltRightHanded" "1" 左手還是右手持槍(0,1分別代表左右手)
"PlayerAnimationExtension" "xm1014"動畫文件後綴
"MuzzleFlashScale" "1.3" 槍口火焰的縮放
"CanEquipWithShield" "0" 是否能持盾(盾在哪呢?)
// Weapon characteristics:
"PenetrationNumLayers" "2" 穿透層數,NUMLAYERS指材質的數量,如果改成9999的話,那你需要一個衛星定位來進行超遠距離狙殺
"PenetrationPower" "30" 穿透威力(即子彈穿透之後的殺傷力,不知道是百分比還是固定數值,希望大家測試一下)
"PenetrationMaxDistance" "500" 最大穿透距離
"CharacterPenetrationMaxDistance" "300" 角色穿透距離(指穿透人體,貌似穿透僵屍不是用這個值來計算的)
"Damage" "23" 基礎傷害值
"Range" "3000" 射距(據說超出這個距離子彈就不見了……)
"RangeModifier" "0.7" 射距的調整量(以此槍為例,部分子彈只能達到3000米的70%,越小表示越不穩定,1.0表示完全射距)
"Bullets" "11" 一次開火射出子彈數量(如果太大的話,你要考慮你的顯卡受不受得了,我改成50之後,我8600GT的顯卡幾乎承受不住一次燃燒彈升級的開火……)
"CycleTime" "0.15" 子彈發射速度(貌似對單發散彈槍效果不大,因為它有個退膛的動作夾在中間……但是如果是其他的**……你最好是考慮把彈夾容量提高)
————————————————————————————————————————————————
// Weapon data is loaded by both the Game and Client DLLs.
"printname" "Auto Shotgun"
"playermodel" "models/w_models/weapons/w_autoshot_m4super.mdl"
"viewmodel" "models/v_models/v_autoshotgun.mdl"
"CharacterViewmodelAddon"
{
"Coach" "models/weapons/arms/v_arms_coach_new.mdl"
"Mechanic" "models/weapons/arms/v_arms_mechanic_new.mdl"
"Producer" "models/weapons/arms/v_arms_producer_new.mdl"
"Gambler" "models/weapons/arms/v_arms_gambler_new.mdl"
}
"anim_prefix" "anim"
"bucket" "0"
"bucket_position" "0"
———————————————————————————————————————————————————
以上這段不管
"clip_size" "10" 彈夾容量(即一個彈夾裡有多少發子彈,改成-1可能就是無限了)
"primary_ammo" "AMMO_TYPE_AUTOSHOTGUN" 子彈類型(如果你改成其他類型的子彈,都會有相應的效果,特別是榴彈槍、燃燒瓶、管狀炸彈,有高爆彈的效果卻沒有高爆彈對自身的爆炸傷害,很爽,就是它們的彈夾容量太小,而且我還沒找到在哪裡改)
"secondary_ammo" "None" 副子彈類型(CS遺留選項吧?)
"weight" "20" 重量
"item_flags" "0" 旗幟(不管)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"TimeToIdle" "1.8" 射擊震動的持續時間,即準心開火後恢復正常的速度,越小越好
"IdleInterval" "60" 瞄準時長(這個不太清楚,我一般都改很小)
"AccuracyDivisor" "-1"
"AccuracyOffset" "0" 以上兩個值相互作用,Divisor越大,Offset越小,射擊時震動就越小
"MaxInaccuracy" "0" 彈著點散布的隨機值,越小槍越準,狙擊槍乾脆為零
(以上數據取自weapon_sniper_military)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"GainRange" "1500" 威力衰減射程(即超出這個射程子彈威力逐步降低)(只有RIFLE類槍有此選項,如M4,AK,戰鬥**)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
上面幾個選項散彈槍沒有,不過其他qiangxie有。
=========================《拆解/封裝vpk》=========================
首先 先下載封裝vpk工具
要將vpk.exe這個工具放置left 4 dead 2\bin裡面
在對這個工具點右鍵 傳送到--->桌面當捷徑
在桌面建立1個空資料夾 名稱為addons
打開資料夾後 在裡面在建立1個空的資料夾 名稱為scripts
把你修改好的源碼都放置addons裡面的scripts
放好之後 在addons資料夾裡面放addoninfo.txt
都好知道 把addons資料夾全部拖到vpk.exe上面 這樣就會封裝成vpk檔案了
將用好的vpk放到left 4 dead 2\left4dead2\addons
就大功告成了
如果還要修改 就把vpk拆解
vpk拆解工具
都用好用在封裝就可以了
用好的vpk放到
left 4 dead 2\left4dead2\addons
就跟放地圖的一方式一模一樣的
=========================《教學結束》=========================
如果有不懂得 可以在此發文章告訴我 我會給你們詳細解說
作者:love6807
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|