Recent content by Zirkhovsky

  1. Zirkhovsky

    Modding Q&A [For Quick Questions and Answers]

    EmielRegis said:
    Zirkhovsky said:
    Is this what it means? Or did I get it wrongly?

    Slots are not arrays. Think of them as kind of object attributes. For example lets say you have sword. Sword slots are damage, speed, cost in gold, weight, if its 1H or 2H etc...
    The objects  such as items, agents, factions, props, scene prop instances etc... are kind of one dimensional arrays and  slots are fields.
    Thanks for the reply. I managed to experiment with slots in module_scripts and module_mission_templates and I sort of found out how to use them. Your explanations made things even clearer, thanks once again.
  2. Zirkhovsky

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    Zirkhovsky said:
    are slots the name of the arrays or the elements in an array?

    see the spoiler about slots: https://forums.taleworlds.com/index.php/topic,142422.0.html

    slots are akin to array elements. Any constant that references slots is just the ID of that element.

    As you may know, arrays are composed of elements, and elements have a position (ID, #, ...) and value

    Array X:
      element #0: value is 0
      element #1: value is 123

    Engine is 0-based. Count from 0 (zero).

    If you want to learn more about how data is saved I suggest you look in the old wiki, they have a article about how the data is stored in the savegames (which is a mirror of game memory). Also install and play with MnBSaveGameEditor

    Thanks for the explanation, did some analysis of the game code and got the idea roughly.

    (troop_get_slot, ":eek:riginal_faction", "$g_talk_troop", slot_troop_original_faction),
    (faction_get_slot, ":eek:riginal_faction_leader", ":eek:riginal_faction", slot_faction_leader),

    Just to make sure that I didn't get it wrongly:

    The meaning of the first line is that "troop_get_slot" will initiate the operation. "slot_troop_original_faction" means that it will access the array containing all original factions, and find the original faction of "$g_talk_troop", then store it in local variable ":eek:riginal_faction".

    In the second line, "slot_faction_leader" means that the array of faction leaders will be accessed to find the faction leader of ":eek:riginal_faction", then store it into local variable ":eek:riginal_faction_leader".

    Is this what it means? Or did I get it wrongly?
  3. Zirkhovsky

    Modding Q&A [For Quick Questions and Answers]

    I am seeking clarification on slots.

    From the threads that I have looked into, slots seem to have something to do with arrays. However, are slots the name of the arrays or the elements in an array?

    Since they can be declared in module_constants, my guess is that they are arrays themselves. If this is the case, how do you access the individual elements in the array? How is it different from the "try_for_range" iterations?

    For example,
    Code:
    (party_get_slot, ":cur_wealth", ":center_no", slot_town_wealth),
    From header_operations, the operation usage include the following arguments - (party_get_slot, <destination>, <party_id>, <slot_no>)

    Since there are no explanations or documentations using the forum's "Search" function, I hope that someone will be able to explain to me on M&B slots, and perhaps explain the line above for additional clarification.
  4. Zirkhovsky

    Decreasing Garrison Sizes?

    Ah, I see. I didn't know that.

    I know that the armies of AI Lords have something to do with the lord's income from fiefs, but I never knew that garrisons of centers are affected by town wealth as well.

    Perhaps this is the trigger that checks if a particular center should be reinforced?

    In module_simple_triggers :
    #Hiring men with hero wealths (once a day)
      #Hiring men with center wealths (once a day)
      (24,
      [
        (try_for_range, ":troop_no", active_npcs_begin, active_npcs_end),
          (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
          (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party),
          (ge, ":party_no", 1),
          (party_is_active, ":party_no"),
          (party_get_attached_to, ":cur_attached_party", ":party_no"),
          (is_between, ":cur_attached_party", centers_begin, centers_end),
          (party_slot_eq, ":cur_attached_party", slot_center_is_besieged_by, -1), #center not under siege
                         
          (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, ":num_hiring_rounds", 1),
            (store_random_in_range, ":random_value", 0, 2),       
            (val_add, ":num_hiring_rounds", ":random_value"),
          (else_try),
            (game_get_reduce_campaign_ai, ":reduce_campaign_ai"),
            (try_begin),
              (eq, ":reduce_campaign_ai", 0), #hard (2x reinforcing)
              (assign, ":num_hiring_rounds", 2),
            (else_try),
              (eq, ":reduce_campaign_ai", 1), #medium (1x or 2x reinforcing)
              (assign, ":num_hiring_rounds", 1),
              (store_random_in_range, ":random_value", 0, 2),       
              (val_add, ":num_hiring_rounds", ":random_value"),
            (else_try),
              (eq, ":reduce_campaign_ai", 2), #easy (1x reinforcing)
              (assign, ":num_hiring_rounds", 1),         
            (try_end),               
          (try_end),
         
          (try_begin),
            (faction_slot_eq,  ":party_faction", slot_faction_marshall, ":troop_no"),
            (val_add, ":num_hiring_rounds", 1),
          (try_end),
                   
          (try_for_range, ":unused", 0, ":num_hiring_rounds"),       
            (call_script, "script_hire_men_to_kingdom_hero_party", ":troop_no"), #Hiring men with current wealth       
          (try_end), 
        (try_end),
         
        (try_for_range, ":center_no", walled_centers_begin, walled_centers_end),
          (neg|party_slot_eq, ":center_no", slot_town_lord, "trp_player"), #center does not belong to player.
          (party_slot_ge, ":center_no", slot_town_lord, 1), #center belongs to someone.     
          (party_slot_eq, ":center_no", slot_center_is_besieged_by, -1), #center not under siege

          (store_faction_of_party, ":center_faction", ":center_no"),
          (try_begin),
            (this_or_next|eq, ":center_faction", "fac_player_supporters_faction"),
            (eq, ":center_faction", "$players_kingdom"),       
            (assign, ":reinforcement_cost", reinforcement_cost_moderate),
          (else_try),
            (game_get_reduce_campaign_ai, ":reduce_campaign_ai"),
            (assign, ":reinforcement_cost", reinforcement_cost_moderate),
            (try_begin),
              (eq, ":reduce_campaign_ai", 0), #hard (1x or 2x reinforcing)
              (assign, ":reinforcement_cost", reinforcement_cost_hard),
              (store_random_in_range, ":num_hiring_rounds", 0, 2),
              (val_add, ":num_hiring_rounds", 1),
            (else_try),
              (eq, ":reduce_campaign_ai", 1), #moderate (1x reinforcing)
              (assign, ":reinforcement_cost", reinforcement_cost_moderate),
              (assign, ":num_hiring_rounds", 1),
            (else_try),
              (eq, ":reduce_campaign_ai", 2), #easy (none or 1x reinforcing)
              (assign, ":reinforcement_cost", reinforcement_cost_easy),
              (store_random_in_range, ":num_hiring_rounds", 0, 2),
            (try_end),         
          (try_end),
         
          (try_for_range, ":unused", 0, ":num_hiring_rounds"),
            (party_get_slot, ":cur_wealth", ":center_no", slot_town_wealth),
            (assign, ":hiring_budget", ":cur_wealth"),
            (val_div, ":hiring_budget", 2),
            (gt, ":hiring_budget", ":reinforcement_cost"),     
            (call_script, "script_cf_reinforce_party", ":center_no"),     
            (val_sub, ":cur_wealth", ":reinforcement_cost"),
            (party_set_slot, ":center_no", slot_town_wealth, ":cur_wealth"),
          (try_end), 
        (try_end),
  5. Zirkhovsky

    Decreasing Garrison Sizes?

    For Module System :
    Garrison sizes (upon first starting the game) can be decreased or increased by modifying module_party_templates.py.

    For example, Kingdom of Swadia is recognised in the game files as kingdom_1.

    We will then look at the kingdom reinforcement party templates. (In this case kingdom_1)
    Code:
    ("kingdom_1_reinforcements_a", "{!}kingdom_1_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_swadian_recruit,2,3),(trp_swadian_militia,4,8)])
    Let's look at this part of the line : (trp_swadian_recruit,2,3),(trp_swadian_militia,4,:cool:

    This part means that each time this party template is spawned, a minimum of 2 and a maximum of 3 Swadian Recruits will be added to the garrison. The same concept goes for the Swadian Militia.

    There will be 3 kinds of reinforcements, a, b and c. All 3 can be adjusted according to your desired garrison sizes.
    Different centers have different spawn rates, as such towns will have a larger garrison than castles.
    This is for using the module system. However, given your situation...

    For Text Files :
    Open party_templates.txt.

    Look for this line :
    Code:
    pt_kingdom_1_reinforcements_a {!}kingdom_1_reinforcements_a 0 0 1 0 35 2 3 0 36 4 8 0 -1 -1 -1 -1
    The formatting is similar.
    Ignore the first 4 numbers, leave them untouched. Now, look at the part (35 2 3 0)

    35 probably refers to the troop id, I will be frank, I do not know how to identify troop ids from text files.
    The 2 and 3 refers to the minimum and maximum, which is the same as in the module system.
    0 is probably a prisoner flag, ignore it.

    The same goes for (36 4 8 0)
    36 refers to troop id, 4 and 8 represent minimum and maximum values respectively.

    As for the -1 at the end of the line, they represent empty spaces. If not mistaken, only 6 troop types can be added per kingdom reinforcement.
    Ignore it.

    Therefore, if you want to lower garrison sizes, decrease the minimum and maximum values for troops.
  6. Zirkhovsky

    1812 - Single Player Remake - Vympel's Beta II (Released)

    Ambrois LeGaillard said:
    as for me, gamefront link don't run. Please give another link, and also tell me if I must adjoin the Beta III also or I can play with this only.
    Go to the Beta IV thread, there are 4 links to choose from. Download from the 3rd and 4th link.
  7. Zirkhovsky

    Bug Reporting HQ

    About the crusade... I was chosen to lead a crusade and I captured the city with my own forces. However, the other crusade generals came and besieged the city which I have captured even though we are not at war. They don't try to capture it, just stand outside the city for months.

    I don't want to attack them and face war, but I don't fancy seeing my city having 0 prosperity...
  8. Zirkhovsky

    Bug Reporting HQ

    I have an issue with custom kingdom troops: Only some of my crossbowmen have crossbows...

    I don't know if it is just me, but it seems that the better crossbows I give them, the less troops spawn with them.

    Example 1: I gave my crossbowmen Heavy Crossbows, only 1 out of 10 troops have it.
    Example 2: I gave my crossbowmen Light Crossbows, 7 out of 10 have it.
  9. Zirkhovsky

    This is probably a stupid question. How does the mod receive bug fixes?

    I believe you just need v3.0.2 alone for it to work.
  10. Zirkhovsky

    This is probably a stupid question. How does the mod receive bug fixes?

    Depends on which mod. Most mods (including this one) receive bug fixes through downloadable patches/updates. Some mods like 1257AD use SVN which automatically updates your mod to the latest version.
  11. Zirkhovsky

    RGL ERROR, Incorrect skeleton type for anim 552 at creation, not using steam

    I downloaded from the link you provided and it worked. Thanks!  :grin:

    @banderola : Pretty sure enbseries isn't the problem, I deleted it and I have no problems.
  12. Zirkhovsky

    RGL ERROR, Incorrect skeleton type for anim 552 at creation, not using steam

    I am running v3.0.2 and I am also encountering this error. My version is non-steam.
  13. Zirkhovsky

    Trade, Resources in L'Aigle

    For me, I buy ale from German towns and sell them all in Salzburg. Salzburg always buy ale at high prices.
  14. Zirkhovsky

    Troop differences?

    Tried some light cavalry? Send your line infantry after your cavalry, so they may close up the distance while your cavalry get close and personal.
Back
Top Bottom