Disabling Npc Interaction - Apparently it was meant to be in the game.

Currently Viewing (Users: 0, Guests: 1)

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
By request of Wraithcat, I looked into a way to disable companion interaction. It turned out to be much simpler than I thought it would be - there is a built in toggle to disable it, but the option to disable it wasn't added in. It's actually there in the .960 module system, but commented out - and doesn't exist in the 1.003 text files. The value is initially assigned as 0 in game_start, though, which is what I'll be editing here (so it would require a new game, unlike the other tweaks).

I won't copy the whole script on this one, since it's ridiculously large, but heres the line of code you need to search for:
2133 2 144115188075856295 0
144115188075856295 is the actual thing being assigned here, and 0 is what it is being assigned to. Normally this is to get the variable ready to be set elsewhere, but we can just set it here and save the hassle. Change the 0 to a 1, and presto - the next time you start a game, companions will no longer interact (no complaints or compliments).

You COULD work it into a game in progress if you really wanted to, but you would have to add the line of code somewhere. I won't cover that here, but basically you'd just pick a script that will be triggered and add in the 2133 2 144115188075856295 1 thing to the end or beginning of it. Then you add 1 to first number in the script (which is the # of lines in that script, it needs to add 1 because you're actually adding in an extra line of code). You could remove it after you know that the script has been triggered - it stays once set.

This is the first of my tweaks that I won't actually be using, since I usually only keep 2 or 3 companions anyway, but it's good for those who want companion armies. Enjoy.

-edit- For those new to M&B modding, this is all in scripts.txt, which is in Mount&Blade\Modules\Native.

Link to other tweaks.

-edit- If you want to put this into games in progress, you can do like lord Kinlar said and add the line to start_training_at_training_ground. See this for a good (I hope, anyway...) explanation of doing that.

Update: In 1.010 a new global variable has been added. This causes the reference to the variable being set here to be changed. To find the new one you need to search for
2133 2 144115188075856296 0
Note the 144115188075856295 changed to 144115188075856296, this is due to the aforementioned new global variable. I haven't dug around in 1.010 to see if this still works in 1.010, but I doubt all the workings of it were changed in a bugfix so it probably will.

Update2: In 1.011 this new variable has been moved to the bottom of the list, thus fixing compatibility errors with 1.003. So if you're using 1.011 you have to use the original number mentioned above for 1.003. I still haven't dug around to see if it all still works, though :smile:
 

Smitehappy

Recruit
Best answers
0
Thank god, now I can finally have Matheld in my party without her threatening to slit my party's doctor's throat. :grin:
 

Tachyon

Veteran
WB
Best answers
0
Momaw said:
I think TheMageLord needs a script-related special title.  :grin:
Lord of the Scripts?

Anyway, his scripts have been really useful...especially his Dhirim siege tower fix.
 

Wraithcat

Sergeant
WF&S
Best answers
0
Absolutely outstanding Magelord!! And damned quick as well!  :cool:

You and your scripting have totally changed the game for me

I second, "Lord of the Scripts"!  :grin:
 

Lord Kinlar

Master Knight
Best answers
0
Excellent stuff, TML!  :smile:

TheMageLord said:
You COULD work it into a game in progress if you really wanted to, but you would have to add the line of code somewhere. I won't cover that here, but basically you'd just pick a script that will be triggered and add in the 2133 2 144115188075856295 0 thing to the end or beginning of it. Then you add 1 to first number in the script (which is the # of lines in that script, it needs to add 1 because you're actually adding in an extra line of code). You could remove it after you know that the script has been triggered - it stays once set.
If I add that line (2133 2 144115188075856295 1) to, let's say, start_training_at_training_ground for example, would it get triggered when I start training at a training ground?  :?:

And if the method above works, is there a way to turn it off after that, like adding 2133 2 144115188075856295 0 line again?




 

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
Haha, apparently my title is now "The Handyman Can." Catchy, I kinda like it :grin:

I expected the request to be *way* more complicated. Who would've thought that there would be a simple trigger to turn off every single npc interaction?

Kinlar: It should, you could try it and then see if the companions stop bickering. If they do, all is well. If not try again. And yes, that's all you'd have to do to turn it back off. What it does is every time an opportunity comes up for them to complain (after battles) it checks it, if it is set to 0 they complain as usual. If not it just doesn't do anything. So turning it back to 0 should make them start complaining again at the next opportunity.

When the module system comes out it would be trivial to add a menu or something to set it as an option. I'm really surprised it wasn't added already, considering all the scripts already check for it.
 

Hound_of_Culann

Recruit
Best answers
0
This really sounds like something I would like to implement, but i don't know much about modding.  Where do I find game_start?  In the program files or do I need an editor?  I looked in the program files but couldn't find it.  Or am I missing the mark completely?
 

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
Ah, sorry - I should have specified.

You need to open scripts.txt in Mount&Blade\Modules\Native.

Game_start is the name of the script inside scripts.txt (incidentally, it's the one at the top). Inside the file you need to open up the search function in whatever text editor your using, and do a search for 2133 2 144115188075856295 0.

Once you've found it (there is only one in the whole file) change the 0 to a 1.

The only thing this does is make companions not interact with eachother - they won't compliment eachother, they won't complain - and they won't leave due to disliking someone. If you want a really big party without bothering with figuring out who hates who, this is useful. I personally never use big parties of heroes anyway so I left mine at the default setting.
 

Zandman

Sergeant at Arms
Best answers
0
Call me crazy, but I really like the NPC interaction.

it really helps creating an image of the characters in my mind and make them come to life without having to construct elaborate storylines in the game. Say that Matheld, e.g., is a terrible, intolerable woman and doesn't suit the style of your party - well, then, you have to either change your own style to accomodate her or just leave her be. I know that when I recruit that obnoxious Alayen, he won't stay long, so I try using him for what he's worth while he's there.

Interaction adds depth, IMO


... and I bet my opinion on this is frightfully interesting to many people.  :roll:
 

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
I actually feel the same way, Zandman. I just made this tweak as a request from Wraithcat (he sent me a PM).

Although the bickering doesn't affect me much anyway. I prefer running with 3 or 4 heroes to carry key skills - one with training + engineering + first aid + wound treatment, another with training + pathfinding + spotting + tracking, the third with high dexterity and looting with a bit of training, and the fourth as a backup for the others - with high first aid, wound treatment, training, and pathfinding. Two pairs that like eachother works fine for this.

I never get surgery (feels too much like cheating, imo) and I customize the party based on my skills. If I go with high charisma, I get trading and leadership. If I go with high dex, I get looting and have that guy focus on charisma to do the trading. Everyone, including me, does the training - and in a couple days I can train a party from raw recruits to hardened soldiers.

The game just feels more real when my people DIE when they get chopped up, instead of magically staying alive (as either a hero or a surgically saved character). Seeing a guy get smacked in the head with an axe and only going unconscious just feels wrong... What did I do to save him, sew his head back on?
 

Muglebust

Veteran
Best answers
0
Zandman said:
Interaction adds depth, IMO
indeed, but I have one love above anything else, and thats options, Handymans tweaks adds more of them and thats a good thing in my book
 

Zandman

Sergeant at Arms
Best answers
0
Yeah - hooray for options, I agree.

Funny, I used to feel the same way about surgery as you, MageLord, but I've had to modify my views a little. Surgery has always played a major role in battlefields all over the world, so I've chosen to include it recently - only with much lower stats than the other two medical skills.
Sometimes, that axe blow to the head might just push a piece of helmet into your soldier's skull, and removing it surgically would save his life, instead of having it get infected and let him die a slow and agonizing death.
For example.
 

Lord Kinlar

Master Knight
Best answers
0
Lord Kinlar said:
TheMageLord said:
You COULD work it into a game in progress if you really wanted to, but you would have to add the line of code somewhere. I won't cover that here, but basically you'd just pick a script that will be triggered and add in the 2133 2 144115188075856295 0 thing to the end or beginning of it. Then you add 1 to first number in the script (which is the # of lines in that script, it needs to add 1 because you're actually adding in an extra line of code). You could remove it after you know that the script has been triggered - it stays once set.
If I add that line (2133 2 144115188075856295 1) to, let's say, start_training_at_training_ground for example, would it get triggered when I start training at a training ground?  :?:

And if the method above works, is there a way to turn it off after that, like adding 2133 2 144115188075856295 0 line again?
FYI. This method seems to work.

 

Red River

Sergeant Knight
Best answers
0
I suspect the tweak will only stop hero disputes but not their decision to leave.. for that ya need to farther tweak the dialog that lets player to persuade a hero to stay. I think ya just have to change 13 to 0 so it will look like -2,0 at some point...
 

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
If they're already pissed at you they might go ahead and leave, but I ran around with 14 heroes fighting battles with this and nobody said a word, and after a day or so with plenty of chances to get angry they were all still happy.