Alliance Francophone Sudden Strike

Fusion modding · UNITS / AVIA / LAND/DOM / ANIMAT / EXPLOSIONS

Français

Global rules (misc\misc)

lang/MISC/MISC, which the game reads as misc\misc, holds the rules shared by all units: minimum damage and remaining damage per hit kind, score stars, colors of neutral soldiers, reinforcement waits. The game reads it when a mission loads, after the name lists (lang2/hitsnames for the hit kinds) and before misc\engine.

Each rule is one key value... line. A dash in the first column disables the line (see the syntax). The unit sheets (properties) supply the armor and damage values that these rules interpret.

Copies of the file

Several archives carry their own MISC/MISC. Change every copy that applies.

CopyContent
lang/MISC/MISC (lang.aps)The game: all the rules.
MISC/MISC of winter_unit, sud_unit, wuste_unit, wuste_unit_s1Copies per terrain. They repeat the shot rules of lang, but have their own SoldClr and tanksonarmorprotection (mine 200 and mine_at 100 instead of 3 and 1).
APRM WW II_Edit/<environment>/misc/MISCThe editor: 11 identical copies, with no shot rule. Their SoldClr for russian and 7 differ from the game.

Syntax

reinforcement_flagbusy_wait 400
StarScore	1	25001
SoldClr	german	163	190	179
shot_damage	pierce	6	1200
shot_armor	pierce	1	200
shot_delta	pierce	150
tanksonarmorprotection pierce	3 3 3 3 3 3
  • Unknown key: the game reports an Error in "desc\misc\misc" key and reads the rest of the file.
  • Unknown hit kind: the game reports Invalid HitID. The value applies to no kind.
  • Absent key: the engine default applies, given in the tables below.
  • The hit kinds are those of lang2/hitsnames: abjective, air, explosive, fire, machine, mine, pierce, transpierce, mine_at, piat, sniper, none.
  • The shot_ricochet and shot_calibre rules (AF engine) are described in Engine settings.

Damage and armor per hit kind

Three lines per hit kind define how a shot of damage D goes through an armor A.

KeyValuesPurpose
shot_armor <kind> <a0> <a1>two armorsX values of the two points of the line.
shot_damage <kind> <d0> <d1>two damagesY values: the damage that matches a0 and a1.
shot_delta <kind> <delta>one integerDivisor of the remaining damage. Default 1.

The game computes, in integers, a slope (d1 - d0) / (a1 - a0) and an intercept (d0 × a1 - a0 × d1) / (a1 - a0). The divisions round toward zero. A shot penetrates when D is higher than slope × sheet armor + intercept. This threshold is called T.

A shot that penetrates does min(D, (D − T) × D / delta) damage. A shot that does not penetrate does 0. A kind with a shot_calibre rule uses its own formula (see Engine settings).

Fusion values:

Kindshot_armorshot_damageshot_deltaSlopeIntercept
piat1 2004 120016−2
pierce1 2006 120015060
explosive2 1813 299950016−30
mine1 1815 92425050
transpierce1 2006 12005060
machine1 101 102010
sniper1 101 101610
fire1 1817 250050013−6
air1 101 10210
abjective1 101 102010
mine_at50 18140 102410007−335

Example: pierce has the threshold 6 × armor. A shell of 120 damage against an armor of 15 (threshold 90) penetrates and does min(120, 30 × 120 / 150) = 24 damage. For pierce and transpierce, the Fusion shot_calibre rule replaces this last calculation.

A kind with no shot_armor or shot_damage line has the points (0, 0) and (1, 0): the slope and the intercept are 0, so the threshold T is 0 and every shot penetrates. A shot_armor, shot_damage or shot_delta line with too few values makes the game write to few params.

Protection per hit kind (tanksonarmorprotection)

tanksonarmorprotection pierce	3 3 3 3 3 3
tanksonarmorprotection abjective 10 10 10 10 10 10

One line per hit kind, then six numbers: three pairs, one for each armor face. For each number, the game keeps 256 − n (limited to 0..256). For the first pair, it draws a random value between the two limits, multiplies it by an amount and divides by 256. With two equal numbers the result is constant: 3 gives 253/256, that is 98.8 %.

Values in lang: abjective 10; fire, mine, piat, pierce, transpierce 3; explosive 2; machine, mine_at, sniper 1. The terrain archives give 200 to mine and 100 to mine_at. The behavior of the second and third pairs is not confirmed.

Score stars (StarScore)

StarScore <star> <score> gives the score to reach for each of the 10 stars. The game counts the thresholds that the player’s score reaches or exceeds: this number, from 0 to 10, is the number of stars saved in the player’s results. Under the threshold of star 1, the player has no star. With no line, the threshold is 0.

Star12345678910
Score2500160001100001150001200001250001275001300001375001400001

The editor copies define the same ten thresholds. The loader also accepts winscore <score> and loosescore <score> (absent from Fusion, default 0).

Colors of neutral soldiers (SoldClr)

SoldClr <nation> <red> <green> <blue> tints the palette of the neutral soldier (SOLD.PL) for one nation. For each gray or nearly gray color of the palette, the game multiplies the gray level by value / 250 on each channel: 250 leaves the gray unchanged, a larger value makes it lighter (a channel stops at 255). Other colors do not change. The unit key camouflage selects the nation of a soldier.

  • Nation by name: german, japanese, british, american, russian.
  • Nation by number: SoldClr <n> ... with n from 1 to 11 for the extra palettes.
  • Nation with no line: the palette stays that of SOLD.PL. A number outside 1 to 11 is a key error.
NationRedGreenBlue
russian19214086
german163190179
british19015050
american20018060
japanese275275200
1188188188
2350350350
3200200200
4150150275
5150150275
6400400300
722213872
8210200166
9150150150
10152172111
11144188136

The terrain archives have their own values. For example, winter_unit gives 400 400 300 to russian, and wuste_unit gives 209 209 12.

Waits and animations

KeyPurposeFusion valueDefault
reinforcement_flagbusy_waitWait, in turns, of a reinforcement whose spot is taken. A turn lasts 40 ms at normal speed: 400 turns make 16 s.4000
hell_maxgointimeMaximum entry time (helicopter, from the name).2502147483647
hell_maxpickuptimeMaximum pick-up time (helicopter, from the name).2502147483647
onturretanitimeAnimation time tied to the turret.8−1
onarmoranitimeAnimation time tied to the armor.10−1
shipboomtypeName of the explosion of a destroyed ship (none: no explosion). The name must exist in the explosion or ground types.ship_radnone

Only reinforcement_flagbusy_wait has a confirmed effect: when the game finds no spot for the reinforcement, it copies this value into the reinforcement’s wait counter. No read of hell_maxgointime or hell_maxpickuptime was found in the original DLL outside the loader. Their effect is not confirmed. The same applies to the detail of onturretanitime and onarmoranitime.

The loader also accepts AI waits: ai_soldwait…, ai_tankwait…, ai_katyawait…, ai_planewaittozonemove and ai_trainwaitrndmove. Each takes two values, minimum and maximum, in turns. It accepts ai_katyaminfireunits and ai_domwaitunload (one value). These lines are absent from Fusion.

Checking a change

  1. Change the copy in lang/MISC/MISC and, if the rule exists there, in the terrain archives.
  2. Keep the CRLF line ends and ASCII.
  3. Build the archive again (lang.aps, and each terrain archive you changed).
  4. Start a mission: the game reports any unknown key or hit kind.
  5. In multiplayer, all the players must have the same files.