OSP Code Making CUSTOM BANNER (heraldry, color, background)

Users who are viewing this thread

FALX

Master Knight
The "M & B    history" has long been the development  make new banner.  We  can make new banner by combine background pattern, color, charge,and flag type. Shield and Heraldic Mail with Surcoat show your custom banner. :cool:

1 Does it work on Warband now is whether the experience of implementation?
2 Who knows the codes for the introduction of the editor of heraldry in the module?
 


e42e8556a57a.jpg
mbfire
5ofv5k.jpg
4qrimx.jpg

I know that the disabled have been used in the original design code scripts. But other masters do much better.

http://forums.taleworlds.com/index.php?topic=56748.0

b2343f5cc3.jpg

4e9003c89843.jpg

This problem is unsolved. From the forum can find out just what a profound knowledge of the entire modular system will find the necessary funds for development.


http://forums.taleworlds.com/index.php/topic,56237.0.html    and      http://forums.taleworlds.com/index.php/topic,70666.msg1837237.html#msg1837237 

But the codes do not, here's the thing ...Please, reply    сommunity experts.

Thanks to the            Notepad + +  and      code  source  native  M&B 1.011    http://www.mbrepository.com/file.php?id=1090

This is a discussion http://forums.taleworlds.com/index.php/topic,21463.0.html

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DOWNLOAD

      * alfa  - code  source  + text files  Warband  1.134      http://www.mbrepository.com/file.php?id=2852
 
I didn't see this when you posted it originally.
You've enabled all the commented-out custom banner code in Warband then?

Is it fully functional, or are there things missing/broken that you need assistance with?
 
Oh, thank you dear Caba`drin for your attention.)

Yes, exactly like you said. It worked.

There are bugs with the text and the timing of the new heraldic flags on the campaign map. The same delay when clicking on some buttons ..
211c256bd5fa.jpg


The fonts and overlay text strings - that's a problem. As well as stopping at the manipulation of touch.. :sad:
If you try to install it on a copy of the native's Warband, you'll get a visual representation. Possibly with different sizes of the desktop screen, we obtain different results.
9e5762d1c223.jpg

a0273c2db0a7.jpg

94e6008424af.jpg

434571274fc3.jpg

5b7ede36fe3e.jpg
96af4ab21c70.jpg

Everything works as before. And that's good.

Had to edit this    custom_flag . BRF file  new arms, it would be great ..)) I'd like to do for Japanese heraldry banners.. :cool:
eb99e0e743a5.jpg
 
FALX said:
Oh, thank you dear Caba`drin for your attention.)
No problem, again, I would have responded right away if I hadn't missed this thread. I'd been wanting to try this for a while, but somehow not gotten around to it.

I see the problems with the positioning of the buttons and I'll look into that if you're stuck there, but:
FALX said:
As well as stopping at the manipulation of touch.. :sad:
I'm not certain what you mean by this?
 
A brief delay in response buttons randomly, or sign emblem ... But maybe I'm wrong and it is connected with something else, regardless of the script.
I'm sorry for my english
 
The Big question: does your cutom banner shop up in battles? I'd uncommented all of the native code and touched here and there, but couldn't get the custom banner to show up in battles! Unfortunately I scrapped the idea later on, so I have most probably lost my codes...
 
Lumos said:
The Big question: does your cutom banner shop up in battles? I'd uncommented all of the native code and touched here and there, but couldn't get the custom banner to show up in battles!
The screen looks identical to the one used in SoD for the original M&B and there it shows up on heraldic armor, etc, in battles (I just ran it again to check). I'll have to take a look if they have included an extra in-battle trigger, but it must at least be possible.
 
SkyShadowing said:
I would like to bump this. As someone who has no knowledge of modding, I would love it if somebody would release this as a kit to copy-paste into the game.

The texts you want instead      . py?            Make a copy of the folder  in  Nativ WB 1.134 and copy the files  (Text files  in archives) Сustom heraldry  are replaced. Click - action - banner ...
 
Yeah, I got the code copied into my module system. I'm just hoping we can get it as fully-functional as the examples in the original M&B, such as the links you posted above.
 
Yes, you're right. It would be very nice to make a    fully-functional  editor as submitted images. I hope to help make a more extended version.)
 
FALX said:
Yes, you're right. It would be very nice to make a    fully-functional  editor as submitted images. I hope to help make a more extended version.)
If you share what is you do with this pyhton like a tutorial its would be greaters for amateur modder :grin:
 
What kind of files and change the line


remove the marks  # #                in green lines  #  do not change!

1.  module_dialogs.py

line  14365             

#custom_banner  begin 
##    (eq, "trp_player", slot_troop_custom_banner_flag_type, -1),
#custom_banner  end
    ], "Can I fly my own banner?", "lord_mercenary_elaborate_banner", []],
  [anyone|plyr,"lord_mercenary_elaborate_1", [], "How much will you pay me for my service?", "lord_mercenary_elaborate_pay", []],
  [anyone|plyr,"lord_mercenary_elaborate_1", [], "Sounds good. I wish to enter your service as a mercenary.", "lord_mercenary_service_accept", []],
  [anyone|plyr,"lord_mercenary_elaborate_1", [], "Apologies, my sword is not for hire.", "lord_mercenary_service_reject", []],
...


2. module_game_menus.py

            I.
line 1965

#normal_banner_begin
            (start_presentation, "prsnt_banner_selection"),
# custom_banner_begin
#             (start_presentation, "prsnt_custom_banner"),
          (else_try),
            (change_screen_return, 0),
          (try_end),
          (set_show_messages, 1),
        ]),
      ("go_back_dot",[],"Go back.",[
        (jump_to_menu,"mnu_start_character_4"),
        ]),
    ]

**************
              II.
line  3280

  ("action_modify_banner",[(eq, "$cheat_mode", 1)],"{!}Cheat: Modify your banner.",
      [
          (start_presentation, "prsnt_banner_selection"),
      #  (start_presentation, "prsnt_custom_banner"),
        ]
      ),
      ("action_retire",[],"Retire from adventuring.",
      [(jump_to_menu, "mnu_retirement_verify"),
        ]
      ),
      ("camp_action_4",[],"Back to camp menu.",
      [(jump_to_menu, "mnu_camp"),
        ]
      ),
      ]



***! replace with :*********************************************

Code:
[color=navy]("action_modify_banner",[],"Modify your banner.",
       [
           (start_presentation, "prsnt_banner_selection"),
           (start_presentation, "prsnt_custom_banner"),
        ]
       ),
      ("action_retire",[],"Retire from adventuring.",
       [(jump_to_menu, "mnu_retirement_verify"),
        ]
       ),
      ("camp_action_4",[],"Back to camp menu.",
       [(jump_to_menu, "mnu_camp"),
        ]
       ),
      ]
  ),[/color]

*****************************
3  module_presentations py

                  I.
line 7543

("custom_banner", 0, mesh_load_window,
  [
    (ti_on_presentation_load,
      [
        (set_fixed_point_multiplier, 1000),
        (troop_get_slot, ":flag_type", "trp_player", slot_troop_custom_banner_flag_type),
        (val_max, ":flag_type", 0),
        (val_add, ":flag_type", custom_banner_flag_types_begin),
        (troop_get_slot, ":map_flag_type", "trp_player", slot_troop_custom_banner_map_flag_type),
        (val_max, ":map_flag_type", 0),
        (val_add, ":map_flag_type", custom_banner_flag_map_types_begin),
##        (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_custom_banner_1", ":flag_type", "tableau_custom_banner_square", "trp_player"),
        (troop_get_slot, ":bg_color_1", "trp_player", slot_troop_custom_banner_bg_color_1),
        (troop_get_slot, ":bg_color_2", "trp_player", slot_troop_custom_banner_bg_color_2),

                              II.   
line 7498  #Correcting banners according to the player banner
          #(assign, ":end_cond", active_npcs_end),
          #(try_for_range, ":cur_troop", original_kingdom_heroes_begin, ":end_cond"),
          #  (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
        # (str_store_troop_name, s7, ":cur_troop"),
        (display_message, "@DEBUGS : {s7}'s banner is changed"),
        #  (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
          #  (assign, ":end_cond", 0),
          #(try_end),

                    III.
line 8074
##    (ti_on_presentation_run,
##     [(try_begin),
##         (this_or_next|key_clicked, key_space),
##        (this_or_next|key_clicked, key_enter),
##        (this_or_next|key_clicked, key_escape),
##        (key_clicked, key_back_space),
##        (presentation_set_duration, 0),
##      (try_end),
##      ]),
    ]),


4  module_scripts  py

                          I.
line  19714

#normal_banner_begin
        (troop_get_slot, ":cur_banner", ":lord_troop_id", slot_troop_banner_scene_prop),
        (gt, ":cur_banner", 0),
        (val_sub, ":cur_banner", banner_scene_props_begin),
        (val_add, ":cur_banner", banner_map_icons_begin),
        (party_set_banner_icon, ":center_no", ":cur_banner"),
# custom_banner_begin
#        (troop_get_slot, ":flag_icon", ":lord_troop_id", slot_troop_custom_banner_map_flag_type),
#       (ge, ":flag_icon", 0),
#        (val_add, ":flag_icon", custom_banner_map_icons_begin),
#        (party_set_banner_icon, ":center_no", ":flag_icon"),
    (try_end),

#    (try_begin),
# (eq, 1, 0),
#      (eq, ":lord_troop_id", "trp_player"),
#      (neq, ":eek:ld_lord_troop_id", "trp_player"),
#       (party_get_slot, ":center_relation", ":center_no", slot_center_player_relation),
#       (is_between, ":center_relation", -4, 5),
#       (call_script, "script_change_player_relation_with_center", ":center_no", 5),
#      (gt, ":eek:ld_lord_troop_id", 0),
#       (call_script, "script_change_player_relation_with_troop", ":eek:ld_lord_troop_id", -25),
#  (try_end),

                      II
line 20606
#Setting the flag icon
      #normal_banner_begin
      (troop_get_slot, ":cur_banner", ":troop_no", slot_troop_banner_scene_prop),
      (try_begin),
        (gt, ":cur_banner", 0),
        (val_sub, ":cur_banner", banner_scene_props_begin),
        (val_add, ":cur_banner", banner_map_icons_begin),
        (party_set_banner_icon, "$pout_party", ":cur_banner"),
      #custom_banner_begin
    #(troop_get_slot, ":flag_icon", ":troop_no", slot_troop_custom_banner_map_flag_type),
    #(try_begin),
    #  (ge, ":flag_icon", 0),
    #  (val_add, ":flag_icon", custom_banner_map_icons_begin),
      #  (party_set_banner_icon, "$pout_party", ":flag_icon"),
      (try_end),


                            III

line 27624
# Output: none
  ("change_banners_and_chest",
    [(party_get_slot, ":cur_leader", "$g_encountered_party", slot_town_lord),
    (try_begin),
      (ge, ":cur_leader", 0),
#normal_banner_begin
      (troop_get_slot, ":troop_banner_object", ":cur_leader", slot_troop_banner_scene_prop),
      (gt, ":troop_banner_object", 0),
      (replace_scene_props, banner_scene_props_begin, ":troop_banner_object"),
    (else_try),
      (replace_scene_props, banner_scene_props_begin, "spr_empty"),
#custom_banner_begin
#      (troop_get_slot, ":flag_spr", ":cur_leader", slot_troop_custom_banner_flag_type),
#      (ge, ":flag_spr", 0),
#      (val_add, ":flag_spr", custom_banner_flag_scene_props_begin),
#      (replace_scene_props, banner_scene_props_begin, ":flag_spr"),
#    (else_try),
#      (replace_scene_props, banner_scene_props_begin, "spr_empty"),
    (try_end),
    (try_begin),
      (neq, ":cur_leader", "trp_player"),
      (replace_scene_props, "spr_player_chest", "spr_locked_player_chest"),
    (try_end),
    ]),

                        IV
line 33857

# script_place_player_banner_near_inventory
  # Input: none
  # Output: none

  ("place_player_banner_near_inventory",
    [
    #normal_banner_begin
    (troop_get_slot, ":troop_banner_object", "trp_player", slot_troop_banner_scene_prop),
    #custom_banner_begin
(troop_get_slot, ":flag_spr", "trp_player", slot_troop_custom_banner_flag_type),

    (try_begin),
    #normal_banner_begin
      (gt, ":troop_banner_object", 0),
      (scene_prop_get_instance, ":flag_object", ":troop_banner_object", 0),
    #custom_banner_begin
#      (ge, ":flag_spr", 0),
#       (val_add, ":flag_spr", custom_banner_flag_scene_props_begin),
#      (scene_prop_get_instance, ":flag_object", ":flag_spr", 0),
      (try_begin),

                      V

line 33907

# script_place_player_banner_near_inventory_bms
  # Input: none
  # Output: none

  ("place_player_banner_near_inventory_bms",
    [
        #normal_banner_begin
    (troop_get_slot, ":troop_banner_object", "trp_player", slot_troop_banner_scene_prop),
        #custom_banner_begin
#  (troop_get_slot, ":flag_spr", "trp_player", slot_troop_custom_banner_flag_type),
    (try_begin),
        #normal_banner_begin
      (gt, ":troop_banner_object", 0),
      (replace_scene_props, banner_scene_props_begin, ":troop_banner_object"),
        #custom_banner_begin
#      (ge, ":flag_spr", 0),
#      (val_add, ":flag_spr", custom_banner_flag_scene_props_begin),
#      (replace_scene_props, banner_scene_props_begin, ":flag_spr"),
    (try_end),
    ]),
                            VI
line  34958

#  # script_store_average_center_value_per_faction
# # Input: none
# # Output: none (sets $g_average_center_value_per_faction)
# ("store_average_center_value_per_faction",
#   [
#      (store_sub, ":num_towns", towns_end, towns_begin),
#     (store_sub, ":num_castles", castles_end, castles_begin),
#      (assign, ":num_factions", 0),
#      (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end),
#        (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active),
      (val_add, ":num_factions", 1),
#     (try_end),
#      (val_max, ":num_factions", 1),
    (store_mul, "$g_average_center_value_per_faction", ":num_towns", 2),
#      (val_add, "$g_average_center_value_per_faction", ":num_castles"),
#      (val_mul, "$g_average_center_value_per_faction", 10),
#      (val_div, "$g_average_center_value_per_faction", ":num_factions"),
#    ]),
                                  VII

line  35344 

#normal_banner_begin
      (troop_get_slot, ":banner", "trp_player", slot_troop_banner_scene_prop),
#custom_banner_begin
    (troop_get_slot, ":banner", "trp_player", slot_troop_custom_banner_flag_type),
      (store_random_in_range, ":renown_check", 100, 200),
5.  module_simple_triggers.py

line 400

#Banner selection menu
  (24,
  [
    (eq, "$g_player_banner_granted", 1),
    (troop_slot_eq, "trp_player", slot_troop_banner_scene_prop, 0),
    (le,"$auto_menu",0),
#normal_banner_begin
    (start_presentation, "prsnt_banner_selection"),
#custom_banner_begin
#    (start_presentation, "prsnt_custom_banner"),
    ]),

  # Party Morale: Move morale towards target value.
  (24,

6.  module_tableau_materials.py

                                  I.
line  784
## ("custom_banner", 0, "missiles", 256, 512, 0, 0, 0, 0,
##  [
##     (store_script_param, ":troop_no", 1),
##
##    (set_fixed_point_multiplier, 100),
##    (troop_get_slot, ":bg_type", ":troop_no", slot_troop_custom_banner_bg_type),
##    (val_add, ":bg_type", custom_banner_backgrounds_begin),
##     (troop_get_slot, ":bg_color_1", ":troop_no", slot_troop_custom_banner_bg_color_1),
##    (troop_get_slot, ":bg_color_2", ":troop_no", slot_troop_custom_banner_bg_color_2),
##    (troop_get_slot, ":num_charges", ":troop_no", slot_troop_custom_banner_num_charges),
##    (troop_get_slot, ":positioning", ":troop_no", slot_troop_custom_banner_positioning),
##    (call_script, "script_get_troop_custom_banner_num_positionings", ":troop_no"),
##     (assign, ":num_positionings", reg0),
##     (val_mod, ":positioning", ":num_positionings"),
##
##    (init_position, pos1),
##
##     (position_move_z, pos1, -10),
##    (cur_tableau_add_mesh_with_vertex_color, ":bg_type", pos1, 0, 0, ":bg_color_1"),
##    (position_move_z, pos1, -10),
##    (cur_tableau_add_mesh_with_vertex_color, "mesh_custom_banner_bg", pos1, 0, 0, ":bg_color_2"),
##    (init_position, pos1),
##    (position_move_z, pos1, -50),
##    (cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner", pos1, 0, 0),
##
##    (call_script, "script_get_custom_banner_charge_type_position_scale_color", "trp_player", ":positioning"),
##     (try_begin),
##      (ge, ":num_charges", 1),
##      (cur_tableau_add_mesh_with_vertex_color, reg0, pos0, reg1, 0, reg2),
##     (try_end),
##    (try_begin),
##      (ge, ":num_charges", 2),
##       (cur_tableau_add_mesh_with_vertex_color, reg3, pos1, reg4, 0, reg5),
##    (try_end),
##     (try_begin),
##      (ge, ":num_charges", 3),
##      (cur_tableau_add_mesh_with_vertex_color, reg6, pos2, reg7, 0, reg:cool:,
##     (try_end),
##    (try_begin),
##      (ge, ":num_charges", 4),
##      (cur_tableau_add_mesh_with_vertex_color, reg9, pos3, reg10, 0, reg11),
##    (try_end),
##
##    (cur_tableau_set_camera_parameters, 0, 100, 200, 0, 100000),
##    ]),

          II (?)
line  852  ( (?)- the change produced by chance )  -  remove all ##

##  ("retirement_troop", 0, "troop_portrait", 1024, 1024, 0, 0, 600, 600,
##  [
##    (store_script_param, ":type", 1),
##    (set_fixed_point_multiplier, 100),
##    (cur_tableau_set_background_color, 0x00000000),
##    (cur_tableau_set_ambient_light, 10,11,15),
##
##    (init_position, pos:cool:,
##    (position_set_x, pos8, -210),
##    (position_set_y, pos8, 200),
##    (position_set_z, pos8, 300),
##    (cur_tableau_add_point_light, pos8, 550,500,450),
##
##    (cur_tableau_set_override_flags, af_override_all),
##
##    (try_begin),
##      (eq, ":type", 0),
##      (cur_tableau_add_override_item, "itm_pilgrim_hood"),
##      (cur_tableau_add_override_item, "itm_pilgrim_disguise"),
##      (cur_tableau_add_override_item, "itm_wrapping_boots"),
##      (assign, ":animation", "anim_pose_1"),
##    (else_try),
##      (eq, ":type", 1),
##      (cur_tableau_add_override_item, "itm_black_hood"),
##      (cur_tableau_add_override_item, "itm_shirt"),
##      (cur_tableau_add_override_item, "itm_wrapping_boots"),
##      (assign, ":animation", "anim_pose_1"),
##    (else_try),
##      (eq, ":type", 2),
##      (cur_tableau_add_override_item, "itm_coarse_tunic"),
##      (cur_tableau_add_override_item, "itm_wrapping_boots"),
##      (assign, ":animation", "anim_pose_2"),
##    (else_try),
##      (eq, ":type", 3),
##      (cur_tableau_add_override_item, "itm_linen_tunic"),
##      (cur_tableau_add_override_item, "itm_woolen_hose"),
##      (assign, ":animation", "anim_pose_2"),
##    (else_try),
##      (eq, ":type", 4),
##      (cur_tableau_add_override_item, "itm_leather_apron"),
##      (cur_tableau_add_override_item, "itm_leather_boots"),
##      (assign, ":animation", "anim_pose_3"),
##    (else_try),
##      (eq, ":type", 5),
##      (cur_tableau_add_override_item, "itm_short_tunic"),
##      (cur_tableau_add_override_item, "itm_leather_boots"),
##      (assign, ":animation", "anim_pose_3"),
##    (else_try),
##      (eq, ":type", 6),
##      (cur_tableau_add_override_item, "itm_tabard"),
##      (cur_tableau_add_override_item, "itm_leather_boots"),
##      (assign, ":animation", "anim_pose_4"),
##    (else_try),
##      (eq, ":type", 7),
##      (cur_tableau_add_override_item, "itm_courtly_outfit"),
##      (cur_tableau_add_override_item, "itm_mail_boots"),
##      (assign, ":animation", "anim_pose_4"),
##    (else_try),
##      (eq, ":type", :cool:,
##      (cur_tableau_add_override_item, "itm_nobleman_outfit"),
##      (cur_tableau_add_override_item, "itm_woolen_hose"),
##      (assign, ":animation", "anim_pose_4"),
##    (else_try),
##      (eq, ":type", 9),
##      (cur_tableau_add_override_item, "itm_heraldic_mail_with_surcoat"),
##      (cur_tableau_add_override_item, "itm_mail_boots"),
##      (assign, ":animation", "anim_pose_5"),
##    (else_try),
##      (cur_tableau_add_override_item, "itm_heraldic_mail_with_tabard"),
##      (cur_tableau_add_override_item, "itm_iron_greaves"),
##      (assign, ":animation", "anim_pose_5"),
##    (try_end),
##
##    (init_position, pos2),
##    (cur_tableau_set_camera_parameters, 1, 6, 6, 10, 10000),
##
##    (init_position, pos5),
##    (position_set_z, pos5, 96),
##    (position_set_y, pos5, 350),
##
####    (troop_get_inventory_slot, ":horse_item", "trp_player", ek_horse),
####    (try_begin),
####      (gt, ":horse_item", 0),
####      (position_rotate_z, pos2, -40),
####      (cur_tableau_add_horse, ":horse_item", pos2, anim_horse_stand, 0),
####      (assign, ":animation", anim_ride_0),
####      (position_set_z, pos5, 125),
####      (position_set_y, pos5, 480),
####    (try_end),
##
##    (cur_tableau_add_troop, "trp_player", pos2, ":animation" , 0),
##
##    (position_rotate_x, pos5, -90),
##    (position_rotate_z, pos5, 180),
##    (cur_tableau_set_camera_position, pos5),
##    ]),





 
FALX said:
What kind of files and change the line


remove the marks  # #                in green lines  #  do not change!

1.  module_dialogs.py

line  14365             

#custom_banner  begin 
##    (eq, "trp_player", slot_troop_custom_banner_flag_type, -1),
#custom_banner  end
    ], "Can I fly my own banner?", "lord_mercenary_elaborate_banner", []],
  [anyone|plyr,"lord_mercenary_elaborate_1", [], "How much will you pay me for my service?", "lord_mercenary_elaborate_pay", []],
  [anyone|plyr,"lord_mercenary_elaborate_1", [], "Sounds good. I wish to enter your service as a mercenary.", "lord_mercenary_service_accept", []],
  [anyone|plyr,"lord_mercenary_elaborate_1", [], "Apologies, my sword is not for hire.", "lord_mercenary_service_reject", []],
...


2. module_game_menus.py

            I.
line 1965

#normal_banner_begin
            (start_presentation, "prsnt_banner_selection"),
# custom_banner_begin
#             (start_presentation, "prsnt_custom_banner"),
          (else_try),
            (change_screen_return, 0),
          (try_end),
          (set_show_messages, 1),
        ]),
      ("go_back_dot",[],"Go back.",[
        (jump_to_menu,"mnu_start_character_4"),
        ]),
    ]

**************
              II.
line  3280

  ("action_modify_banner",[(eq, "$cheat_mode", 1)],"{!}Cheat: Modify your banner.",
      [
          (start_presentation, "prsnt_banner_selection"),
      #  (start_presentation, "prsnt_custom_banner"),
        ]
      ),
      ("action_retire",[],"Retire from adventuring.",
      [(jump_to_menu, "mnu_retirement_verify"),
        ]
      ),
      ("camp_action_4",[],"Back to camp menu.",
      [(jump_to_menu, "mnu_camp"),
        ]
      ),
      ]



***! replace with :*********************************************

Code:
[color=navy]("action_modify_banner",[],"Modify your banner.",
       [
           (start_presentation, "prsnt_banner_selection"),
           (start_presentation, "prsnt_custom_banner"),
        ]
       ),
      ("action_retire",[],"Retire from adventuring.",
       [(jump_to_menu, "mnu_retirement_verify"),
        ]
       ),
      ("camp_action_4",[],"Back to camp menu.",
       [(jump_to_menu, "mnu_camp"),
        ]
       ),
      ]
  ),[/color]

*****************************
3  module_presentations py

                  I.
line 7543

("custom_banner", 0, mesh_load_window,
  [
    (ti_on_presentation_load,
      [
        (set_fixed_point_multiplier, 1000),
        (troop_get_slot, ":flag_type", "trp_player", slot_troop_custom_banner_flag_type),
        (val_max, ":flag_type", 0),
        (val_add, ":flag_type", custom_banner_flag_types_begin),
        (troop_get_slot, ":map_flag_type", "trp_player", slot_troop_custom_banner_map_flag_type),
        (val_max, ":map_flag_type", 0),
        (val_add, ":map_flag_type", custom_banner_flag_map_types_begin),
##        (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_custom_banner_1", ":flag_type", "tableau_custom_banner_square", "trp_player"),
        (troop_get_slot, ":bg_color_1", "trp_player", slot_troop_custom_banner_bg_color_1),
        (troop_get_slot, ":bg_color_2", "trp_player", slot_troop_custom_banner_bg_color_2),

                              II.   
line 7498  #Correcting banners according to the player banner
          #(assign, ":end_cond", active_npcs_end),
          #(try_for_range, ":cur_troop", original_kingdom_heroes_begin, ":end_cond"),
          #  (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
        # (str_store_troop_name, s7, ":cur_troop"),
        (display_message, "@DEBUGS : {s7}'s banner is changed"),
        #  (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
          #  (assign, ":end_cond", 0),
          #(try_end),

                    III.
line 8074
##    (ti_on_presentation_run,
##     [(try_begin),
##         (this_or_next|key_clicked, key_space),
##        (this_or_next|key_clicked, key_enter),
##        (this_or_next|key_clicked, key_escape),
##        (key_clicked, key_back_space),
##        (presentation_set_duration, 0),
##      (try_end),
##      ]),
    ]),


4  module_scripts  py

                          I.
line  19714

#normal_banner_begin
        (troop_get_slot, ":cur_banner", ":lord_troop_id", slot_troop_banner_scene_prop),
        (gt, ":cur_banner", 0),
        (val_sub, ":cur_banner", banner_scene_props_begin),
        (val_add, ":cur_banner", banner_map_icons_begin),
        (party_set_banner_icon, ":center_no", ":cur_banner"),
# custom_banner_begin
#        (troop_get_slot, ":flag_icon", ":lord_troop_id", slot_troop_custom_banner_map_flag_type),
#       (ge, ":flag_icon", 0),
#        (val_add, ":flag_icon", custom_banner_map_icons_begin),
#        (party_set_banner_icon, ":center_no", ":flag_icon"),
    (try_end),

#    (try_begin),
# (eq, 1, 0),
#      (eq, ":lord_troop_id", "trp_player"),
#      (neq, ":eek:ld_lord_troop_id", "trp_player"),
#       (party_get_slot, ":center_relation", ":center_no", slot_center_player_relation),
#       (is_between, ":center_relation", -4, 5),
#       (call_script, "script_change_player_relation_with_center", ":center_no", 5),
#      (gt, ":eek:ld_lord_troop_id", 0),
#       (call_script, "script_change_player_relation_with_troop", ":eek:ld_lord_troop_id", -25),
#  (try_end),

                      II
line 20606
#Setting the flag icon
      #normal_banner_begin
      (troop_get_slot, ":cur_banner", ":troop_no", slot_troop_banner_scene_prop),
      (try_begin),
        (gt, ":cur_banner", 0),
        (val_sub, ":cur_banner", banner_scene_props_begin),
        (val_add, ":cur_banner", banner_map_icons_begin),
        (party_set_banner_icon, "$pout_party", ":cur_banner"),
      #custom_banner_begin
    #(troop_get_slot, ":flag_icon", ":troop_no", slot_troop_custom_banner_map_flag_type),
    #(try_begin),
    #  (ge, ":flag_icon", 0),
    #  (val_add, ":flag_icon", custom_banner_map_icons_begin),
      #  (party_set_banner_icon, "$pout_party", ":flag_icon"),
      (try_end),


                            III

line 27624
# Output: none
  ("change_banners_and_chest",
    [(party_get_slot, ":cur_leader", "$g_encountered_party", slot_town_lord),
    (try_begin),
      (ge, ":cur_leader", 0),
#normal_banner_begin
      (troop_get_slot, ":troop_banner_object", ":cur_leader", slot_troop_banner_scene_prop),
      (gt, ":troop_banner_object", 0),
      (replace_scene_props, banner_scene_props_begin, ":troop_banner_object"),
    (else_try),
      (replace_scene_props, banner_scene_props_begin, "spr_empty"),
#custom_banner_begin
#      (troop_get_slot, ":flag_spr", ":cur_leader", slot_troop_custom_banner_flag_type),
#      (ge, ":flag_spr", 0),
#      (val_add, ":flag_spr", custom_banner_flag_scene_props_begin),
#      (replace_scene_props, banner_scene_props_begin, ":flag_spr"),
#    (else_try),
#      (replace_scene_props, banner_scene_props_begin, "spr_empty"),
    (try_end),
    (try_begin),
      (neq, ":cur_leader", "trp_player"),
      (replace_scene_props, "spr_player_chest", "spr_locked_player_chest"),
    (try_end),
    ]),

                        IV
line 33857

# script_place_player_banner_near_inventory
  # Input: none
  # Output: none

  ("place_player_banner_near_inventory",
    [
    #normal_banner_begin
    (troop_get_slot, ":troop_banner_object", "trp_player", slot_troop_banner_scene_prop),
    #custom_banner_begin
(troop_get_slot, ":flag_spr", "trp_player", slot_troop_custom_banner_flag_type),

    (try_begin),
    #normal_banner_begin
      (gt, ":troop_banner_object", 0),
      (scene_prop_get_instance, ":flag_object", ":troop_banner_object", 0),
    #custom_banner_begin
#      (ge, ":flag_spr", 0),
#       (val_add, ":flag_spr", custom_banner_flag_scene_props_begin),
#      (scene_prop_get_instance, ":flag_object", ":flag_spr", 0),
      (try_begin),

                      V

line 33907

# script_place_player_banner_near_inventory_bms
  # Input: none
  # Output: none

  ("place_player_banner_near_inventory_bms",
    [
        #normal_banner_begin
    (troop_get_slot, ":troop_banner_object", "trp_player", slot_troop_banner_scene_prop),
        #custom_banner_begin
#  (troop_get_slot, ":flag_spr", "trp_player", slot_troop_custom_banner_flag_type),
    (try_begin),
        #normal_banner_begin
      (gt, ":troop_banner_object", 0),
      (replace_scene_props, banner_scene_props_begin, ":troop_banner_object"),
        #custom_banner_begin
#      (ge, ":flag_spr", 0),
#      (val_add, ":flag_spr", custom_banner_flag_scene_props_begin),
#      (replace_scene_props, banner_scene_props_begin, ":flag_spr"),
    (try_end),
    ]),
                            VI
line  34958

#  # script_store_average_center_value_per_faction
# # Input: none
# # Output: none (sets $g_average_center_value_per_faction)
# ("store_average_center_value_per_faction",
#   [
#      (store_sub, ":num_towns", towns_end, towns_begin),
#     (store_sub, ":num_castles", castles_end, castles_begin),
#      (assign, ":num_factions", 0),
#      (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end),
#        (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active),
      (val_add, ":num_factions", 1),
#     (try_end),
#      (val_max, ":num_factions", 1),
    (store_mul, "$g_average_center_value_per_faction", ":num_towns", 2),
#      (val_add, "$g_average_center_value_per_faction", ":num_castles"),
#      (val_mul, "$g_average_center_value_per_faction", 10),
#      (val_div, "$g_average_center_value_per_faction", ":num_factions"),
#    ]),
                                  VII

line  35344 

#normal_banner_begin
      (troop_get_slot, ":banner", "trp_player", slot_troop_banner_scene_prop),
#custom_banner_begin
    (troop_get_slot, ":banner", "trp_player", slot_troop_custom_banner_flag_type),
      (store_random_in_range, ":renown_check", 100, 200),
5.  module_simple_triggers.py

line 400

#Banner selection menu
  (24,
  [
    (eq, "$g_player_banner_granted", 1),
    (troop_slot_eq, "trp_player", slot_troop_banner_scene_prop, 0),
    (le,"$auto_menu",0),
#normal_banner_begin
    (start_presentation, "prsnt_banner_selection"),
#custom_banner_begin
#    (start_presentation, "prsnt_custom_banner"),
    ]),

  # Party Morale: Move morale towards target value.
  (24,

6.  module_tableau_materials.py

                                  I.
line  784
## ("custom_banner", 0, "missiles", 256, 512, 0, 0, 0, 0,
##  [
##     (store_script_param, ":troop_no", 1),
##
##    (set_fixed_point_multiplier, 100),
##    (troop_get_slot, ":bg_type", ":troop_no", slot_troop_custom_banner_bg_type),
##    (val_add, ":bg_type", custom_banner_backgrounds_begin),
##     (troop_get_slot, ":bg_color_1", ":troop_no", slot_troop_custom_banner_bg_color_1),
##    (troop_get_slot, ":bg_color_2", ":troop_no", slot_troop_custom_banner_bg_color_2),
##    (troop_get_slot, ":num_charges", ":troop_no", slot_troop_custom_banner_num_charges),
##    (troop_get_slot, ":positioning", ":troop_no", slot_troop_custom_banner_positioning),
##    (call_script, "script_get_troop_custom_banner_num_positionings", ":troop_no"),
##     (assign, ":num_positionings", reg0),
##     (val_mod, ":positioning", ":num_positionings"),
##
##    (init_position, pos1),
##
##     (position_move_z, pos1, -10),
##    (cur_tableau_add_mesh_with_vertex_color, ":bg_type", pos1, 0, 0, ":bg_color_1"),
##    (position_move_z, pos1, -10),
##    (cur_tableau_add_mesh_with_vertex_color, "mesh_custom_banner_bg", pos1, 0, 0, ":bg_color_2"),
##    (init_position, pos1),
##    (position_move_z, pos1, -50),
##    (cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner", pos1, 0, 0),
##
##    (call_script, "script_get_custom_banner_charge_type_position_scale_color", "trp_player", ":positioning"),
##     (try_begin),
##      (ge, ":num_charges", 1),
##      (cur_tableau_add_mesh_with_vertex_color, reg0, pos0, reg1, 0, reg2),
##     (try_end),
##    (try_begin),
##      (ge, ":num_charges", 2),
##       (cur_tableau_add_mesh_with_vertex_color, reg3, pos1, reg4, 0, reg5),
##    (try_end),
##     (try_begin),
##      (ge, ":num_charges", 3),
##      (cur_tableau_add_mesh_with_vertex_color, reg6, pos2, reg7, 0, reg:cool:,
##     (try_end),
##    (try_begin),
##      (ge, ":num_charges", 4),
##      (cur_tableau_add_mesh_with_vertex_color, reg9, pos3, reg10, 0, reg11),
##    (try_end),
##
##    (cur_tableau_set_camera_parameters, 0, 100, 200, 0, 100000),
##    ]),

          II (?)
line  852  ( (?)- the change produced by chance )  -  remove all ##

##  ("retirement_troop", 0, "troop_portrait", 1024, 1024, 0, 0, 600, 600,
##  [
##    (store_script_param, ":type", 1),
##    (set_fixed_point_multiplier, 100),
##    (cur_tableau_set_background_color, 0x00000000),
##    (cur_tableau_set_ambient_light, 10,11,15),
##
##    (init_position, pos:cool:,
##    (position_set_x, pos8, -210),
##    (position_set_y, pos8, 200),
##    (position_set_z, pos8, 300),
##    (cur_tableau_add_point_light, pos8, 550,500,450),
##
##    (cur_tableau_set_override_flags, af_override_all),
##
##    (try_begin),
##      (eq, ":type", 0),
##      (cur_tableau_add_override_item, "itm_pilgrim_hood"),
##      (cur_tableau_add_override_item, "itm_pilgrim_disguise"),
##      (cur_tableau_add_override_item, "itm_wrapping_boots"),
##      (assign, ":animation", "anim_pose_1"),
##    (else_try),
##      (eq, ":type", 1),
##      (cur_tableau_add_override_item, "itm_black_hood"),
##      (cur_tableau_add_override_item, "itm_shirt"),
##      (cur_tableau_add_override_item, "itm_wrapping_boots"),
##      (assign, ":animation", "anim_pose_1"),
##    (else_try),
##      (eq, ":type", 2),
##      (cur_tableau_add_override_item, "itm_coarse_tunic"),
##      (cur_tableau_add_override_item, "itm_wrapping_boots"),
##      (assign, ":animation", "anim_pose_2"),
##    (else_try),
##      (eq, ":type", 3),
##      (cur_tableau_add_override_item, "itm_linen_tunic"),
##      (cur_tableau_add_override_item, "itm_woolen_hose"),
##      (assign, ":animation", "anim_pose_2"),
##    (else_try),
##      (eq, ":type", 4),
##      (cur_tableau_add_override_item, "itm_leather_apron"),
##      (cur_tableau_add_override_item, "itm_leather_boots"),
##      (assign, ":animation", "anim_pose_3"),
##    (else_try),
##      (eq, ":type", 5),
##      (cur_tableau_add_override_item, "itm_short_tunic"),
##      (cur_tableau_add_override_item, "itm_leather_boots"),
##      (assign, ":animation", "anim_pose_3"),
##    (else_try),
##      (eq, ":type", 6),
##      (cur_tableau_add_override_item, "itm_tabard"),
##      (cur_tableau_add_override_item, "itm_leather_boots"),
##      (assign, ":animation", "anim_pose_4"),
##    (else_try),
##      (eq, ":type", 7),
##      (cur_tableau_add_override_item, "itm_courtly_outfit"),
##      (cur_tableau_add_override_item, "itm_mail_boots"),
##      (assign, ":animation", "anim_pose_4"),
##    (else_try),
##      (eq, ":type", :cool:,
##      (cur_tableau_add_override_item, "itm_nobleman_outfit"),
##      (cur_tableau_add_override_item, "itm_woolen_hose"),
##      (assign, ":animation", "anim_pose_4"),
##    (else_try),
##      (eq, ":type", 9),
##      (cur_tableau_add_override_item, "itm_heraldic_mail_with_surcoat"),
##      (cur_tableau_add_override_item, "itm_mail_boots"),
##      (assign, ":animation", "anim_pose_5"),
##    (else_try),
##      (cur_tableau_add_override_item, "itm_heraldic_mail_with_tabard"),
##      (cur_tableau_add_override_item, "itm_iron_greaves"),
##      (assign, ":animation", "anim_pose_5"),
##    (try_end),
##
##    (init_position, pos2),
##    (cur_tableau_set_camera_parameters, 1, 6, 6, 10, 10000),
##
##    (init_position, pos5),
##    (position_set_z, pos5, 96),
##    (position_set_y, pos5, 350),
##
####    (troop_get_inventory_slot, ":horse_item", "trp_player", ek_horse),
####    (try_begin),
####      (gt, ":horse_item", 0),
####      (position_rotate_z, pos2, -40),
####      (cur_tableau_add_horse, ":horse_item", pos2, anim_horse_stand, 0),
####      (assign, ":animation", anim_ride_0),
####      (position_set_z, pos5, 125),
####      (position_set_y, pos5, 480),
####    (try_end),
##
##    (cur_tableau_add_troop, "trp_player", pos2, ":animation" , 0),
##
##    (position_rotate_x, pos5, -90),
##    (position_rotate_z, pos5, 180),
##    (cur_tableau_set_camera_position, pos5),
##    ]),
OH MY GOD! He did it! You are impressionist FALX
 
Caba`drin said:
Quite kind of you FALX. I would have told them to load up Notepad++ or WinMerge and do a compare for differences between the source you provided and Native... heh.

      :grin:      I'm easier for other users to this  "Sisyphean task", that would not do mods personally .


____________________________


    Another good thing would be to fix problems with the positioning of buttons and transparent textures flags.  Need help.  :smile:
 
SkyShadowing said:
So does this work fully? I'm eager to add it to my mod, but I want to wait until everything's finished. Appear on armor, properly in game, etc.?

That case is pending, there are small flaws. But for a particular mode of development, more preferably to remake all the original emblems and colors. You can already feel the original work in this game, and then  improve over time.
 
Back
Top Bottom