feat(patcher): resolve native LocalMP values from patch definitions
The LocalMP modules of wto_ws.dll scanned for 42 functions at start-up and used about a hundred structure offsets compiled in as constants, so a game update could move a field without anything noticing. Their needs are now definitions under patches/native/<module>.jsonc, resolved by the patcher when it builds the game copy, the same way exe patches are located: - Locate methods: "string_ref" finds code by the string it loads (optionally with a pattern around the lea, to read the field a scoreboard row stores under that name), and "within" searches a short pattern inside the function of a site located before it (function ranges from the exception directory). - Each module lists its sites (functions, globals, call targets and the instructions whose captures give structure offsets), its features and the modules it requires. A module whose sites are not all found is reported like an unavailable patch, with the modules depending on it. - The resolved values go into wto_ws.cfg as native.<site>[.<capture>] lines, with the executable's PE time stamp and image size so the library can refuse values resolved for another build. - Version records include the native module variants and values. - Patch-set folders: the patcher, the scripts and the launcher take the root of a patch set (exe, gui, native, versions) instead of separate folders. - New feature tags K-Chat and radio and K-Nuclear bomb in both language packs. The library still scans by itself; reading these values is the next change. Checked: root and launcher type checks; all 10 modules resolve on 2.61.0.37, where the 239 values equal what the drafting tool read with a disassembler, and on 2.61.0.43, where every structure offset is unchanged except the GameSaveData HUD event queue (0xae8 -> 0xb18); build-game-copy from 2.61.0.37 into a temporary folder writes the values into wto_ws.cfg.
This commit is contained in:
1 parent
373b7a037a
commit
dde852e2b1
36 files changed
+3318
-91
No files matched your search
@@ -160,5 +160,380 @@
|
||||
"variant": "2.61.0.37"
|
||||
}
|
||||
},
|
||||
"native_modules": {
|
||||
"local_mp_core": {
|
||||
"disabled_slots_mask": "2.61.0.37",
|
||||
"do_respawn_player": "2.61.0.37",
|
||||
"get_player_country": "2.61.0.37",
|
||||
"sq_local_country": "2.61.0.37",
|
||||
"refl_dtor": "2.61.0.37",
|
||||
"aircraft_change_result": "2.61.0.37",
|
||||
"set_player_gui_state": "2.61.0.37",
|
||||
"get_unit_by_eid": "2.61.0.37",
|
||||
"set_owning_mplayer": "2.61.0.37",
|
||||
"iground_on_dead": "2.61.0.37",
|
||||
"datablock_get_str": "2.61.0.37",
|
||||
"datablock_set_from": "2.61.0.37",
|
||||
"mp_construct_local": "2.61.0.37",
|
||||
"gui_state_update": "2.61.0.37",
|
||||
"app_econ_state": "2.61.0.37",
|
||||
"mplayer_matching": "2.61.0.37",
|
||||
"unit_change_aircraft": "2.61.0.37",
|
||||
"unit_type": "2.61.0.37",
|
||||
"unit_info_name": "2.61.0.37",
|
||||
"unit_mplayer": "2.61.0.37",
|
||||
"refl_stdmem": "2.61.0.37",
|
||||
"mission_settings_load": "2.61.0.37"
|
||||
},
|
||||
"local_mp_actions": {
|
||||
"mp_init_chat": "2.61.0.37",
|
||||
"mp_chat": "2.61.0.37",
|
||||
"bot_system_setup": "2.61.0.37",
|
||||
"mp_team_countries": "2.61.0.37"
|
||||
},
|
||||
"local_mp_awards": {
|
||||
"add_score_message": "2.61.0.37",
|
||||
"score_msg_blk_ctor": "2.61.0.37",
|
||||
"score_msg_blk_set_str": "2.61.0.37",
|
||||
"score_msg_blk_to_owned": "2.61.0.37",
|
||||
"score_msg_blk_set_int": "2.61.0.37",
|
||||
"score_msg_hud_queue": "2.61.0.37",
|
||||
"score_msg_blk_dtor": "2.61.0.37",
|
||||
"score_msg_exp_class": "2.61.0.37",
|
||||
"game_save_data": "2.61.0.37"
|
||||
},
|
||||
"local_mp_scores": {
|
||||
"datablock_get_real": "2.61.0.37",
|
||||
"mission_score_params": "2.61.0.37"
|
||||
},
|
||||
"local_mp_kills": {
|
||||
"mplayer_add_score": "2.61.0.37",
|
||||
"mplayer_score": "2.61.0.37",
|
||||
"mplayer_stat_sync": "2.61.0.37",
|
||||
"net_mark_dirty": "2.61.0.37",
|
||||
"on_unit_dead_once": "2.61.0.37",
|
||||
"unit_severe": "2.61.0.37",
|
||||
"ground_death_flags": "2.61.0.37",
|
||||
"ground_bailout": "2.61.0.37",
|
||||
"ground_offenders": "2.61.0.37",
|
||||
"iground_award_assists": "2.61.0.37",
|
||||
"offender_fields": "2.61.0.37",
|
||||
"stat_kills": "2.61.0.37",
|
||||
"stat_ground_kills": "2.61.0.37",
|
||||
"stat_human_kills": "2.61.0.37",
|
||||
"stat_naval_kills": "2.61.0.37",
|
||||
"stat_team_kills": "2.61.0.37",
|
||||
"stat_ai_kills": "2.61.0.37",
|
||||
"stat_ai_ground_kills": "2.61.0.37",
|
||||
"stat_ai_naval_kills": "2.61.0.37",
|
||||
"stat_assists": "2.61.0.37",
|
||||
"stat_deaths": "2.61.0.37",
|
||||
"stat_capture_zone": "2.61.0.37",
|
||||
"stat_score": "2.61.0.37",
|
||||
"stat_award_damage": "2.61.0.37",
|
||||
"stat_air_severe": "2.61.0.37",
|
||||
"stat_ship_severe": "2.61.0.37"
|
||||
},
|
||||
"local_mp_events": {
|
||||
"dispatch_assist": "2.61.0.37",
|
||||
"caller_capture_zone": "2.61.0.37",
|
||||
"caller_hit_crit": "2.61.0.37",
|
||||
"caller_severe_damage": "2.61.0.37",
|
||||
"caller_naval_damage": "2.61.0.37",
|
||||
"offender_assist": "2.61.0.37"
|
||||
},
|
||||
"local_mp_players": {
|
||||
"mplayer_init_matching": "2.61.0.37",
|
||||
"is_slot_ready_at_host": "2.61.0.37",
|
||||
"mplayer_gui_state": "2.61.0.37",
|
||||
"mplayer_clear_before_lobby": "2.61.0.37",
|
||||
"mplayer_used_spares": "2.61.0.37",
|
||||
"scoreboard_rows": "2.61.0.37",
|
||||
"mplayer_unit_eid": "2.61.0.37",
|
||||
"mission_allies_country": "2.61.0.37",
|
||||
"mission_axis_country": "2.61.0.37",
|
||||
"mission_arcade_country": "2.61.0.37",
|
||||
"mission_custom_bots": "2.61.0.37"
|
||||
},
|
||||
"local_mp_loadout": {
|
||||
"sem_change_aircraft_send": "2.61.0.37",
|
||||
"refl_ctor": "2.61.0.37",
|
||||
"datablock_dtor": "2.61.0.37",
|
||||
"bullet_vec_assign": "2.61.0.37",
|
||||
"get_decals_blk": "2.61.0.37",
|
||||
"get_attachables_blk": "2.61.0.37",
|
||||
"str_hash_fnv1": "2.61.0.37",
|
||||
"namemap_add_name_id": "2.61.0.37",
|
||||
"crew_skills_init": "2.61.0.37",
|
||||
"refl_objects": "2.61.0.37",
|
||||
"refl_names": "2.61.0.37",
|
||||
"refl_flags": "2.61.0.37",
|
||||
"refl_targeting": "2.61.0.37",
|
||||
"refl_vertical_targeting": "2.61.0.37",
|
||||
"refl_bomb_fuse": "2.61.0.37",
|
||||
"respawn_spawn": "2.61.0.37",
|
||||
"unit_spawn_state": "2.61.0.37",
|
||||
"change_req_slot": "2.61.0.37",
|
||||
"econ_clear": "2.61.0.37",
|
||||
"change_req_bullets": "2.61.0.37",
|
||||
"unit_crew_skills": "2.61.0.37"
|
||||
},
|
||||
"local_mp_nuke": {
|
||||
"shell_launch": "2.61.0.37",
|
||||
"shell_instant_win": "2.61.0.37",
|
||||
"shell_explode": "2.61.0.37",
|
||||
"cta_logic_action": "2.61.0.37",
|
||||
"mission_vars_data": "2.61.0.37",
|
||||
"mission_vars_walk": "2.61.0.37",
|
||||
"mission_vars_step": "2.61.0.37",
|
||||
"mission_vars_value": "2.61.0.37"
|
||||
},
|
||||
"local_mp_support": {
|
||||
"set_controlled_unit": "2.61.0.37",
|
||||
"mplayer_update": "2.61.0.37",
|
||||
"mplayer_support_unit": "2.61.0.37"
|
||||
}
|
||||
},
|
||||
"native_values": {
|
||||
"add_score_message": "0x189a8e0",
|
||||
"aircraft_change_result": "0xebc490",
|
||||
"aircraft_change_result.econ_change_req": "0xf578",
|
||||
"app_econ_state": "0x155f5b7",
|
||||
"app_econ_state.econ_holder": "0x3f0",
|
||||
"app_econ_state.econ_state": "0x9a8",
|
||||
"bot_system_setup": "0x11af3f0",
|
||||
"bullet_vec_assign": "0x4f1410",
|
||||
"caller_capture_zone": "0x3db0e0",
|
||||
"caller_capture_zone.call": "0x357310",
|
||||
"caller_hit_crit": "0xff85ea",
|
||||
"caller_hit_crit.call": "0x35bc20",
|
||||
"caller_naval_damage": "0xd048ea",
|
||||
"caller_naval_damage.call": "0x35a5f0",
|
||||
"caller_severe_damage": "0xe55afa",
|
||||
"caller_severe_damage.call": "0x35c310",
|
||||
"change_req_bullets": "0x2dd45f",
|
||||
"change_req_bullets.bullets_begin": "0xf608",
|
||||
"change_req_bullets.bullets_end": "0xf610",
|
||||
"change_req_slot": "0xebc657",
|
||||
"change_req_slot.slot_id": "0xf65c",
|
||||
"crew_skills_init": "0x1032130",
|
||||
"cta_logic_action": "0x11bc400",
|
||||
"datablock_dtor": "0x3093a60",
|
||||
"datablock_get_real": "0x5445270",
|
||||
"datablock_get_str": "0x3094400",
|
||||
"datablock_set_from": "0x3093210",
|
||||
"datablock_set_from.dagmem_alloc": "0x6bf5a2c",
|
||||
"disabled_slots_mask": "0x6bb480",
|
||||
"disabled_slots_mask.app": "0x7bab428",
|
||||
"disabled_slots_mask.local_mplayer": "0x7b817c0",
|
||||
"disabled_slots_mask.mplayer_broken_slots": "0x4d0",
|
||||
"disabled_slots_mask.multiplayer": "0x7b83cb0",
|
||||
"dispatch_assist": "0x35beb0",
|
||||
"do_respawn_player": "0xc6c010",
|
||||
"do_respawn_player.app_score_rules": "0x3e0",
|
||||
"do_respawn_player.hero": "0x7bad418",
|
||||
"econ_clear": "0x2dd300",
|
||||
"game_save_data": "0x427e19",
|
||||
"game_save_data.game_save_data": "0x7bf4958",
|
||||
"get_attachables_blk": "0x2e08f0",
|
||||
"get_decals_blk": "0x2df9a0",
|
||||
"get_player_country": "0x12773b0",
|
||||
"get_player_country.mp_is_local_mp": "0x61",
|
||||
"get_player_country.player_count": "0x7b817e0",
|
||||
"get_player_country.player_table": "0x7b817d0",
|
||||
"get_unit_by_eid": "0x110b960",
|
||||
"ground_bailout": "0x427a61",
|
||||
"ground_bailout.bailout_dead": "0x3888",
|
||||
"ground_death_flags": "0x427490",
|
||||
"ground_death_flags.already_dead": "0x2101",
|
||||
"ground_death_flags.dead_silent": "0x1c19",
|
||||
"ground_offenders": "0x427aad",
|
||||
"ground_offenders.killer": "0x19e8",
|
||||
"ground_offenders.killer_pid": "0x1a08",
|
||||
"ground_offenders.killer_uid": "0x1a40",
|
||||
"ground_offenders.offender_size": "0x160",
|
||||
"ground_offenders.offenders": "0x17c0",
|
||||
"ground_offenders.offenders_count": "0x17d0",
|
||||
"ground_offenders.unit_type": "0x8c",
|
||||
"gui_state_update": "0x155f490",
|
||||
"iground_award_assists": "0x465540",
|
||||
"iground_award_assists.choose_offender": "0x498",
|
||||
"iground_on_dead": "0x427400",
|
||||
"is_slot_ready_at_host": "0x17a31d0",
|
||||
"mission_allies_country": "0x1277500",
|
||||
"mission_allies_country.allies_country": "0xd0",
|
||||
"mission_arcade_country": "0x127748a",
|
||||
"mission_arcade_country.arcade_country": "0x1d0",
|
||||
"mission_axis_country": "0x1277518",
|
||||
"mission_axis_country.axis_country": "0xc8",
|
||||
"mission_custom_bots": "0x126ef8d",
|
||||
"mission_custom_bots.custom_bots": "0x718",
|
||||
"mission_score_params": "0x126d762",
|
||||
"mission_score_params.custom_score_params": "0x6d8",
|
||||
"mission_settings_load": "0x12657a0",
|
||||
"mission_vars_data": "0x11bc4f6",
|
||||
"mission_vars_data.data": "0x40",
|
||||
"mission_vars_step": "0x11bd180",
|
||||
"mission_vars_step.name": "-0x8",
|
||||
"mission_vars_step.stride": "0x20",
|
||||
"mission_vars_value": "0x11bd1a6",
|
||||
"mission_vars_value.value": "0x8",
|
||||
"mission_vars_walk": "0x11bd150",
|
||||
"mission_vars_walk.count": "0x50",
|
||||
"mission_vars_walk.entry_bias": "0x8",
|
||||
"mp_chat": "0x5bd732",
|
||||
"mp_chat.mp_chat": "0x1f0",
|
||||
"mp_construct_local": "0x5bd960",
|
||||
"mp_construct_local.mp_chat_host": "0xf8",
|
||||
"mp_construct_local.mp_is_host": "0x60",
|
||||
"mp_init_chat": "0x5bd6a0",
|
||||
"mp_team_countries": "0x11afd9f",
|
||||
"mp_team_countries.team1_countries": "0x150",
|
||||
"mp_team_countries.team2_countries": "0x170",
|
||||
"mplayer_add_score": "0x59f2d0",
|
||||
"mplayer_clear_before_lobby": "0x599680",
|
||||
"mplayer_gui_state": "0x155f6f1",
|
||||
"mplayer_gui_state.gui_state": "0x640",
|
||||
"mplayer_init_matching": "0x59e660",
|
||||
"mplayer_matching": "0x59e95f",
|
||||
"mplayer_matching.match_team": "0x4",
|
||||
"mplayer_matching.mp_team": "0x228",
|
||||
"mplayer_matching.mp_user_id": "0xb8",
|
||||
"mplayer_score": "0x59f30d",
|
||||
"mplayer_score.score": "0x8f8",
|
||||
"mplayer_stat_sync": "0x59f5f8",
|
||||
"mplayer_stat_sync.dirty": "0xa10",
|
||||
"mplayer_stat_sync.payload": "0xa30",
|
||||
"mplayer_support_unit": "0x59da3c",
|
||||
"mplayer_support_unit.eid": "0xb58",
|
||||
"mplayer_support_unit.unit": "0xb50",
|
||||
"mplayer_unit_eid": "0x1292bfb",
|
||||
"mplayer_unit_eid.controlled_eid": "0x880",
|
||||
"mplayer_unit_eid.unit_eid": "0x850",
|
||||
"mplayer_update": "0x59d270",
|
||||
"mplayer_used_spares": "0x59a102",
|
||||
"mplayer_used_spares.used_spares": "0x520",
|
||||
"namemap_add_name_id": "0xed4b0",
|
||||
"net_mark_dirty": "0x31030a0",
|
||||
"offender_assist": "0x465896",
|
||||
"offender_assist.assist_sent": "0x148",
|
||||
"offender_fields": "0x465832",
|
||||
"offender_fields.army": "0x1c",
|
||||
"offender_fields.pid": "0x20",
|
||||
"offender_fields.uid": "0x58",
|
||||
"offender_fields.unit_army": "0x1010",
|
||||
"on_unit_dead_once": "0xe5b200",
|
||||
"on_unit_dead_once.skip_kill": "0x3058",
|
||||
"refl_bomb_fuse": "0xff1443",
|
||||
"refl_bomb_fuse.bomb_fuse": "0xe4",
|
||||
"refl_ctor": "0xcccdc0",
|
||||
"refl_dtor": "0x548f20",
|
||||
"refl_flags": "0xff139a",
|
||||
"refl_flags.flags": "0xd0",
|
||||
"refl_names": "0x548fa2",
|
||||
"refl_names.custom_skin": "0x68",
|
||||
"refl_names.skin": "0x60",
|
||||
"refl_names.unit": "0x50",
|
||||
"refl_names.weapon": "0x58",
|
||||
"refl_objects": "0x548f45",
|
||||
"refl_objects.attachables": "0x90",
|
||||
"refl_objects.bullets": "0x190",
|
||||
"refl_objects.custom_preset": "0xb0",
|
||||
"refl_objects.decals": "0x70",
|
||||
"refl_objects.disabled_mods": "0x140",
|
||||
"refl_objects.enabled_mods": "0xf0",
|
||||
"refl_stdmem": "0x548fab",
|
||||
"refl_stdmem.stdmem": "0x8025298",
|
||||
"refl_targeting": "0xff13ce",
|
||||
"refl_targeting.gun_convergence": "0xdc",
|
||||
"refl_vertical_targeting": "0xff140e",
|
||||
"refl_vertical_targeting.vertical_targeting": "0xe0",
|
||||
"respawn_spawn": "0xc6c48a",
|
||||
"respawn_spawn.resp_base_id": "0xbd8",
|
||||
"respawn_spawn.spawn_delay_a": "0xbf4",
|
||||
"respawn_spawn.spawn_pos_x": "0xbfc",
|
||||
"respawn_spawn.spawn_pos_y": "0xc00",
|
||||
"respawn_spawn.spawn_pos_z": "0xc04",
|
||||
"score_msg_blk_ctor": "0x189b99c",
|
||||
"score_msg_blk_ctor.call": "0x3093000",
|
||||
"score_msg_blk_dtor": "0x189be90",
|
||||
"score_msg_blk_dtor.call": "0x3093a60",
|
||||
"score_msg_blk_set_int": "0x189ba68",
|
||||
"score_msg_blk_set_int.call": "0x3095130",
|
||||
"score_msg_blk_set_str": "0x189ba34",
|
||||
"score_msg_blk_set_str.call": "0x3094950",
|
||||
"score_msg_blk_to_owned": "0x189ba4f",
|
||||
"score_msg_blk_to_owned.call": "0x30998c0",
|
||||
"score_msg_exp_class": "0x189bb19",
|
||||
"score_msg_exp_class.exp_class": "0x38",
|
||||
"score_msg_exp_class.unit_info": "0x1020",
|
||||
"score_msg_hud_queue": "0x189be3b",
|
||||
"score_msg_hud_queue.call": "0x1804900",
|
||||
"score_msg_hud_queue.queue": "0xae8",
|
||||
"scoreboard_rows": "0x12929f0",
|
||||
"sem_change_aircraft_send": "0xccba20",
|
||||
"set_controlled_unit": "0x598a70",
|
||||
"set_owning_mplayer": "0xfce410",
|
||||
"set_owning_mplayer.mp_pid": "0x8",
|
||||
"set_player_gui_state": "0x155f5f0",
|
||||
"shell_explode": "0xbe7c00",
|
||||
"shell_instant_win": "0x14332fd",
|
||||
"shell_instant_win.instant_win": "0x70",
|
||||
"shell_instant_win.record": "0x18",
|
||||
"shell_launch": "0x1431c10",
|
||||
"sq_local_country": "0x179f400",
|
||||
"sq_local_country.mission_settings": "0x7bb5058",
|
||||
"stat_ai_ground_kills": "0x111f16e",
|
||||
"stat_ai_ground_kills.field": "0x9e6",
|
||||
"stat_ai_kills": "0x111f157",
|
||||
"stat_ai_kills.field": "0x9e4",
|
||||
"stat_ai_naval_kills": "0x111f185",
|
||||
"stat_ai_naval_kills.field": "0x9e8",
|
||||
"stat_air_severe": "0x129349c",
|
||||
"stat_air_severe.field": "0xa06",
|
||||
"stat_assists": "0x111f19c",
|
||||
"stat_assists.field": "0x9ec",
|
||||
"stat_award_damage": "0x111f21b",
|
||||
"stat_award_damage.field": "0xa00",
|
||||
"stat_capture_zone": "0x111f1ca",
|
||||
"stat_capture_zone.field": "0x9ee",
|
||||
"stat_deaths": "0x111f1b3",
|
||||
"stat_deaths.field": "0x9dc",
|
||||
"stat_ground_kills": "0x111f0fb",
|
||||
"stat_ground_kills.field": "0x9de",
|
||||
"stat_human_kills": "0x111f112",
|
||||
"stat_human_kills.field": "0x9e0",
|
||||
"stat_kills": "0x111f0e4",
|
||||
"stat_kills.field": "0x9d8",
|
||||
"stat_naval_kills": "0x111f129",
|
||||
"stat_naval_kills.field": "0x9e2",
|
||||
"stat_score": "0x111f1f7",
|
||||
"stat_score.fallback": "0x2d8",
|
||||
"stat_score.score": "0x8f8",
|
||||
"stat_ship_severe": "0x12934c8",
|
||||
"stat_ship_severe.field": "0xa08",
|
||||
"stat_team_kills": "0x111f140",
|
||||
"stat_team_kills.field": "0x9da",
|
||||
"str_hash_fnv1": "0x21b670",
|
||||
"unit_change_aircraft": "0xff1020",
|
||||
"unit_crew_skills": "0x485850",
|
||||
"unit_crew_skills.crew_skills": "0x10a8",
|
||||
"unit_info_name": "0xff12a5",
|
||||
"unit_info_name.info_name": "0x10",
|
||||
"unit_info_name.unit_info": "0x1020",
|
||||
"unit_mplayer": "0xfce718",
|
||||
"unit_mplayer.unit_mplayer": "0xf98",
|
||||
"unit_severe": "0xe5b2c7",
|
||||
"unit_severe.severe_idx": "0x6b0",
|
||||
"unit_severe.severe_pid": "0x6d0",
|
||||
"unit_severe.severe_uid": "0x708",
|
||||
"unit_spawn_state": "0x1044ff1",
|
||||
"unit_spawn_state.resp_base_id": "0xbd8",
|
||||
"unit_spawn_state.spawn_delay_a": "0xbf4",
|
||||
"unit_spawn_state.spawn_delay_b": "0xbf8",
|
||||
"unit_spawn_state.unit_mplayer": "0xf98",
|
||||
"unit_type": "0xff120f",
|
||||
"unit_type.unit_type": "0x8c"
|
||||
},
|
||||
"unavailable": {}
|
||||
}
|
||||
Reference in new issue
Block a user