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

Users who are viewing this thread

First is just to clean up rgl_log.txt (so it won't complain about not finding such scripts). They are optional and not used on the DLC.

Second is related to changes in morale for tweaks. Vanilla tends to force morale to 50 on a more agressive way. Tweak lets you regulate the base target (average)
 
Remember that this tool is not a submod or a unofficial patch or a fork to the game. It simple takes what is there and adds options to players to choose minor tweaks or even a quicker path to starting to mod the game themselves.

You won't find bug fixes here by design.
 
kalarhan said:
You won't find bug fixes here by design.

We are talking about bugs created by the Tweaks Tool itself, things that work fine in Vanilla Viking Conquest 2.036 but get messed up if the Tweaks Tool is used.


The 2 earlier bug reports I made in the first reply are both instances where the VC tweaks tool module files differ from the official 2.036 files in a way not justified by any intended tweaks, and introduces bugs not present in vanilla 2.036 Viking Conquest.

For the first one, the tweaks tool has: desnudos_end = "itm_picts_hoodtunic_11"

In the place that vanillla 2.036 has the correct term: desnudos_end = "itm_picts_hoodtunic_03"

That means the Tweaks Tool has a bug with equipment modifiers. I think what happened is this: In a recent patch, the developers probably updated module_constants.py to fix a bug, but the change was not properly copied over to the tweaks tool, so the tweaks tool retains the earlier bug. Since the tweaks tool is intended to reflect 2.036, it should have all the same fixes the VC devs made to it.

And the merchant gold tweak having incorrect calculations is not a bug that only affects those who tweak--instead it means someone who leaves that tweak off will unintentionally and unknowingly receive a different experience than vanilla. This is because in some places where the tweaks tools has TWEAK_MERCHANT_MAX_CASH, the vanilla VC files have 4000, and in other places they have 2500. That means in some places the Tweaks Tool is missing a -1500 term--it has it in some places, it just looks like it was forgotten to include that term in some other places where it is needed.

Since tweaks off should mean vanilla behavior, that is an bug specifically with the tool, and the fact the correction was done in some but not other places makes clear it was just an error.

In other words, both bugs are bugs with the tweaks tool specifically, areas where the tweaks file differs from the unmodded vanilla VC 2.036 module files in a way that creates differences from the latest version of vanilla without a tweak activated, or the Tweaks Tool introduces a bug not present in 2.036.
 
Is tweaks tool free from bugs? Of course not, as no software ever created is bug free. Feel free to report any doubt, and they will be analysed if we ever get a new update.

You can agree/disagree with any change introduced here. You are (as any player) encouraged to further modify it to your heart's content.

To understand the history you would need to go back to 2014 and follow 2 years of discussions (back when the game was new and changing, and the community as actually big).

However to change the nature of any of them you would need to travel back in time and join the conversations from a few years ago, some of each can be found on the Tweaks thread.

It is not the purpose of this thread to discuss them (you can do that in the Tweaks thread), neither explain the tech side (q&a thread), just help with any installations issues.

Cheers
 
Hey guys my module wont show in my selection (the folder is named VC_Tweaks_Tool_2.1) and I'm not seeing it. Every step was completed and my cmd window had no errors.
 
lewisjac said:
Hey guys my module wont show in my selection (the folder is named VC_Tweaks_Tool_2.1) and I'm not seeing it. Every step was completed and my cmd window had no errors.

check if your folder is on the right position: [game folder]/Modules/[your mod] and if you just need to scroll down the list of modules (on the game launcher).
 
yeah it is in my modules folder of my Mount and Blade Warband folder (programfiles86) and I scrolled through the list and I can't seem to see it
 
News Update:


version 1.2 was released 3 months ago. Compatible with Warband 1.172+ and VC 2.036.

no plans for a new version.

no news on a update for base VC.

download count: ~40,000 total. ~1,500 for latest final version (plus ~2,500 for the early beta).
 
kraggrim said:
Trainer can upgrade troops to max level (2.010 beta)

If you want your refuge trainer to be able to upgrade troops beyond the third tier (usually spearmen or equivalent) then back up simple_triggers.txt and find this section:
120.000000  72 11 1 1224979098644774912 541 3 1224979098644774912 394 1 501 3 1224979098644774912 394 0 3 0 31 2 144115188075856346 16 31 2 144115188075856132 648518346341351795 132 1 648518346341351795 2133 2 1224979098644774913 0 2170 3 1224979098644774914 17 360287970189639680 4 0 2147483680 2 1224979098644774914 1 2120 3 1224979098644774913 1224979098644774914 4 5 0 2120 3 1224979098644774913 1224979098644774914 3 3 0 4 0 2172 3 1224979098644774915 360287970189639680 2 30 2 1224979098644774915 18 2105 2 1224979098644774913 1 3 0 1650 2 1224979098644774916 648518346341351795 2133 2 1224979098644774917 0 7 3 1224979098644774918 0 1224979098644774916 31 2 1224979098644774917 0 1652 3 1224979098644774919 648518346341351795 1224979098644774918 2147485155 1 1224979098644774919 1561 3 1224979098644774920 1224979098644774919 144115188075856133 4 0 2147483680 2 1224979098644774920 0 1561 3 1224979098644774920 1224979098644774919 0 3 0 32 2 1224979098644774920 0 2171 2 1224979098644774921 1224979098644774919 2147483680 2 1224979098644774921 18 2133 2 1224979098644774922 16 4 0 4 0 2147483680 2 1224979098644774921 12 2105 2 1224979098644774913 2 3 0 2147483680 2 1224979098644774922 19 2105 2 1224979098644774922 10 3 0 2147483680 2 1224979098644774921 1224979098644774922 2330 2 10 648518346341351795 1630 3 1224979098644774923 648518346341351795 1224979098644774919 2110 2 1224979098644774913 1224979098644774923 1 2 936748722493063264 1224979098644774919 2105 2 72057594037927936 10 2122 3 1224979098644774924 1224979098644774913 72057594037927936 2149 2 1224979098644774925 360287970189639680 4 0 2147483678 2 1224979098644774925 1224979098644774924 2123 3 1224979098644774926 1224979098644774925 72057594037927936 2110 2 1224979098644774913 1224979098644774926 2122 3 1224979098644774924 1224979098644774913 72057594037927936 1106 1 216172782113787161 3 0 32 2 1224979098644774913 0 1615 3 648518346341351795 1224979098644774919 1224979098644774913 1610 3 648518346341351795 1224979098644774920 1224979098644774913 1529 2 360287970189639680 1224979098644774924 2133 2 72057594037927941 1224979098644774913 2121 3 72057594037927942 72057594037927941 1 2322 2 6 1224979098644774919 2322 2 7 1224979098644774920 2323 2 8 1224979098644774919 2323 2 9 1224979098644774920 2320 2 11 216172782113787162 1106 1 1585267068834417162 2133 2 1224979098644774917 1 3 0
Change that 18 to 26.

If you are king and want the same for your minister then do the same in this section (should be right undearneath).
120.000000  71 542 3 432345564227567631 21 0 542 3 432345564227567631 11 360287970189639680 2147483679 2 144115188075855992 -1 2204 2 1224979098644774912 144115188075855992 31 2 1224979098644774912 432345564227567631 2133 2 1224979098644774913 0 2170 3 1224979098644774914 17 360287970189639680 4 0 2147483680 2 1224979098644774914 1 2120 3 1224979098644774913 1224979098644774914 4 5 0 2120 3 1224979098644774913 1224979098644774914 3 3 0 4 0 2172 3 1224979098644774915 360287970189639680 2 30 2 1224979098644774915 18 2105 2 1224979098644774913 1 3 0 2133 2 1224979098644774916 144115188075855992 1650 2 1224979098644774917 1224979098644774916 2133 2 1224979098644774918 0 7 3 1224979098644774919 0 1224979098644774917 31 2 1224979098644774918 0 1652 3 1224979098644774920 1224979098644774916 1224979098644774919 2147485155 1 1224979098644774920 1561 3 1224979098644774921 1224979098644774920 144115188075855993 4 0 2147483680 2 1224979098644774921 0 1561 3 1224979098644774921 1224979098644774920 0 3 0 32 2 1224979098644774921 0 2171 2 1224979098644774922 1224979098644774920 2147483680 2 1224979098644774922 18 2133 2 1224979098644774923 16 4 0 4 0 2147483680 2 1224979098644774922 12 2105 2 1224979098644774913 2 3 0 2147483680 2 1224979098644774923 19 2105 2 1224979098644774923 10 3 0 2147483680 2 1224979098644774922 1224979098644774923 2330 2 10 1224979098644774916 1630 3 1224979098644774924 1224979098644774916 1224979098644774920 2110 2 1224979098644774913 1224979098644774924 1 2 936748722493063264 1224979098644774920 2105 2 72057594037927936 10 2122 3 1224979098644774925 1224979098644774913 72057594037927936 2149 2 1224979098644774926 360287970189639680 4 0 2147483678 2 1224979098644774926 1224979098644774925 2123 3 1224979098644774927 1224979098644774926 72057594037927936 2110 2 1224979098644774913 1224979098644774927 2122 3 1224979098644774925 1224979098644774913 72057594037927936 1106 1 216172782113787161 3 0 32 2 1224979098644774913 0 1615 3 1224979098644774916 1224979098644774920 1224979098644774913 1610 3 1224979098644774916 1224979098644774921 1224979098644774913 1529 2 360287970189639680 1224979098644774925 2133 2 72057594037927941 1224979098644774913 2121 3 72057594037927942 72057594037927941 1 2322 2 6 1224979098644774920 2322 2 7 1224979098644774921 2323 2 8 1224979098644774920 2323 2 9 1224979098644774921 2320 2 11 216172782113787162 1106 1 1585267068834417163 2133 2 1224979098644774918 1 3 0

How do you change this in Python? I can't find that particular string of code.

In python simple triggers if I search for Trainerlair I see this:

Code:
training player
  # Moved from 36 trigger
  (24 * 5, [
      (try_begin),
        (eq, "$hire_trainer1", hire_trainer1),
        (eq, "$g_trainerlair_training_center", "p_yourlair"),
        (party_is_active, "p_yourlair"),
        
        (call_script, "script_cf_process_training_fail", "p_yourlair", "$g_trainerlair_training_type"),
        (str_store_party_name, s1, "p_yourlair"),
        (display_message, "@You receive word that the trainer at {s1} has completed his task."),
        (assign, "$g_trainerlair_training_center", -1),
        (assign, "$g_trainerlair_training_type", 0),
      (try_end),
      
      (try_begin),
        (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active),
        (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "trp_player"),
        
        (neq, "$g_trainerlair_training_center2", -1),
        (store_faction_of_party, ":faction", "$g_trainerlair_training_center2"),
        (eq, ":faction",  "fac_player_supporters_faction"),
        
        (call_script, "script_cf_process_training_fail", "$g_trainerlair_training_center2", "$g_trainerlair_training_type2"),
        (str_store_party_name, s1, "$g_trainerlair_training_center2"),
        (display_message, "@You receive word that the trainer at {s1} has completed his task."),
        (assign, "$g_trainerlair_training_center2", -1),
        (assign, "$g_trainerlair_training_type2", 0),
      (try_end),
  ]),
  
  (24 * 5, [
      (try_for_parties, ":party"),
        (party_slot_eq, ":party", slot_party_bribed, 1),
        (party_set_slot, ":party", slot_party_bribed, 0),
      (try_end),
  ]),
  ###


What would I have to change there?


Thanks in advance

additionally, would it be possible to increase the amount of people the trainer can train per week?

Also, 1 more possibly stupid question: If I change something in one of the python files instead of the tweak document, do I have to run the app to make the changes in the text files happen?

EDIT:

I noticed in Module scripts.py

# script_cf_process_training_fail
  # Input: training center, upgrade path
  # Output: none
  ("cf_process_training_fail", [
      (store_script_param_1, ":party_no"),
      (store_script_param_2, ":path"),
     
      (assign, ":num_troops_to_train", 0),
      (store_skill_level, ":trainer_level", skl_trainer, "trp_player"),
     
      (try_begin),
        (le, ":trainer_level", 1),
        (store_add, ":num_troops_to_train", ":trainer_level", 4),
      (else_try),
        (store_add, ":num_troops_to_train", ":trainer_level", 3),
      (try_end),
     
      (try_begin),
        (store_attribute_level, ":int", "trp_player", ca_intelligence),
        (ge, ":int", 1:cool:,
        (val_add, ":num_troops_to_train", 1),
      (try_end),
     
      (party_get_num_companion_stacks, ":num_stacks", ":party_no"),
     
      (assign, ":trained", 0),
      (try_for_range_backwards, ":i_stack", 0, ":num_stacks"),    #MOTO go from bottom of stack (which player can easily manipulate)
        (eq, ":trained", 0),
        (party_stack_get_troop_id, ":troop_id", ":party_no", ":i_stack"),
        (neg|troop_is_hero, ":troop_id"),
       
        (troop_get_upgrade_troop, ":upgrade_troop", ":troop_id" , ":path"),
        (try_begin),
          (le, ":upgrade_troop", 0),
          (troop_get_upgrade_troop, ":upgrade_troop", ":troop_id", 0),
        (try_end),
       
        #only proceed if troop is upgradable
        (gt, ":upgrade_troop", 0),
       
        (store_character_level, ":troop_level", ":troop_id"),
        #only proceed if troop level is basic
        (le, ":troop_level", AI_Poor_Troop_Level-7),  #train up to L3
       
        (try_begin),
          (le, ":troop_level", 12), #chief cambia MOTO change from 22 to 15 (level of recruits)
          (val_add, ":num_troops_to_train", 10), #more recruits are trained during improved training
        (try_end),
       
        (str_store_party_name, s10, ":party_no"),
        (party_count_members_of_type,":cur_number",":party_no",":troop_id"),
        (val_min, ":num_troops_to_train", ":cur_number"),
       
        (call_script, "script_game_get_upgrade_cost", ":troop_id"),
        (val_add, reg0, 10),    #MOTO per upgrade
       
        (store_mul, ":upgrade_cost", ":num_troops_to_train", reg0),    #MOTO make PER upgrade


The ones that are bold and underlined, I changed the first was a 4 I think the second numbre I'm not sure about.

Do I have to do something else after saving the python file to make it change in the game? run the app again and copy the compiled folder to the game folder again for instance? Because I also changed a python file to stop my men from getting killed by the siege events but those changes didn't take effect either.

Cheers
 
Dionaea said:
Do I have to do something else after saving the python file to make it change in the game? run the app again and copy the compiled folder to the game folder again for instance?

yes, any change you do on the [VC Tweaks Tool] files, be it at "tweaks.ini" or any file in "/app" folder requires you to run the file "run_app.bat". That generates new .txt files with your changes.

Trainer can upgrade troops to max level (2.010 beta)

see script (module_scripts) "cf_process_training_fail"

untested (so up to you):
Code:
(assign, ":num_troops_to_train", 0),
you can increase the initial value here, or apply some logic related to character stats

Code:
        #only proceed if troop level is basic
        (le, ":troop_level", AI_Poor_Troop_Level-4),  #train up to L3
this limits the max level
 
kalarhan said:
Dionaea said:
Code:
        #only proceed if troop level is basic
        (le, ":troop_level", AI_Poor_Troop_Level-4),  #train up to L3
this limits the max level

Do you have any idea what number should go there? I wrote 7 at first assuming they'd all be trained to level 6 but then the trainer said he was done constantly without training anyone, then I put it at 6 and now he did start training troops again but still have to see my guys reach the 4th tier via training.

EDIT: 6 isn't the right number either. My Merkismather aren't being upgraded despite the trainer saying he was done
 
Dionaea said:
Do you have any idea what number should go there?

VC troops are divided in tiers around their levels (so a recruit is about level 13, a veteran 26, a elite is 29+)...

put the level limit there. That means if a troop is currently lower/equal level than that number, it will get XP. If it is already at that higher, it doesnt get any.

Code:
(le, ":troop_level", 26),  #train up to level 26 troops, wont touch level 27, 28, ....
le = less or equal

remember the troop needs to have a higher tier available (like a elite version), otherwise it doesnt change anything too.

Troop A: 12 -> 18 -> 23 -> 26 (no elite version)
Troop B: 12 -> 18 -> 23 -> 29 -> 33 (elite version)
 
Sorry to bother you again, but which line do I change exactly?
this one:
Code:
(le, ":troop_level", AI_Poor_Troop_Level -4),  #train up to L3

or this:

Code:
(le, ":troop_level", 34), #chief cambia MOTO change from 22 to 15 (level of recruits)

Or something else entirely because the men aren't being upgraded, I did change the second one, that was 26 at first I believe and I changed it to 34 but it's not working

To be sure: this is the part that deals with lair training in module_scripts right:

Code:
# script_cf_process_training_fail
  # Input: training center, upgrade path
  # Output: none
  ("cf_process_training_fail", [
      (store_script_param_1, ":party_no"),
      (store_script_param_2, ":path"),
      
      (assign, ":num_troops_to_train", 0),
      (store_skill_level, ":trainer_level", skl_trainer, "trp_player"),
      
      (try_begin),
        (le, ":trainer_level", 1),
        (store_add, ":num_troops_to_train", ":trainer_level", 4),
      (else_try),
        (store_add, ":num_troops_to_train", ":trainer_level", 3),
      (try_end),
      
      (try_begin),
        (store_attribute_level, ":int", "trp_player", ca_intelligence),
        (ge, ":int", 18),
        (val_add, ":num_troops_to_train", 1),
      (try_end),
      
      (party_get_num_companion_stacks, ":num_stacks", ":party_no"),
      
      (assign, ":trained", 0),
      (try_for_range_backwards, ":i_stack", 0, ":num_stacks"),    #MOTO go from bottom of stack (which player can easily manipulate)
        (eq, ":trained", 0),
        (party_stack_get_troop_id, ":troop_id", ":party_no", ":i_stack"),
        (neg|troop_is_hero, ":troop_id"),
        
        (troop_get_upgrade_troop, ":upgrade_troop", ":troop_id" , ":path"),
        (try_begin),
          (le, ":upgrade_troop", 0),
          (troop_get_upgrade_troop, ":upgrade_troop", ":troop_id", 0),
        (try_end),
        
        #only proceed if troop is upgradable
        (gt, ":upgrade_troop", 0),
        
        (store_character_level, ":troop_level", ":troop_id"),
        #only proceed if troop level is basic
        (le, ":troop_level", AI_Poor_Troop_Level -4),  #train up to L3
       


And the bottom pat is where you make changes?
 
You just need to change the -4. What it does is take away 4 levels from the AI_poor_troop_level (which I believe is level 24) so basically you can train troops from level 20. So if you change the -4 to 0 you will train troops from lvl 24, which is most t3 units. If you go into the other tweaks thread you will find the txt version there if you want to do it that way.
 
Back
Top Bottom