本帖最后由 廖威 于 2012-5-30 15:43 编辑
我使用unRap v1.06解包,然后得到一堆cpp和hpp文件,找到并修改CfgWeapons.hpp,附录的代码是我改过的版本,然后把config.bin
文件移出文件夹或者随便改个名字比如@config.bin,游戏执行文件就会自动读取cpp和hpp文件,而不是bin文件
定义瞄准镜的语句是:
opticsZoomMin = 0.024900; //瞄准镜最大倍率,别笑确实是最大,数值越小镜头推得越近,相应倍率也就越大!
opticsZoomMax = 0.124500; //瞄准镜最小倍率
opticsZoomInit = 0.124500; //瞄准镜初始倍率,这么写瞄准镜就可以变倍了
memoryPointCamera = "opticview";
visionMode[] = {
"Normal", "NVG" //瞄准镜模式,为了能够夜战我加了微光夜视模式
};
附录:我改动过的地方基本上都会给你标出来
class CfgWeapons {
class M24; // External class reference
class UKF_L115A3 : M24 {
scope = public;
model = "\UKF_L115A3\UKF_L115A3.p3d";
displayName = L115A3;
descriptionShort = "Accuracy International L115A3";
dexterity = 1.0;
ACE_bipod = 0;
ACE_WEIGHT = 6.8;
ACE_Size = 9000;
ACE_NoPack = 1;
modelOptics = "\UKF_L115A3\scope\P3L-Fine_mildot.p3d";
class OpticsModes
{
class P3L_Fine_mildot
{
opticsID = 1;
useModelOptics = 1;
opticsPPEffects[] = {
"OpticsCHAbera1", "OpticsBlur1"
};
opticsZoomMin = 0.024900;
opticsZoomMax = 0.124500;
opticsZoomInit = 0.124500;
memoryPointCamera = "opticview";
visionMode[] = {
"Normal", "NVG"
};
opticsFlare = "true";
opticsDisablePeripherialVision = "true";
optics = "true";
distanceZoomMin = 400;//枪械在最大倍率下的归零距离
distanceZoomMax = 400;//枪械在最小倍率下的归零距离
discretedistance[] = {100,200,300,400,450,500,550,600,650,700,750,800,850,900,950,1000,1025,1050,1075,1100,1125,1150,1175,1200,1225,1250,1275,1300,1325,1350,1375,1400,1425,1450,
1475,1500};//原版OA中的弹道归零距离设置
discretedistanceinitindex = 3;
cameraDir = "";
};
};
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_ca.paa";
UiPicture = "\CA\weapons\data\Ico\i_sniper_CA.paa";
handanim[] = {"OFP2_ManSkeleton", "\UKF_L115A3\anims\UKF_L115A3.rtm"};
magazines[] = {"UKF_5Rnd_338_Mag"};
reloadMagazineSound[] = {"ca\sounds\weapons\rifles\reload-m16-3", 0.1, 1, 20};
reloadsound[] = {"\UKF_L115A3\snd\l115boltcycle.ogg", 0.0316228, 1, 20};
begin1[] = {"\UKF_L115A3\snd\l115.ogg", 1.71189, 1, 1300};
soundBegin[] = {"begin1", 1};
autoFire = false;
reloadTime = 2;
dispersion = 3e-005;
minRange = 2;
minRangeProbab = 0.1;
midRange = 800;
midRangeProbab = 0.7;
maxRange = 1500;
maxRangeProbab = 0.05;
recoil = "L115Recoil";
recoilProne = "L115RecoilProne";
class Library {
libTextDesc = "The Accuracy International L115A3 'Long Range Rifle' (LRR) was introduced in 2008 as part of the Sniper System Improvement Programme (SSIP), replacing the AI L96A1 as the primary sniper weapon system of the United Kingdom's armed forces. It is the latest militarized version of the AI 'Arctic Warfare Super Mangum' (AWSM) which was first introduced to British forces in limited numbers back in the year 2000 as the L115A1. The L115A1 was introduced to extend the accurate range of recce platoon snipers out beyond the capabilities of the 7.62mm L96A1, with the aid of the larger .338 (8.6mm) Lapua round. Operational experience in Iraq and Afghanistan has shown fire-fights frequently occurring over long ranges, resulting in large-calibre rifles like the L115A3 being adopted more widely by British snipers. The L115A3 features a Schmidt and Bender 5-25x56 PM-II telescopic sight on a Picatinny rail, AI 'Tactical' muzzle brake, 27-inch fluted barrel, Harris bipod and a folding stock with butt spike. The rifle can be fitted with a suppressor to eliminate muzzle flash, and a Qioptiq Ltd. SniperVIPIR-2+ Thermal Weapon Sight. Weight = 6.8kg, Length = 1,300mm, Muzzle Velocity = 936m/s, Ammunition = .338 Lapua, in five-round box magazines.";
};
ace_sa_enabled = 1;
ace_sa_adj_mode = "angle";
ace_sa_defaultelevation = 2.6; //瞄准镜与枪管默认夹角,修正了一下,为了配合我搞到的一份真实情况下的AWSM弹道表
ace_sa_zerooffset = 0;
ace_sa_defaultwindage = 0;
ace_sa_defaultrange = 400;
ace_sa_minelevation = -4;
ace_sa_maxelevation = 23;
ace_sa_stepelevation = 0.1;
ace_sa_windage = 6;
ace_sa_stepwindage = 0.1;
ace_sa_minrange = 100;
ace_sa_maxrange = 1500;
ace_sa_elev_unit = "mil";
ace_sa_wind_unit = "mil";
ace_sa_range_unit = "meters";
ace_sa_zeroelev = 100;
ace_sa_table_elev[] = {{0, 0}, {100, 0.6}, {200, 1.2}, {300, 1.8}, {400, 2.6}, {450, 3.0}, {500, 3.4}, {550, 3.9}, {600, 4.3}, {650, 4.8}, {700, 5.2}, {750, 5.7}, {800, 6.2}, {850, 6.8}, {900, 7.4}, {950, 8.0}, {1000, 8.6}, {1050, 9.3}, {1100, 9.9}, {1150, 10.6}, {1200, 11.3}, {1250, 12.1}, {1300, 12.9}, {1350, 13.8}, {1400, 14.6},{1450, 15.6},{1500, 16.5}}; //ACE弹道表,我修正过
ace_drift[] = {{0, 0}, {100, 0.0}, {200, 0.02}, {300, 0.06}, {400, 0.12}, {500, 0.20}, {600, 0.30}, {700, 0.49}, {800, 0.64}, {900, 0.9}, {1000, 1.1}, {1100, 1.43}, {1200, 1.92}, {1300, 2.34}, {1400, 2.80}, {1500, 3.45}}; //ACE风偏表,我修正过
};
class UKF_L115A3_fgrip : UKF_L115A3 {
model = "\UKF_L115A3\UKF_L115A3_fgrip.p3d";
ACE_bipod = 1;
};
class UKF_L115A3_wdl : UKF_L115A3 {
model = "\UKF_L115A3\Camo_G\UKF_L115A3_G.p3d";
displayName = "L115A3 (WD)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_w_ca.paa";
};
class UKF_L115A3_wdl_fgrip : UKF_L115A3_fgrip {
model = "\UKF_L115A3\Camo_G\UKF_L115A3_G_fgrip.p3d";
displayName = "L115A3 (WD)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_w_ca.paa";
};
class UKF_L115A3_des : UKF_L115A3 {
model = "\UKF_L115A3\Camo_D\UKF_L115A3_D.p3d";
displayName = "L115A3 (D)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_d_ca.paa";
};
class UKF_L115A3_des_fgrip : UKF_L115A3_fgrip {
model = "\UKF_L115A3\Camo_D\UKF_L115A3_D_fgrip.p3d";
displayName = "L115A3 (D)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_d_ca.paa";
};
class UKF_L115A3_sd : UKF_L115A3 {
fireLightDuration = 0.0;
fireLightIntensity = 0.0;
model = "\UKF_L115A3\UKF_L115A3_sd.p3d";
displayName = "L115A3 SD";
descriptionShort = "Accuracy International L115A3 (SD)";
ace_suppressed = 1;
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_sd_ca.paa";
UiPicture = "\CA\weapons\data\Ico\i_sniper_CA.paa";
begin1[] = {"\UKF_L115A3\snd\l115_sd.ogg", 1.57928, 1, 1000};
soundBegin[] = {"begin1", 1};
class Library {
libTextDesc = "Accuracy International L115A3 (suppressed)";
};
};
class UKF_L115A3_sd_fgrip : UKF_L115A3_sd {
model = "\UKF_L115A3\UKF_L115A3_sd_fgrip.p3d";
ACE_bipod = 1;
};
class UKF_L115A3_sd_wdl : UKF_L115A3_sd {
model = "\UKF_L115A3\Camo_G\UKF_L115A3_G_SD.p3d";
displayName = "L115A3 SD (WD)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_wsd_ca.paa";
};
class UKF_L115A3_sd_wdl_fgrip : UKF_L115A3_sd_fgrip {
model = "\UKF_L115A3\Camo_G\UKF_L115A3_G_SD_fgrip.p3d";
displayName = "L115A3 SD (WD)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_wsd_ca.paa";
};
class UKF_L115A3_sd_des : UKF_L115A3_sd {
model = "\UKF_L115A3\Camo_D\UKF_L115A3_D_SD.p3d";
displayName = "L115A3 SD (D)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_dsd_ca.paa";
};
class UKF_L115A3_sd_des_fgrip : UKF_L115A3_sd_fgrip {
model = "\UKF_L115A3\Camo_D\UKF_L115A3_D_SD_fgrip.p3d";
displayName = "L115A3 SD (D)";
picture = "\UKF_L115A3\Equip\w_UKF_L115A3_dsd_ca.paa";
}; |