How do I add a custom armor I made into Warband

Users who are viewing this thread

Hello, apologies in advance if this post is in the wrong forum,

I need help, I created my own armor and I want to play it in Warband, I watched tutorials regarding adding armor into Warband and I did all the steps needed and now I'm stuck in the menus.txt part of adding my own armor into Warband, I'm trying to add my armor into the Diplomacy mod for Warband and I don't know what to do because I couldn't find in the menus.txt the portion of code I need to modify, can anyone please help me ?
 
Well, Add Mesh to your mod ,the best way is use ms.
If you want to add your armor by modify .txt file, follow these steps:
1. add command in module.ini : load_mod_resource = yourmesh file name
2. in item_kinds1.txt . Write your item code before this line:
itm_items_end Items_End Items_End 1 shield_round_a 0 0 0 1 0 0.000000 100 0 0 0 0 0 0 0 0 0 0 0.

why it is important? because we need get an item from menu: cheatmenu

(
to prevent this from influence other items, you can write just like :
itm_your_itemid your_itemName your_itempluralName X X X X ...
itm_items_end Items_End Items_End 1 shield_round_a 0 0 0 1 0 0.000000 100 0 0 0 0 0 0 0 0 0 0 0.
)

btw, in ms. the step is similar.
open module_items.py , and find the code :

["items_end", "Items End", [("shield_round_a",0)], 0, 0, 1, 0, 0],
write the ms code before the item.
 
Last edited:
Upvote 0
yes I did the steps of editing module.ini and used morghs editor to modify item_kinds1.txt, however I need to modify the menus.txt file otherwise my armor won't appear in the cheat menu, how would I edit that ?
 
Upvote 0
You need to decide if you want to do bigger modding or not. If you want to do bigger modding, so more than just adding some weapons and troops you should learn how to use the Module System. The Module System is the source code of any module, you can make new entries there, etc. and compile it, so the Module changes. If you don't want to do so, because you want to use Morgh's Editor, at some point there will appear problems like this.
Show the lines of your item_kinds1.txt at which you have added your new item as well as two or three lines of the items before and after, so that we can see if you have added your line correctly.
 
Upvote 0
this is what I have in item_kinds1.txt, mamluke_guard_armor is what I'm trying to put in the game
Code:
 itm_kicking_boots Kicking_Boots Kicking_Boots 1  sarranid_camel_boots 0  536874766 0 0 704643238 3.000000 100 0 0 20 0 0 0 0 0 0 0 0
 0
0

 itm_restore_health_armour Restore_Health_Armour Restore_Health_Armour 1  samurai_armor 0  16777229 0 0 704643236 12.000000 100 0 27 11 0 0 0 0 0 0 0 0
 0
0

 itm_javelin_bow_ammo Shooting_Javelins Shooting_Javelins 2  javelin_bow_ammo 0  javelins_quiver_new 3458764513820540928  32773 2147483648 0 0 4.000000 100 0 0 0 0 0 0 0 75 15 290 0
 0
0

 itm_mamluke_guard_armor Mamluke_Guard_Armor Mamluke_Guard_Armor 4  mamluke_guard.3 0  mamluke_guard.2 0  mamluke_guard.1 0  mamluke_guard 0  553713677 0 2900 704643236 24.000000 100 0 48 16 8 0 0 0 0 0 0 0
 0
0

 itm_ccoop_new_items_end Items_End Items_End 1  shield_round_a 0  0 0 1 0 0.000000 100 0 0 0 0 0 0 0 0 0 0 0
 0
0
 
Last edited by a moderator:
Upvote 0
ok I did what you said, the last item on the cheat menu was the steppe charger, however when I did what you told me the steppe charger was replaced with the mamluke_guard_armor, and now the armor is being sold by horse merchants, that isn't the result I wanted, though the armor did appear in the cheat menu kind of, but there were other problems
 
Upvote 0
Well, that's the backside of txt file modding. You'll need to find where the range loop is and change the upper bound number to match the id number of the last added item +1. That is assuming that's how this presentation works. It would perhaps be easier to give that armour to a troop and then just take it from that troop?
Can't really help you at this, I never did txt-file modding. Using the Module System and recompiling the module is much easier, less struggles like this.
 
Upvote 0
I am willing to learn how to use and modify the module system, but are you certainly sure that I can achieve the result I want through learning how to use the module system ?
 
Upvote 0
Yes, I am sure that you will be able to achieve what you want via the Module System. It is the source code of a module, the mod authors themselves used it to achieve everything else there.
If you want to get started, here is your starting point:
You can download the documentation too:
You can find within also a link to a documented version of header_operations.py (which is basically a list of all possible operations).

Your to-do:
  1. Try to manage to compile the Native module succesfully (always work with copies of the module which you want to mod!)
  2. Try to find the current Module System version of Diplomacy
  3. Try to implement your wanted item there (I will give you a helping step at this point).
Give it a try, it's easier than it sounds. All beginning is hard. You only need to start with little steps at the beginning to not get frustrated a lot. If you need help, write us at which point you are stuck and try to provide us as many informations as you have at hand so that we are able to help you.
 
Upvote 0
cheat_find_item in module_game_menus.py

These 2 lines are in menus.txt
Code:
menu_cheat_find_item 0 {!}Current_item_range:_{reg5}_to_{reg6} none 4 2133 2 72057594037927941 144115188075856184 2120 3 72057594037927942 144115188075856184 96 2110 2 72057594037927942 288230376151712346 2106 2 72057594037927942 1 3
 mno_cheat_find_item_next_range  0  {!}Move_to_next_item_range.  6 2105 2 144115188075856184 96 4 0 30 2 144115188075856184 288230376151712346 2133 2 144115188075856184 0 3 0 2060 1 864691128455135257  .  mno_cheat_find_item_choose_this  0  {!}Choose_from_this_range.  9 1532 1 360287970189639684 2120 3 1224979098644774912 144115188075856184 96 2110 2 1224979098644774912 288230376151712346 2121 3 1224979098644774913 1224979098644774912 144115188075856184 6 3 1224979098644774914 0 1224979098644774913 2120 3 1224979098644774915 144115188075856184 1224979098644774914 1535 3 360287970189639684 1224979098644774915 1 3 0 2042 1 360287970189639684  .  mno_camp_action_4  0  {!}Back_to_camp_menu.  1 2060 1 864691128455135255  .

The structure of menus.txt
Code:
[id], [flags], [text], [mesh name], [num of statements/operations], [[operations]], [num of menu options]
    [[option id], [num of operations], [[condition operation]], [option text], [num of operations], [[consequence operation]]]

The 4 statements in MS
Code:
(assign, reg5, "$cheat_find_item_range_begin"),
(store_add, reg6, "$cheat_find_item_range_begin", max_inventory_items),
(val_min, reg6, "itm_items_end"),
(val_sub, reg6, 1),

The numbers that relate
Code:
4 - 4 Statements
2133 2 72057594037927941 144115188075856184
2120 3 72057594037927942 144115188075856184 96
2110 2 72057594037927942 288230376151712346
2106 2 72057594037927942 1 3

You're looking for the ending item index in 'item_kinds1.txt'
288230376151712346 - 288230376151711744 = 602 for 'itm_items_end' in 'item_kinds1.txt'

Replace 288230376151712346 with 288230376151711744 + your ending items index.

There's a few instances of 288230376151712346 in both menu lines, replace them with the new value.

The ending index can be the item count at the top of 'item_kinds1.txt' below 'itemsfile version 3'. Since the script subtracts 1 from the value.
 
Upvote 0
In Diplomacy's 'menus.txt'
Code:
4
2133 2 72057594037927941 144115188075856184
2120 3 72057594037927942 144115188075856184 96
2110 2 72057594037927942 603
2106 2 72057594037927942 1 3

In Native's 'menus.txt'
Code:
4 - 4 Statements
2133 2 72057594037927941 144115188075856184
2120 3 72057594037927942 144115188075856184 96
2110 2 72057594037927942 288230376151712346
2106 2 72057594037927942 1 3

They're using the index directly, change 603 to your ending item's index + 1, or use the item count at the top.

If that don't work add the index to 288230376151711744 and try that.

The number 603 is repeated a couple more times in both lines. You'll need to replace them.

Since it's diplomacy, you're better off using their module system.

You can then add your item before 'items_end' in module_items.py. The compiler will update the index for you then

Where as if you want to change it in the .txt files, you'll need to update the index
 
Upvote 0
In Diplomacy's 'menus.txt'
Code:
4
2133 2 72057594037927941 144115188075856184
2120 3 72057594037927942 144115188075856184 96
2110 2 72057594037927942 603
2106 2 72057594037927942 1 3

In Native's 'menus.txt'
Code:
4 - 4 Statements
2133 2 72057594037927941 144115188075856184
2120 3 72057594037927942 144115188075856184 96
2110 2 72057594037927942 288230376151712346
2106 2 72057594037927942 1 3

They're using the index directly, change 603 to your ending item's index + 1, or use the item count at the top.

If that don't work add the index to 288230376151711744 and try that.

The number 603 is repeated a couple more times in both lines. You'll need to replace them.

Since it's diplomacy, you're better off using their module system.

You can then add your item before 'items_end' in module_items.py. The compiler will update the index for you then

Where as if you want to change it in the .txt files, you'll need to update the index
when you say item index, you mean item number right, so if item number 620 is (Items_End) does that mean the item index for Items_End is 620 ?
 
Upvote 0
when you say item index, you mean item number right, so if item number 620 is (Items_End) does that mean the item index for Items_End is 620 ?
Yeah, in item_kinds1.txt you count how many items there are starting from 0 instead of 1. I think morgh's editor shows the index. If you want to get the ending item's index, you can use the item count at the top of 'item_kinds1.txt' below 'itemsfile version 3' and subtract 1 from it.
 
Upvote 0
Back
Top Bottom