Yet another question about banners

正在查看此主题的用户

DMcain

Veteran
With all the wonderful work done and being done on banners and banner selection, has ANYONE tried to implement a menu selection so the player can decide if he wants it oriented vertical or horizontal?

I know that orientation is decided somewhere, but:
- is it hard-coded?
- is it based on the individual banner?

Some banners look goofy when horizontal, but perfectly ok when vertical, and vice versa. Also, some banners look good with either orientation.

On a side note, why is the code for custom banners commented out in the 1.010 mod system? Does it not function properly?
 
Good question. Some of them do look rather strange either horizontal, or vertical. If I had to guess, I'd bet they're assigned in module_meshes.py.
 
meshes just lists them, I think the actual sizing and orienting is done in tableau materials.. but I might be wrong.

I've spent the last two days working with tableaus and presentations but to say I still don't fully understand it would be a gross understatement :smile:
 
MartinF 说:
I think the actual sizing and orienting is done in tableau materials.. but I might be wrong.

插入代码块:
tab_custom_banner_square_no_mesh ...
tab_custom_banner_default ...
tab_custom_banner_tall ...
tab_custom_banner_square ...
tab_custom_banner_short ...
tab_custom_banner_short ...

Editing the above in tableau_materials did not have any effect. I did find the following listed in presentations.

插入代码块:
("banner_flag_map_type_selection", 0, mesh_load_window,
   [
     (ti_on_presentation_load,
      [
        (set_fixed_point_multiplier, 1000),
        (create_text_overlay, reg1, "str_choose_map_flag_type", tf_center_justify),
        (position_set_x, pos1, 500),
        (position_set_y, pos1, 600),
        (overlay_set_position, reg1, pos1),
        (troop_get_slot, ":bg_type", "trp_player", slot_troop_custom_banner_bg_type),
        (val_add, ":bg_type", custom_banner_backgrounds_begin),
        (assign, ":pos_x", 250),
        (assign, ":pos_y", 150),
        (try_for_range, ":cur_flag", custom_banner_flag_map_types_begin, custom_banner_flag_map_types_end),
          (store_sub, ":slot_index", ":cur_flag", custom_banner_flag_map_types_begin),
          (troop_set_slot, "trp_player", slot_troop_custom_banner_map_flag_type, ":slot_index"),
          (try_begin),
            (eq, ":cur_flag", "mesh_custom_map_banner_01"),
            (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_square", "trp_player"),
          (else_try),
            (eq, ":cur_flag", "mesh_custom_map_banner_02"),
            (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_short", "trp_player"),
          (else_try),
            (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_tall", "trp_player"),
          (try_end),
          (position_set_x, pos1, ":pos_x"),
          (position_set_y, pos1, ":pos_y"),
          (val_add, ":pos_x", 200),
          (overlay_set_position, reg1, pos1),
          (position_set_x, pos1, 100),
          (position_set_y, pos1, 100),
          (overlay_set_size, reg1, pos1),
          (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1),
        (try_end),
        (presentation_set_duration, 999999),
        ]),
     (ti_on_presentation_event_state_change,
      [
        (store_trigger_param_1, ":object"),
        (assign, ":end_cond", custom_banner_flag_map_types_end),
        (val_sub, ":end_cond", custom_banner_flag_map_types_begin),
        (try_for_range, ":trp_slot_index", 0, ":end_cond"),
          (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"),
          (troop_set_slot, "trp_player", slot_troop_custom_banner_map_flag_type, ":trp_slot_index"),
          (assign, ":end_cond", 0),
        (try_end),
        (try_begin),
          (gt, "$g_presentation_next_presentation", 0),
          (start_presentation, "$g_presentation_next_presentation"),
        (else_try),
          (presentation_set_duration, 0),
        (try_end),
        ]),
     ]),
 
SPD_Phoenix 说:
Currently, all decided by meshes in the brf.

IMO, this is a very odd way to decide banner orientation. There really only needs to be 3 banner meshes. One each for vertical, horizontal or square.

There should be a way to adjust the code in such a way that you can select which orientation the player desires. Granted, I have no idea on how to go about doing this. I might be able to implement the selection in game menus, but actually applying the selection in game thru the tableau materials and presentations totally loses me.
 
后退
顶部 底部