Search results for query: *

  1. John25-

    Force dismounted units in multiplayer

    Hello, I have created multiplayers maps that can be played in battle mode. However, one of them should be played without mounted units for this game type. What should I do for this to happen, considering this situation only applies to this map and only in battle mode? (i.e. not a problem to...
  2. John25-

    AI lords won't apply skill

    Ok, got it. It does work like a charm as you say!
  3. John25-

    AI lords won't apply skill

    I've added the import line at the top of module_mission_templates, solves the "skl_surgery" issue. Thanks

    Add a test display message at a few points to make sure it is firing. It should work as written, after importing header_skills of course.

    Just to make sure, you know how to add new triggers to missions, right?

    But no change on the battlefield. I reckon I am not familiar with triggers and missions, what should I do exactly?
  4. John25-

    AI lords won't apply skill

    Thanks for your quick reply. I've tested after updating module_mission_templates but it didn't work; all non-hero enemies still get killed.

    + For some reason I had the following issue when compiling:
    0wuuDXj.png


    I'm quite surprised it requires to be written "skl_surgery" to be compiled without error, for we can find the same writing in module_scripts ("get_quest"):
    (store_skill_level, ":cur_surgery_skill", skl_surgery, ":stack_troop"),

    Anyway, I've tested both but writing either skl_surgery or "skl_surgery" doesn't affect the final result: it doesn't seem to work.. :sad:
  5. John25-

    AI lords won't apply skill

    Hello, After giving AI lords 'knows_surgery_7', the skill does appear in their character window, but it is not applied in battles. Here is an example: Based on this post I thought it would be fine, but I guess it only works when the lord is a member of player's party; player then benefits...
  6. John25-

    Level up at start of campaign problem

    Hello,

    I also encountered this issue some time ago: link.

    This solution might help you even though it is only about avoiding the extra xp, not looking into your modifications
  7. John25-

    Edit number of Tournament rounds?

    Hello,

    (4 years later but all good if someone still wants to know the answer to this question lol)


    From what I know, you need the module system. In module_scripts.py, look for these various scripts:
    # script_fill_tournament_participants_troop
    Code:
    (try_for_range, ":cur_slot", ":begin_slot", 64),

    # script_get_num_tournament_participants
    Code:
    (try_for_range, ":cur_slot", 0, 64),

    # script_get_random_tournament_participant
    Code:
    (try_for_range, ":cur_slot", 0, 64),

    # script_add_tournament_participant
    Code:
    (try_for_range, ":cur_slot", 0, 64),

    # script_sort_tournament_participant_troops
    Code:
    (try_for_range, ":cur_slot_2", ":cur_slot_2_begin", 64),

    # script_remove_tournament_participants_randomly
    Code:
    (try_for_range, ":cur_slot", 0, 64),
    And
    Code:
    (try_for_range, ":cur_slot", 0, 64),

    Then change the value 64 to the multiple you wish (2, 4, 8, 16, 32, 64, 128, 256, ...). The number of rounds will vary depending on this.


    And one last script you need to change:
    # script_sort_tournament_participant_troops
    Code:
    (try_for_range, ":cur_slot", 0, 63),
    Which will be your chosen number - 1.
    E.g. 1, 3, 7, 15, 31, 63, 127, 255, ...
  8. John25-

    Faction orders: 'Vassals still need time to attend their own business'

    Hi there, does anyone know how to reduce the amount of time needed for vassals to 'attend their own business'? I am working on a mod with smaller factions (only 5/6 lords in each) and smaller parties as well. But after approx. 10 to 15 days of campaign, faction orders change to inactivity and...
  9. John25-

    In-game texture are wacky for some mod resources

    In the case of the sword, I think you should also check the material and texture have been imported to your .brf file. This is usually what happens when the game is not able to read them.

    sNJbE8e.png
  10. John25-

    Removing lords' ages and family relations?

    Age should be removed via module_strings.py:
    Code:
      ("_age_reg1_family_", "^Age: {reg1}^Family:"),

    You can replace this line with:
    Code:
      ("_age_reg1_family_", " "),
    But if you remove age from game_start only, you will likely get an error such as Age: 0 in character notes



    Then if you want to remove family relations, you should look for specific pieces of coding inside initialize_aristocracy, such as:
    Code:
                    (troop_set_slot, slot_troop_father)
                    (troop_set_slot, slot_troop_mother)
                    (troop_set_slot, slot_troop_spouse)
                    (troop_set_slot, slot_troop_guardian)
    Removing all those lines will prevent affiliation among AI characters, no need to delete the whole initialize_aristocracy script. But this would have an impact on gameplay, maybe you should prevent family relations from being shown in notes instead - via game_get_troop_note (module_scripts.py)

    If I were you, I would simply change this:
    Code:
          #Family notes
          (try_begin),
            (this_or_next|is_between, ":troop_no", lords_begin, kingdom_ladies_end),
            (eq, ":troop_no", "trp_player"),
            (neg|is_between, ":troop_no", pretenders_begin, pretenders_end),

    And make it look like this:
    Code:
          #Family notes
          (try_begin),
            (is_between, ":troop_no", mercenary_troops_begin, mercenary_troops_end),
    Family relations are not affected but they are disabled in character notes
  11. John25-

    Troop Items in Freelancer

    Getting back to you after looking at your source files: you should use itp_type_crossbow instead of itp_type_musket and it will work fine.
    However, you will also have to deal with ammo (itp_type_bolts instead of itp_type_bullets), meshes, sounds, etc.
  12. John25-

    Heraldic items for custom banner

    Hello, in camp menu I have added an option for creating a custom banner via prsnt_custom_banner*. It works well with the banner on the map** But it doesn't work with heraldic items, towns/castles, and also does not show up in character notes. Is there any way to make them use custom banners...
  13. John25-

    Staying?

    Yes they do, so you need both: money and food. It's all about logistics :smile:
  14. John25-

    What exactly causes this? The helmet model won't align with the head for some reason.

    Otherwise you can move and rotate the item via openBRF if you are not using the module system
  15. John25-

    Staying?

    If you leave the place and come back then the "Wait here for some time" option will not appear in the menu. But if you are already staying in town and do not leave, you will be staying for free :fruity:
  16. John25-

    Renown/Controversy problem

    I have had a closer look at the issue and ways to solve it.

    In regards to family relations, your initialize_aristocracy should look like this (let's add ages and family relations at the end, those I have written are only an example):
    Code:
        ("initialize_aristocracy",
        [
          #LORD OCCUPATIONS, BLOOD RELATIONSHIPS, RENOWN AND REPUTATIONS
     
          #King ages
          (try_for_range, ":cur_troop", kings_begin, kings_end),
            (troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_hero),
            (store_random_in_range, ":age", 50, 60),
            (troop_set_slot, ":cur_troop", slot_troop_age, ":age"),
            (eq, ":cur_troop", "trp_kingdom_5_lord"),
            (troop_set_slot, ":cur_troop", slot_troop_age, 47),
          (try_end),
      
          #The first thing - family structure
          #lords 1 to 8 are patriarchs with one live-at-home son and one daughter. They come from one of six possible ancestors, thus making it likely that there will be two sets of siblings
          #lords 9 to 12 are unmarried landowners with sisters
          #lords 13 to 20 are sons who still live in their fathers' houses
          #For the sake of simplicity, we can assume that all male aristocrats in prior generations either married commoners or procured their brides from the Old Country, thus discounting intermarriage
    
          (try_for_range, ":cur_troop", kingdom_ladies_begin, kingdom_ladies_end),
            (troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_lady),
          (try_end),
     
          (assign, ":cur_lady", "trp_kingdom_1_lady_1"),
    
          (try_for_range, ":cur_troop", lords_begin, lords_end),
            (troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_hero),
     
    #        (store_random_in_range, ":father_age_at_birth", 23, 26),
    #        (store_random_in_range, ":mother_age_at_birth", 19, 22),
     
            (try_begin),
                (is_between, ":cur_troop", "trp_knight_1_1", "trp_knight_2_1"),
                (store_sub, ":npc_seed", ":cur_troop", "trp_knight_1_1"),
                (assign, ":ancestor_seed", 1),
    
            (else_try),
                (is_between, ":cur_troop", "trp_knight_2_1", "trp_knight_3_1"),
                (store_sub, ":npc_seed", ":cur_troop", "trp_knight_2_1"),
                (assign, ":ancestor_seed", 7),
      
            (else_try),
                (is_between, ":cur_troop", "trp_knight_3_1", "trp_knight_4_1"),
                (store_sub, ":npc_seed", ":cur_troop", "trp_knight_3_1"),
                (assign, ":ancestor_seed", 13),
      
            (else_try),
                (is_between, ":cur_troop", "trp_knight_4_1", "trp_knight_5_1"),
                (store_sub, ":npc_seed", ":cur_troop", "trp_knight_4_1"),
                (assign, ":ancestor_seed", 19),
    
            (else_try),
                (is_between, ":cur_troop", "trp_knight_5_1", "trp_knight_6_1"),
                (store_sub, ":npc_seed", ":cur_troop", "trp_knight_5_1"),
                (assign, ":ancestor_seed", 25),
      
            (else_try),
                (is_between, ":cur_troop", "trp_knight_6_1", "trp_kingdom_1_pretender"),
                (store_sub, ":npc_seed", ":cur_troop", "trp_knight_6_1"),
                (assign, ":ancestor_seed", 31),
      
            (try_end),
     
     
            (try_begin),
                (lt, ":npc_seed", 8), #NPC seed is the order in the faction
                (assign, ":reputation", ":npc_seed"),
                (store_random_in_range, ":age", 45, 64),
      
                (store_random_in_range, ":father", 0, 6), #six possible fathers
                (val_add, ":father", ":ancestor_seed"),
    #            (troop_set_slot, ":cur_troop", slot_troop_father, ":father"),
      
                #wife
    #            (troop_set_slot, ":cur_troop", slot_troop_spouse, ":cur_lady"),
    #            (troop_set_slot, ":cur_lady", slot_troop_spouse, ":cur_troop"),
                (store_random_in_range, ":wife_reputation", 20, 26),
                (try_begin),
                    (eq, ":wife_reputation", 20),
                    (assign, ":wife_reputation", lrep_conventional),
                (try_end),
                (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":wife_reputation"),
      
      
                (call_script, "script_init_troop_age", ":cur_lady", 49),
                (call_script, "script_add_lady_items", ":cur_lady"),
      
                (val_add, ":cur_lady", 1),
    
                #daughter
    #            (troop_set_slot, ":cur_lady", slot_troop_father, ":cur_troop"),
    #            (store_sub, ":mother", ":cur_lady", 1),
                (call_script, "script_init_troop_age", ":cur_lady", 19),
    #            (troop_set_slot, ":cur_lady", slot_troop_mother, ":mother"),
                (store_random_in_range, ":lady_reputation", lrep_conventional, 34), #33% chance of father-derived
                (try_begin),
                    (le, ":lady_reputation", 25),
                    (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":lady_reputation"),
                (else_try),
                    (eq, ":lady_reputation", 26),
                    (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_conventional),
                (else_try),
                    (eq, ":lady_reputation", 27),
                    (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_moralist),
                (else_try),
                    (assign, ":guardian_reputation", ":reputation"),
                    (try_begin),
                        (this_or_next|eq, ":guardian_reputation", lrep_martial),
                            (eq, ":guardian_reputation", 0),
                        (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_conventional),
                    (else_try),
                        (eq, ":guardian_reputation", lrep_quarrelsome),
                        (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_otherworldly),
                    (else_try),
                        (eq, ":guardian_reputation", lrep_selfrighteous),
                        (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_ambitious),
                    (else_try),
                        (eq, ":guardian_reputation", lrep_cunning),
                        (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_adventurous),
                    (else_try),
                        (eq, ":guardian_reputation", lrep_goodnatured),
                        (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_adventurous),
                    (else_try),
                        (eq, ":guardian_reputation", lrep_debauched),
                        (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_ambitious),
                    (else_try),
                        (eq, ":guardian_reputation", lrep_upstanding),
                        (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_moralist),
                    (try_end),
                (try_end),
      
                (call_script, "script_add_lady_items", ":cur_lady"),
                (val_add, ":cur_lady", 1),
                #high renown
    
            (else_try),    #Older unmarried lords
                (is_between, ":npc_seed", 8, 12),
      
                (store_random_in_range, ":age", 25, 36), 
                (store_random_in_range, ":reputation", 0, 8), 
      
                (store_random_in_range, ":sister_reputation", 20, 26),
                (try_begin),
                    (eq, ":sister_reputation", 20),
                    (assign, ":sister_reputation", lrep_conventional),
                (try_end),
                (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":sister_reputation"),
      
    #            (troop_set_slot, ":cur_lady", slot_troop_guardian, ":cur_troop"),
    
                (call_script, "script_init_troop_age", ":cur_lady", 21),
                (call_script, "script_add_lady_items", ":cur_lady"),
      
                (val_add, ":cur_lady", 1),
      
            (else_try),    #Younger unmarried lords
                #age is father's minus 20 to 25
                (store_sub, ":father", ":cur_troop", 12),
    #            (troop_set_slot, ":cur_troop", slot_troop_father, ":father"),
    #            (troop_get_slot, ":mother", ":father", slot_troop_spouse),
    #            (troop_set_slot, ":cur_troop", slot_troop_mother, ":mother"),
      
    #            (troop_get_slot, ":father_age", ":father", slot_troop_age),
    #            (store_sub, ":age", ":father_age", ":father_age_at_birth"),
    
                (try_begin), #50% chance of having father's rep
                    (store_random_in_range, ":reputation", 0, 16),
    
                    (gt, ":reputation", 7),
                    (troop_get_slot, ":reputation", ":father", slot_lord_reputation_type),
                (try_end),
            (try_end),
     
            (try_begin),
                (eq, ":reputation", 0),
                (assign, ":reputation", 1),
            (try_end),
     
            (troop_set_slot, ":cur_troop", slot_lord_reputation_type, ":reputation"),
    
            (call_script, "script_init_troop_age", ":cur_troop", ":age"),
          (try_end),
     
          (try_begin),
            (eq, "$cheat_mode", 1),
            (assign, reg3, "$cheat_mode"),
            (display_message, "@{!}DEBUG -- Assigned lord reputation and relations"),
     
    #        (display_message, "str_assigned_lord_reputation_and_relations_cheat_mode_reg3"), #This string can be removed
          (try_end),
     
          (try_for_range, ":cur_troop", pretenders_begin, pretenders_end),
            (troop_set_slot, ":cur_troop", slot_troop_occupation, slto_inactive_pretender),
            (store_random_in_range, ":age", 25, 30),
            (troop_set_slot, ":cur_troop", slot_troop_age, ":age"),
            (eq, ":cur_troop", "trp_kingdom_5_pretender"),
            (troop_set_slot, ":cur_troop", slot_troop_age, 45),
          (try_end),
    
    
    #Custom family+
     
                (troop_set_slot, "trp_kingdom_1_lord", slot_troop_age, 57),
                (troop_set_slot, "trp_kingdom_1_lady_1", slot_troop_age, 56),
                (troop_set_slot, "trp_kingdom_1_lady_17", slot_troop_age, 21),
    
              (troop_set_slot, "trp_kingdom_1_lord", slot_troop_spouse, "trp_kingdom_1_lady_1"),
              (troop_set_slot, "trp_kingdom_1_lady_1", slot_troop_spouse, "trp_kingdom_1_lord"),
              (troop_set_slot, "trp_kingdom_1_lady_17", slot_troop_mother, "trp_kingdom_1_lady_1"),
              (troop_set_slot, "trp_kingdom_1_lady_17", slot_troop_father, "trp_kingdom_1_lord"),
    
                (troop_set_slot, "trp_knight_1_1", slot_troop_age, 50),
                (troop_set_slot, "trp_kingdom_1_lady_2", slot_troop_age, 48),
              (troop_set_slot, "trp_knight_1_1", slot_troop_spouse, "trp_kingdom_1_lady_2"),
              (troop_set_slot, "trp_kingdom_1_lady_2", slot_troop_spouse, "trp_knight_1_1"),
    
    #Custom family-
        ]),

    → If the changes do not show up in the notes, go to #Family notes (still in module_scripts.py) and change the:
    Code:
     lords_begin, kingdom_ladies_end),
    To:
    Code:
     companions_begin, kingdom_ladies_end),



    In regards to renown, kings' values can be customized in game_start at # Factions::
    Code:
          (faction_set_slot, "fac_kingdom_1",  slot_faction_culture, "fac_culture_1"),
          (faction_set_slot, "fac_kingdom_1",  slot_faction_leader, "trp_kingdom_1_lord"),
    #      (troop_set_slot, "trp_kingdom_1_lord", slot_troop_renown, 1200),
    
    #Custom renown+
          (troop_set_slot, "trp_kingdom_1_lord", slot_troop_renown, 900),
    #Custom renown-

    Lords' values can be customized at # Troops::
    Code:
            (store_character_level, ":level", ":kingdom_hero"),
            (store_mul, ":renown", ":level", ":level"),
            (val_div, ":renown", 4), #for top lord, is about 400
    
            (troop_get_slot, ":age", ":kingdom_hero", slot_troop_age),
            (store_mul, ":age_addition", ":age", ":age"),
            (val_div, ":age_addition", 8), #for top lord, is about 400
            (val_add, ":renown", ":age_addition"),
      
            (try_begin),
              (faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
              (store_random_in_range, ":random_renown", 250, 400),
            (else_try),
              (store_random_in_range, ":random_renown", 0, 100),
            (try_end),
            (val_add, ":renown", ":random_renown"),
    
            (troop_set_slot, ":kingdom_hero", slot_troop_renown, ":renown"),     
          (try_end),
    → Values are based on age and troop level, and a random amount is added

    Therefore you can choose to base renown on level only, and make all lord of the same level have the same amount of renown:
    Code:
            (store_character_level, ":level", ":kingdom_hero"),
            (store_mul, ":renown", ":level", ":level"),
            (val_div, ":renown", 4), #for top lord, is about 400
    
    #Custom renown+
    #        (troop_get_slot, ":age", ":kingdom_hero", slot_troop_age),
    #        (store_mul, ":age_addition", ":age", ":age"),
    #        (val_div, ":age_addition", 8), #for top lord, is about 400
    #        (val_add, ":renown", ":age_addition"),
      
    #        (try_begin),
    #          (faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
    #          (store_random_in_range, ":random_renown", 250, 400),
    #        (else_try),
    #          (store_random_in_range, ":random_renown", 0, 100),
    #        (try_end),
    #        (val_add, ":renown", ":random_renown"),
    #Custom renown-
    
            (troop_set_slot, ":kingdom_hero", slot_troop_renown, ":renown"),     
          (try_end),
    You can then edit either troop levels or change (val_div, ":renown", 4), if the values are not those you want


    -
    Btw, this is my 100th message on the forum ???
  17. John25-

    Troop name with Player name

    Maybe the player's name still hasn't been set up when that script is read, let's try to make it happen later - e.g. when you hire the troop in the tavern via module_dialogs.py
  18. John25-

    Warband add troop in city ?

    Let's say you want the Goldemen in Praven, Kingdom of Swadia is culture 1, so this is what it would look like:
    Code:
          (faction_set_slot, "fac_culture_1", slot_faction_town_walker_male_troop, "trp_goldemen"),
    ⚠️You have to use the troop's ID, not its name. For example trp_swadian_recruit instead of Swadian Recruit or Swadian Recruits
  19. John25-

    -- Official Unofficial 'Ask Questions About Warband Singleplayer Here' Thread --

    How to mod fief income when it comes to prosperity. I'd like 'very poor' villages to give half the rent 'very rich' villages give
    You'll have to use the module system (module_simple_triggers.py), because this cannot be edited via .txt files
    https://forums.taleworlds.com/index.php?threads/editing-village-income.172743/
  20. John25-

    Warband add troop in city ?

    Unfortunately you cannot do it with Morgh's editor or .txt files, only with the module system in module_scripts.py.
    This will be the relevant piece of coding you want to change (for each culture):
    Code:
          (faction_set_slot, "fac_culture_1", slot_faction_town_walker_male_troop, "trp_town_walker_1"),
          (faction_set_slot, "fac_culture_1", slot_faction_town_walker_female_troop, "trp_town_walker_2"),
Back
Top Bottom