游戏狂人
 
- 贡献度
- 81
- 金元
- 12567
- 积分
- 1581
- 精华
- 0
- 注册时间
- 2012-5-28
|
本帖最后由 Max.Fan 于 2019-6-15 10:34 编辑
玩英雄连2没两天 玩着实在难受 发现ccm很强大 理论应该是modifiers文件里什么都可以改改 玩着爽多很看了论坛的帖子有了些启发 改了射程和精准 应该还能改装弹时间什么的 更改调出单位就不说了 有帖子
另外手雷的射程没改到 有没有老大告诉下
应该是在这里添加 Modify_Weaponrange(sg_ccm, "hardpoint_01", s.scalefactor, "sgroup") 但是不知道手雷是怎么添加的
ccm文件夹里 6个文件都要相应的修改 函数对应才有效
ccm.scar
ccm_actions.scar
ccm_extensions.scar
ccm_squad.scar
ccm_support.scar
ccm_config.scar
例如修改射程
ccm.scar 把速度改成射程
bind("CONTROL+PageUp", "CCM_IncreaseSelectionrange()")
bind("CONTROL+PageDown", "CCM_DecreaseSelectionrange()")
ccm_actions.scar 找到增和减伤害函数复制 改成射程 如下
function CCM_IncreaseSelectionrange()
Misc_GetSelection()
local msg = ""
if not SGroup_IsEmpty(sg_ccm) then
SGroup_ForEach(sg_ccm,
function(sgid, idx, squad)
msg = msg..Squad_Modifyrange(squad, 1).."\n"
end
)
end
CCM_DisplayText("Modified unit range:"..g_listline..msg)
end
function CCM_DecreaseSelectionrange()
Misc_GetSelection()
local msg = ""
if not SGroup_IsEmpty(sg_ccm) then
SGroup_ForEach(sg_ccm,
function(sgid, idx, squad)
msg = msg..Squad_Modifyrange(squad, -1).."\n"
end
)
end
CCM_DisplayText("Modified unit range:"..g_listline..msg)
end
ccm_squad.scar 找到增加伤害的数据复制 改成
function Squad_Modifyrange(squad, addition)
local found = false
for key, s in ipairs(g_rangemultiplier) do
if s.id == Squad_GetGameID(squad) then
found = true
end
end
if found == false then
local s_range = {
id = Squad_GetGameID(squad),
scalefactor = 1.0,
modid,
}
table.insert(g_rangemultiplier, s_range)
end
for key, s in ipairs(g_rangemultiplier) do
if s.id == Squad_GetGameID(squad) then
s.scalefactor = s.scalefactor + addition
if s.scalefactor < 0.1 then s.scalefactor = 1 end
Misc_ClearGroups()
if s.modid then Modifier_Remove(s.modid) end
SGroup_Add(sg_ccm, squad)
s.modid = Modify_Weaponrange(sg_ccm, "hardpoint_01", s.scalefactor, "sgroup")
return Squad_GetText(squad).." range * "..s.scalefactor
end
end
end
ccm_extensions.scar 找到关于伤害的数据复制 改成
function Util.Increaserange()
Misc_GetSelection()
local msg = ""
if not SGroup_IsEmpty(sg_ccm) then
SGroup_ForEach(sg_ccm,
function(sgid, idx, squad)
msg = msg..Squad.Modifyrange(squad, 0.1).."\n"
end
)
end
DisplayText("Modified unit range:\n--------------------\n\n"..msg)
end
function Util.Decreaserange()
Misc_GetSelection()
local msg = ""
if not SGroup_IsEmpty(sg_ccm) then
SGroup_ForEach(sg_ccm,
function(sgid, idx, squad)
msg = msg..Squad.Modifyrange(squad, -0.1).."\n"
end
)
end
DisplayText("Modified unit range:\n--------------------\n\n"..msg)
end
function Squad.Modifyrange(squad, addition)
local found = false
for key, s in ipairs(g_rangemultiplier) do
if s.id == Squad_GetGameID(squad) then
found = true
end
end
if found == false then
local s_range = {
id = Squad_GetGameID(squad),
scalefactor = 1.0,
modid,
}
table.insert(g_rangemultiplier, s_range)
end
for key, s in ipairs(g_rangemultiplier) do
if s.id == Squad_GetGameID(squad) then
s.scalefactor = s.scalefactor + addition
if s.scalefactor < 0.1 then s.scalefactor = 0 end
Misc_ClearGroups()
if s.modid then Modifier_Remove(s.modid) end
SGroup_Add(sg_ccm, squad)
s.modid = Modify_Weaponrange(sg_ccm, "hardpoint_01", s.scalefactor, "sgroup")
return Squad.GetText(squad).." range * "..s.scalefactor
end
end
end
ccm_support.scar 同样是找到伤害的数据复制 改成
function Modify_Weaponrange(groupid, hardpoint, factor, gtype)
-- create the appropriate modifier
local modifier = Modifier_Create(MAT_Weapon, "modifiers\\range_weapon_modifier.lua", MUT_Multiplication, false, factor, hardpoint)
local result = {}
local _ApplyModifierToSquad = function(gid, idx, sid)
if Squad_IsValid(Squad_GetGameID(sid)) and Squad_Count(sid) > 0 then
local modid = Modifier_ApplyToSquad(modifier, sid)
table.insert(result, modid)
Modifier_AddToSquadTable(sid, modid)
end
end
local _ApplyModifierToEntity = function(gid, idx, eid)
local modid = Modifier_ApplyToEntity(modifier, eid)
table.insert(result, modid)
Modifier_AddToEntityTable(eid, modid)
end
if gtype == "sgroup" then
-- apply this to each squad in the group
SGroup_ForEachEx(groupid, _ApplyModifierToSquad, true, true)
elseif gtype == "egroup" then
-- apply this to each entity in the group
EGroup_ForEach(groupid, _ApplyModifierToEntity)
end
return result
end
ccm_config.scar 找到伤害的数据复制 改成
g_accuracymultiplier = {}
附上修改CCM 修改伤害1000 修改精度和射击距离 修改美军调出单位和技能省的翻页
CTRL+
q{title = "M26 Pershing", sbp = "m26_pershing_mp"},m26潘兴
w{title = "M4A3E8 Sherman 'Easy Eight'", sbp = "m4a3e8_sherman_easy_8_squad_mp"},谢尔曼e8
e{title = "m4a3_sherman_squad_mp", sbp = "m4a3_sherman_squad_mp"},谢尔曼蓝图
r{title = "command_king_tiger_squad_mp", sbp = "command_king_tiger_squad_mp"},虎王精英
t{title = "Tiger Ace PzKpfw VI", sbp = "tiger_ace_squad_mp"},虎式精英
y{title = "Panther PzKpfw V Command Tank", sbp = "panther_commander_squad_mp"},黑豹指挥 加成
u{title = "Flakpanzer IV Ostwind", sbp = "ostwind_squad_westgerman_mp"},四号自行火炮 防空
i{title = "Centaur AA Mk. II Cruiser Tank", sbp = "centaur_aa_mk2_squad_mp"},防空巡洋
o{title = "BM-13 Katyusha Rocket Truck", sbp = "katyusha_bm-13n_squad_mp"},喀秋莎
p{title = "Panzerwerfer 42 Multiple Rocket Launcher", sbp = "panzerwerfer_squad_mp"},自行火箭炮
a{title = "Goliath", sbp = "goliath_mp"},歌利亚遥控
s{title = "B-4 203mm Howitzer", sbp = "m1931_203mm_b-4_howitzer_artillery_commander_mp"},自行榴弹炮
d{title = "ML-20 152mm Gun-Howitzer", sbp = "m1937_152mm_ml_20_artillery_mp"},榴弹炮
f{title = "Ordnance QF 6-Pounder Anti-Tank Gun", sbp = "brit_6_pounder_at_gun_squad_mp"},6磅射速炮
g{title = "HM-38 120mm Mortar Squad", sbp = "hm-120_38_mortar_squad_mp"},迫击炮
h{title = "WC54 ?Ton Ambulance", sbp = "dodge_wc51_ambulance_squad_mp"},急救车
j{title = "Rangers", sbp = "ranger_squad_commander_mp"},游骑兵
k{title = "I&R Pathfinders", sbp = "pathfinder_squad_recon_mp"},侦察信号兵
l{title = "MG42 Heavy Machine Gun Team", sbp = "mg42_heavy_machine_gun_squad_mp"},重机枪小队
z{title = "sniper_team_male", sbp = "sniper_team_male"},狙击小队
x{title = "Vehicle Crew", sbp = "m20_assault_engy_antitank_squad_mp"},载具小队
b{title = "Rear Echelon Troops", sbp = "rear_echelon_squad_mp"},占地后备队
n{title = "Jaeger Light Infantry", sbp = "stormtrooper_squad_mp"},暴风突击队
m{title = "Commissar Squad", sbp = "commissar_squad_mp"},政委 加成
q{title = "Guards Rifle Infantry", sbp = "guards_troops_mp"},近卫军
w{title = "Penal Battalion", sbp = "penal_battalion_mp"},惩戒营
e{title = "Paratroopers", sbp = "paratrooper_squad_mp"},空降兵
r{title = "M2HB .50 cal Machine Gun Team", sbp = "m2hb_50cal_hmg_squad_mp"},m2hb机枪
t{title = "Partisan Anti-tank Rifle Squad", sbp = "tow_partisan_squad_kar98k_rifle_mp"},游击反坦队
y{title = "Assault Engineer Squad", sbp = "assault_engineer_squad_mp"},突击工兵
u{title = "Royal Engineer Demolition Team", sbp = "sapper_squad_demolition_mp"},皇家爆破小队
ALT+
q{ title = "155mm Artillery Barrage", ubp = "artillery_155mm", abp = "artillery_155mm"},155火炮
w{ title = "P-47 Rocket Strike", ubp = "p47_rocket_attack", abp = "p47_rocket_attack"},p47火箭弹打击
e{title = "Air Supremacy Operation", abp = "allied_strategic_bombing"},空中霸权行动
r{title = "Anti-Building Flame Mortar Support", abp = "mortar_fire_artillery"},反建筑燃烧迫击炮
t{ title = "IL-2 Precision Bombing Strike", ubp = "il-2_bomb_strike", abp = "il-2_precision_bomb_strike"},伊尔2精确炸弹
y{ title = "IL-2 PTAB Anti-Tank Bombing Run", ubp = "il-2_anti_tank_bomb", abp = "il-2_anti_tank_bomb_strike"},伊尔2反弹
u{ title = "IL-2 Sturmovik Attacks", ubp = "il-2_sturmovik_attack", abp = "il-2_sturmovik_attack"},伊尔2强击
i{ title = "Incendiary Artillery Barrage", ubp = "fire_artillery", abp = "fire_artillery"},燃烧弹火炮
o{ title = "Defensive Tank Grenades", ubp = "tank_grenade", abp = "tank_throw_defensive_grenade_unlock_mp"},自动坦克手雷
p{ title = "Emergency Repairs", ubp = "vehicle_critical_repair", abp = "vehicle_critical_repair_unlock"},被动紧急维修
a{ title = "Infiltration Tactics", ubp = "infiltration_tactics", abp = "infiltration_tactics_unlock"},被动渗透战术
|
|