I never liked Native map icon banners. Map icons are limited in number and those banners are eating away about 150 slots out of 256 available. That's simply too much for my taste. In the end I decided that I want to replace all of them with just a single banner mesh, which would be painted with whatever heraldry is appropriate.
So, without further ado:
To create a heraldic map banner, you need to make following modifications:
This trigger retrieves the party_id, calls "script_get_banner_mesh_for_party" (covered later) to determine what banner mesh to use, and then finally applies the heraldry to our banner using a new tableau.
The tableau material uses only standard meshes, fully available in Native.
Finally, the script to determine the banner mesh to use. Currently it is just a stub:
Obviously this script needs some love, but it's enough for proof of concept.
Once everything is ready, and your script "get_banner_mesh_for_party" is ready to determine banner meshes for your parties, assign your "icon_heraldic_banner" to them instead of selecting one of the dozens available flags.
It is recommended to use this in combination with Banners and Flags Standardization Pack, due to it's uniform banner placement.
So, without further ado:
Heraldic Map Banners
To create a heraldic map banner, you need to make following modifications:
Code:
("heraldic_banner",0,"custom_map_banner_03", banner_scale, 0,
[
(ti_on_init_map_icon,
[
(store_trigger_param_1, ":party_id"),
(call_script, "script_get_banner_mesh_for_party", ":party_id"),
(cur_map_icon_set_tableau_material, "tableau_heraldic_map_banner", reg0),
]
),
]
),
Code:
("heraldic_map_banner", 0, "missiles", 512, 256, 0, 0, 0, 0,
[
(store_script_param, ":banner_mesh", 1),
(set_fixed_point_multiplier, 100),
(init_position, pos1),
(position_set_x, pos1, -12),
(position_set_y, pos1, 113),
(position_move_z, pos1, -20),
(cur_tableau_add_mesh, ":banner_mesh", pos1, 0, 0),
(init_position, pos1),
(position_set_z, pos1, 10),
(cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner", pos1, 0, 0),
(cur_tableau_set_camera_parameters, 0, 100, 200, 0, 100000),
]
),
Finally, the script to determine the banner mesh to use. Currently it is just a stub:
Code:
("get_banner_mesh_for_party",
[
(assign, reg0, "mesh_banners_default_b"), # Stub for the moment
]
),
Once everything is ready, and your script "get_banner_mesh_for_party" is ready to determine banner meshes for your parties, assign your "icon_heraldic_banner" to them instead of selecting one of the dozens available flags.
It is recommended to use this in combination with Banners and Flags Standardization Pack, due to it's uniform banner placement.