Files
WT-Offline/packages/local-service/tuning/battle-economy.jsonc
T
N0VAN0M4LY e3c5880023 refactor(native): limit the LocalMP bridge to engine gaps
- Scoreboard scores come from the local service: BattleEconomy
  missionScores() writes the official mission scores into the stock
  mission block customScoreParams, which the client copies into
  MissionSettings+0x6d8 without reading it; local_mp_scores.c reads them
  with DataBlock::getReal. The hardcoded scores and the death score go.
- countActivePlayers already counts players with a living vehicle; the
  only LocalMP gap is its filter skipping bots (MPlayer+0x1d8 bit 7). A
  one-byte exe patch drops that filter bit instead of a rewrite hook.
- ucavLaunch returns early on a host; an exe patch skips that return
  instead of clearing the global host flag around the call.
- onBecameDead no longer runs with isLocalMP cleared: that only queued an
  EventOnPlayerDeath stock LocalMP skips on purpose, and broke the local
  player id remap inside the function.
- The host chat object keeps its two-field layout, now documented from
  the host chat handler that reads it.
2026-11-28 07:09:07 +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
}