Compilation of 82 little tweaks to the text files to change your gameplay(links)

Users who are viewing this thread

rasz said:
hotmitts said:
I can't get Tavern Keepers to sell prisoners at all, can anyone help with this pls? Tried following the eg. earlier in thread but it doesn't work, all other tweaks I've tried work fine

I just came here to complaint about same thing :smile: it works in Reyvadin and Sargoth, but doesnt work in suno, very weird. Its like Teeper in Suno is using another dialog file.

can you tell me exactly what you put into the txt. file, like, paste the chunk, at least you got somewhere with it!!
 
vonmistont pre-empted me a bit here but doesn't go as far as I do so I'll post it all here anyway.

Hardrada's Caravan Generation Tweak Part One:  The Player Kingdom.
By default an independent player's kingdom doesn't produce caravans (although I have had one appear on rare occasions for unknown reasons), I am going to change this so that player kingdoms will produce caravans in the same manner as other kingdoms.  To do this properly, and give you some options I will be editing four different files.

We'll start with triggers.txt (this is the same as what vonmistont posted).  Search for 1.000000 0.000000 0.000000 it should look like this:
1.000000 0.000000 0.000000  0  9 6 3 1224979098644774912 432345564227567629 432345564227567635 542 3 1224979098644774912 21 0 2147483679 2 1224979098644774912 432345564227567629 4 0 2136 3 1224979098644774913 0 100 2147483678 2 1224979098644774913 10 1 3 936748722493063294 1224979098644774912 11 3 0 3 0
Change it to this:
1.000000 0.000000 0.000000  0  8 6 3 1224979098644774912 432345564227567629 432345564227567635 542 3 1224979098644774912 21 0 4 0 2136 3 1224979098644774913 0 100 2147483678 2 1224979098644774913 10 1 3 936748722493063294 1224979098644774912 11 3 0 3 0
This script used to cover the generation of a number of party types - patrols, scouts, foragers - and excluding the player faction made some sense then, but now the only party it produced still in use is caravans.

There's a problem here though, the caravans produced only have the caravan guard troops protecting it, no faction troops, so they're quite small and vulnerable.  I want to set up a default reinforcement of mercenary troops but also allow you to choose what faction's troops will be used.

First we will create the mercenary reinforcements to be used in party_templates.txt
On the second line of the file you will see a number, 48 by default.  Increase this by 1.
Add this line to the end of the file.
pt_kingdom_p_reinforcements_b kingdom_p_reinforcements_b 0 0 1 0 26 2 6 0 30 4 7 0 -1 -1 -1 -1
Then we will set them up as the default reinforcements when you start a new game.  Open up scripts.txt, near the top of the file you will see game_start -1, and the next line starts with 1074, change this to 1075, then search for 432345564227567629 7 360287970189639680 it should look like this:
432345564227567629 7 360287970189639680 6 3 1224979098644774924 288230376151711814 288230376151711840
Change it to this:
432345564227567629 7 360287970189639680 502 3 432345564227567629 78 576460752303423536 6 3 1224979098644774924 288230376151711814 288230376151711840
Now when you start a new game your caravans will be reinforced with watchmen and mercenary crossbowmen, but you probably don't want to have to start a new game to take advantage of this and might prefer to use another faction's troops so we're moving onto menus.txt
On the second line of the file you will see a number, 183 by default.  Increase this by 1.  Search for menu_camp_action it should look like this:
menu_camp_action 0 Choose_an_action: none 0 5
mno_camp_recruit_prisoners  10 105 1 1 2270 1 1224979098644774912 2106 2 1224979098644774912 24 32 2 1224979098644774912 144115188075856030 4 0 32 2 144115188075856030 0 2133 2 144115188075856028 0 2133 2 144115188075856029 0 2133 2 144115188075856030 0 3 0  Recruit_some_of_your_prisoners_to_your_party.  1 2060 1 864691128455135254  .  mno_action_read_book  0  Select_a_book_to_read.  1 2060 1 864691128455135256  .  mno_action_modify_banner  1 31 2 144115188075856014 1  Cheat:_Modify_your_banner.  1 900 1 1513209474796486657  .  mno_action_retire  0  Retire_from_adventuring.  1 2060 1 864691128455135258  .  mno_camp_action_4  0  Back_to_camp_menu.  1 2060 1 864691128455135251  .
Change it to this:
menu_camp_action 0 Choose_an_action: none 0 6
mno_camp_recruit_prisoners  10 105 1 1 2270 1 1224979098644774912 2106 2 1224979098644774912 24 32 2 1224979098644774912 144115188075856030 4 0 32 2 144115188075856030 0 2133 2 144115188075856028 0 2133 2 144115188075856029 0 2133 2 144115188075856030 0 3 0  Recruit_some_of_your_prisoners_to_your_party.  1 2060 1 864691128455135254  .  mno_action_read_book  0  Select_a_book_to_read.  1 2060 1 864691128455135256  .  mno_action_caravan_troops  2 522 3 1224979098644774912 432345564227567629 21 31 2 1224979098644774912 0  Change_your_caravan_troops.  1 2060 1 864691128455135415  .  mno_action_modify_banner  1 31 2 144115188075856014 1  Cheat:_Modify_your_banner.  1 900 1 1513209474796486657  .  mno_action_retire  0  Retire_from_adventuring.  1 2060 1 864691128455135258  .  mno_camp_action_4  0  Back_to_camp_menu.  1 2060 1 864691128455135251  .
(If you added my "Change your kingdom name" tweak it will look a bit different, that's OK, just add in the new line and increase the blue number by 1.)
Go to the end of the file and add this:
menu_camp_action_caravan_troops 0 Select_the_type_of_troops_you_want_to_protect_your_caravans. none 0 6
mno_action_set_faction_1  0  Swadians.  2 502 3 432345564227567629 78 576460752303423522 2040 0  .  mno_action_set_faction_2  0  Vaegirs.  2 502 3 432345564227567629 78 576460752303423525 2040 0  .  mno_action_set_faction_3  0  Khergits.  2 502 3 432345564227567629 78 576460752303423528 2040 0  .  mno_action_set_faction_4  0  Nords.  2 502 3 432345564227567629 78 576460752303423531 2040 0  .  mno_action_set_faction_5  0  Rhodoks.  2 502 3 432345564227567629 78 576460752303423534 2040 0  .  mno_action_set_faction_p  0  Mercenaries.  2 502 3 432345564227567629 78 576460752303423536 2040 0  .
Now if you have your own kingdom you should find an option under camp actions to change the troops used.  Note that unless you have started a new game, the default is to not use any reinforcements so you will have to come here and pick one.

Edited to correct a bug in the menu code.
Module System code, for those who are interested:
module_triggers.py - under Kingdom Parties delete the following line.
      (neq, ":cur_kingdom", "fac_player_supporters_faction"),
module_party_templates.py - Add this to the end of the file.
  ("kingdom_p_reinforcements_b", "kingdom_p_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_watchman,2,6),(trp_mercenary_crossbowman,4,7)]),
module_scripts.py - find this line:
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_marshall, "trp_player"),
and add this line after it.
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_reinforcements_b, "pt_kingdom_p_reinforcements_b"),
module_game_menus.py - find "camp_action" and add in this:
      ("action_caravan_troops",
      [(faction_get_slot, ":active", "fac_player_supporters_faction", slot_faction_state),
        (eq, ":active", sfs_active),
        ],"Change your caravan troops.",
      [(jump_to_menu, "mnu_camp_action_caravan_troops"),
        ]
      ),
Then add this menu to the file:
  ("camp_action_caravan_troops",0,
  "Select the type of troops you want to protect your caravans.",
  "none",
  [],
    [
      ("action_set_faction_1",[],"Swadians.",
      [(faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_1_reinforcements_b"),
        (display_message, "@You have changed your caravan troops to swadians."),
        (change_screen_return),
        ]
      ),
      ("action_set_faction_2",[],"Vaegirs.",
      [(faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_2_reinforcements_b"),
        (display_message, "@You have changed your caravan troops to vaegirs."),
        (change_screen_return),
        ]
      ),
      ("action_set_faction_3",[],"Khergits.",
      [(faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_3_reinforcements_b"),
        (display_message, "@You have changed your caravan troops to khergits."),
        (change_screen_return),
        ]
      ),
      ("action_set_faction_4",[],"Nords.",
      [(faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_4_reinforcements_b"),
        (display_message, "@You have changed your caravan troops to nords."),
        (change_screen_return),
        ]
      ),
      ("action_set_faction_5",[],"Rhodoks.",
      [(faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_5_reinforcements_b"),
        (display_message, "@You have changed your caravan troops to rhodoks."),
        (change_screen_return),
        ]
      ),
      ("action_set_faction_p",[],"Mercenaries.",
      [(faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_p_reinforcements_b"),
        (display_message, "@You have changed your caravan troops to mercenaries."),
        (change_screen_return),
        ]
      ),
      ]
  ),
This add a confirmation message for the change that the tweak on it's own doesn't, since that would mean editing yet another file.
 
Marksman said:
Dtay08 said:
wow why cant i change anything :evil: i try but when i do it says no path or if i change the name in save as it says save so i say ok then it says you dont have permission from Administrator
Let me guess  - you're using Vista and you've installed the game to C:\program files\ ... ?
In short .. Vista -nice as it is- tries to hide the real folder names from you, redirects the savegame folder for you and keeps someone unauthorised (yes, YOU, the owner!) from fiddling with program files (saves ..) to prevent something bad from happening (after all, all windows users are idiots!).

You might have more luck if you run the Windows Explorer with admin rights and open the files from there .. for the specifics use google ... .

hmm thanx for the tip and dont worrie ive read the notepad one to and windows users arnt all idiots lol
 
Hardrada's Caravan Generation Tweak Part Two: Caravan Limits.
By default, as long as a faction has a city it can have five caravans regardless of it's size.  This is not only illogical, but also means that in the later game caravans become scarcer as factions die off, and this affects the income generated by cities, and thus your ability to pay your armies, particularly a problem if you are trying to conquer the map as an independent since you have to garrison everything yourself.  I'm going to change this so that the limit on the number of caravans is based on the amount of land held by each faction, not a flat five each.

Open up scripts.txt and search for create_kingdom_party_if_below_limit it should look like this:
create_kingdom_party_if_below_limit -1
14 21 1 1224979098644774912 22 1 1224979098644774913 1 3 936748722493063243 1224979098644774912 1224979098644774913 2133 2 1224979098644774914 72057594037927936 2133 2 1224979098644774915 0 4 0 31 2 1224979098644774913 11 2133 2 1224979098644774915 5 3 0 2133 2 72057594037927936 -1 4 0 2147483678 2 1224979098644774914 1224979098644774915 1 3 936748722493063295 1224979098644774912 1224979098644774913 3 0

Change it to this:
create_kingdom_party_if_below_limit -1
32 21 1 1224979098644774912 22 1 1224979098644774913 1 3 936748722493063243 1224979098644774912 1224979098644774913 2133 2 1224979098644774914 72057594037927936 2133 2 1224979098644774915 0 4 0 31 2 1224979098644774913 11 2133 2 1224979098644774916 0 6 3 1224979098644774917 648518346341351443 648518346341351461 2204 2 1224979098644774918 1224979098644774917 31 2 1224979098644774918 1224979098644774912 2105 2 1224979098644774916 4 3 0 6 3 1224979098644774917 648518346341351461 648518346341351501 2204 2 1224979098644774918 1224979098644774917 31 2 1224979098644774918 1224979098644774912 2105 2 1224979098644774916 1 3 0 6 3 1224979098644774917 648518346341351501 648518346341351591 2204 2 1224979098644774918 1224979098644774917 31 2 1224979098644774918 1224979098644774912 2105 2 1224979098644774916 1 3 0 2107 2 1224979098644774916 1 2108 2 1224979098644774916 7 2133 2 1224979098644774915 1224979098644774916 3 0 2133 2 72057594037927936 -1 4 0 2147483678 2 1224979098644774914 1224979098644774915 1 3 936748722493063295 1224979098644774912 1224979098644774913 3 0

This gets a point value for each faction, I'm using 4 for towns, 1 for castles and 1 for villages, then multiplies it by 1, divides by 7 and rounds down to get the caravan limit for each faction.  For a new game this would give the Swadians and Vaegirs six caravans and the others five.  I've written this to be easily adjusted to suite people's individual preferences, and there shouldn't be any problem setting the value for a centre type to zero if you don't want to count them.

Module System code, for those who are interested:
Under "create_kingdom_party_if_below_limit" in module_scripts.py you will see this:
        (eq, ":party_type", spt_kingdom_caravan),
        (assign, ":party_count_limit", 5),
I've changed it to this:
        (eq, ":party_type", spt_kingdom_caravan),
        (assign, ":no_towns", 0),
        (try_for_range,":cur_town", towns_begin, towns_end),
          (store_faction_of_party, ":cur_faction", ":cur_town"),
          (eq, ":cur_faction", ":faction_no"),
          (val_add, ":no_towns", 4),
        (try_end),
        (try_for_range,":cur_town", castles_begin, castles_end),
          (store_faction_of_party, ":cur_faction", ":cur_town"),
          (eq, ":cur_faction", ":faction_no"),
          (val_add, ":no_towns", 1),
        (try_end),
        (try_for_range,":cur_town", villages_begin, villages_end),
          (store_faction_of_party, ":cur_faction", ":cur_town"),
          (eq, ":cur_faction", ":faction_no"),
          (val_add, ":no_towns", 1),
        (try_end),
        (val_mul, ":no_towns", 1),
        (val_div, ":no_towns", 7),
        (assign, ":party_count_limit", ":no_towns"),
 
hotmitts said:
rasz said:
hotmitts said:
I can't get Tavern Keepers to sell prisoners at all, can anyone help with this pls? Tried following the eg. earlier in thread but it doesn't work, all other tweaks I've tried work fine

I just came here to complaint about same thing :smile: it works in Reyvadin and Sargoth, but doesnt work in suno, very weird. Its like Teeper in Suno is using another dialog file.

can you tell me exactly what you put into the txt. file, like, paste the chunk, at least you got somewhere with it!!

I just replaced

Code:
dlga_tavernkeeper_buy_drinks_2:tavernkeeper_pretalk 69631 616  0 Actually,_cancel_that_order.  612  0 
dlga_tavernkeeper_talk:close_window 69631 610  0 I_guess_I_should_leave_now.  6  0

with

Code:
dlga_tavernkeeper_buy_drinks_2:tavernkeeper_pretalk 69631 616  0 Actually,_cancel_that_order.  612  0 
dlga_tavernkeeper_talk:ransom_broker_sell_prisoners 69631 610  2 2159 1 72057594037927936 30 2 72057594037927936 1 I_have_prisoners_to_sell.  626  0 
dlga_tavernkeeper_talk:close_window 69631 610  0 I_guess_I_should_leave_now.  6  0

Hmm I think it doesnt show up if you dont have any prisoners while talking to Keeper, thats why it didnt work for me in Suno, I forgot I had no prisoners :sad:
 
I thought this would be the best place to get help, since I haven't spent time on the modding sections...

Anyway, the thing I was wondering was that is it possible to get items that are not in the game, but can still be found in item_kinds.txt to appear in shops without using the item editor? Don't ask me why I can't use it, I just have some difficulties with an old Windows... So anyway, is there some sort of small piece of code that tells the game not to put those particular items in shops (items like black armour, noble dresses etc.), or would one have to dwell deaper in order to make this kind of change?
 
Lord Sami said:
Anyway, the thing I was wondering was that is it possible to get items that are not in the game, but can still be found in item_kinds.txt to appear in shops without using the item editor?

If don't want to use the item editor, then you'll need Notepad (notepad.exe) and Windows Calculator (calc.exe).

1. Open item_kinds1.txt using Notepad.
2. Open Calculator (Start -> Run -> calc) and from the File menu select View->Scientific.

This item for example, is not purchasable by default, let's make it purchasable...

itm_norman_shield_1 Kite_Shield Kite_Shield 1  norman_shield_1 0  262151 4831838208 118 167772194 2.500000 100 0 1 0 0 480 82 0 90 0 0 0
0

3. 262151 is the number we're going to change.

4. Type or paste this number in Decimal mode (Dec) in Calculator

5. Switch to Hexadecimal mode (Hex)

6. Click on "Or" button

7. Type 10000

8. Click on "="

9. Switch back to decimal

10. 327687 is the number which makes this item purchasable.

11. Replace 262151 with 327687

12. Save the file.

For other items, it doesn't matter whatever number there is, instead of 262151, all you need to do is to OR that number with 10000 in Hex mod.

or you can use the Module System and add itp_merchandise flag to the item and compile, which is basically the same thing. :wink:



Edit: I think you can also add those items to the game in Edit Mode, but I'm not sure. Though this won't make them appear in shops or anything, it just gives you the items you want.

 
TheMageLord said:
Monk,
I edited the troop wages post to include the divisor for garrisoned troops.

jocan2003,
The best way to prevent sieging your land is to make strong garrisons - they won't siege them near as often if their are other easier to siege places. For the companion xp use the hero_xp_multiplier in module.ini like Lancefighter said.

red.murder1,
Increasing the number of people would be difficult (it has to map out a bunch of stuff to use 6 slots, adding another would require a good bit more code throughout the script) but making it move faster isn't that difficult. Search for
2105 2 144115188075856338 1
in scripts.txt. That's where it adds the number of men pushing the belfry, normally every guy that's pushing adds 1. If you change that to 2 it would act like it had twice as many men, and move twice as fast.

This is in three different places in the scripts file, which one of the three is it? First, second or third?
 
Is there a way so you can train with more then four companions in your party? Is there a way to make it so not only are you fighting more, but so there are teams? For instance - you go to the Training Grounds with about 40 men. Would it be possible to make it so it's 20 vs 20, for instance?
 
Hardrada said:
Change it to this:
menu_camp_action 0 Choose_an_action: none 0 6
mno_camp_recruit_prisoners  10 105 1 1 2270 1 1224979098644774912 2106 2 1224979098644774912 24 32 2 1224979098644774912 144115188075856030 4 0 32 2 144115188075856030 0 2133 2 144115188075856028 0 2133 2 144115188075856029 0 2133 2 144115188075856030 0 3 0  Recruit_some_of_your_prisoners_to_your_party.  1 2060 1 864691128455135254  .  mno_action_read_book  0  Select_a_book_to_read.  1 2060 1 864691128455135256  .  mno_action_caravan_troops  2 522 3 1224979098644774912 432345564227567629 21 31 2 1224979098644774912 0  Change_your_caravan_troops.  1 2060 1 864691128455135258  .  mno_action_modify_banner  1 31 2 144115188075856014 1  Cheat:_Modify_your_banner.  1 900 1 1513209474796486657  .  mno_action_retire  0  Retire_from_adventuring.  1 2060 1 864691128455135259  .  mno_camp_action_4  0  Back_to_camp_menu.  1 2060 1 864691128455135251  .
That last red number drove me nuts trying to find just now :smile:  A post edit will save some other cut and paste guy like me (including me the next time I do this tweak :lol: )

Edit: Well, I thought that would fix it so that changing my caravan troops didn't bring up the retirement yes/no dialog.  What it did instead was make the retirement skip the confirmation and go directly to game over.  Hardrada, what'd I get wrong that the dialog works but doesn't point to the new menu?
 
Sorry, I should have seen this coming. 

Essentially what happened is that when I wrote this in the module system, rather than add the new menu to the end of the file I stuck in before the retirement menu.  When the module system was compiled each menu was given a number based on it's position in the file, so the new menu gets the number the retirement menu had, and it gets the game end menu's number etc.  This works fine until you try to do it as a text file mod and all the other menus aren't renumbered, which is why I said to add the new menu to the end of the file, but forgot that the number referring to it would have to be changed too.

I've updated the original post but here's the fix for those who have already done the tweak.
The last number in the addition here is 864691128455135258, change it to 864691128455135415.  If you copied the entire menu you probably want to change the 864691128455135259 after Retire_from_adventuring back to 864691128455135258 so you have a chance to confirm/cancel retiring if you click on this menu.
 
is there a way to make the repulsion from weapons more critical. i mean that is there a way to make soldier fly away when you kill them for example
 
Is there a way to modify the after-battle XP gain in .808? Like for The Last Days? Training Elves is hard...
 
After some amount of searching, I give up. Couldn't find it anywhere.

Is there a way to "soften" the spiky terrain generation in vanilla 1.011?
 
Did some searching and didn't see these on the tweaks list.

Is there a way to increase the % of prisoners accepting your recruitment efforts?

And is there a way to decrease their desertion rate once they've joined?
 
Jester451 said:
Did some searching and didn't see these on the tweaks list.

Is there a way to increase the % of prisoners accepting your recruitment efforts?

And is there a way to decrease their desertion rate once they've joined?

1. you can change the time which you can recruit them, so if they refuse, try again a second later

2.check the list on page 1, its number 13 on the combat/troop related section
 
Back
Top Bottom