Simple Way to Edit npc inventory

正在查看此主题的用户

DeViLmAn0

Veteran
Was searching around a bit before trying to post but i was wondering if theres a simple,non mod heavy way to change npc inventory(clothing) etc.
 
Was going to suggest the Unofficial Troop Editor by HokieBT but that was for the original M&B but you can use Morgh's Warband TXT Tools. Mind you, they both require a new game. Actually, any change in troops.txt requires a new game to take effect.

These two programs let you modify the inventory of each troop present in a particular mod (including Native). All you have to do is to clear their inventor first and then give them the equipment you want them to have (clothes, weapons, horses etc. and everything else). Also, if you add two different equipment of the same kind, one of them will be picked randomly etc. It's really not that difficult.



 
There was a txt tweak in the MageLord thread, that allowed getting the "Let me see your equipment" dialog with any troop in your party, thus allowing changing the outfit or weapons.
The issue (or bonus, I don't know) was that any change in their outfit would then affect all troops of the same category in the entire world!
If you gave your Nord Veteran Warrior a purple hat, then ALL Nord Veteran Warriors of Calradia would then wear the same purple hat.

Anyway, I wonder if this tweak still works in Warband.
 
You may be referring to this thread

Equip regular troops like companions *tweak*

It works with Warband, but it's not the ideal way to equip NPCs as they usually have multiple equipment of the same type. Some lords, for example, have both armor and a casual dress which they wear indoors. If you accidentally remove one of their clothes or armor it becomes impossible to put them back as the other one replaces it. But of course if you want to equip your vassals just like you do to companions, then you can use that tweak.

Here's the code I use to equip my vassals in Warband:

You need to replace these lines in conversation.txt

dlga_lord_talk:lord_talk_preoffer 69631 265  3 31 2 1 0 2147483680 2 144115188075856110 2 30 2 144115188075855992 0 I_have_an_offer_for_you.  473  0 NO_VOICEOVER
dlga_lord_talk:lord_give_troops 69631 265  2 31 2 144115188075855989 432345564227567630 2147484208 3 144115188075855987 8 0 I_want_to_give_some_troops_to_you.  474  0 NO_VOICEOVER

with these...

dlga_lord_talk:lord_talk_preoffer 69631 265  3 31 2 1 0 2147483680 2 144115188075856110 2 30 2 144115188075855992 0 I_have_an_offer_for_you.  473  0 NO_VOICEOVER
dlga_lord_talk:lord_trade 69631 265  2 31 2 144115188075855989 432345564227567630 2147484208 3 144115188075855987 8 0 Let_me_see_your_equipment.  8008  0 NO_VOICEOVER
dlga_lord_trade:do_lord_trade 4095 8008  0 Very_well,_it's_all_here...  8009  1 2051 0 NO_VOICEOVER
dlga_do_lord_trade:lord_talk 4095 8009  0 Anything_else?  265  0 NO_VOICEOVER
dlga_lord_talk:view_lord_char_requested 69631 265  2 31 2 144115188075855989 432345564227567630 2147484208 3 144115188075855987 8 0 What_can_you_tell_me_about_your_skills?  9800  0 NO_VOICEOVER
dlga_view_lord_char_requested:do_lord_view_char 4095 9800  0 All_right,_let_me_tell_you...  9801  1 2046 0 NO_VOICEOVER
dlga_do_lord_view_char:lord_talk 4095 9801  0 Anything_else?  265  0 NO_VOICEOVER

dlga_lord_talk:lord_give_troops 69631 265  2 31 2 144115188075855989 432345564227567630 2147484208 3 144115188075855987 8 0 I_want_to_give_some_troops_to_you.  474  0 NO_VOICEOVER

Notice that with this tweak you can also view & upgrade his skills.
 
I will have to check into those a bit more after im more awake, tryin to play with such things after first waking up may not be wise unless ive made a backup copy of my game folders haha.  Would it then also be possible to change the attire of future wife in the game? in native she was fine but seems some attires were tweaked a bit in the current mod im playing and id like to switch her back to her normal attire haha
 
I don't think it's possible to change the equipment on your wife. The python scripts determine it based on random variables and the lady's personality. I attempted to script it, but my wife's inventory wouldn't even appear, despite the script working for other characters.

Old Post
An interesting coincidence. Earlier today, I "coded" (term used loosely since I mostly just mash scripts together) the ability to edit the equipment of lords through a dialogue option.

In module_dialogs.py, search for this block.

插入代码块:
  [anyone|plyr,"lord_talk",[(eq, "$cheat_mode", 1),
                            ],
   "CHEAT -- Let's duel (insult)", "lord_respond_to_insult_challenge_duel",
   [
   ]],

Put another block below it, like this.

插入代码块:
  [anyone|plyr,"lord_talk", [],
   "Let me see your equipment.", "cheat_review_lord_equipment",[]],

  [anyone,"cheat_review_lord_equipment", [], "Very well, it's all here...", "lord_pretalk",[(change_screen_equip_other)]],

Edit 1: Already been posted, although not in module format. Give me about 20 minutes and I'll have a version for any NPC.

Edit 2: Maybe this? I couldn't get it working for every NPC at once, and I'm still testing this due to my current character not being married. I'll report back soon on whether it works or not.

Above this block (at the very bottom):
插入代码块:
  [anyone|plyr,"free", [[in_meta_mission]], " Good-bye.", "close_window",[]],
  [anyone|plyr,"free", [[neg|in_meta_mission]], " [Leave]", "close_window",[]],

Put this:
插入代码块:
  [anyone|plyr,"spouse_talk", [],
   "Let me see your equipment.", "cheat_review_spouse_equipment",[]],
   
  [anyone,"cheat_review_spouse_equipment", [], "Very well, it's all here...", "close_window",[(change_screen_equip_other)]],
 
Lord Kinlar 说:
Actually, any change in troops.txt requires a new game to take effect.

Only stat changes, new troops, or a change in the trees requires a new game. Inventory changes of existing troops are savegame compatible.
 
Captain_Octavius 说:
Lord Kinlar 说:
Actually, any change in troops.txt requires a new game to take effect.

Only stat changes, new troops, or a change in the trees requires a new game. Inventory changes of existing troops are savegame compatible.

I've successfully added troops to the game, loaded a save game, and was able to use said troops. Stat changes work, just not level changes.

Odd thing is, however, inventory change may or may not work on the Ladies of Calradia. For some reason, if I remove their current equipment via an editor, and add new items, after a few days they strip entirely/partly naked.
 
I don't think it's possible to change the equipment on your wife. The python scripts determine it based on random variables and the lady's personality. I attempted to script it, but my wife's inventory wouldn't even appear, despite the script working for other characters.
The randomized clothing is only done once at game start. You can add a new dialog to change wife clothing just like companions.
Make you wife into companion. The 9th spoiler contains some additonal dialogs for wife including option to equip her.
 
后退
顶部 底部