Faction Limited Banners

Users who are viewing this thread

GameDrifter

Veteran
Hi,

I've seen the few banner tut's out there on the forums, the 1 banner per faction, and making adding banners to the game etc..

But I'd like to know how to possibly code it so when a player choices to join a faction (Starting game option I intend to use in my mod) They can pick from the faction only list of banners I intend to make. Then the rest of the banners are assigned to the other NPC's of the same faction, while all the other factions auto pick there faction only banners. I'm not after a 1 banner per faction setup really. More like a Themed set of banners per faction... Example: Player joins a faction who's symbol is the eagle so all available banners for that faction have an eagle on them just variations in colors etc..
 
Code:
        (assign, ":try_end", banner_meshes_end_minus_one), ##change this depending on what faction
        (store_sub, ":num_npc_kingdoms", npc_kingdoms_end, npc_kingdoms_begin),
        (val_sub, ":try_end", ":num_npc_kingdoms"), #do not allow kingdom banners to be selected
        (store_mul, ":begin_mesh", 16, "$g_presentation_page_no"),
        (val_add, ":begin_mesh", banner_meshes_begin), ##change this depending on what faction
        (store_add, ":try_end_2", ":begin_mesh", 16),
        (val_min, ":try_end", ":try_end_2"),
        (store_add, "$g_presentation_banner_start", "$g_presentation_obj_banner_selection_1", 1),
        (try_for_range, ":cur_banner_mesh", ":begin_mesh", ":try_end"),
          (create_image_button_overlay, reg1, ":cur_banner_mesh", ":cur_banner_mesh"),
          (position_set_x, pos1, ":x_pos"),
          (position_set_y, pos1, ":y_pos"),
          (overlay_set_position, reg1, pos1),
          (position_set_x, pos1, 100),
          (position_set_y, pos1, 100),
          (overlay_set_size, reg1, pos1),
          (val_add, ":x_pos", 100),
          (ge, ":x_pos", 900),
          (assign, ":x_pos", 150),
          (val_sub, ":y_pos", 250),
        (try_end),
        (presentation_set_duration, 999999),
        ]),
      (ti_on_presentation_event_state_change,
       [(store_trigger_param_1, ":object"),
        (try_begin),
          (eq, ":object", "$g_presentation_obj_banner_selection_1"),
          (val_add, "$g_presentation_page_no", 1),
          (val_mod, "$g_presentation_page_no", 8), ## change this depending on how many pages of banners you may have
          (start_presentation, "prsnt_banner_selection"),
        (else_try),
          (store_sub, ":selected_banner", ":object", "$g_presentation_banner_start"),
          (store_mul, ":page_adder", 16, "$g_presentation_page_no"),
          (val_add, ":selected_banner", ":page_adder"),
          (try_begin),
            (eq, "$g_player_troop", "trp_player"),
            (store_add, ":selected_banner_map_icon", ":selected_banner", banner_map_icons_begin),
            (party_set_banner_icon, "p_main_party", ":selected_banner_map_icon"),
          (try_end),
Change the lines with double comments: assign some globals for the range (start & end banners) and number of pages before calling the presentation, depending on the player's faction. Better yet, define them in faction slots at game_start and fetch the values dynamically from the presentation.
 
Wow thanks for quick reply  :mrgreen:
I did forget to mention my mod is for M&B version but the coding between both versions module systems doesn't seem to farth apart really.. I'll look the code over more in the morning when I am more awake and have the energy to get it tried out. But again thank you for fast reply  :grin:
 
Another idea (the one I used in M&B): you can hide the kings and lords banners and only present the selectable ones for player to choose. You can do this by changing the offset to start from the first selectable instead of the first banner. Adjust the page number and the page count code. From that range break them up into group for each faction. Some conditions to present the correct group (using offset).

Edit: you may need to rearrange banners into proper group first.
 
SPD_Phoenix said:
Another idea (the one I used in M&B): you can hide the kings and lords banners and only present the selectable ones for player to choose. You can do this by changing the offset to start from the first selectable instead of the first banner. Adjust the page number and the page count code. From that range break them up into group for each faction. Some conditions to present the correct group (using offset).

Edit: you may need to rearrange banners into proper group first.

Yeah that sounds like a reasonable way to do the same thing I want to do.. Welp today's Mod ToDo List,
1. Setup the different starting options.
2. Adjust Banner system per faction selection.
3. Add a few new faces to the game. (Thank lord for some facegen programs my art skills are limited)  :mrgreen:
 
Back
Top Bottom