Search results for query: *

  1. Modding VC: basic tutorials and Q&A thread

    Hello!
    I'm playing as an anglo-saxon character. I used the TWEAK_CENTERS_RECRUIT_FROM_CURRENT_FACTION tweak bacause I want to recruit Angle troops in all towns that belong to my kingdom. But it makes you recruit saxon troops instead. I tried to modify module_simple_triggers.py, specifically, I changed 'saxon' to 'angle' in the following strings:
    (eq,"$nacionalidad_type",cb7_anglesaxon),
    (try_begin),
    (gt, "$g_faction_selected", 0),
    (faction_get_slot, reg1, "$g_faction_selected", slot_faction_culture),
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_culture, reg1),
    (faction_set_slot, "fac_player_faction", slot_faction_culture, reg1),
    (else_try),
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_culture, "fac_culture_angle"),
    (faction_set_slot, "fac_player_faction", slot_faction_culture, "fac_culture_angle"),
    (try_end),
    and
    (eq,"$nacionalidad_type",cb7_anglesaxon),
    (faction_get_slot, ":cult", "fac_player_supporters_faction", slot_faction_culture),
    (try_begin),
    (eq, ":cult", "fac_culture_angle"),
    (faction_set_slot, "fac_player_faction", slot_faction_deserter_troop, "trp_angle_deserter"),
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_deserter_troop, "trp_angle_deserter"),
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_guard_troop, "trp_angle_level1_landed"),
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_messenger_troop, "trp_angle_messenger"),
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_prison_guard_troop, "trp_angle_prison_guard"),
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_castle_guard_troop, "trp_angle_castle_guard"),
    (faction_set_slot, "fac_player_faction", slot_faction_guard_troop, "trp_angle_level1_landed"),
    (faction_set_slot, "fac_player_faction", slot_faction_messenger_troop, "trp_angle_messenger"),
    (faction_set_slot, "fac_player_faction", slot_faction_prison_guard_troop, "trp_angle_prison_guard"),
    (faction_set_slot, "fac_player_faction", slot_faction_castle_guard_troop, "trp_angle_castle_guard"),
    I started a new game, created my own kingdom, but the town troops (both recruits and guards) are still saxon instead of angle.
    What else should I do to change my troops culture from Saxon to Angle?
  2. The Persuasion checks are far far too punishing

    I would prefer it completely non-random. Preferably, you as a player should be able to see if you can convince the character or not. This could be impacted by your skill, your relations, the lord's relations with his current liege and by what you can possibly offer (money, fiefs). This would help to avoid the save scumming completely while preserving both fun and the balance.
  3. Modding Q&A [For Quick Questions and Answers]

    Hello!

    In Viking Conquest I'm trying to mod all lords and towns/castles to spawn only their current faction's troops when they reinforce. They spawn their original faction's troops by default.

    I was advised to mod it so that the towns/villages would change their culture after conquest, and so I did.
    I was also advised to remove the following lines from the scripts.py:

    Code:
          (try_begin),
            (eq, ":party_type", spt_kingdom_hero_party),
            (party_stack_get_troop_id, ":leader", ":party_no"),
            (troop_get_slot, ":party_faction",  ":leader", slot_troop_original_faction),
          (try_end),   

    and

    Code:
              (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),
            (else_try),
              (party_get_slot, ":party_faction", ":party_no", slot_center_original_faction),

    It seems it worked very well for the AI factions, however, the player's faction's lords and towns/castles don't reinforce at all.

    Is it possible to mod it so that all lords of any kingdoms, including the player's kingdom, would only recruit the troops from that particular kingdom's culture?
    Please could you help? I couldn't find any relevant information within this thread, but please refer me if there is an existing solution.
  4. [TWEAKS] VC Tweaks Tool: +80 tweaks the easy way! (released/1.2)

    Thank you!!

    I was mislead by this comment
    # Adds reinforcement to party according to its type and faction
    # Called from several places, simple_triggers for centers, script_hire_men_to_kingdom_hero_party for hero parties

    Anyway, this is this script

    Code:
    script_cf_reinforce_party
      # Input: arg1 = party_no,
      # Output: none
      # Adds reinforcement to party according to its type and faction
      # Called from several places, simple_triggers for centers, script_hire_men_to_kingdom_hero_party for hero parties
      ("cf_reinforce_party",
        [
          (store_script_param_1, ":party_no"),
          
          (store_faction_of_party, ":party_faction", ":party_no"),
          (party_get_slot, ":party_type",":party_no", slot_party_type),
          
          #Rebellion changes begin:
          (try_begin),
            (eq, ":party_type", spt_kingdom_hero_party),
            (party_stack_get_troop_id, ":leader", ":party_no"),
            (troop_get_slot, ":party_faction",  ":leader", slot_troop_original_faction),
          (try_end),
          #Rebellion changes end
          
          (try_begin),
            (eq, ":party_no", "p_main_party"),
            (try_begin),
              (is_between, "$players_kingdom", npc_kingdoms_begin, npc_kingdoms_end),
              (assign, ":party_faction", "$players_kingdom"),
            (else_try),
              (assign, ":party_faction", "fac_player_supporters_faction"),
            (try_end),
            
          (else_try),
            (eq, ":party_faction", "fac_player_supporters_faction"),
            (is_between, ":party_no", walled_centers_begin, walled_centers_end),
            (party_get_slot, ":town_lord", ":party_no", slot_town_lord),
            (try_begin),
              (gt, ":town_lord", 0),
              (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),
            (else_try),
              (party_get_slot, ":party_faction", ":party_no", slot_center_original_faction),
            (try_end),
          (try_end),
          
          (faction_get_slot, ":party_template_a", ":party_faction", slot_faction_reinforcements_a),
          (faction_get_slot, ":party_template_b", ":party_faction", slot_faction_reinforcements_b),
          (faction_get_slot, ":party_template_c", ":party_faction", slot_faction_reinforcements_c),
          
          (assign, ":party_template", 0),
          (store_random_in_range, ":rand", 0, 100),
          (try_begin),
            (this_or_next|eq, ":party_type", spt_town),
            (eq, ":party_type", spt_castle),  #CASTLE OR TOWN
            (try_begin),
              (lt, ":rand", 65),
              (assign, ":party_template", ":party_template_a"),
            (else_try),
              (assign, ":party_template", ":party_template_b"),
            (try_end),
          (else_try),
            (this_or_next|eq, ":party_no", "p_main_party"),
            (eq, ":party_type", spt_kingdom_hero_party),
            (try_begin),
              (lt, ":rand", 55),
              (assign, ":party_template", ":party_template_a"),
            (else_try),
              (lt, ":rand", 75),
              (assign, ":party_template", ":party_template_b"),
            (else_try),
              (assign, ":party_template", ":party_template_c"),
            (try_end),
          (try_end),
          
          (try_begin),
            (gt, ":party_template", 0),
            (party_add_template, ":party_no", ":party_template"),
          (try_end),
      ]),

    As I noted earlier, excluding Rebellion, it only references to troop_original_faction here:
    Code:
              (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),

    Is this the line that needs to be changed? What should I better change it to?
  5. [TWEAKS] VC Tweaks Tool: +80 tweaks the easy way! (released/1.2)

    Thank you!!

    when they spawn (reborn after a defeat, etc)
    Yes, this is exactly what I mean!

    I'm looking at the script, but I'm not sure I understand which piece of code makes them recruit from their original faction.
    The only references to the original faction I could find are these:
    Code:
              (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),
            (else_try),
              (party_get_slot, ":party_faction", ":party_no", slot_center_original_faction),
    But I think this part recruits to the towns, doesn't it?

    Again, if I understand the source correctly, the lord recruiting piece is this:
    Code:
      # script_hire_men_to_kingdom_hero_party
      # Input: arg1 = troop_no (hero of the party)
      # Output: none
      ("hire_men_to_kingdom_hero_party",
        [
          (store_script_param_1, ":troop_no"),
          
          (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party),
          (troop_get_slot, ":cur_wealth", ":troop_no", slot_troop_wealth),
          
          #while hiring reinforcements party leaders can only use 3/4 of their budget. This value is holding in ":hiring budget".
          (assign, ":hiring_budget", ":cur_wealth"),
          (val_mul, ":hiring_budget", 3),
          (val_div, ":hiring_budget", 4),
          
          (try_begin),
            (eq, ":party_no", "p_main_party"),
            (call_script, "script_game_get_party_companion_limit"),
            (store_div, ":ideal_size", reg0, 2),
          (else_try),
            (call_script, "script_party_get_ideal_size", ":party_no"),
            (assign, ":ideal_size", reg0),
          (try_end),
          
          (store_mul, ":ideal_top_size", ":ideal_size", 3),
          (val_div, ":ideal_top_size", 2),
          
          #(try_begin),
          #	(ge, "$cheat_mode", 1),
          #  (str_store_troop_name, s7, ":troop_no"),
          #  (assign, reg9, ":cur_wealth"),
          #  (display_message, "@{!}DEBUGS : {s7} total budget is {reg9}"),
          #  (assign, reg6, ":ideal_size"),
          #  (assign, reg7, ":ideal_top_size"),
          #  (assign, reg8, ":hiring_budget"),
          #  (display_message, "str_debug__hiring_men_to_s7_ideal_size__reg6_ideal_top_size__reg7_hiring_budget__reg8"),
          #(try_end),
          
          (party_get_num_companions, ":party_size", ":party_no"),
          
          (store_faction_of_party, ":party_faction", ":party_no"),
          (try_begin),
            (this_or_next|eq, ":party_faction", "fac_player_supporters_faction"),
            (eq, ":party_faction", "$players_kingdom"),
            (assign, ":reinforcement_cost", reinforcement_cost_moderate),
          (else_try),
            (options_get_campaign_ai, ":reduce_campaign_ai"), #moto chief
            (assign, ":reinforcement_cost", reinforcement_cost_moderate),
            (try_begin),
              (eq, ":reduce_campaign_ai", 0), #hard
              (assign, ":reinforcement_cost", reinforcement_cost_hard),
            (else_try),
              (eq, ":reduce_campaign_ai", 1), #moderate
              (assign, ":reinforcement_cost", reinforcement_cost_moderate),
            (else_try),
              (eq, ":reduce_campaign_ai", 2), #easy
              (assign, ":reinforcement_cost", reinforcement_cost_easy),
            (try_end),
          (try_end),
          
          (assign, ":num_rounds", 1),
          (try_for_range, ":unused", 0 , ":num_rounds"),
            (try_begin),
              (lt, ":party_size", ":ideal_size"),
              (gt, ":hiring_budget", ":reinforcement_cost"),
              (store_and, reg0, "$first_time", first_time_load_main_party),
              (this_or_next|neq, reg0, 0),
              (gt, ":party_no", 0),
              (call_script, "script_cf_reinforce_party", ":party_no"),
              (val_sub, ":cur_wealth", ":reinforcement_cost"),
              (troop_set_slot, ":troop_no", slot_troop_wealth, ":cur_wealth"),
            (else_try),
              (gt, ":party_size", ":ideal_top_size"),
              (store_troop_faction, ":troop_faction", ":troop_no"),
              (party_get_num_companion_stacks, ":num_stacks", ":party_no"),
              (assign, ":total_regulars", 0),
              (assign, ":total_regular_levels", 0),
              (try_for_range_backwards, ":i_stack", 0, ":num_stacks"),
                (party_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"),
                (neg|troop_is_hero, ":stack_troop"),
                (party_stack_get_size, ":stack_size", ":party_no", ":i_stack"),
                (store_character_level, ":stack_level", ":stack_troop"),
                (store_troop_faction, ":stack_faction", ":stack_troop"),
                (try_begin),
                  (eq, ":troop_faction", ":stack_faction"),
                  (val_mul, ":stack_level", 3), #reducing the chance of the faction troops' removal
                (try_end),
                (val_mul, ":stack_level", ":stack_size"),
                (val_add, ":total_regulars", ":stack_size"),
                (val_add, ":total_regular_levels", ":stack_level"),
              (try_end),
              (gt, ":total_regulars", 0),
              (store_div, ":average_level", ":total_regular_levels", ":total_regulars"),
              (try_for_range_backwards, ":i_stack", 0, ":num_stacks"),
                (party_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"),
                (neg|troop_is_hero, ":stack_troop"),
                (party_stack_get_size, ":stack_size", ":party_no", ":i_stack"),
                (store_character_level, ":stack_level", ":stack_troop"),
                (store_troop_faction, ":stack_faction", ":stack_troop"),
                (try_begin),
                  (eq, ":troop_faction", ":stack_faction"),
                  (val_mul, ":stack_level", 3),
                (try_end),
                (store_sub, ":level_dif", ":average_level", ":stack_level"),
                (val_div, ":level_dif", 3),
                (store_add, ":prune_chance", 10, ":level_dif"),
                (gt, ":prune_chance", 0),
                (call_script, "script_get_percentage_with_randomized_round", ":stack_size", ":prune_chance"),
                (gt, reg0, 0),
                (party_remove_members, ":party_no", ":stack_troop", reg0),
              (try_end),
            (try_end),
          (try_end),
      ]),

    But it doesn't reference the original faction.
    Please could you help?

  6. [TWEAKS] VC Tweaks Tool: +80 tweaks the easy way! (released/1.2)

    Hello!
    There are tweaks to get recruits from your culture in any town/fort/village.
    However, is it possible to make all lords in any kingdom to only recruit the troops from that particular kingdom's culture?
    This is to avoid the mess when all cultures fight against the same cultures in the end game.
  7. Guild of craftsmen

    Hello! Please could you point me, which strings in which files add the following feature:
    >Choose your faction culture so all your lords will recruit the same type of troops
  8. Duration of lord’s duty

    Caba`drin, thank you!! Your help is always appreciated!
  9. Duration of lord’s duty

    When you as a king give an order to your lord, he spends a certain amount of time fulfilling this order. For example, as I noticed, if you order a lord to go to a city, he will spend two days in that city. Similarly, if you order a lord to patrol around a fief, he will patrol for a certain...
  10. Feast automation

    What module do you think it should be in?
  11. Feast automation

    With more lords coming to your growing kingdom feasts become an important part of the lord relation management. Talking to each guest gives one point of relation once per day. Cool feature, what are we waiting for! Talk-click-exit-click, talk-click-exit-click, talk-click-exit-click...
  12. Number of guests on a feast

    Yes, I have found it too, thank you!!! Will try now...

    EDIT: Yes, I put it before the line:
          (try_for_range, ":cur_troop", kingdom_ladies_begin, kingdom_ladies_end),
    and it did the trick. At least all 16 positions are first ocupied by the lords.

    Thank you for the tips!!!
  13. Number of guests on a feast

    Thank you!

    Unfortunately, the first suggestion didn’t work because adding any entry point number above 31 leads to CTD when I close the editor. So I can only use entry points 16 through 31. I'm not sure I understood how to 'shift' the position of the spawn points.

    Also, I’ve noticed that the NPCs spawn in a certain order: first the inactive lords wishing to pledge allegiance, then normal lords, then women and claimants. Is there a way to change this order, increasing the priority if normal lords during the feast?
  14. Number of guests on a feast

    I’m running a kingdom with a center in Dhirim. When I start a feast I can accommodate only a limited amount of guests, which is far from enough. The other lords, while present in the city, will not show up in the hall. I tried to use the Edit Mode to simply add entry points to the hall, but it...
  15. Dynamic groups

    Thank you! I would suggest to leave it as is. The charge order for AI cavalry usually makes no sense and makes life harder for the AI. So this script in its current form actually improves the AI behaviour.
  16. OSP Code Combat Lancers: Use the right weapon! Battle edition

    You must be correct about the conflict with the native behaviour. After commenting that line out they just stay and switch to and from their back-up weapons. Looks funny.

  17. Dynamic groups

    Caba`drin,

    I tried this solution and it didn’t help, but removing the optional lines as you suggested previously did the job. Anyway, why did you think it important to exclude the AI from this script? Do you suspect incorrect behavior or something? Why bother?

    EDIT: I checked the AI behaviour during castle attack and defense and it seems OK to me.
  18. OSP Code Combat Lancers: Use the right weapon! Battle edition

    I have noticed an interesting pattern when testing the Caba`drin’s fix for lancers. It works as intended if we face a purely infantry army: all lancers try to use their lances and switch to back-up weapons if dehorsed. But if the enemy army has at least one cavalry unit, our dehorsed lancers will pull out their lances when it’s near and will not switch back to their back-up weapons even after the last enemy cavalry unit is killed.
  19. Dynamic groups

    Thank you for the siege tweak! I tried it in quick siege and it works as intended, but gives the following warning:
    Warning.jpg


    What could be the problem?

  20. Dynamic groups

    Thank you very much!!! That’s really useful!

    Could you please also advise on how to make those knights join infantry during sieges? I use the module system.
Back
Top Bottom