骑砍1战团mod开发-大地图制作方法_哔哩哔哩_bilibilihttps://www.bilibili.com/video/BV1rz4y1c7wH/
一.大地图map.txt
RTS视角大地图 = 大地图静态模型(map.txt) + 军团/城镇图标(module_parties.py).
<1.大地图的战争迷雾和天气:
# Weather-handling operations
get_global_cloud_amount = 90 # (get_global_cloud_amount, <destination>),
# Returns current cloudiness (a value between 0..100).
set_global_cloud_amount = 91 # (set_global_cloud_amount, <value>),
# Sets current cloudiness (value is clamped to 0..100).
get_global_haze_amount = 92 # (get_global_haze_amount, <destination>),
# Returns current fogginess (value between 0..100).
set_global_haze_amount = 93 # (set_global_haze_amount, <value>),
# Sets current fogginess (value is clamped to 0..100).
<2.大地图terrain_type(header_terrain_types.py)
#water为不可通过区域
rt_water = 0
rt_mountain = 1
rt_steppe = 2
rt_plain = 3
rt_snow = 4
rt_desert = 5
rt_bridge = 7
#river为可通过区域
rt_river = 8
rt_mountain_forest = 9
rt_steppe_forest = 10
rt_forest = 11
rt_snow_forest = 12
rt_desert_forest = 13
<3.大地图坐标/地形获取(编辑坐标模式Ctrl+E直接显示大地图坐标)
#获取当前大地图地形类型,与header_terrain_types常量形成映射
party_get_current_terrain = 1608 # (party_get_current_terrain, <destination>, <party_id>),
#检测是否在大地图
(map_free),
#设置大地图party坐标
party_relocate_near_party = 1623 # (party_relocate_near_party, <relocated_party_id>, <target_party_id>, <spawn_radius>),
party_get_position = 1625 # (party_get_position, <dest_position>, <party_id>),
party_set_position = 1626 # (party_set_position, <party_id>, <position>),
#产生随机大地图坐标
map_get_random_position_around_position = 1627 # (map_get_random_position_around_position, <dest_position_no>, <source_position_no>, <radius>),
map_get_land_position_around_position = 1628 # (map_get_land_position_around_position, <dest_position_no>, <source_position_no>, <radius>),
map_get_water_position_around_position = 1629 # (map_get_water_position_around_position, <dest_position_no>, <source_position_no>, <radius>),
二.大地图编辑工具
<1.MapEditor++,支持map.txt静态模型obj导入&导出,module_parties.py的编辑
霸王•吕布 / MB_Map_Editor_Plus_Plus · GitCodehttps://gitcode.net/qq_35829452/map_editor_plus_plus <2.MapEditor,支持map.txt的parties.txt的查看和编辑,地形平滑处理
霸王•吕布 / MB_Map_Editor · GitCodehttps://gitcode.net/qq_35829452/1-plus三.军团城镇parties.txt
<1.module_parties.py预制常量.
#party在大地图中显示
pf_icon_mask = 0x000000ff
pf_disabled = 0x00000100
pf_is_static = 0x00000400
pf_label_small = 0x00000000
pf_label_medium = 0x00001000
pf_label_large = 0x00002000
pf_always_visible = 0x00004000
pf_show_faction = 0x00400000
pf_no_label = 0x00080000
#party能否在rt_water水中行走
pf_is_ship = 0x00000200
#party在大地图中AI
pf_default_behavior = 0x00010000
pf_auto_remove_in_town = 0x00020000
pf_quest_party = 0x00040000
pf_limit_members = 0x00100000
pf_hide_defenders = 0x00200000
#pf_is_hidden = 0x01000000
pf_dont_attack_civilians = 0x02000000
pf_civilian = 0x04000000
#party在大地图中行走速度
pf_carry_goods_bits = 48
pf_carry_gold_bits = 56
pf_carry_gold_multiplier = 20
pf_carry_goods_mask = 0x00ff000000000000
pf_carry_gold_mask = 0xff00000000000000
<2.party在大地图中碰撞检测,RTS视角切换,自动寻路
#party右键点击事件
#script_game_context_menu_get_buttons:
# This script is called from the game engine when the player clicks the right mouse button over a party on the map.
# INPUT: arg1 = party_no
# OUTPUT: none, fills the menu buttons
script_game_context_menu_get_buttons
#script_game_event_context_menu_button_clicked:
# This script is called from the game engine when the player clicks on a button at the right mouse menu.
# INPUT: arg1 = party_no, arg2 = button_value
# OUTPUT: none
script_game_event_context_menu_button_clicked
#碰撞检测回调事件
# script_game_event_party_encounter:
# This script is called from the game engine whenever player party encounters another party or a battle on the world map
script_game_event_party_encounter
#强制碰撞检测
start_encounter = 1300 # (start_encounter, <party_id>),
leave_encounter = 1301 # (leave_encounter),
#RTS视角切换
set_camera_follow_party = 1021 # (set_camera_follow_party, <party_id>),