Author Topic: Compilation of 82 little tweaks to the text files to change your gameplay(links)  (Read 536095 times)

0 Members and 7 Guests are viewing this topic.

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
Even trying to change the one that you get talking to them via the party menu to appear there doesn't seem to work for me...

Could you tell me how you changed it? I just want to experiment on this a bit more.

Since there's also a file named dialog_states.txt it makes me wonder if the dialogs in the game work on an FSM (Finite State Machine) or something.  :)

Sanzo84

  • Sergeant
  • *
    • View Profile
  • Faction: Swadian
*notice* For those of you new to M&B modding, the files you need to edit for these tweaks are in Mount&Blade\Modules\Native.

I thought it might be nice to have all the little text file tweaks that I've posted in random places all stuck in one thread to make them easy to find. So:

1. Change to make cattle follow instead of run

2. Info about changing the way villages get cattle

3. Change Morale and Party Size (still works in 1.003)

4. Adjusting tournament bet amounts

5. Editing the escape rate of lords

It's Do it Yourself modding :)

-edit- More!
6. Editing to allow inventory access during sieges.

7. Change AI lord's maximum party size. (same thread as 3 above)

8. Disabling companion interaction (have as many as you like)

9. Modify the timer on repeating quests, repeat them sooner! (Yes, I just linked you to the bottom of this page. Heh heh...)

10. Allow village elders to give quests again after refusing one (Another link to this thread, this time on the 2nd page.)

11. Change to allow consuming of ale/wine (same thread as the food fix below)

12. Adjust the amount of time between recruiting from prisoners. (Another link to this thread, this time on the 3rd page.)

13. Customize arena melee winnings (tedious) (Another link to this thread, this time on the 4th page.)

14. Adjust the build times on village improvements. (Same link as 13, it's in the bottom section of the post.)

15. Allow garrisoning of heroes. This tweak brought to you by Lord Kinlar. (Another link to the 4th page of this thread.)

16. Make cattle move faster. (Yet another link to the 4th page of this thread.)

Also, heres the trading guide I posted. Not exactly a tweak, but I figured if I have it here too it will be easier to find :)
Trading Guide

-edit- I made a fix for the food morale bug! It happened to one of my games, so I was able to come up with a 'patch' for it. I can't figure out what's causing the initial problem, but this will correct it - and keep correcting it if it happens again.
Fix your food!

TML, why are you so awesome? *bows to TML's awesomeness, as awesome as he may be still behind Armagan*
'This is my son Temujin. Temujin, this is your cousin Koke. His father is the man I shot in the hip on the day I met your mother.' -Yesugei (Conn Iggulden's "Wolf of the Plains")

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
I tried a few things. One thing I tried was to change the state of
Quote
dlga_member_chat:member_talk 4095 13  4 2200 1 144115188075855885 1507 1 144115188075855885 520 3 1224979098644774912 144115188075855885 130 2320 2 5 1224979098644774912 Yes,_{s5}?  71  0 
from member_chat to start to see if it would show up then, but that didn't seem to do anything. Looking at the code for it, what it's doing is first storing them, then checking that stored number to see if they are a hero, then it gets the honorific that they use to talk to you (set elsewhere for each companion), then it sets that honorific to display where {s5} is.

And while I'm describing this to you, I suddenly realised what I'm doing wrong. D'oh! Even though conversation.txt stores member_chat there, the actual dialog state is stored in the number - the red 13 in this case. The red 71 is the next dialog that one leads to, which is member_talk if you look it up in dialog_states. Changing the 13 to 0 (start) made it display in the castle, but then it no longer displays in troops - and even displays when you first meet them in the tavern. The change would obviously have to be way more complex to get it to work properly, but you *CAN* get them to talk correctly. You'd just have to add a new dialog entry with conditions that only allow them to talk to you during the castle scene, using start (0) as the dialog state. The trick would be making it specifically affect them only in the castle scene, and only affect the specific heroes.

You could do the castle scene with a check to see if they are in court, which is:
Quote
31 2 144115188075856039 1
31 is the function to check if the first equals the second, 144115188075856039 is the $talk context - which I believe is set automatically by the engine, and 1 is talk context court. So if the talk context is court (if they're in a lord's hall or castle) it will come back as true and let the dialog continue.

The check to make sure that they're a companion would be
Quote
33 3 144115188075855885 360287970189639844 360287970189639860
33 being a check if the first thing is between the other two things. 144115188075855885 is $g_talk_troop and the other two big numbers are the range of npc heroes.
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Tachyon

  • Veteran
  • *
    • View Profile
  • Faction: Khergit
  • WB
TheMageLord, I posted this question in another thread, but I couldn't get a proper response.

Does building a mill only give you a one time bonus of 5% prosperity or does it increase by 5% over regular intervals of time?

In case it only gives a one time bonus, is it possible to tweak it to increase the prosperity of the village after every month or so?

Nordmann

  • Knight at Arms
  • *
  • "Just 'and over the tea, an' everyone lives!"
    • View Profile
    • Evochron Mercenary (Indie Space-sim)
  • Faction: Nord
  • MP nick: Nordmann, of course.
  • M&BWB
This thread needs to be pinned, no doubt.

bravesirknight

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
Great stuff!

Here's one I wonder if you can do... if there's anything in there for how Lords respawn elsewhere after a battle when they're not captured, a way to make it take a lot longer?

Mainly so I don't have to deal with this crazy problem if you push a faction into just a few castles they'll be 15 lords sitting together in them with 50-100 guys each...

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Mills gives a one time bonus of 5%, which I admit kinda sucks... Changing it to a recurring means you have to add a new trigger (so might not be savegame compatible).

Heres a simple trigger that I made from scratch that you can add that will keep applying the bonus:
Quote
720.000000 3 6 3 1224979098644774912 648518346341351501 648518346341351591 541 3 1224979098644774912 131 1 1 3 936748722493063465 1224979098644774912 5
What this does is: Every 720 hours (30 days) it runs a check through all the villages. For each village with a mill, it triggers a script that increases prosperity by 5%.

What you do is open up simple_triggers.txt and paste that whole thing in at the very bottom, then go up to the very top and increase the very first number in the file (84, on line 2) by 1 (so 85 unless you've added other triggers). That way it will read the trigger. Again, I don't know if this is savegame compatible - I don't have a save with a mill built to see if it is or not. Also note that while this trigger *should* work, im only human. I'll be using it myself, though - so I do trust it :)
« Last Edit: October 04, 2008, 10:32:48 PM by TheMageLord »
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
bravesirknight, it's possible but it won't be perfect. Go into simple_triggers.txt and search for:
Quote
48.000000  23
The 48 is the number of hours between triggering, so this one goes every two days. The trigger takes all lords who aren't currently on the map and puts them in a friendly castle - if the kingdom is destroyed, it gives them a 10% chance to swap to another kingdom.

Raising the 48 to a higher number would increase the interval between checks, but it would still spawn them all at once when it did do the check. Even if you have it set to monthly, you could kill them 1 hour before the end of the month and they'd still pop back in.

Given the module system, it wouldn't be too hard to build in a more complex check that stores the time that they are defeated or released and releases them X days from that point, but without the module system that would be quite difficult.
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
FYI  I've just found a typo in conversations.txt and dialog_states.txt. I don't know if it has an effect on gameplay but here it is...

pretneder_view_char_requested

should be pretender.   :)

bravesirknight

  • Knight
  • *
    • View Profile
  • Faction: Vaegir
bravesirknight, it's possible but it won't be perfect. Go into simple_triggers.txt and search for

Given the module system, it wouldn't be too hard to build in a more complex check that stores the time that they are defeated or released and releases them X days from that point, but without the module system that would be quite difficult.

Interesting. Probably means more cheating in my future in the short term lol... At least it will be changeable at some point, sounds good to me.

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Lord Kinlar, I decided to go ahead and look into the dialogs again and came up with a nice solution to the problem of companions telling you to die.

Go into conversation.txt and increase the number at the top by 1 (so to 1670 if you haven't added anything else in) and then paste this:
Quote
dlga_start:member_talk 4095 0  4 33 3 144115188075855885 360287970189639844 360287970189639860 31 2 144115188075856039 1 520 3 1224979098644774912 144115188075855885 130 2320 2 5 1224979098644774912 Yes,_{s5}?  71  0
in somewhere. I put mine directly behind the member_chat one. That alone will work, but lets also add 2147483679 2 144115188075856039 1 (a check if you're in a castle or not) to the member_separate thing (so you can't ask them to leave when they're in the castle, which might screw something up). To do this just put it in right after the first 0 in that dialog, and then change the 0 to a 1 (so it will read the line of code you added).

That section of the dialog file should look like this now if you stuck the dialog in the same spot I did:
Quote
dlga_member_chat:member_talk 4095 13  4 2200 1 144115188075855885 1507 1 144115188075855885 520 3 1224979098644774912 144115188075855885 130 2320 2 5 1224979098644774912 Yes,_{s5}?  71  0
dlga_start:member_talk 4095 0  4 33 3 144115188075855885 360287970189639844 360287970189639860 31 2 144115188075856039 1 520 3 1224979098644774912 144115188075855885 130 2320 2 5 1224979098644774912 Yes,_{s5}?  71  0
dlga_member_talk:member_trade 69631 71  0 Let_me_see_your_equipment.  72  0
dlga_member_trade:do_member_trade 4095 72  0 Very_well,_it's_all_here...  73  1 2051 0
dlga_do_member_trade:member_talk 4095 73  0 Anything_else?  71  0
dlga_member_talk:view_member_char_requested 69631 71  0 What_can_you_tell_me_about_your_skills?  74  0
dlga_view_member_char_requested:do_member_view_char 4095 74  0 All_right,_let_me_tell_you...  75  1 2046 0
dlga_member_talk:member_separate 69631 71  1 2147483679 2 144115188075856039 1 We_need_to_separate_for_a_while.  76  2 1 2 936748722493063474 144115188075855885 2133 2 144115188075855902 72057594037927936
Stuff added is in blue, the 0 which was changed to a 1 is in red.

Once this is done, the message that you get when talking to the troops will be the same as the one when you talk to them from the party menu - and you'll be able to change their equipment and look at their skills and everything.

NOTE: The new dialog needs to be ABOVE the section dealing with companions rejoining, or you will encounter a bug later where any companion that leaves you for any reason and rejoins will trigger those dialogs instead of the new one being added. If you put it where I put it in the example you'll be fine. So I suggest you put it exactly where I did on the example to avoid this bug.
« Last Edit: October 04, 2008, 10:46:58 PM by TheMageLord »
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
-edit- For a few minutes, the one I had here was buggy (triggered on other people, since the check was just if they were a hero). I've corrected this now (now it checks if they are one of the companions specifically).

Will this work for claimants now, when you garrison them?

TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
No, but the original dialogs for the claimant already works :)

No need for a tweak there.

The bug that I fixed was the fact that the original script only checked if they were a hero, and all I added to it at first was a check that they were in a castle/lord's hall. But since there are a LOT of heroes (every single lord, lady, and all the claimants have the hero tag set) it was triggering on everyone while they were in castles.

To fix it, I removed the check to see if they were a hero and added a check to see if they were one of the companions (it's an is_between check). So now it ONLY triggers on companions in castles, and since companions are only in castles when you garrison them, it shouldn't trigger at all except for the exact occurence that it was meant for.
« Last Edit: October 04, 2008, 02:44:06 AM by TheMageLord »
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...

Lord Kinlar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
No, but the original dialogs for the claimant already works :)

No need for a tweak there.

The bug that I fixed was the fact that the original script only checked if they were a hero, and all I added to it at first was a check that they were in a castle/lord's hall. But since there are a LOT of heroes (every single lord, lady, and all the claimants have the hero tag set) it was triggering on everyone while they were in castles.

To fix it, I removed the check to see if they were a hero and added a check to see if they were one of the companions (it's an is_between check). So now it ONLY triggers on companions in castles, and since companions are only in castles when you garrison them, it shouldn't trigger at all except for the exact occurence that it was meant for.

I just thought the claimants would also use the same "surrender or die" dialog when garrisoned*, but you say they don't. I'm still trying to figure out how those dialogs work so I haven't tested your fix yet. This fix will also work for towns, right?

Do you really think adding "1 2147483679 2 144115188075856039 1" to member_separate line is necessary? I mean, what would happen if we ask them to leave in a castle? Would they disappear forever?


* Actually, they don't seem to use that dialog anymore, instead they use this line "My_offer_to_rejoin_you_still_stands,_if_you'll_have_me". In fact, I've discovered a really funny bug which you can use to clone the garrisoned companions. If you accept the above offer to rejoin (in a castle), the game adds them to your party but will not remove the one in the castle, so you'll have one more of each of them.  :)




TheMageLord

  • The Handyman Can
  • Knight
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
They still use that dialog - thats the one where you ask them to leave. And it does work for towns the same as castles.

If you ask them to leave in the castle, seemingly nothing happens - but it probably sets things in the background that might screw something up later - Personally, I'd rather be safe than sorry.

If you're getting cloned companions, it must be some other change you've done to dialogs to make them use the other dialog. I never get that dialog with the changes I've made.
I shall destroy you! I shall cleave off your limbs with a dull axe, rip off your head with my bare hands, tear out your eyes with a rusty SPOON! So please stand there while I find the time. Oh, so busy...