骑砍战团MOD开发(19)-ID掩码算法

发布时间:2023年12月17日

一.header_common.py掩码

op_num_value_bits = 24 + 32

tag_register        =  1
tag_variable        =  2
tag_string          =  3
tag_item            =  4
tag_troop           =  5
tag_faction         =  6
tag_quest           =  7
tag_party_tpl       =  8
tag_party           =  9
tag_scene           = 10
tag_mission_tpl     = 11
tag_menu            = 12
tag_script          = 13
tag_particle_sys    = 14
tag_scene_prop      = 15
tag_sound           = 16
tag_local_variable  = 17
tag_map_icon        = 18
tag_skill           = 19
tag_mesh            = 20
tag_presentation    = 21
tag_quick_string    = 22
tag_track	        = 23
tag_tableau         = 24
tag_animation       = 25
tags_end            = 26


opmask_register           =  tag_register       << op_num_value_bits
opmask_variable           =  tag_variable       << op_num_value_bits
opmask_string             =  tag_string         << op_num_value_bits
opmask_item_index         =  tag_item           << op_num_value_bits
opmask_troop_index        =  tag_troop          << op_num_value_bits
opmask_faction_index      =  tag_faction        << op_num_value_bits
opmask_quest_index        =  tag_quest          << op_num_value_bits
opmask_p_template_index   =  tag_party_tpl      << op_num_value_bits
opmask_party_index        =  tag_party          << op_num_value_bits
opmask_scene_index        =  tag_scene          << op_num_value_bits
opmask_mission_tpl_index  =  tag_mission_tpl    << op_num_value_bits
opmask_menu_index         =  tag_menu           << op_num_value_bits
opmask_script             =  tag_script         << op_num_value_bits
opmask_particle_sys       =  tag_particle_sys   << op_num_value_bits
opmask_scene_prop         =  tag_scene_prop     << op_num_value_bits
opmask_sound              =  tag_sound          << op_num_value_bits
opmask_map_icon           =  tag_map_icon       << op_num_value_bits
opmask_local_variable     =  tag_local_variable << op_num_value_bits
opmask_quick_string       =  tag_quick_string   << op_num_value_bits

二.identifyVal计算方法(process_operation.py)

identifyVal = id_no | (tag_type << op_num_value_bits)

(troop_add_items, "trp_player","itm_smoked_fish", 1),
troop_add_items = 1535 (header_operation.py定义)
"trp_player" = 2 | (5 << 56) = 360287970189639682L (trp_player在module_troops.pyID为2)
"itm_cloth" = 293 | (4 << 56) = 288230376151712037L (itm_cloth在module_items.py-ID为293)

故对应txt中代码为 1535 3 360287970189639682 288230376151712037 1

文章来源:https://blog.csdn.net/qq_35829452/article/details/134986047
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。