Recent content by LoneFennec

  1. LoneFennec

    1heraldic banner per faction

    I made some progress, now the lords change banner when defecting to a clan, all of them change to 1 specific banner as you will see in the picture below, castles and towns change their banner to the new lords new banner, not sure if it will work a 2nd time.
    it's still buggy as they all change to one random banner, not sure if they will change again if they change clan again, and sometimes they don't change, needs more testing.
    iANmFNT.png
    The lords with the yellow eagle flags are lords defected from the Akamatsu clan(the faction being besieged) to Amago clan (the faction doing the besieging)
    I've been messing around with the codes I've found in the forum, trying this and that, understanding what this and that do. and apparently doing this will give the results I have so far.
    Python:
        ("initialize_troop_banners",
        [        
    ######## WOTS one banner per faction start ########
          #faction banners
          (faction_set_slot, "fac_kingdom_1", slot_faction_banner, "mesh_banner_Akamatsu"),  #Akamatsu Clan
          (faction_set_slot, "fac_kingdom_2", slot_faction_banner, "mesh_banner_Akizuki"),   #Akizuki Clan
          (faction_set_slot, "fac_kingdom_3", slot_faction_banner, "mesh_banner_Amago"),     #Amago Clan
          (faction_set_slot, "fac_kingdom_4", slot_faction_banner, "mesh_banner_Anegakoji"), #Anegakoji Clan
          (faction_set_slot, "fac_kingdom_5", slot_faction_banner, "mesh_banner_Anto"),      #Anto Clan
          (faction_set_slot, "fac_kingdom_6", slot_faction_banner, "mesh_banner_Arima"),     #Arima Clan
       
          (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
            (faction_get_slot, ":cur_faction_king", ":cur_faction", slot_faction_leader),
            (faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner),
            (val_sub, ":cur_faction_banner", banner_meshes_begin),
            (val_add, ":cur_faction_banner", banner_scene_props_begin),
            (troop_set_slot, ":cur_faction_king", slot_troop_banner_scene_prop, ":cur_faction_banner"),
          (try_end),
    
          (try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
            (this_or_next|troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
            (troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_inactive_pretender),
    
            (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
            (neg|faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
    
            (try_begin),
              (eq, ":kingdom_hero_faction", "fac_kingdom_1"), #Akamatsu Clan
              (faction_get_slot, ":cur_faction_banner", "fac_kingdom_1", slot_faction_banner),
              (val_sub, ":cur_faction_banner", banner_meshes_begin),
              (val_add, ":cur_faction_banner", banner_scene_props_begin),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":cur_faction_banner"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_2"), #Akizuki Clan
              (faction_get_slot, ":cur_faction_banner", "fac_kingdom_2", slot_faction_banner),
              (val_sub, ":cur_faction_banner", banner_meshes_begin),
              (val_add, ":cur_faction_banner", banner_scene_props_begin),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":cur_faction_banner"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Amago Clan
              (faction_get_slot, ":cur_faction_banner", "fac_kingdom_3", slot_faction_banner),
              (val_sub, ":cur_faction_banner", banner_meshes_begin),
              (val_add, ":cur_faction_banner", banner_scene_props_begin),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":cur_faction_banner"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_4"), #Anegakoji Clan
              (faction_get_slot, ":cur_faction_banner", "fac_kingdom_4", slot_faction_banner),
              (val_sub, ":cur_faction_banner", banner_meshes_begin),
              (val_add, ":cur_faction_banner", banner_scene_props_begin),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":cur_faction_banner"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_5"), #Anto Clan
              (faction_get_slot, ":cur_faction_banner", "fac_kingdom_5", slot_faction_banner),
              (val_sub, ":cur_faction_banner", banner_meshes_begin),
              (val_add, ":cur_faction_banner", banner_scene_props_begin),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":cur_faction_banner"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_6"), #Arima Clan
              (faction_get_slot, ":cur_faction_banner", "fac_kingdom_6", slot_faction_banner),
              (val_sub, ":cur_faction_banner", banner_meshes_begin),
              (val_add, ":cur_faction_banner", banner_scene_props_begin),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":cur_faction_banner"),
            (try_end),
          (try_end),
    
        #    (try_begin),
        #      (this_or_next|lt, ":banner_id", banner_scene_props_begin),
        #      (gt, ":banner_id", banner_scene_props_end_minus_one),
        #      (display_message, "@{!}ERROR: Not enough banners for heroes!"),
        #    (try_end),######## WOTS one banner per faction end ########
          ]),
    Python:
    ######## WOTS one banner per faction start ########
        ### Change banner start ###
          (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
            (faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner),
            (faction_get_slot, ":banner", ":faction_no", slot_faction_banner),
            (troop_set_slot, ":troop_no", slot_troop_banner_scene_prop, ":banner"),
            # (val_sub, ":cur_faction_banner", clans_banner_meshes_begin),
            # (val_add, ":cur_faction_banner", clans_banner_scene_props_begin),
            (troop_set_slot, ":troop_no", slot_troop_banner_scene_prop, ":cur_faction_banner"),
          (try_end),
        ### Change banner end ###
    ######## WOTS one banner per faction end ########

    what do you think? is there a way to improve it?
    Thanks!
  2. LoneFennec

    Making AI lords update their banner when they join another faction

    Ok so I have added these few lines to "change_troop_faction" (module_scripts.py):

    Code:
            #Change banner
    (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
            (faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner),
            (val_sub, ":cur_faction_banner", banner_meshes_begin),
            (val_add, ":cur_faction_banner", banner_scene_props_begin),
            (troop_set_slot, ":troop_no", slot_troop_banner_scene_prop, ":cur_faction_banner"),
          (try_end),
    After a few moments in-game the lord's banner is updated in the presentation notes, the banner of the settlements he owns are changed as well, but his own party flag remains the same on the map..
    E.g.:
    uqHpGpM.png

    1bwBHuo.png

    Z3cmECo.png
    UqcXiQ4.png

    rL8CJMK.png

    Ufo1oXs.png

    Any ideas on what could be missing in order to update the party's flag as well?

    Edit 1- The flag actually does get updated - after the lord has been defeated in battle. The 'new' party spawns with the right banner. Problem solved :smile:

    Edit 2- And it happens only once, so if the player has convinced a lord of joining their faction, and then changes their banner, the lord's banner will remain the one of when he joined the faction
    I tried your code and it didn't work for me. Trying to do the same thing as you, no matter what I do the lords won't update their banner for both castles/towns inside banners and outside flags and parties banner as well
  3. LoneFennec

    1heraldic banner per faction

    1) Assigning all lords a kingdom banner.
    Find this
    Python:
    # Assign banners and renown.
    # We assume there are enough banners for all kingdom heroes.
    
          #faction banners
          (faction_set_slot, "fac_kingdom_1", slot_faction_banner, "mesh_banner_kingdom_f"),
          (faction_set_slot, "fac_kingdom_2", slot_faction_banner, "mesh_banner_kingdom_b"),
          (faction_set_slot, "fac_kingdom_3", slot_faction_banner, "mesh_banner_kingdom_c"),
          (faction_set_slot, "fac_kingdom_4", slot_faction_banner, "mesh_banner_kingdom_a"),
          (faction_set_slot, "fac_kingdom_5", slot_faction_banner, "mesh_banner_kingdom_d"),
          (faction_set_slot, "fac_kingdom_6", slot_faction_banner, "mesh_banner_kingdom_e"),

    Paste code
    Python:
          (try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
            (troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
            (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
            (faction_get_slot, ":banner", ":kingdom_hero_faction", slot_faction_banner),
            (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner"),
          (try_end),
    And delete code after
    Python:
          (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
            (faction_get_slot, ":cur_faction_king", ":cur_faction", slot_faction_leader),
            (faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner),
            (val_sub, ":cur_faction_banner", banner_meshes_begin),
            (val_add, ":cur_faction_banner", banner_scene_props_begin),
            (troop_set_slot, ":cur_faction_king", slot_troop_banner_scene_prop, ":cur_faction_banner"),
          (try_end),
          (assign, ":num_khergit_lords_assigned", 0),
          (assign, ":num_sarranid_lords_assigned", 0),
          (assign, ":num_other_lords_assigned", 0),
             
          (try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
            (this_or_next|troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
            (troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_inactive_pretender),
         
            (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
            (neg|faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
            (try_begin),
              (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
              (store_add, ":kingdom_3_banners_begin", banner_scene_props_begin, khergit_banners_begin_offset),
              (store_add, ":banner_id", ":kingdom_3_banners_begin", ":num_khergit_lords_assigned"),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
              (val_add, ":num_khergit_lords_assigned", 1),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_6"), #Sarranid Sultanate
              (store_add, ":kingdom_6_banners_begin", banner_scene_props_begin, sarranid_banners_begin_offset),
              (store_add, ":banner_id", ":kingdom_6_banners_begin", ":num_sarranid_lords_assigned"),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
              (val_add, ":num_sarranid_lords_assigned", 1),
            (else_try),
              (assign, ":hero_offset", ":num_other_lords_assigned"),
              (try_begin),
                (gt, ":hero_offset", khergit_banners_begin_offset),#Do not add khergit banners to other lords
                (val_add, ":hero_offset", khergit_banners_end_offset),
                (val_sub, ":hero_offset", khergit_banners_begin_offset),
              (try_end),
              (try_begin),
                (gt, ":hero_offset", sarranid_banners_begin_offset),#Do not add sarranid banners to other lords
                (val_add, ":hero_offset", sarranid_banners_end_offset),
                (val_sub, ":hero_offset", sarranid_banners_begin_offset),
              (try_end),
              (store_add, ":banner_id", banner_scene_props_begin, ":hero_offset"),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
              (val_add, ":num_other_lords_assigned", 1),
            (try_end),
            (try_begin),
              (this_or_next|lt, ":banner_id", banner_scene_props_begin),
              (gt, ":banner_id", banner_scene_props_end_minus_one),
              (display_message, "@{!}ERROR: Not enough banners for heroes!"),
            (try_end),

    2) Lord joins faction
    Find
    Python:
          (troop_set_faction, ":troop_no", ":faction_no"),
          (troop_set_slot, ":troop_no", slot_troop_recruitment_random, 0),
          (troop_set_slot, ":troop_no", slot_lord_recruitment_argument, 0),
          (troop_set_slot, ":troop_no", slot_lord_recruitment_candidate, 0),
          (troop_set_slot, ":troop_no", slot_troop_promised_fief, 0),

    and paste code below
    Python:
          (faction_get_slot, ":banner", ":faction_no", slot_faction_banner),
          (troop_set_slot, ":troop_no", slot_troop_banner_scene_prop, ":banner"),

    3) Find and fix possible bugs. For example, for claymant quest or rebellion.

    EDIT: apparently it doesn't work properly. The banners will change inside the castle normally, but lords and castles/towns never change the banner. plus the banner seems randomized, so each start each clan has a flag.

    EDIT 2: fixed the randomization of banners. But still no luck in the banner changing, it seems like they don't check or update the banners at all.
  4. LoneFennec

    1heraldic banner per faction

    Quoted the above from the Discord server, and was advised to start a post here. Can someone enlighten me or show me the way on how to do the above? wanting 1 heraldic banner per 1 faction that when one lord defect he change to his new faction banner. Hope someone can help, thanks!
  5. LoneFennec

    B Tutorial Scenes Scening - a definitive guide by Veledentella

    Great Guide!! Thank you! I actually learned a lot of stuff I didn't know before! I know some people who are interested in scenes making but they don't find enough documentations for it, I try to help when I can with things I know, this will be a great help to them and might even light the torch for those who are on the fence, I'll make sure to share it with all of who are interested (and who are not :smile: )
  6. LoneFennec

    Diplomacy for 1.174

    a question not sure if it was asked or if this is not the place to ask.

    Diplomacy is not compatible with wreck?

    I tried it earlier, everything works correctly aside from the snippets of codes diplomacy adds after the ending of the brackets. so no matter what I do, wreck can't define them.

    want to know to see if I should wasting my time if it's not possible. Thanks
  7. LoneFennec

    OSP Code Campaign Field army - Separated player warband

    You are free to add the other things into the script by yourself. For the NPC lords that would probably require changes at the AI scripts, that's a hazzle most try to avoid.
    I'll definitely try to mess with code, it will be a great fun and learning experience at the same time.
  8. LoneFennec

    OSP Kit Campaign Trade with caravans

    No, it allows the player to approach the caravan and be able to trade with them.
    Thank you for clearing things for me, I appreciate it.
  9. LoneFennec

    OSP Code SP Scalable World Map

    Great! Hade a lot of problems with bigger maps! thank you!
  10. LoneFennec

    OSP Kit Campaign Trade with caravans

    hope I understood better, this OSP allow the player to have many caravans and send them to trade?
    thanks
  11. LoneFennec

    OSP Code Campaign Field army - Separated player warband

    Its a nice addition, it would be great to make them expensive since they warband(hehe) leader not only needs money to pay his men, he also needs it to buy food...etc
    Also adding a condition that you need a certain level of leadership to control certain number of bands, meaning having high level leadership can be more useful. also I think allowing npc lords be able to deploy warbands would be great as well depending on the lord's leadership level, will help small kingdoms have another way to defend themselves or even when invading, it opens a lot of new ways of attacking and defending.

    thanks again for the work!
  12. LoneFennec

    OSP Code SP Better looking dialog scenes

    Great work, it will prove useful and helpful when trying to create a cut scene in game for an event or to share a story!
  13. LoneFennec

    LSP Kit QoL Troop Diversification with Random Items - Bags & Bottles LSP Code Kit

    This is great and it will improve the visual during battles.

    Wondering though can that be used outside of battle? Let's say you are wondering a town, will it be possible to make the soldiers on patrol wear some random items as well?

    and a great thanks for a great worker!
  14. LoneFennec

    OSP Campaign A Feudal Map of the World, 2.0: Granting fiefs interactively using the map

    Great Work and great improvements to the previous OSP.
    I really like the part where it will only be possible to grant fiefs through the minister and the report one can only let you view the holds, it keep it more immersive.

    A question, will it be possible to upgrade the graphics by using the Fire arrow presentation suggested in your first version of the osp.
    It will be great to see an update to the graphics!

    other than that, I'm happy to see talented people still modding warband, it bring tears to my eyes *snif snif*
  15. LoneFennec

    Gekokujo Discord channel

    I'll join
Back
Top Bottom