Call to Arms

Call to Arms

View Stats:
KkDubai Mar 10, 2017 @ 2:20pm
Changing weapon ranges
I really wanted to increase the weapon ranges for a new map I made so I went to C:\Program Files (x86)\Steam\steamapps\common\Call to Arms/resource/gamelogic.pak/set/stuff/ .

Then I went to the small arms section and changed the weapon ranges of some individual guns but it has made no difference. I read that you have to put the file into the mods folder but it doesn't work.

Can anyone help me?
< >
Showing 1-15 of 18 comments
You can extract the individual weapons config files from the gamelogic.pak (set/stuff/smallarms folder) and then open the files with Notepad++ or another text editor program, then change the range values to what you desire, save the config file, close the text editor, and with the gamelogic.pak archive open in a program like 7-Zip or WinRAR you can click and drag the altered config files from the folder you extracted them to and drag the altered files back into the gamelogic.pak archive in the set/stuff/smallarms directory inside the .pak file.

However, I'm not sure what the {range 95 100} string actually modifies in the game. I increased the AK-74M rifle's values from {range 95 100} to {range 50 500} thinking it would increase the maximum range of the rifle in the game, but all it did was make it so that the infantry units equipped with that rifle always switched to their sidearm pistol and refused to use the AK-74M rifle in combat.

So, I think the {range XX XX} string in the config files for small arms actually modifies the soldier's AI logic for deciding which weapon to equip and use for the engagement distance values specified by the string (i.e. the distance between the soldier and his target). I'm pretty confused by this string and simply want to increase the maximum range that small arms can fire and hit targets at, but modifying that string seems to not affect that parameter. If anyone knows, I'd be very grateful if they explained it in this thread. :)
95 100 is, unless its since changed, Aim range, IE: The range which the AI will begin actually engaging. And the 100 is the actual weapon range.

Soooo, 50 500 means your guys would only start shooting on their own within 50m, but they did in fact shoot 500m. Did you go into Direct control to confirm the gun could shoot 500m?

I always make guns aim ranges the same as the gun range. It makes no sense to have a gun that they wont shoot at max range with.

Im guessing they swapped to the pistols cuz the pistols shot further than the rifles after you modded it.
Last edited by Lord-Knight Fandragon; Feb 29, 2020 @ 12:07pm
Okay, wow thanks that's so helpful KnightCole! Much appreciated! Yeah, I was confused because in Direct Control mode the weapons were firing out to 500 meters, but then my AI infantry would just switch to pistols every time. That was quite annoying! Thanks again for helping me fix that! :)
RFC Rudel Feb 29, 2020 @ 1:31pm 
I have years modifing the files.modifie the gun, then the ammo. look at another large range ammo and copy paste.
RFC Rudel Mar 1, 2020 @ 11:04am 
my 120mm abrams reload in 1sec, have 400ammo and 1 shoot destroy 2 blocks.
Thanks again KnightCole and RFC Rudel. Do either of you understand what the following code in a smallarms weapon config file modifies in the game?

{projectileDamageTable {50 10} {250 0}}

Does the above code modify the damage of the bullet from that weapon at two different distances/ranges from the firing weapon? So, would the above code mean that rifle does "10" damage at "50 meters" distance, and does "0" damage at "250 meters" distance? It doesn't seem to make sense as there's already a differently scaled projectile damage string earlier in the config files for each small arms weapon and it uses a much larger number for the damage value, e.g. "853" damage points. So, that's why I'm confused about it. Any more help is greatly appreciated! :)
Originally posted by Yopo:
Thanks again KnightCole and RFC Rudel. Do either of you understand what the following code in a smallarms weapon config file modifies in the game?

{projectileDamageTable {50 10} {250 0}}

Does the above code modify the damage of the bullet from that weapon at two different distances/ranges from the firing weapon? So, would the above code mean that rifle does "10" damage at "50 meters" distance, and does "0" damage at "250 meters" distance? It doesn't seem to make sense as there's already a differently scaled projectile damage string earlier in the config files for each small arms weapon and it uses a much larger number for the damage value, e.g. "853" damage points. So, that's why I'm confused about it. Any more help is greatly appreciated! :)

That I believe is 50m range it does 10 dmg, 250m range it does 0. Its either damage or its penetration.....it could be penetration, because 10 dmg? I doubt it.

As for that 853 dmg, yeah, I looked at that and it makes no sense to me either.

The file says like 853 dmg, but in game, weapon damage is 18-47, depending on range. Soooo, idk, maybe they mean something else entirely.
Last edited by Lord-Knight Fandragon; Mar 1, 2020 @ 3:10pm
Originally posted by KnightCole:
That I believe is 50m range it does 10 dmg, 250m range it does 0. Its either damage or its penetration.....it could be penetration, because 10 dmg? I doubt it.

As for that 853 dmg, yeah, I looked at that and it makes no sense to me either.

The file says like 853 dmg, but in game, weapon damage is 18-47, depending on range. Soooo, idk, maybe they mean something else entirely.

Thanks for your input, hopefully a developer will see this thread and provide some clarification!


RFC Rudel Mar 1, 2020 @ 7:01pm 
some ammo dont explote and the code is this:
;Missile type S-8D
{from "pattern fg"
{tag "rocket"}
{inventory
{size 5 1}
}
{mass 18.2}
("fg" args 3.75)
{entity "shell_s-8"}
}

the one that explote have this code:

{inventory
{weight 25}
{size 2 2}
{block 5}
}
{mass 44.55}
{entity "shell_ap_25"}
{trace
{view "/texture/fx/trace_zenite1.mtl"
{ScaleY 0.125}
{Light 1}
}
{length 6}
}
{damage blastwave
{energy 87.75}
{area 1 60}
}
}

you can paste the code betewn shells jus copy under inventory. you can see that the blasteway energy and area are edited to huge damage




smal arms are diferent. I only ad a 0 to each of those number, and increase the range.

Tip: for automatic wepons a larger recoveryTime number increase the rate of fire.

my 50cal ammo

;// 12.7x99mm

{bullet
{tag "bullet big hmgun stackable pierce"}
{inventory
{weight 25}
{size 2 2}
{block 5}
}
{mass 4.55}
{entity "shell_ap_25"}
{trace
{view "/texture/fx/trace_zenite1.mtl"
{ScaleY 0.125}
{Light 1}
}
{length 6}
}
{damage blastwave
{energy 5.75}
{area 1 17}
}
}

for the 25mm of the bradley:
gun 25m242


{from "pattern gun"
{filling "bullet25" 40000}
{fireSound "gun/autocannon_medium/"}
{reloadSound "gun_small/"}
{rechargeTime 1}
("range_zenite_long")

("speed" s(1100))
("caliber_zenite")
("recoveryTime" r(5000))
{projectileDamage 55}
("minimumDamageModifier" m(25))
("damage_autocannon" a(100))

{AimingTolerance 3}
{Automatic}
{burst
{min 1}
{short 2.5 1}
{long 7 2}
}
{RelaxationTime 0}

("accuracy_zenite_high")

("healthDamage" h(100))

{crosshair "crosshair5"}
{crosshairReloading "crosshair5_reload"}

{toplayerVignette "/texture/common/environment/lens_effects/zoom_vignette_vehicle_bradley_crosshair"}
}


then end the 25mm shell:

{inventory
{weight 25}
{size 2 2}
{block 5}
}
{mass 4.55}
{entity "shell_ap_25"}
{trace
{view "/texture/fx/trace_zenite1.mtl"
{ScaleY 0.125}
{Light 1}
}
{length 6}
}
{damage blastwave
{energy 17.75}
{area 1 17}
}
}


Last edited by RFC Rudel; Mar 1, 2020 @ 7:14pm
Originally posted by RFC Rudel:

Thanks for sharing that information about how the projectiles can have an explosive blast effect added to them in the weapon config files in the .pak files! That's incredibly useful! :)
RFC Rudel Mar 6, 2020 @ 9:33am 
you have to modify the amount of ammo that each vheicule have, that in other file

\common\Call to Arms\resource\entity

my abrams tank shoot and 3 blocks get destroy, ideal for the invasion mission, the bradley with 70.000 amo and like 300 ammo rate per second plus explosion is fun.

I can give you the files, jus add me as friend.
RFC Rudel, thanks but I've got my own preferences for the gameplay mod I'm currently creating, I enjoy modifying the config files by changing the various parameters to be as close to their real-world counterparts as possible. Your advice has been very helpful in helping me understand the file system used by this game and I've made some great changes. Eventually, I might upload the mod to the workshop, first I'll need to play test it extensively to make sure nothing totally breaks the game.
RFC Rudel Mar 6, 2020 @ 7:19pm 
be aware that some missions don’t like some things, if you put to much power in the 50 cal in the mission unbreakable the suicide truck get destroyed before it reach the gates and that don’t allow the mission to continue. also you can increase the artillery explosion and the cheat mode get more exiting.
The most important thing is that you can make non explosive rounds explosive and edit the amount of blast and area of the blast.

Also in the vehicles you can edit velocity , turret speed, thermal camera time etc.


also dont put 300k of ammo becouse the game will crash use my parameters, will put the tanks config too

Last edited by RFC Rudel; Mar 6, 2020 @ 7:21pm
RFC Rudel Mar 6, 2020 @ 7:23pm 
bradley, only a few modifications:

{game_entity
(include "/properties/tank.ext")
(include "/properties/selection/vehicle.inc" scale(1.2))
{collider "tank.heavy"}
{props "heavy" "turret_rotator" "vision_vehicle_high" "muzzle_zenite"}
{targetclass "armoredcar" "atgm zenite bullet"}

{extender "enumerator"
{digit_folder "black"}
}

;volume, component/tag
("make_component" args "body1" "body")
("make_component" args "body2" "body")
("make_component" args "body3" "body")
("make_component" args "gun2" "gun")

("armor_heavy" turret(50 30 30 25) body(50 30 30 25))
("armor_engine" t(25 25 25 25))

("shield" args 8)
{extender "shield"
{on}
}

{component "shieldl1" {tags "shield"}}
{component "shieldl2" {tags "shield"}}
{component "shieldl3" {tags "shield"}}
{component "shieldl4" {tags "shield"}}
{component "shieldl5" {tags "shield"}}
{component "shieldl6" {tags "shield"}}
{component "shieldl8" {tags "shield"}}
{component "shieldl9" {tags "shield"}}
{component "shieldl7" {tags "shield"}}
{component "shieldr1" {tags "shield"}}
{component "shieldr2" {tags "shield"}}
{component "shieldr3" {tags "shield"}}
{component "shieldr4" {tags "shield"}}
{component "shieldr5" {tags "shield"}}
{component "shieldr6" {tags "shield"}}
{component "shieldr7" {tags "shield"}}
{component "shieldr8" {tags "shield"}}
{component "shieldr9" {tags "shield"}}

("crew_3_invisible")
("crew_invisible" place(charger) door(emit1) door2(emit2) animation(anim_board_tank) animation2(anim_board_tank) group(crew))
("seat_6_visible")

{placer
{place "driver" {visor "driver"}}
{place "gunner" {visor "main"}}
}

{extender "smokescreen"
{cooldown 120}
}

{extender "vision_mode"
{timer_object
{tag "thermal"}
{active_time 300}
{recharge_rate 0.5}
{type "recharge"}
}
}

{extender "inventory"
{box
{item "ammo bullet25 ap" 7000}
{item "ammo bullet25 fg" 2000}
{item "ammo bullet152 atgm" 7}
{item "ammo 7x51" 2200}
{item "grenade decoy" 1}
}
}
{Weaponry
("restore_ik_time")
{place "gun"
{RestoreIKAfterAim}
{weapon "25mm_m242" filled}
("abm_zenite")
}
{place "gun2" ;atgm
{weapon "152mm_bgm-71_x2" filled}
{Barrels 2}
{charger "gunner"}
("abm_low")
{basic}
}
{place "mgun2" ;coax
{weapon "m240_v1" filled}
{foresight "foresight5"}
("abm_mgun")
{basic}
}
}

{mass 27600}
{Chassis
("tank_trace" fx("tracks_big") step(0.47) len(0.8))
{Locomotion ("locomotion")
("Speed" s(96))
}
{FuelBag
{volume 746}
("rate" r(1.54))
{remain 746}
}
}

{Extension "m2_bradley.mdl"}

{bone "turret"
{speed 0.125}
}
}
RFC Rudel Mar 6, 2020 @ 7:30pm 
to be more clear this is the abrams tusk:

First the Gun 120mm_m256a1:

{from "pattern gun"
{filling "bullet120"}
{fireSound "gun/cannon_4/"}
{reloadSound "gun/"}
{rechargeTime 1}
("range_long")

("speed" s(3000))
("caliber_large")
{projectileDamage 3400}
("minimumDamageModifier_gun" m(120))
("damage_gun" a(3400))
{parameters "heat"
("damage_cumulative_heat" a(1400))
("minimumDamageModifier_heat" m(120))
}

("accuracy_high")

{crosshair "crosshair3"}
{crosshairReloading "crosshair3_reload"}

{toplayerVignette "/texture/common/environment/lens_effects/zoom_vignette_vehicle_abrams_crosshair"}
}

then the Shells, ap,heat,fg:

;APFSDS type M829A3
{from "pattern ap"
{tag "big" "shell_big" "pierce"}
{inventory
{weight 25}
{size 2 2}
{block 5}
}
{mass 44.55}
{entity "shell_ap_25"}
{trace
{view "/texture/fx/trace_zenite1.mtl"
{ScaleY 0.125}
{Light 1}
}
{length 6}
}
{damage blastwave
{energy 87.75}
{area 1 60}
}
}


Then the tank:

{game_entity
(include "/properties/tank.ext")
(include "/properties/selection/vehicle.inc" scale(1.3))
{collider "tank.heavy"}
{props "heavy" "turret_rotator" "vision_vehicle_high" "muzzle_large"}
{targetclass "tank" "ap fg bullet"}

{extender "enumerator"
{digit_folder "black"}
}

;volume, component/tag
("make_component" args "body1" "body")
("make_component" args "body2" "body")
("make_component" args "engine2" "engine")

{Volume "turret_shield"
{thickness 10}
}

("armor_heavy" turret(600 600 600 300) body(600 500 500 200))
("armor_mantlet" t(800))
("armor_engine" t(100 100 100 100))

("shield" args 8)
{extender "shield"
{on}
}

{component "shieldl1" {tags "shield"}}
{component "shieldl2" {tags "shield"}}
{component "shieldl3" {tags "shield"}}
{component "shieldl4" {tags "shield"}}
{component "shieldl5" {tags "shield"}}
{component "shieldl6" {tags "shield"}}
{component "shieldl7" {tags "shield"}}
{component "shieldr1" {tags "shield"}}
{component "shieldr2" {tags "shield"}}
{component "shieldr3" {tags "shield"}}
{component "shieldr4" {tags "shield"}}
{component "shieldr5" {tags "shield"}}
{component "shieldr6" {tags "shield"}}
{component "shieldr7" {tags "shield"}}

("crew_4_invisible_opengun")
("seat_4_visible_armor")

{placer
{place "driver" {visor "driver"}}
{place "gunner" {visor "main"}}
{place "charger" {visor "mgun"}}
{place "commander" {visor "mgun2"}{sealable}}
}

{sensor
{visor "mgun2"
{vision "human"}
{bone "turret_mgun2"}
}
}

{extender "smokescreen"
{cooldown 120}
}

{extender "vision_mode"
{timer_object
{tag "thermal"}
{active_time 300}
{recharge_rate 0.5}
{type "recharge"}
}
}

{extender "inventory"
{weapon "mgun1"
{mask "weapon mgun1"}
}
{box
{item "ammo bullet120 ap" 400}
{item "ammo bullet120 fg" 400}
{item "ammo bullet120 heat" 400}
{item "m240_v1" filled {user "mgun1"}}
{item "ammo 7x51" 10400}
{item "ammo 12x99" 9000}
{item "grenade decoy" 1}
}
}
{Weaponry
("restore_ik_time")
{place "gun"
{RestoreIKAfterAim}
{weapon "120mm_m256a1" filling "ammo bullet120 ap" 1}
("abm_high")
}
{place "mgun" ;aa
{weapon "m2hb_v2" filled}
{gunner "charger"}
{charger "charger"}
{LinkBone "mgun_m2"}
{LinkAnimation "off"}
("abm_mgun")
{basic}
}
{place "mgun1" ;aa
{gunner "commander"}
{charger "commander"}
{LinkBone "mgun_rot2"}
{LinkAnimation "off"}
("abm_mgun")
{basic}
{ai_in_manual}
}
{place "mgun2" ;coax
{weapon "m240_v1" filled}
{foresight "foresight5"}
("abm_mgun")
{basic}
}
}

{mass 63000}
{Chassis
("tank_trace" fx("tracks_big") step(0.47) len(0.8))
{Locomotion ("locomotion")
("Speed" s(97))
}
{FuelBag
{volume 1900}
("rate" r(4.46))
{remain 1900}
}
}

{Extension "m1a2_tusk.mdl"}

{bone "turret"
{speed 0.10}
}
{bone "turret_mgun"
{speed 0.25}
{terminator}
}
{bone "turret_mgun2"
{speed 0.25}
}
}
< >
Showing 1-15 of 18 comments
Per page: 1530 50

Date Posted: Mar 10, 2017 @ 2:20pm
Posts: 18