Files
WT-Offline/apps/server/tuning/battle-economy.jsonc
T
N0VAN0M4LY 930ea07630 refactor(repo)!: move apps, shared packages, and patch definitions
Everything sat in packages/: two programs next to the small libraries
they use, and the patch data loose at the root. The programs now live in
apps/ and the shared libraries in packages/:

  apps/server        the local server (was packages/local-service),
                     package @wto/server
  packages/patcher   builds the game copy (was packages/build),
                     package @wto/patcher
  patches/exe        exe patch definitions (was exe-patches)
  patches/gui        GUI script patches (was gui-patches)

Inside the server, the network layer folder becomes transport/ so it is
not server/server/, the entry module is server.ts, and startLocalService
and its types become startServer, ServerOptions and RunningServer. The
health answer names the app wto-server, and the TLS files in the data
folder are server.key and server.crt (made again on the next start).
Comments, logs and tool texts say "local server".

The patcher no longer reaches into the server's folder. It read the
default tuning/store.jsonc by a relative path to register bundle GUIDs
for the multi-vehicle packs, which also ignored the player's overrides
in <data>/tuning/. It now takes the pack ids from its caller; the
server exports multiVehiclePackIds(dataFolder), which reads them the way
the running server does. rebuildGuiPack takes the patch folder from its
caller as well.

The development build moves out of the patcher to
scripts/build-game-copy.ts, since it uses both the server and the
patcher. It needs --data (the folder the server will run with) and
defaults the patch folders and the hook library to this repository.


Checked with the root typecheck, check-patches, check-gui,
check-offsets, the native build, a run of build-game-copy.ts into a
scratch folder (12 exe patches, 35 GUI patches, 496 bundle GUIDs as
before) and a server start from apps/server answering wto-server.

BREAKING CHANGE: Use @wto/server and @wto/patcher from the new workspace paths. Run the development build with scripts/build-game-copy.ts and pass --data.
2026-11-29 03:20:54 +08:00

61 lines
3.7 KiB
JSON

// Battle rewards the game files do not carry. The reward factors themselves (aKill, rewardMul,
// expMul, class factors, win/defeat bonus, premium multipliers, time RP rates, skill bonus) are
// read from wpcost.blk, warpoints.blk and rank.blk. What the battle server keeps private is the
// mission score of each combat event; the values below are the official published ones where
// they exist, and the offline version's own choice where they do not (marked "offline").
//
// How a combat event is priced (battle/battle-economy.ts):
// Silver Lions = aKill x SL class factor(victim) x rewardMul(own vehicle, difficulty)
// x eventScore / referenceScore(victim group)
// Research Points = eventScore x expMul(own vehicle) x RP class factor(victim)
// both x aiKillK when the victim is not a player.
// The same mission scores (x aiKillK for non-player victims) are the scoreboard score: they go to
// the client in the mission settings block customScoreParams (BattleEconomy.missionScores) and the
// native LocalMP bridge adds them on the scoreboard.
{
// Destroyed-unit classes (warpoints.blk / rank.blk units{} keys) by victim group; any class not
// listed counts as "ground".
"victimGroups": {
"air": ["exp_bomber", "exp_fighter", "exp_assault", "exp_helicopter", "exp_ufo"],
"naval": [
"exp_torpedo_boat", "exp_gun_boat", "exp_torpedo_gun_boat", "exp_submarine_chaser",
"exp_destroyer", "exp_cruiser", "exp_naval_ferry_barge",
"exp_ship", "exp_ca_ship", "exp_bb_ship", "exp_cv_ship"
],
"human": ["exp_human", "exp_infantry"]
},
// Mission score per combat event, by victim group.
// ground kill 180: official ("Basic mission score for destruction of an enemy ground vehicle
// ... 150 -> 180", server update 2021-11-10, devtrackers.gg/war-thunder/p/2edb7e23).
// air kill 450, air assist 300, air critical 150: official, same update (air simulator values).
// naval kill 30, naval assist 10: official, same update; naval damage is scored separately below.
// ground assist 120, air severe damage 360, naval severe damage 15: original author's values.
// ground critical 30, hits 10, ground severe damage 0: offline (no published value).
"eventScores": {
"ground": { "kill": 180, "assist": 120, "severeDamage": 0, "criticalHit": 30, "hit": 10 },
"air": { "kill": 450, "assist": 300, "severeDamage": 360, "criticalHit": 150, "hit": 10 },
"naval": { "kill": 30, "assist": 10, "severeDamage": 15, "criticalHit": 0, "hit": 0 },
"human": { "kill": 180, "assist": 120, "severeDamage": 0, "criticalHit": 30, "hit": 10 }
},
// Score of a capture by a single player, by the capturing vehicle's group. ground 300: official
// (300 for the first capturer, +200 for each additional one, shared; same 2021 update).
// naval 200: official ("175 -> 200", same update). air and human: offline, as ground. The
// LocalMP host reports captures without the number of capturers, so a capture always scores
// the single-capturer value.
"captureZoneScore": { "ground": 300, "air": 300, "naval": 200, "human": 300 },
// Naval mission score per point of damage dealt: official ("0.15 -> 0.18", same update).
"navalDamageScorePerPoint": 0.18,
// The score at which an event pays exactly one reference kill (warpoints.blk aKill), by victim
// group. ground 180 and air 450 are the official base kill scores; naval 216 is the official
// example of a boat destruction ("now awarded with 216 points instead of 180").
"referenceScore": { "ground": 180, "air": 450, "naval": 216, "human": 180 },
// Destroying a teammate costs the Silver Lions that destroying an enemy of that class would pay,
// times this factor (offline: the penalty rules are not published).
"friendlyKillPenaltyMul": 1.0
}