Search results for query: *

  1. Dalion

    SP Tutorial Module System How to make troops recruitable from castle/towns.

    It seems that more and more people face troubles with getting this to work nowdays. And to no surprise - as a somewhat experienced modder I find the instructions not noob-friendly enough, of course one can follow them if they know what they are doing, but most people who are still new to modding and just want the feature in question likely wouldn't keep up just yet. Which led me to thought I could rephrase the opening post to make it more straightforward and actually point on the things which are getting added (right now it all blends in one big mess). The code we add will be green, and the whilte lines are the ones which are already there, you can use them for searching the right spot and comparing the result to what's under my spoilers.

    Okay, so what this does? It adds the native mechanic of village volunteers to castles and towns and comes with 2 mutually exclusive options:
    1) Without separation - both castles and towns will offer the slot_faction_tier_5_troop of the owner faction.
    1. Open module_scripts.py, and make the following additions:
    #script_cf_town_castle_recruit_volunteers_cond
    # INPUT: none
    # OUTPUT: none
    ("cf_town_castle_recruit_volunteers_cond",
    [(store_faction_of_party, ":town_faction", "$current_town"),
    (party_get_slot, ":center_relation", "$current_town", slot_center_player_relation),
    (store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"),
    (ge, ":center_relation", 0),
    (this_or_next|ge, ":center_relation", 5),
    (this_or_next|eq, ":town_faction", "$players_kingdom"),
    (this_or_next|ge, ":town_faction_relation", 0),
    (this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"),
    (eq, "$players_kingdom", 0),
    (party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0),
    (party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1),
    (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (ge, ":free_capacity", 1),
    ]),


    #script_cf_village_recruit_volunteers_cond
    # INPUT: none
    # OUTPUT: none
    ("cf_village_recruit_volunteers_cond",
    [

    (try_begin),
    (eq, "$cheat_mode", 1),
    ..................

    #script_town_castle_recruit_nobles_recruit
    # INPUT: none
    # OUTPUT: none
    ("town_castle_recruit_nobles_recruit",
    [(store_faction_of_party, ":cur_faction", "$current_town"),
    (faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_5_troop),
    (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
    (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, ":volunteer_amount", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", 200),#200 denars per man
    (val_min, ":volunteer_amount", ":gold_capacity"),
    (party_add_members, "p_main_party", ":volunteer_troop", ":volunteer_amount"),
    (party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
    (store_mul, ":cost", ":volunteer_amount", 200),#200 denars per man
    (troop_remove_gold, "trp_player", ":cost"),
    ]),


    #script_village_recruit_volunteers_recruit
    # INPUT: none
    # OUTPUT: none
    ("village_recruit_volunteers_recruit",
    [(store_faction_of_party, ":cur_faction", "$current_town"),
    (faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_2_troop),
    2. Open module_game_menus.py, and make the following additions:
    ("recruit_nobles",[(call_script, "script_cf_town_castle_recruit_volunteers_cond"),]
    ,"Recruit Nobles.",
    [
    (try_begin),
    (call_script, "script_cf_enter_center_location_bandit_check"),
    (else_try),
    (jump_to_menu, "mnu_recruit_nobles"),
    (try_end),
    ]),


    ("join_tournament", [(neg|is_currently_night),(party_slot_ge, "$current_town", slot_town_has_tournament, 1),]
    ,"Join the tournament.",
    [
    (call_script, "script_fill_tournament_participants_troop", "$current_town", 1),
    ..................

    ("recruit_nobles",0,
    "{s18}",
    "none",
    [(store_faction_of_party, ":cur_faction", "$current_town"),
    (faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_5_troop),
    (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
    (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", 40),#40 denars per man
    (assign, ":party_capacity", ":free_capacity"),
    (val_min, ":party_capacity", ":gold_capacity"),
    (try_begin),
    (gt, ":party_capacity", 0),
    (val_min, ":volunteer_amount", ":party_capacity"),
    (try_end),
    (assign, reg5, ":volunteer_amount"),
    (assign, reg7, 0),
    (try_begin),
    (gt, ":volunteer_amount", ":gold_capacity"),
    (assign, reg7, 1), #not enough money
    (try_end),
    (try_begin),
    (eq, ":volunteer_amount", 0),
    (str_store_string, s18, "@ Nobody here seems to be willing to join your party."),
    (else_try),
    (store_mul, reg6, ":volunteer_amount", 40),#40 denars per man
    (str_store_troop_name_by_count, s3, ":volunteer_troop", ":volunteer_amount"),
    (try_begin),
    (eq, reg5, 1),
    (str_store_string, s18, "@One {s3} volunteers to follow you."),
    (else_try),
    (str_store_string, s18, "@{reg5} {s3} volunteer to follow you."),
    (try_end),
    (set_background_mesh, "mesh_pic_recruits"),
    (try_end),
    ],
    [
    ("continue_not_enough_gold",
    [
    (eq, reg7, 1),
    ],
    "I don't have enough money...",
    [
    (jump_to_menu, "mnu_town"),
    ]),

    ("continue",
    [
    (eq, reg7, 0),
    (eq, reg5, 0),
    ], #noone willing to join
    "Continue...",
    [
    (party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
    (jump_to_menu, "mnu_town"),
    ]),

    ("recruit_them",
    [
    (eq, reg7, 0),
    (gt, reg5, 0),
    ],
    "Recruit them ({reg6} denars).",
    [
    (call_script, "script_town_recruit_nobles_recruit"),

    (jump_to_menu, "mnu_town"),
    ]),

    ("forget_it",
    [
    (eq, reg7, 0),
    (gt, reg5, 0),
    ],
    "Forget it.",
    [
    (jump_to_menu, "mnu_town"),
    ]),
    ]),


    ("notification_relieved_as_marshal", mnf_disable_all_keys,
    "{s4} wishes to inform you that your services as marshal are no longer required. In honor of valiant efforts on behalf of the realm over the last {reg4} days, however, {reg8?she:he} offers you a purse of {reg5} denars.",
    "none",
    [
    (assign, reg4, "$g_player_days_as_marshal"),
    3. Open module_simple_triggers.py, find this trigger and replace villages begin/end with centers begin/end
    # Adding mercenary troops to the towns
    (72,
    [
    (call_script, "script_update_mercenary_units_of_towns"),
    #NPC changes begin
    # removes (call_script, "script_update_companion_candidates_in_taverns"),
    #NPC changes end
    (call_script, "script_update_ransom_brokers"),
    (call_script, "script_update_tavern_travellers"),
    (call_script, "script_update_tavern_minstrels"),
    (call_script, "script_update_booksellers"),
    (call_script, "script_update_villages_infested_by_bandits"),
    (try_for_range, ":village_no", centers_begin, centers_end),
    (call_script, "script_update_volunteer_troops_in_village", ":village_no"),
    (call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
    (try_end),
    ]),
    2) With separation - castles will still offer you the slot_faction_tier_5_troop, but towns will have only the slot_faction_tier_1_troop, basically the same as villages.
    1. Open module_scripts.py, and make the following additions:
    #script_cf_town_recruit_volunteers_cond
    # INPUT: none
    # OUTPUT: none
    ("cf_town_recruit_volunteers_cond",
    [(store_faction_of_party, ":town_faction", "$current_town"),
    (party_get_slot, ":center_relation", "$current_town", slot_center_player_relation),
    (store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"),
    (ge, ":center_relation", 0),
    (this_or_next|ge, ":center_relation", 5),
    (this_or_next|eq, ":town_faction", "$players_kingdom"),
    (this_or_next|ge, ":town_faction_relation", 0),
    (this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"),
    (eq, "$players_kingdom", 0),
    (party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0),
    (party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1),
    (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (ge, ":free_capacity", 1),
    ]),


    #script_cf_village_recruit_volunteers_cond
    # INPUT: none
    # OUTPUT: none
    ("cf_village_recruit_volunteers_cond",
    [

    (try_begin),
    (eq, "$cheat_mode", 1),
    ..................

    #script_town_recruit_nobles_recruit
    # INPUT: none
    # OUTPUT: none
    ("town_recruit_nobles_recruit", #renamed
    [(store_faction_of_party, ":cur_faction", "$current_town"),
    (faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_1_troop), #changed tier so it wouldnt recruit nobles.
    (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
    (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, ":volunteer_amount", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", 200),#200 denars per man
    (val_min, ":volunteer_amount", ":gold_capacity"),
    (party_add_members, "p_main_party", ":volunteer_troop", ":volunteer_amount"),
    (party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
    (store_mul, ":cost", ":volunteer_amount", 200),#200 denars per man
    (troop_remove_gold, "trp_player", ":cost"),
    ]),


    #script_village_recruit_volunteers_recruit
    # INPUT: none
    # OUTPUT: none
    ("village_recruit_volunteers_recruit",
    [(store_faction_of_party, ":cur_faction", "$current_town"),
    (faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_2_troop),
    2. Open module_game_menus.py, and make the following additions:

    ("recruit_nobles",[(is_between, "$current_town",
    castles_begin, castles_end), (call_script,
    "script_cf_town_castle_recruit_volunteers_cond"),]
    ,"Recruit Nobles.",
    [
    (try_begin),
    (call_script, "script_cf_enter_center_location_bandit_check"),
    (else_try),
    (jump_to_menu, "mnu_recruit_nobles"),
    (try_end),
    ]),

    ("recruit_normals",[(is_between, "$current_town",
    towns_begin, towns_end), (call_script,
    "script_cf_town_recruit_volunteers_cond"),]
    ,"Recruit Volunteers.",
    [
    (try_begin),
    (call_script, "script_cf_enter_center_location_bandit_check"),
    (else_try),
    (jump_to_menu, "mnu_recruit_normales"),
    (try_end),
    ]),


    ("join_tournament", [(neg|is_currently_night),(party_slot_ge, "$current_town", slot_town_has_tournament, 1),]
    ,"Join the tournament.",
    [
    (call_script, "script_fill_tournament_participants_troop", "$current_town", 1),
    ..................

    ("recruit_nobles",0,
    "{s18}",
    "none",
    [(store_faction_of_party, ":cur_faction", "$current_town"),
    (faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_5_troop),
    (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
    (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", 40),#40 denars per man
    (assign, ":party_capacity", ":free_capacity"),
    (val_min, ":party_capacity", ":gold_capacity"),
    (try_begin),
    (gt, ":party_capacity", 0),
    (val_min, ":volunteer_amount", ":party_capacity"),
    (try_end),
    (assign, reg5, ":volunteer_amount"),
    (assign, reg7, 0),
    (try_begin),
    (gt, ":volunteer_amount", ":gold_capacity"),
    (assign, reg7, 1), #not enough money
    (try_end),
    (try_begin),
    (eq, ":volunteer_amount", 0),
    (str_store_string, s18, "@ Nobody here seems to be willing to join your party."),
    (else_try),
    (store_mul, reg6, ":volunteer_amount", 40),#40 denars per man
    (str_store_troop_name_by_count, s3, ":volunteer_troop", ":volunteer_amount"),
    (try_begin),
    (eq, reg5, 1),
    (str_store_string, s18, "@One {s3} volunteers to follow you."),
    (else_try),
    (str_store_string, s18, "@{reg5} {s3} volunteer to follow you."),
    (try_end),
    (set_background_mesh, "mesh_pic_recruits"),
    (try_end),
    ],
    [
    ("continue_not_enough_gold",
    [
    (eq, reg7, 1),
    ],
    "I don't have enough money...",
    [
    (jump_to_menu, "mnu_town"),
    ]),

    ("continue",
    [
    (eq, reg7, 0),
    (eq, reg5, 0),
    ], #noone willing to join
    "Continue...",
    [
    (party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
    (jump_to_menu, "mnu_town"),
    ]),

    ("recruit_them",
    [
    (eq, reg7, 0),
    (gt, reg5, 0),
    ],
    "Recruit them ({reg6} denars).",
    [
    (call_script, "script_town_recruit_nobles_recruit"),

    (jump_to_menu, "mnu_town"),
    ]),

    ("forget_it",
    [
    (eq, reg7, 0),
    (gt, reg5, 0),
    ],
    "Forget it.",
    [
    (jump_to_menu, "mnu_town"),
    ]),
    ]),


    ("recruit_normales",0,
    "{s18}",
    "none",
    [(store_faction_of_party, ":cur_faction", "$current_town"),
    (faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_1_troop), #Notice the changed tier
    (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
    (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", 40),#40 denars per man
    (assign, ":party_capacity", ":free_capacity"),
    (val_min, ":party_capacity", ":gold_capacity"),
    (try_begin),
    (gt, ":party_capacity", 0),
    (val_min, ":volunteer_amount", ":party_capacity"),
    (try_end),
    (assign, reg5, ":volunteer_amount"),
    (assign, reg7, 0),
    (try_begin),
    (gt, ":volunteer_amount", ":gold_capacity"),
    (assign, reg7, 1), #not enough money
    (try_end),
    (try_begin),
    (eq, ":volunteer_amount", 0),
    (str_store_string, s18, "@ Nobody here seems to be willing to join your party."),
    (else_try),
    (store_mul, reg6, ":volunteer_amount", 40),#40 denars per man
    (str_store_troop_name_by_count, s3, ":volunteer_troop", ":volunteer_amount"),
    (try_begin),
    (eq, reg5, 1),
    (str_store_string, s18, "@One {s3} volunteers to follow you."),
    (else_try),
    (str_store_string, s18, "@{reg5} {s3} volunteer to follow you."),
    (try_end),
    (set_background_mesh, "mesh_pic_recruits"),
    (try_end),
    ],
    [
    ("continue_not_enough_gold",
    [
    (eq, reg7, 1),
    ],
    "I don't have enough money...",
    [
    (jump_to_menu, "mnu_town"),
    ]),

    ("continue",
    [
    (eq, reg7, 0),
    (eq, reg5, 0),
    ], #noone willing to join
    "Continue...",
    [
    (party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
    (jump_to_menu, "mnu_town"),
    ]),

    ("recruit_them",
    [
    (eq, reg7, 0),
    (gt, reg5, 0),
    ],
    "Recruit them ({reg6} denars).",
    [
    (call_script, "script_town_recruit_nobles_recruit"),

    (jump_to_menu, "mnu_town"),
    ]),

    ("forget_it",
    [
    (eq, reg7, 0),
    (gt, reg5, 0),
    ],
    "Forget it.",
    [
    (jump_to_menu, "mnu_town"),
    ]),
    ]),


    ("notification_relieved_as_marshal", mnf_disable_all_keys,
    "{s4} wishes to inform you that your services as marshal are no longer required. In honor of valiant efforts on behalf of the realm over the last {reg4} days, however, {reg8?she:he} offers you a purse of {reg5} denars.",
    "none",
    [
    (assign, reg4, "$g_player_days_as_marshal"),
    3. Open module_simple_triggers.py, find this trigger and replace villages begin/end with centers begin/end
    # Adding mercenary troops to the towns
    (72,
    [
    (call_script, "script_update_mercenary_units_of_towns"),
    #NPC changes begin
    # removes (call_script, "script_update_companion_candidates_in_taverns"),
    #NPC changes end
    (call_script, "script_update_ransom_brokers"),
    (call_script, "script_update_tavern_travellers"),
    (call_script, "script_update_tavern_minstrels"),
    (call_script, "script_update_booksellers"),
    (call_script, "script_update_villages_infested_by_bandits"),
    (try_for_range, ":village_no", centers_begin, centers_end),
    (call_script, "script_update_volunteer_troops_in_village", ":village_no"),
    (call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
    (try_end),
    ]),
    That's all. To see the recruiting option you must have at least 1 free place in your party and the fief should have any volunteers available (they get some every 3 days normally). If the fief is not owned by the faction you joined, you must also have 5 or more positive relation with it to see the option.
    1. If you want to skip the required 3 days of waiting find this in game_start script:
    Code:
    (try_for_range, ":village_no", villages_begin, villages_end),
            (call_script, "script_update_volunteer_troops_in_village", ":village_no"),
    (try_end),
    and replace villages_begin with centers_begin and villages_end with centers_end, then just start new game and given you meet the other requirements the option should appear.
    2. If you want to change the troops getting offered, either change at the respective places the slot name from slot_faction_tier_1_troop to slot_faction_tier_3_troop for example or just straight up change the troop stored there - search in game_start script for lines like
    Code:
    (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop,
    (it should be close to the top).
  2. Dalion

    [OSP] Shield Toss

    you can check whether it has itp_wooden_parry to play the wood instead of metal sound, or even play the gong sound when you hit a hero.
    Indeed, added. The gong part is commented out tho, it's a bit too much.

    Aim at random, different bones to achieve different effects, for example disarming if it hits arm bones & lowering movement/dehorsing if it hits leg bones.
    Loweing movement with additional trigger checks to restore it back goes beyond this OSP's scope. Sure one can do it, but each mod may have its own approach to agent speed management, so it's better the user will add it to affected targets on his end. Disarming could be a thing, but on my experience bots draw their weapons back in 90% cases so not that much of a use. Dehorsing is already guaranteed to happen, and tbh it looks better when shield hits chest than legs.

    Use weight to determine cooldown period between uses similar to shield bash, perhaps checking player agility
    Cooldown to this could be implemented in so many ways that I leave it for user to add as well. My older OSPs had them integrated, which resulted in some users having to cut them off to add their own ones. So it will be easier to add when there isn't any included. I like the agility idea a lot though.

    Calculate the ratio of height/width of the shield & speed rating to determine how aerodynamic it is (as a modifier alongside ST_Time_Factor)
    As much as I sincerely agree that rhodok pavise and khergit cav shield shouldn't behave exactly the same while flying, I'm also afraid I wouldn't be able to pull this one off by myself. Any kinds of aerodynamic calculations always give me a hard time, but if you provide a code piece for that I'll gladly include it.

    Take shield resistance as the min damage, modify max with power throw so it requires investment into multiple skills?
    That's fair, these should have their impact on damage as well. Added that, lowering the default tresholds with them in mind.

    Add in the unfun chance to break base on shield hp + imod, or even not returning so you have to do a walk of shame to pick it back up
    Those are too optional to include in base pack :p I'd love to add some downsides like damaging the shield hp a bit after each throw, but MS is very limited in terms of agent item manipulations and so far I haven't found any tools for that. Best I could do was I went with spawn_item_without_refill which sometimes returns shield in a bit damaged state even when it was thrown at full hp. Sometimes it doesn't. I'm not sure why it has any effect at all, since it's not the operation to equip the shield, only to spawn it. And I still haven't figured out what exactly differs it from spawn_item in that regard.
  3. Dalion

    [OSP] Shield Toss

    This is a combat ability to toss your shield in battle, which will deal damage to certain amount of targets within line of sight in specified radius and then come back to you. The damage amount depends on your Shield skill, Power Throw skill and the resistance stat of the shield itself. All...
  4. Dalion

    B Tutorial Scenes Scening - a definitive guide by Veledentella

    Some props have collision mesh maladjusted, therefore it is sometimes buggy and slows down agents; such props are spr_earth_stairs_b and spr_full_keep_b. In their case, some barriers must be placed on floor/ surface of them to make agents' movement normal.
    Nope, it's the sokf_type_ladder flag that slows down the agents, nothing to do with collision. Remove it and movement speed returns to normal. There's still many other situations where the barrier trick would come in handy tho, so thanks for this detailed guide, especially for the blueprints part.
  5. Dalion

    SP Tutorial Module System Example of using store_repeat_object to create list of options

    Once upon a time I was experiencing troubles with finding needed arrows with Large Bag modifier. So I decided to make a feature that you give the arrows you want to some NPC, and he assigns this modifier to it for some fee. But how does he know what arrows he should work with? Best way to do...
  6. Dalion

    OSP SP QoL Civilian outfits system for player/companions/pretenders (predetermined)

    This system allows player, companions (after they became lords) and claimants (after they became kings) to wear civilian clothes in castle hall scenes. For NPCs outfits are determined in code, and for player it is set under Camp -> Take an action -> Set civilian outfit. If player takes back all...
  7. Dalion

    PYTHON SCRIPT/SCHEME EXCHANGE

    Started Battles

    Do you know that feel when you join a started battle between two parties and turns out they still have yet to clash? Almost like they have been waiting for your join before actully start a fight. Weird feel, I know. Well guess what, it's fixed now! When you join a battle, all troops except for your party members will spawn in random spot within 10m radius from the middle of the map. So you will see kill feed from the very beginning, which should create a feeling that the battle was indeed going on when you joined. Sure it means more casualties for allies, but it's far more realistic. Reinforcements however will come from usual entrypoints for both sides.

    Just put this trigger in lead_charge mission:
    Code:
    (ti_on_agent_spawn, 0, 0,
      [
       (ge, "$g_ally_party", 0), # if player has joined already started battle
       (eq, "$attacker_reinforcement_stage", 0), # and there hasn't been any reinforcements yet
       (eq, "$defender_reinforcement_stage", 0),
      ],
      [
        (store_trigger_param_1, ":agent"),
        (assign, ":agent_to_move", -1),
        (try_begin),
          (agent_is_human, ":agent"),
          (agent_get_party_id, ":a_party", ":agent"),
          (neq, ":a_party", "p_main_party"),
          (agent_is_non_player, ":agent"),
          (assign, ":agent_to_move", ":agent"),
        (else_try), 
          (neg|agent_is_human, ":agent"),
          (agent_get_rider, ":rider", ":agent"),
          (agent_get_party_id, ":r_party", ":rider"),
          (neq, ":r_party", "p_main_party"),
          (agent_is_non_player, ":rider"),
          (assign, ":agent_to_move", ":agent"),
        (try_end),   
        (neq, ":agent_to_move", -1),
        (get_scene_boundaries, pos10, pos11),
        (set_fixed_point_multiplier, 100),
        (position_get_x, "$g_scene_max_x", pos11),
        (position_get_y, "$g_scene_max_y", pos11),
        (val_add, "$g_scene_max_x", 2400), # 2400 has been subtracted automatically because of barriers from outer terrain
        (val_add, "$g_scene_max_y", 2400),
        (store_div, ":pos_x", "$g_scene_max_x", 2),
        (store_div, ":pos_y", "$g_scene_max_x", 2),
        (init_position, pos22), # map center
        (store_random_in_range, ":x_shift", -1000, 1000),
        (store_random_in_range, ":y_shift", -1000, 1000),
        (val_add, ":pos_x", ":x_shift"),
        (val_add, ":pos_y", ":y_shift"),
        (position_set_x, pos22, ":pos_x"),
        (position_set_y, pos22, ":pos_y"),
        (agent_set_position, ":agent_to_move", pos22),
      ]),

    Shoutouts to Tocan for pointing me in the right direction here.
  8. Dalion

    [BUGS] Support Thread for v3.9

    Its one of the most annoying quests i think im just going to autofail those.
    Or you can just fix it with #13 here: https://forums.taleworlds.com/index...or-tweaks-and-talk.386332/page-6#post-9497319
  9. Dalion

    [QUESTIONS] Quick Questions//Quick Answers (Redux)

    took a Qualis Gem from Maltise. But who is she? I literally couldn't find any lore on her. Just some randomass Priestess?
    Judging by equipment there's more to her but recently I come across this screenshot on Nexus: https://www.nexusmods.com/mbwarband/images/293
    In the description author mentions his own fan-fiction lore for her, and I kinda like how "Maltise" could be just a rearranged word from "Melista". Not sure what possible connections she could have to Vendethiel though, but if you like this theory, you can consider her that.
  10. Dalion

    [MODDING] Prophesy of Pendor Tweaks and Talk

    Does anyone know how to change the Recruitment and Right to Rule Troop templates for Companions?
    For instance, I want to change the Right to Rule Troop template for Sir Jocelyn, from
    1. Silvermist Halberdier
    2. Radiant Cross Plaguewarden
    3. Knight of the Dawn
    to
    1. Sarleon Nobleman
    2. Squire of the Lion
    3. Knight of the Lion
    These are to be changed in scripts.txt. Recruitment troops are operated by ask_companions_for_unique_troops script, and Right to Rule troops by rtr_quest_troops_reward script. In both cases look at the troop IDs, they start with 360. You just have to subtract 360287970189639680 from them to get morghs editor number, or vise-versa. So, if you need Jocelyn and you know his number is 511 in morghs, then in those scrips he is 360287970189640191. Either that, or look up ids of the troops themselves, like you can just replace 360287970189640078 (Silvermist Halberdier) with 360287970189639777 (Sarleon Nobleman) and so on. These changes don't require new game, but require to send companion on a new mission obviously.

    Note, this was posted already at the POP Wiki Tweaks section
    Noted but wiki comments clutter way faster than this thread does, so I reply here.
  11. Dalion

    PYTHON SCRIPT/SCHEME EXCHANGE

    Prop Clock

    It was just an experiment, not really it's own thread level, so I'm posting it here. If you need a clock, better make it text-based, trust me you don't need props for this. But prop clock is possible too, and it looks cooler maybe.

    Final result:

    Have fun =)

    lrU1awD.jpg

    Code:
    clock_1 = (0, 0, ti_once, [], # preparing the 00:00 situation
    [
      (try_for_prop_instances, ":instance_no", "itm_linen"),
        (prop_instance_get_variation_id, ":var1", ":instance_no"),
        (eq, ":var1", 4),
        (scene_prop_set_visibility, ":instance_no", 0),
      (try_end),
      (assign, "$clock_time", 0),
      (assign, "$start_clock", 0),
    ])
    
    clock_2 = (1, 0, 0, # actual clock with 1 sec interval
    [
    (eq, "$start_clock", 1),
    ],
    [  
      (val_add, "$clock_time", 1),
      (assign, ":time", "$clock_time"),
      (store_mission_timer_a_msec, ":cur_time"), # getting msec value to make exact digits
      (val_mul, ":time", 1000),
      (val_sub, ":cur_time", ":time"),
      (val_div, ":time", 1000),
      (gt, ":cur_time", 1000),   
      (store_mod, reg1, ":time", 10),
      (call_script, "script_make_digit_of_linens", reg1, 1),
      (val_div, ":time", 10),
      (store_mod, reg2, ":time", 6),
      (call_script, "script_make_digit_of_linens", reg2, 2),
      (val_div, ":time", 6),
      (store_mod, reg3, ":time", 10),
      (call_script, "script_make_digit_of_linens", reg3, 3),
      (val_div, ":time", 10),
      (store_mod, reg4, ":time", 6),
      (call_script, "script_make_digit_of_linens", reg4, 4),
      #(tutorial_message, "@{reg4}{reg3}:{reg2}{reg1}"),  # I used this to make sure prop clock matches text one
      (play_sound, "snd_shield_hit_metal_wood"),
      (val_add, "$clock_time", 1),
    ])

    Code:
    ("make_digit_of_linens", # long but very simple script
      [
        (store_script_param_1, ":digit", 1),
        (store_script_param_2, ":position", 2),
    
        (try_for_prop_instances, ":instance_no", "itm_linen"),
          (prop_instance_get_variation_id, ":var1", ":instance_no"),
          (prop_instance_get_variation_id_2, ":var2", ":instance_no"),
          (eq, ":var2", ":position"),
          (try_begin),
            (eq, ":digit", 0),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 1),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 2),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 0),
            (try_end),
          (else_try),
            (eq, ":digit", 3),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 4),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 5),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 6),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 7),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 8),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (else_try),
            (eq, ":digit", 9),
            (try_begin),
              (eq, ":var1", 1),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 2),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 3),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 4),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 5),
              (scene_prop_set_visibility, ":instance_no", 0),
            (else_try),
              (eq, ":var1", 6),
              (scene_prop_set_visibility, ":instance_no", 1),
            (else_try),
              (eq, ":var1", 7),
              (scene_prop_set_visibility, ":instance_no", 1),
            (try_end),
          (try_end),
        (try_end),  
      ]),

    Code:
    ("clock_trigger",0,"bucket_a","bo_bucket_a", [
      (ti_on_scene_prop_hit,
      [
        (store_trigger_param_1, ":instance_no"),
        (play_sound, "snd_dummy_hit"),
        (particle_system_burst, "psys_dummy_smoke", pos1, 3),
        (particle_system_burst, "psys_dummy_straw", pos1, 10),
        (scene_prop_slot_eq, ":instance_no", scene_prop_open_or_close_slot, 0),
        (prop_instance_get_position, pos2, ":instance_no"), # pos1 is trigger param so we use pos2
        (position_move_z, pos2, 20),
        (prop_instance_animate_to_position, ":instance_no", pos2, 20),
        (scene_prop_set_slot, ":instance_no", scene_prop_open_or_close_slot, 1),
        (assign, "$start_clock", 1),
      ]),
    
      (ti_on_scene_prop_animation_finished,
      [
        (store_trigger_param_1, ":instance_no"),
        (scene_prop_slot_eq, ":instance_no", scene_prop_open_or_close_slot, 1),
        (prop_instance_get_starting_position, pos1, ":instance_no"),
        (prop_instance_animate_to_position, ":instance_no", pos1, 100),
        (scene_prop_set_slot, ":instance_no", scene_prop_open_or_close_slot, 0),
      ]),
      ]),
  12. Dalion

    OSP Code QoL Particle Preview Presentation

    Is the description really necessary? Warband doesn't provide any ways to preview particles before using, so I made my own. IMPORTANT NOTE: I strongly advise not putting it in combat missions! Here's why: - since this presentation doesn't have prsntf_read_only flag, it disables your ability...
  13. Dalion

    OSP Code QoL Dark Souls Reference Pack

    Reserved for possible character limit exceeding in the future
  14. Dalion

    OSP Code QoL Dark Souls Reference Pack

    This thread will contain all DS references I made. If I make more in the future, they will be added here as well. As of now, we have: Enjoy!
  15. Dalion

    PYTHON SCRIPT/SCHEME EXCHANGE

    Auto-Pickup Missiles

    Recently I was trying horse archery and found one aspect of this playstyle quite frustrating. When you are low on ammo, your best bet is to collect arrows from the ground. But it's not very comfortable sometimes to point the camera on those (especially when there is a bunch of cavalry chasing you), not to mention you need to be on the correct distance from the arrow for pickup option to appear. So I decided to make this trigger. To lower the load on engine and possibly on performance, I tied it to holding a [Num_Enter] key while moving. You don't need this permanently active anyway. Two things to remember when using it:
    1) unlike the pickup via F button, this one requires you to wield the respective weapon to succeed. Just keep it in mind;
    2) it won't pickup quivers, only single missiles. That's because it would always give a full quiver, even if there was 3 arrows left after agent died. And I haven't figured out how to retrieve valid ammo amount of quivers on the ground yet.

    Have fun =)

    Code:
    missiles_auto_pickup = (0, 0, 0.6,
      [
      (neg|main_hero_fallen),
      (key_is_down, key_numpad_enter),
      ],
      [
        (set_fixed_point_multiplier, 100),
        (get_player_agent_no, ":player"),
        (agent_is_active, ":player"),
        (agent_get_position, pos1, ":player"),
        (agent_get_wielded_item, ":weapon", ":player", 0),
        (neq, ":weapon", -1), # preventing errors from bare fists
        (item_get_type, ":w_type", ":weapon"),
        (assign, ":free_slots", 0),
        (assign, ":valid_ammo", 0),
        (try_for_range_backwards, ":s", 0, 4), # retrieve the current quiver that matches weapon type. Game 
                                               # spends quivers from top to bottom, so we need backwards loop
            (agent_get_item_slot, ":slot_item", ":player", ":s"),
            (try_begin),
                (eq, ":slot_item", -1),
                (assign, ":empty_slot", ":s"),
                (val_add, ":free_slots", 1),
            (else_try),
                (item_get_type, ":m_type", ":slot_item"),
                (eq, ":m_type", itp_type_arrows),
                (eq, ":w_type", itp_type_bow),
                (assign, ":ammo_item", ":slot_item"),
                (assign, ":ammo_slot", ":s"),
            (else_try),
                (item_get_type, ":m_type", ":slot_item"),
                (eq, ":m_type", itp_type_bolts),
                (eq, ":w_type", itp_type_crossbow),
                (assign, ":ammo_item", ":slot_item"),
                (assign, ":ammo_slot", ":s"),
            (else_try),
                (item_get_type, ":m_type", ":slot_item"),
                (eq, ":m_type", itp_type_thrown),
                (eq, ":slot_item", ":weapon"), # no need to compare weapon type this time, it's a 2-in-1 check
                (assign, ":ammo_item", ":slot_item"),
                (assign, ":ammo_slot", ":s"),
            (try_end),
        (try_end),   
        (try_for_prop_instances, ":missile", -1, somt_spawned_single_ammo_item), # only single missiles, not quivers
            (prop_instance_get_position, pos2, ":missile"),
            (get_distance_between_positions, ":dist", pos2, pos1),
            (le, ":dist", 250), # pickup radius, adjust to your liking
            (prop_instance_get_scene_prop_kind, ":item", ":missile"), # get item id to compare it with current weapon
            (item_get_type, ":i_type", ":item"),
            (try_begin),
                (eq, ":i_type", itp_type_arrows),
                (eq, ":w_type", itp_type_bow),
                (assign, ":valid_ammo", 1),
            (else_try),
                (eq, ":i_type", itp_type_bolts),
                (eq, ":w_type", itp_type_crossbow),
                (assign, ":valid_ammo", 1),
            (else_try),
                (eq, ":i_type", itp_type_thrown),
                (eq, ":item", ":weapon"), 
                (assign, ":valid_ammo", 1),
            (try_end),
            (eq, ":valid_ammo", 1), #invalid ammo will be ignored without warnings
            (neg|item_has_property, ":item", itp_no_pick_up_from_ground),
            (agent_get_ammo, ":old_ammo", ":player", 1), # ONLY for total amount comparison
            (agent_get_ammo_for_slot, ":s_ammo", ":player", ":ammo_slot"), # for actual pickup calculation
            (store_add, ":new_ammo", ":s_ammo", 1),
            (agent_set_ammo, ":player", ":ammo_item", ":new_ammo"),
            (str_store_item_name, s2, ":item"),   
            (try_begin),
                (agent_get_ammo, ":cur_ammo", ":player", 1),
                (eq, ":cur_ammo", ":old_ammo"), # if these values are the same, it means there are no room for more ammo. In this
                                                # case, when you pick up something via F, game will create new quiver given there
                                                # are empty slots left. So we should replicate this behaviour
                (try_begin),
                    (ge, ":free_slots", 1),
                    (agent_equip_item, ":player", ":item", ":empty_slot"),
                    (agent_set_ammo, ":player", ":item", 1),
                    (scene_prop_set_prune_time, ":missile", 0), # remove missile from ground
                    (display_message, "@Picking up {s2}."), # duplicate default message               
                (else_try), # if there are no room for ammo in current quiver and no empty slots for new one
                    (display_message, "@Unable to take that."), # duplicate default warning
                (try_end),           
            (else_try),
                (scene_prop_set_prune_time, ":missile", 0),
                (display_message, "@Picking up {s2}."),
            (try_end),
        (try_end),   
      ])
  16. Dalion

    PYTHON SCRIPT/SCHEME EXCHANGE

    Passable Allies

    I loved it how in Bannerlord you can pass through ally troop lines. Turns out it's possible in Warband too. But, to lower the load on engine and possibly on performance, I tied this effect to holding a left [Ctrl] key while moving. You don't need this permanently active anyway. Have fun =)

    Code:
    passable_allies = (0, 0, 0,
        [
        (neg|main_hero_fallen),
        (key_is_down, key_left_control),
        ],
        [
        (set_fixed_point_multiplier, 1),
        (get_player_agent_no, ":player"),
        (agent_get_position, pos1, ":player"),
        (agent_get_team, ":p_team", ":player"),
        (try_for_agents, ":agent", pos1, 1),
            (agent_is_alive, ":agent"),
            (agent_is_human, ":agent"),
            (agent_is_non_player, ":agent"),
            (agent_get_team, ":a_team", ":agent"),
            (neg|teams_are_enemies, ":a_team", ":p_team"),
            (agent_get_speed, pos2, ":player"),
            (position_get_y, ":forward_momentum", pos2),
            (position_get_x, ":sideway_momentum", pos2),
            (convert_to_fixed_point, ":forward_momentum"),
            (convert_to_fixed_point, ":sideway_momentum"),
            (try_begin),
                (lt, ":forward_momentum", 0), # backwards moving speed is higher somehow, so we divide it in half
                (val_div, ":forward_momentum", 2),
            (try_end),
            (val_div, ":sideway_momentum", 2), # so is sideways moving speed
            (position_move_y, pos1, ":forward_momentum"),
            (position_move_x, pos1, ":sideway_momentum"),
            (agent_set_position, ":player", pos1),      
        (try_end),
        ])

    Props to SupaNinjaMan and Garedyr for support, you're the best.
  17. Dalion

    [MODDING] Prophesy of Pendor Tweaks and Talk

    I'll soon add the above and tweak #12 to the Wikia
    Seems like you frogot to remove the request about previous range button in cheatmenu with July 26th update. Also bullet trail request is still there, maybe some other too, imo the list should be revised.

    Also I can quiclkly relocate Sange Safid(location #3, closer to other fiefs) and Tuldar(location #2, it looks like a mountain pass and it would make sense to have a keep there to defend it) right now. Are you good with it?
    reloca11.jpg
  18. Dalion

    [MODDING] Prophesy of Pendor Tweaks and Talk

    Somehow forum still deletes extra spaces which are essential for tweaks. This and the fact that it automatically turns some digits/symbols into emotes are the reason why I probably won't post here any more tweaks.
    raw

    This post will be considered part 2 as part 1 has exceeded the character limit.

    13 )
    While 3.9.1 patch introduced a fix for looters quest party being hostile to other parties as well, it left behind couple other guildmaster quest problems:
    1) Track Down Bandits quest fails if target party is destroyed by someone else than player
    2) The target party of the above quest can turn out to be unique spawn, which player won't be able to deal with within 60 days and quest will fail
    3) Target parties of Deal with Looters quest are really unpleasant to try and catch (not technically a problem, but fixing this would surely count as a QoL feature, like cattle following you instead of running)
    Tweak aims to cover all of the above, but does it independently, so you can skip the points you are good with.

    (1) to make target party of Track Down Bandits quest neutral to all but player:
    - open conversation.txt, find this line:

    dlga_merchant_quest_track_bandits_choice:merchant_quest_track_bandits_brief 69631 1457 0 Aye,_I'll_do_it. 1454 12 2133 2 144115188075856102 0 2133 2 144115188075856101 144115188075855892 526 3 1224979098644774912 504403158265495607 8 1603 3 1224979098644774912 262144 1 506 3 504403158265495607 8 144115188075856112 506 3 504403158265495607 6 144115188075855892 506 3 504403158265495607 12 144115188075856280 2342 2 8 144115188075856280 2330 2 9 1224979098644774912 1290 1 504403158265495607 2320 2 2 216172782113788389 1 3 936748722493063555 504403158265495607 144115188075855892 NO_VOICEOVER

    - increase the red number by 1 (12->13), and add this after the blue one: 1620 2 1224979098644774912 432345564227567619

    (2) to exclude minor faction armies and heroes from the list of possible target parties for Track Down Bandits quest:
    - open scripts.txt, find merchant_road_info_to_s42 script, increase the number it starts with by 9 (212->221)
    - find this part: 1224979098644774928 1224979098644774930 2133 2 1224979098644774929
    and put this before 2133:

    1609 2 1224979098644774940 1224979098644774927 2147483681 3 1224979098644774940 576460752303423556 576460752303423578 2147483679 2 1224979098644774940 576460752303423502 2147483679 2 1224979098644774940 576460752303423505 2147483679 2 1224979098644774940 576460752303423508 2147483679 2 1224979098644774940 576460752303423511 2147483679 2 1224979098644774940 576460752303423514 2147483679 2 1224979098644774940 576460752303423518 2147483679 2 1224979098644774940 576460752303423521

    (3) to make the target parties of Deal with Looters quest converge on your location to attack you instead of running away:
    - open conversation.txt, find this line:

    dlga_merchant_quest_looters_brief:close_window 4095 1450 25 4 0 541 3 144115188075856280 0 3 2320 2 5 1585267068834416647 5 0 541 3 144115188075856280 0 4 2320 2 5 1585267068834416646 3 0 2136 3 1224979098644774912 3 7 506 3 504403158265495586 10 1224979098644774912 6 3 1224979098644774913 0 1224979098644774912 2136 3 1224979098644774914 5 14 1103 1 1224979098644774914 1100 2 144115188075856280 576460752303423654 1640 2 72057594037927936 2 1643 2 72057594037927936 2 1625 2 0 72057594037927936 1642 2 72057594037927936 0 3 0 2341 2 9 144115188075855892 2342 2 13 144115188075856280 2330 2 4 144115188075856280 1290 1 504403158265495586 2320 2 2 1585267068834417504 1 3 936748722493063555 504403158265495586 144115188075855892 2133 2 144115188075855935 1 Excellent!_You'll_find_the_looters_roaming_around_the_countryside,_probably_trying_to_rob_more_good_people._Kill_or_capture_the_bastards,_I_don't_care_what_you_do_with_them._I'll_pay_you_a_bounty_of_200_denars_on_every_band_of_looters_you_destroy,_until_all_the_looters_are_dealt_with. 6 0 NO_VOICEOVER

    - increase the red number by 1 (25->26) and replace the blue ones with this:

    1640 2 72057594037927936 4 1641 2 72057594037927936 648518346341351424 1639 2 72057594037927936 0 1606 2 72057594037927936 15 1607 2 72057594037927936 15
    14 )
    Just what the title says.

    - open conversation.txt, find the line that starts with dlga_declaration_of_indep3:declaration_of_indep3 and replace it with this:
    Code:
    dlga_declaration_of_indep3:declaration_of_indep3 4095 269  0 All_Hail_{reg63?King:Queen}_{playername}!_^^_Long_live_the_{reg63?King:Queen}!!!  269  10 2114 2 144115188075856171 65536 603 1 0 1506 2 1224979098644774912 360287970189639680 4 0 32 2 1224979098644774912 0 600 1 1152921504606847611 5 0 600 1 1152921504606847610 3 0 1 1 936748722493063217 NO_VOICEOVER
    (basically do the third step from 15 f) tweak)
    - open scripts.txt, find cf_reinforce_party script
    - decrease the number it starts with by 11 (620->609), then find and remove this part in it:
    4 0 31 2 1224979098644774913 432345564227567630 33 3 1224979098644774912 648518346341351446 648518346341351504 521 3 1224979098644774916 1224979098644774912 7 4 0 32 2 1224979098644774916 0 520 3 1224979098644774913 1224979098644774916 14 5 0 521 3 1224979098644774913 1224979098644774912 61 3 0 3 0
    15 )
    These 2 castles in particular are out of the desertous D'Shar territory and are located in grassy plains despite their scene. Since their exterior is surrounded by hilly areas, they are relocated close to mountains as a result.

    - open parties.txt
    in Safid's record replace
    -44.150000 -50.280000 -44.150000 -50.280000 -44.150000 -50.280000
    with
    -53.300000 -124.210000 -53.300000 -124.210000 -53.300000 -124.210000
    in Tuldar's record replace
    -10.340000 -60.210000 -10.340000 -60.210000 -10.340000 -60.210000
    with
    -63.370000 -109.860000 -63.370000 -109.860000 -63.370000 -109.860000

    this requires new game or save editor appliance to take effect!
    16 )
    Do I even have to explain how frustrating it was sometimes to get blocked by the ally units? Enemy troops you can kill and pass, your troops you can order to go 10 steps backwards, but ally troops are gonna ruin your plans no matter what. Well, not anymore. With this tweak, you'll be able to pass through any non-hostile troop as long as you hold left [Ctrl] while moving. The difference will be most noticable in sieges.

    - open mission_templates.txt and increase the trigger counter (the number by itself on a single line) by 1 under the following sections:
    • mst_lead_charge - field battles (66 -> 67)
    • mst_village_attack_bandits - bandit infestations (24 -> 25)
    • mst_village_raid - village fights (27 -> 28 )
    • mst_castle_attack_walls_defenders_sally - sally-outs (56 -> 57)
    • mst_castle_attack_walls_belfry - siege tower sieges (42 -> 43)
    • mst_castle_attack_walls_ladder - ladder sieges (37 -> 38 )
    • mst_bandit_lair - bandit lairs (19 -> 20)
    - add the following trigger in a new line right under the increased trigger counter for each section:
    0.000000 0.000000 0.000000 2 2147484654 0 70 1 29 24 2124 1 1 1700 1 1224979098644774912 1710 2 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 12 3 1224979098644774914 1 1 1702 1 1224979098644774914 1704 1 1224979098644774914 1707 1 1224979098644774914 1770 2 1224979098644774915 1224979098644774914 2147485436 2 1224979098644774915 1224979098644774913 1689 2 2 1224979098644774912 727 2 1224979098644774916 2 726 2 1224979098644774917 2 2130 1 1224979098644774916 2130 1 1224979098644774917 4 0 2147483678 2 1224979098644774916 0 2108 2 1224979098644774916 2 3 0 2108 2 1224979098644774917 2 721 2 1 1224979098644774916 720 2 1 1224979098644774917 1711 2 1224979098644774912 1 3 0

    Tweak works in any version of any module, it's entirely universal, have fun!
    17 )
    When someone takes you prisoner, they take 1-5 of your items and some gold, which varies from 1/4 to 1/10. You also lose all your troops. If you manage to defeat the party that has looted you, all the taken items with their modifiers will be guaranteed to appear in the battle loot, so you can take them back if you are not skipping loot screen rapidly. But gold and troops are lost forever. And while it will still hold true for troops, you can remove the gold/item penalty with this tweak.

    - open scripts.txt and look for the loot_player_items script:

    loot_player_items -1
    52 23 2 1224979098644774912 1 1540 2 1224979098644774913 360287970189639680 6 3 1224979098644774914 0 1224979098644774913 1541 3 1224979098644774915 360287970189639680 1224979098644774914 30 2 1224979098644774915 0 1542 3 1224979098644774916 360287970189639680 1224979098644774914 1570 2 1224979098644774917 1224979098644774915 2133 2 1224979098644774918 0 4 0 31 2 1224979098644774917 11 2133 2 1224979098644774918 20 5 0 31 2 1224979098644774917 1 2133 2 1224979098644774918 15 5 0 1073741855 2 1224979098644774917 2 1073741855 2 1224979098644774917 3 1073741855 2 1224979098644774917 4 1073741855 2 1224979098644774917 8 1073741855 2 1224979098644774917 9 31 2 1224979098644774917 10 2133 2 1224979098644774918 5 5 0 1073741855 2 1224979098644774917 12 1073741855 2 1224979098644774917 13 1073741855 2 1224979098644774917 14 1073741855 2 1224979098644774917 15 31 2 1224979098644774917 7 2133 2 1224979098644774918 5 3 0 2136 3 1224979098644774919 0 100 2147483678 2 1224979098644774919 1224979098644774918 1531 2 360287970189639680 1224979098644774915 4 0 32 2 1224979098644774912 0 521 3 1224979098644774920 1224979098644774912 109 2105 2 1224979098644774920 110 501 3 1224979098644774912 1224979098644774920 1224979098644774915 2106 2 1224979098644774920 110 2105 2 1224979098644774920 115 501 3 1224979098644774912 1224979098644774920 1224979098644774916 2106 2 1224979098644774920 115 2105 2 1224979098644774920 1 2109 2 1224979098644774920 5 501 3 1224979098644774912 109 1224979098644774920 3 0 3 0 2149 2 1224979098644774921 360287970189639680 2123 3 1224979098644774922 1224979098644774921 4 2123 3 1224979098644774923 1224979098644774921 10 2136 3 1224979098644774924 1224979098644774923 1224979098644774922 1529 2 360287970189639680 1224979098644774924

    The green part is responsible for items, so to remove that penalty - delete it all and decrease orange number by 46 (52->6).
    The yellow part is responsible for gold, so to remove that penalty - delete it all and decrease orange number by 5 (52->47).
    To remove them both, your script should look like this:
    Code:
    loot_player_items -1
    1 23 2 1224979098644774912 1

    For 3.9.5.1 version, new game is not required
Back
Top Bottom