Men of War: Assault Squad 2

Men of War: Assault Squad 2

Men of War: Assault Squad 2 - Workshop
The place to find custom maps, missions and mods for your favourite Men of War game! Want to contribute? Check the mainfolder of the game for all modding tools, such as map editor and plug-ins.
Need some help identifying this code
I am attempting to change the accuracy on the artillery. I dont know what numbers change what. Would appreciate any help.


(define "accuracy_curve_1"
{spreading
{radiusTable {0 0} {500 (* 0.50 %r1)} {900 (* 1.50 %r1)} {1200 (* 2.00 %r1)} {1500 (* 2.50 %r1)} {2050 (* 3.00 %r1)}}
}
{parameters "apcr"
{spreading
{radiusTable {0 0} {500 (* 0.75 %r1)} {900 (* 1.75 %r1)} {1200 (* 2.25 %r1)} {1500 (* 2.75 %r1)} {250 (* 3.25 %r1)}}
}
}
{parameters "fg"
{spreading
{radiusTable {0 0} {500 (* 1.00 %r1)} {900 (* 2.00 %r1)} {1020 (* 2.50 %r1)} {1500 (* 3.00 %r1)} {2050 (* 3.50 %r1)}}
}
}
)

(define "accuracy_curve_2"
{spreading
{radiusTable {0 0} {500 (* 0.50 %r1)} {900 (* 1.00 %r1)} {1200 (* 2.00 %r1)} {1500 (* 2.50 %r1)} {2500 (* 3.50 %r1)}}
}
{parameters "fg"
{spreading
{radiusTable {0 0} {500 (* 1.00 %r1)} {900 (* 2.00 %r1)} {1200 (* 3.00 %r1)} {1500 (* 3.50 %r1)} {2500 (* 4.50 %r1)}}
}
}
)

(define "accuracy_curve_3"
{spreading
{radiusTable {0 0} {50 (* 1.00 %r1)} {1000 (* 1.50 %r1)} {1500 (* 2.00 %r1)} {3000 (* 2.50 %r1)}}
}
)
< >
Showing 1-2 of 2 comments
Successfulkiller 28 Aug, 2023 @ 3:06pm 
I'm not an expert at the game files, but here's what I found out through random testing:

(define "accuracy_curve_1" {spreading {radiusTable {0 0} {500 (* 0.50 %r1)} {900 (* 1.50 %r1)} {1200 (* 2.00 %r1)} {1500 (* 2.50 %r1)} {2050 (* 3.00 %r1)}} } {parameters "apcr" {spreading {radiusTable {0 0} {500 (* 0.75 %r1)} {900 (* 1.75 %r1)} {1200 (* 2.25 %r1)} {1500 (* 2.75 %r1)} {250 (* 3.25 %r1)} } } ... )
"define "accuracy_curve_1"" is just a name to define the set of values/variables, this definition can then be inherited by a weapon itself, or in another definition (see below). "{radiusTable {0 0} ...}" the first '0' defines the range, the second '0' is the radius(?). "{radiusTable {0 0} {500 (* 0.50 %r1)} ...}" the '500' defines the range, in the bracket is an multiplication operation with a radius of '0.50' and a parameter '%r1' (see below). The smaller the radius value, the more accurate the weapon is. Each subsequent curly bracket, '{}', follows the same format. "{parameters "apcr" {...} }" parameters specify if a specified ammo type is loaded, use these values instead (similar to an 'if' statement). Note: "fg" is HE ammo.

Further below the code, you should see various additional definitions like "accuracy_zenite_low", "accuracy_zenite_medium", etc. Each of these uses an accuracy curve mentioned above. These seem to pass an argument 'r1([FACTOR])' that replaces the '%r1' parameter. The smaller this [FACTOR] is, the more accurate the weapon is.
Last edited by Successfulkiller; 28 Aug, 2023 @ 3:08pm
Lord Vrodain 2 2 Oct, 2023 @ 10:26am 
Thanks! This helps me quite a bit!
< >
Showing 1-2 of 2 comments
Per page: 1530 50