Installing New Items without Python

Users who are viewing this thread

maw

Sergeant Knight at Arms
so many requests about installing the new packs. lot of you want to make your own personal mods, but seem to be a little unsure on how to add anew horse, shield, armor, or weapon (also known as items in m&b parley).

i know there are tutorials out there, and i myself have explained it in a couple of threads. but, since i'm the type of guy i am, i'll do it here, for you, my loyal fans, my people. can we do it? YES, WE CAN!

maw's step by step adding items to m&b

1. locate and make a copy of your Native mod. it is found in the m&b directory under Modules. i usually make two copies, and change the name to the mod i will initially work in as Test.

2. there are two subdirectory's within you working mod, locate them. they are Resource and Textures.

3. open the Textures directory under your mod. this is where all related graphic files for the skins are to be placed, also called dds files (direct draw surface). open the pack you want to add, and copy all the dds files to this location.

4. next, open the Resource directory under your mod. this is where the three dimensional mesh is stored for your mod. many meshes are held collectively in a file usually referred to as a brf file. in the case of what i release, it is usually the file that starts with mod_whatever (mod_armors.brf, mod_horse,brf, mod_shields.brf). copy that mod_whatever file here.

i usually, at this time, open up that brf file using the mighty Thorgrim's brf editor found here: http://forums.taleworlds.com/index.php/topic,8771.0.html. then i check all the meshes to insure they have dds matches - they should all look nice and pretty, if any pop up white, it usually means a dds file is missing, or that the dds and texture are improperly addressed within the mod. we're not gonna address that here - the easy fix is to delete the white meshes for now, to get the non-problem, meshes in game. NOTE: if you click on any of the fields that can be edited in the brf file, like Name or Material, the material usually defaults to nothing. don't panic - just close the file without saving, and re-open it - it'll come back. at worst, just reload the brf file from the source.

5. next, you must add the new brf file to your mod addressess. if you've opened the brf, and everything checks out, just save it - the first time the brf file will check and see if the mod file has been added to the module's Module configuration settings, a text file found in the module's main directory among all sorts of text files. open that up, and you should see something like "load_mod_resource = mod_whatever" appended to the last line of the file. if you don't see it, add it manually (whatever being the name ofthe mod file, though it has to be the same name of the brf file in your Resources directory). this calls out and opens the file within m&b when it starts, telling m&b all the cool items, the skins, and where they're found.

6. next, you gotta add the items through the module item_kinds1.text file in your mod. be careful - iusually make a copy of this file within the directory so i have a clean base to go back to as i edit, and as i get items in there and they work, i save a working copy so if i screw up i don't redo 100 meshes later. i usually add my new items in batches of 20.  this is the step that two things gotta happen.

first, copy an existing item of the type you're adding. in this example, we're going to add a new warhorse. so - search for 'warhorse' and you'll find....

itm_warhorse Warhorse Warhorse 1  warhorse 0  65537 0 724 41876193280 0.000000 50 0 52 0 4 135 34 36 0 0 18 0
0


this is what we need to copy and edit. it is called a line item. open up an editor, like Notepad, and copy 20 of them into a new notepad, making sure you add no additional lines or spaces - its gotta have the same format as item_kinds1.txt. don't copy it into item_kinds1.txt yet as you may make mistakes.

now, first change the item name to a unique name for each warhorse. i use warhorse_01, warhorse_02, etc to 20.

itm_warhorse_01 Warhorse Warhorse 1  warhorse 0  65537 0 724 41876193280 0.000000 50 0 52 0 4 135 34 36 0 0 18 0
0


itm_warhorse_02 Warhorse Warhorse 1  warhorse 0  65537 0 724 41876193280 0.000000 50 0 52 0 4 135 34 36 0 0 18 0
0

etc.

next, change the mesh name, which in this case is 'warhorse' to one of the meshes in the brf file - which should be open for review on your system. we'll add the first two horses in maw's Horse Pack as an example.

itm_warhorse_01 Warhorse Warhorse 1  black_hunting_horse 0  65537 0 724 41876193280 0.000000 50 0 52 0 4 135 34 36 0 0 18 0
0


itm_warhorse_02 Warhorse Warhorse 1  cataphract_gold 0  65537 0 724 41876193280 0.000000 50 0 52 0 4 135 34 36 0 0 18 0
0


you can at this time, rename them to whatever you want by changing the first 'Warhorse' to whatever. make sure you add no additional spaces or lines or it'll hose up the program.

now, the second part...

copy your 20 new horses, edited, to the item_kinds1.txt file AT THE END maintaining the space between items - make it look like all the other items. if you add it anywhere else it shifts the line count for other items. m&b interprets each line item as a line item number, so if 272 is a sword and you add 20 horse before that, sword becomes 292 - and every number after the horses installed hsifts, which changes what items the troops are assigned. just, for right now, add it to the end.

finally, change the line count number, in this case, by 20. the line count number is found before the first line item in the item_kinds1.text file. in native, it looks like this:

itemsfile version 2
421


where the blue 421 is the line item count indicating all the lines (items) in the file (and in m&b). since you added 20 items, the number needs to go up 20 to 441.

7. save the edited item_kinds1.txt

8. start m&b and play mod whatever you called it

COMMON ERRORS:

redundent texture, material, or mesh warning - usually 'error trying to re-register (whatever) just open up the brf file and delete the offending mesh, texture, or material. it happens. in the first release of maw's Armor Pack there are two costume3_maw textures - so this will be good practice. make sure there is at one and only one costumes3_maw file in each texture and material. i also have a costumes2 in there that supercedes the game defalut costumes2.dds - delete that outta the mod_armors textures and materials, too.

missing mesh, texture, or material - like 'mesh whatever not found' or 'unable to find material whatever'. if its a mesh, the mesh name was usually not copied properly from the brf file to the item_kinds1.txt file - double check it, and make sure the brf mesh name and line item mesh name exist and match exactly, no spaces or whatever. if a material or texture is missing, it has to be added or the item will show up white in game.

after this, you can experiment with editing the values - which don't even ask me about. i think the unoffical Troop and Item editor works for 1.003 - but ask somewhere else. my fingers are tired.

that pretty much does it. play with it. if you screw it up, go back to the last workable saved (you did save a copy of item_kinds1.txt, didn't you?) and don't worry about screwing it up.

you can always re-install. maw



 
Hey maw! thanks for the manual! but I did everything it says, and the game works fine, it loads, I can play just fine, but..., Where are the new horses???? where can I find them? buy them?
 
should be purchaseable from the horse merchant - the marketplace or wwherever its called - the armor and weapon smith page when you enter a town. maw
 
I know! but I keep getting only the old horses on every horse merchant. should they be in every town? or just a couple? because if not I must have done something wrong...
 
first, are you loading the mod you edited? common mistake. the game defaults to Native... i usually rename my working file Test so if i'm not paying attention i load native.

next, did you change the item count? if you didn't, the game will only load the first 421 items and ignore everything after.

is the new brf file added to the mod's module.txt configuation file? it should be appended to the bottom.

go into the mod you added it to and check those things. beyond that, i don't have enough info to help you out. maw
 
jesus christ. when i saw the instal instructions i gave up. i want new armours, but to lazy to do all that work. : P if you had created a installer..
 
soon. maybe two days, tops.

i got all the armors and horses in, as well as about 200 shields and about 20 weaposn from luigi's weapons pack.

i'm tweaking a coupla of things, then you can all play with it. maw
 
heeeeey! great to hear that maw! I am pretty sure everybody will appreciate the installer. keep up the good work!
 
Hi all looking at the textures they look awesome i'm glad i got this game, but at the risk of sounding like a nud, could some one just copy paste their new armor section of the item_kinds.txt so we could take from them?
 
maw said:
soon. maybe two days, tops.

i got all the armors and horses in, as well as about 200 shields and about 20 weaposn from luigi's weapons pack.

i'm tweaking a coupla of things, then you can all play with it. maw

that would be pretty nice... especially when i see the large numbers of new "items" ^^
 
Hey Maw i have a problem with my mod. When i put the weapon ingame. The BRF file contains the mesh, the material and the texture reference. And in my texture folder i have the texture too.. When i start i get the error: attempting to reregister texture berserker's dragonslayer. So i deleted the textures in the texture folder. Then another error: get_object failed for texture. I restored the textures in the texture folder and deleted the texture reference in the brf file but this time i also get the same error. So i seek your help maw. If this actually succeeds, it will change my modelling and texturing only history to a modelling, texturing and modding history forever! Please..... :cry:

Edit: Seems like i solved my own problems. Any way thank you! :mrgreen:
 
musketear said:
Hey Maw i have a problem with my mod. When i put the weapon ingame. The BRF file contains the mesh, the material and the texture reference. And in my texture folder i have the texture too.. When i start i get the error: attempting to reregister texture berserker's dragonslayer. So i deleted the textures in the texture folder. Then another error: get_object failed for texture. I restored the textures in the texture folder and deleted the texture reference in the brf file but this time i also get the same error. So i seek your help maw. If this actually succeeds, it will change my modelling and texturing only history to a modelling, texturing and modding history forever! Please..... :cry:

Edit: Seems like i solved my own problems. Any way thank you! :mrgreen:

first, get_object failed for texture, means that a texture name requested by a brf model file either can't be found or (most likely) you have a blank texture file. read :

http://forums.taleworlds.com/index.php/topic,47041.0.html

and check all the textures in the brf file doing a 'sort' first, then seeing if the first or last one is blank. otherwise, run down them all - if one has an associated material 'default' that also might provoke the error. you may have missed assigning the material to it.

the other error, attempt to reregister texture, just means you had two texture addressess of the same name, and by deleting one, would reolve the problem. i've gotten into the habit of putting all my related files in one brf - mesh, material, and texture - so i can more easily debug when i have issues.

luck, maw
 
I cant seem to find the Textures for the charger horse..

3. open the Textures directory under your mod. this is where all related graphic files for the skins are to be placed, also called dds files (direct draw surface). open the pack you want to add, and copy all the dds files to this location.

i think i found the resource file for the charger.. but it only has entries in the Mat tab in the BRF editor, nothing on the Mesh tab.. :sad:

i want to make new horse that uses the charger model/mesh/texture Called Stallion Charger, its basically gonna be a charger with slightly better stats.. but super rare hopefully.. and expensive to boot..

what dds file do i need for the charger?
what brf file do i need for the charger?
 
in the main game Texture directory, the graphic is charger.dds; the brf is found in the main game CommonRes directory filr horses_b.brf; the files you need to import are charger, charger.lod1 and copy or create the texture and material also named charger.

do this all in a new brf file, call it something seperate like mod_horses_plas.

copy the dds file with a new name into your mod, edit it to your taste. use the renamed dds as the same name for your new texture and material, added to your mod_horse_plas. import the brf file charge from CommonRes horses_b.brf and chnge the material name to the new material name.

not hard. play with it. you'll get it. maw

 
maw said:
in the main game Texture directory, the graphic is charger.dds; the brf is found in the main game CommonRes directory filr horses_b.brf; the files you need to import are charger, charger.lod1 and copy or create the texture and material also named charger.

do this all in a new brf file, call it something seperate like mod_horses_plas.

copy the dds file with a new name into your mod, edit it to your taste. use the renamed dds as the same name for your new texture and material, added to your mod_horse_plas. import the brf file charge from CommonRes horses_b.brf and chnge the material name to the new material name.

not hard. play with it. you'll get it. maw

Ok.. Hopefully it'll work now :razz:

I know those numbers following the item in the items_kinds1.txt are the stats.. But what does each one mean?
 
Back
Top Bottom