SP Native Respec Mod and NPC Import & Export Mod for Warband 1.168

Users who are viewing this thread

RamonNZ

Recruit
Warband 1.168 Respec Mod and NPC Export/Import from Statistics screen Mod:




Information:

This is an in-game respec mod for yourself and companions, for v1.168 warband. For those who don't know - respec is short for re-specialization. It allows you to reallocate the stats/skills/proficiencies of your character or and NPC. You access it from the Camp menu/Take an action.

For those who just want things simple, there is an Export-Import NPCs from the Character/Statistics window for download as well.




Respecializing in other people's mods:

You are able to respec or export/import within all mods I've tried so far. Sometimes it can "break" a mod though, in which case the fix is to reinstall the mod (but you still get to keep your saves including saves with respecialized NPCs). It is recommended to use my NPC export/import mod instead to respec NPCs in other mods - it appears to be less likely to "break" in the testing I've done.

If you want to respec or export/import in another mod what you do is:
1) rename the original txt file(s) from the mod and replace them with the txt files from my mod.
2) boot up the game, make the changes to your npcs, save your game in a different slot (to be safe) using "save as", then exit the game.
3) remove my txt files and replace with the original ones from the mod. You now have re-specialized npcs and you're ready to continue playing normally.
4) IMPORTANT - if some functions in the mod stop working and give errors after doing this trick - don't panic - just reinstall the mod. Your old saves and probably your new saves won't be affected by this problem, just the mod itself, but do save in a different slot for a while to be safe. I heard about the problem and so found the workaround.




TL;DR:

The Character/NPC/(troops) Respec (Respecialization) mod for Warband 1.168 can be downloaded here: http://www.nexusmods.com/mbwarband/mods/5909 under main files.

The Export & Import NPCs (and troops) from Character/Statistics window for Warband 1.168 can be downloaded here: http://www.nexusmods.com/mbwarband/mods/5909 also under main files.




For the same mods for original Mount&Blade 1.011 head here: http://forums.taleworlds.com/index.php?topic=306088

For the same mods for WFaS 1.143 head here: http://forums.taleworlds.com/index.php?topic=306085




Feedback:

Any feedback is appreciated. I'd be happy to hear if there's anything that could be better, any ways to exploit the mod, what works well, and any suggestions.

Please bear in mind the following information about the respec mod if giving feedback:

Due to limitations of the Mount and Blade engine - It is not possible to respec using the character screen, because it is not possible to change unused attribute or skill point totals. That is why I had to created this modification using self-made menus because changing the unused attribute point or unused skill point totals can't be done from anywhere. I therefore create other variables to hold the attribute and skill points until the respec is finished.

-Due to limitations of the Mount and Blade engine - it is also not possible to check if you have any unused attribute, skill or proficiency points on the character screen, so they won't show up in the respec screen.

-Due to limitations of the Mount and Blade engine - you may save up to 99 unused proficiency points (only).

-You might notice that when you add to your intelligence I haven't got the module to add to your skill points. I did at first but then noticed that the game will do that naturally and will give you extra skill points afterwards (or negative skill points if you lowered your intelligence!). For that reason the modificaion doesn't give skills when you add to your intelligence.

-Every effort has gone into making this mod non-exploitable, so if you lower a stat then go to the skills menu, any skill dependent upon that stat may decrease as well. Likewise if you lower your Weapon Mastery, your proficiencies will lower to the new cap eg 60 (0), 100 (1), 140 (2), 180 (3), 220 (4), 260 (5), 300 (6), 340 (7), 380 (:cool:, 420 (9), 460 (10). If you don't lower your Weapon Mastery below what you started with, the profiencies won't lower.




Why this mod?

Since I've been playing warband (about 2 weeks) I've really wanted a way to directly export and import troops from the statistics screen, but moreso a way to respec myself and troops ingame. Whilst googling and searching this forum I've seen lots of requests for it so I know it's not just me. Having said that the current export and import troop in camp is workable, I just want to be able to do it in game.

The ultimate purpose of doing this is to put the code up for any mod maker to use when it's bug free, not particularly to just release modded txt files. So as I say, once I’ve got it completed satisfactorily I shall put up my python code up as well. I've only been writing python for about a week, but it's just enough to get the job done.




Respec Version History:

1.01 - fixed bug that occasionally gave 500000 proficiency points - oops.
1.02 - improved the screens a bit.
1.20 - overhauled the menus - in particular the skills menu which was virutally unreadable. Small optimizations and changes.
1.30 - disallowing a person save till you've used all stats and skills so no accidental losing them,
allowing locked (skills being 1/3 of attributes, proficiencies based on weapon mastery) or unlocked respec,
fixes for a multitude of tiny annoying bugs that I never noticed before like:
respec counting books like surgery towards skill points thus adding 1 skill point per book each time,
sometimes deleting all of one-handed proficiency,
very occasional random number of attribute points appearing.
other little details.
1.40 - In this version I've checked and allowed that if you've read a book (e.g. Engineering), you can make that skill one point higher than your stat (i.e. intelligence) will normally allow.



Credits:

Rubik for his original source code which got me started: http://forums.taleworlds.com/index.php?topic=61239




[Edit: fixed an unforseen error in Respec mod which gave weak troops 500,000 proficiency points because of using jump if not even rather than jump if greater. yeah that was a doozie.]




Images for Respec mod:

Attributes_zps596df30b.jpg

Proficiencies_zps91c76b82.jpg

Images for Simple Export-Import:

Exported_zpsa7bd353c.jpg




Cheers,
RamonNZ/TechWarrior
 
I'm adding this in case I'm ever too lazy to convert to an update as my interest tends to wane over time.

The way to edit the source code to export & import NPC heros from the Character/Statistics screen:

From module_dialogs.py: Additions in Red
  [anyone,"member_trade", [], "Very well, it's all here...", "do_member_trade",[(set_player_troop, "trp_player"),(change_screen_equip_other)]], #set back to trp_player before open equipment or you get two screens of the NPCs equipment.
  [anyone,"view_member_char_requested", [], "All right, let me tell you...", "do_member_view_char", [(set_player_troop,"$g_talk_troop"),[change_screen_view_character]]],
  [anyone|plyr,"member_talk", [], "Never mind.", "close_window",[(set_player_troop, "trp_player")]], #set back to trp_player at the end or you'll become the troop.

Then also code to export and import non-hero troops from Character/Statistics screen:

From module_dialogs.py: Additions in Red
  [anyone,"view_regular_char_requested", [], "Aye {sir/madam}. Let me tell you all there is to know about me.", "do_regular_member_view_char", [(set_player_troop,"$g_talk_troop"), [change_screen_view_character]]],
  [anyone|plyr,"regular_member_talk", [], "Nothing. Keep moving.", "close_window",[(set_player_troop, "trp_player")]], #set back to trp_player at the end or you will become the troop.

The same can be done for anybody who will show you their character screen.

The source code for the full respec mod includes pretty big changes, so I've uploaded it here: http://www.nexusmods.com/mbwarband/download/1000003806/
 
I just made fixes to the mod removing all possible exploits that I could think of off the top of my head:
Finishing up with negative proficiency points isn't allowed.
Making a stat high, then making a skill high, then reducing the stat now also reduces skills dependent upon the stat.
Making Weapon Mastery high, making a proficiency high, then bumping Weapon Mastery down will reduce weapon proficiencies to only what is possible.

It's pretty much finished.
 
Tried the "Character/Statistics window" version, worked like a charm in both native and Warsword conquest (by reverting to the mod's original file once I was done editing the NPCs), nice job.
 
D'Sparil said:
Tried the "Character/Statistics window" version, worked like a charm in both native and Warsword conquest (by reverting to the mod's original file once I was done editing the NPCs), nice job.

That is a great idea. I hadn't thought of trying that. Switching out the conversations of a mod won't crash the game, so it should be possible to do for just about any mod. Thanks.

Eidenwood_Hellschyte said:
or you could just upload a .txt file of the import/export version

I could separate the txt file from the source code. I think that's what you're saying you want(?)  Done.
 
Yeah the source code is removed. It's still rared so that the instructions can go in for newbies tho.
 
Thanks a lot for making this cool mod! I used the text file switch version and it worked beautifully. This saves so much time and effort that would normally be spent trying to edit export and import files. It's great.
 
Hello there! I have a question. Is it possible that after overwriting the files (scripts and menus) something about quest has gone? I was in Tulga when I overwrited the files and nowI can't see the quest option when I talk with the Guild Master.

(sorry for my bad english)
 
You have to save the text files of the module BEFORE you paste the ones from this mod in there. Then after you load up the game and respec your character, you delete the files added by this mod and paste the ones you save before back in.
 
Yes thanks MMM,

Gawain, if it's vanilla warband it shouldn't make any difference. I'm assuming that it's a mod though if something's missing.

and yeah I hope that you didn't "overwrite the files" like you said, just swapped them out just in case.
 
Any chance of getting an update that can manage mods which add new skills? Currently the respec won't affect those and only deals with the vanilla ones.
 
I'm able to successfully use this mod to adjust 2 of my companions on Prophesy of Pendor. Unfortunately, it appears to be bugging out all my other companions. In this screenshot I haven't even used the mod yet to adjust anyone beyond Alistair and Rayne. This happens immediately after loading the game with the new Script and Menu files. The script bugs occur immediately upon clicking any of the companions and, as you can see, they have no visual doll.

I'm able to use the mod to respec those companions, but attempting to view their skill sheet results in a crash. The crash happens if I check their skill sheets either before OR after respecing.

Here's a picture:

http://i537.photobucket.com/albums/ff340/EdwardCentofante/Warband.png
 
Ah, to fix the script error, just reinstall PoP again, then the script error gets fixed.

As long as the game doesn't actually crash, and you can save it, your changes to your saved game are probably fine. Just reinstall the mod after that or you'll have the script error forever.
 
Thanks for posting the source tweaks for the simple import/export of companions. As an exercise in using modmerger, I created the following code for a mini-mod. Save the below code as exportcomp_dialogs.py modmerger and add exportcomp to your modmerger_options file. You will need  Caba`drin extensions to modmerger from here.

Code:
# -*- coding: cp1254 -*-
from header_common import *
from header_dialogs import *
from header_operations import *
from header_parties import *
from header_item_modifiers import *
from header_skills import *
from header_triggers import *
from ID_troops import *
from ID_party_templates import *
from module_constants import *

from util_wrappers import *

def modmerge_dialogs(orig_dialogs):
    # Start - Allow export and import of companions

    # Set troop back to player before opening equipment
    dialog = FindDialog(orig_dialogs, ststate="member_trade",
                        endstate="do_member_trade")
    cons_block = dialog.GetConsequenceBlock()
    pos = cons_block.FindLineMatching((change_screen_equip_other))
    cons_block.InsertBefore(pos, [(set_player_troop, "trp_player")])

    # Set troop back to player when ending conversation
    dialog = FindDialog(orig_dialogs, ststate="member_talk",
                        endstate="close_window")
    cons_block = dialog.GetConsequenceBlock()
    pos = cons_block.FindLastLine()
    cons_block.InsertAfter(pos, [(set_player_troop, "trp_player")])

    # Set player troop to companion we are talking with for stats screen
    dialog = FindDialog(orig_dialogs, ststate="view_member_char_requested",
                        endstate="do_member_view_char")
    cons_block = dialog.GetConsequenceBlock()
    pos = cons_block.FindLineMatching((change_screen_view_character))
    cons_block.InsertBefore(pos, [(set_player_troop, "$g_talk_troop")])

    # End - Allow export and import of companions


def modmerge(var_set):
   try:
      orig_dialogs = var_set["dialogs"]
      modmerge_dialogs(orig_dialogs)
   except KeyError:
      raise ValueError("Variable set missing dialogs")

Happy New Year,
CyberSoul
 
Back
Top Bottom