WB Coding Trouble adding custom native armor modifications as new armor into game.

Users who are viewing this thread

Chantalope

Recruit
Hello everyone, I just want to say that I am new to modding Warband, and I appreciate anyone taking their time to help me with my query.
I have recently begun trying to make custom versions of the plate armor in native, then adding said mesh as a new item in my module. I have successfully added one mesh (labeled blue_full_plate) into the game with no problem. After being successful with this, every other piece of plate armor i've tried to make has seemed to fail.
To start, I have: 1. Modsys downloaded 2. Morghs m&b editor 3. Openbrf downloaded 4. Gimp and Paint.net downloaded 5. Notepad++ as my text editor
6. Python2.7 downloaded and the path correctly set up.

Let me show you what I did with the first armor. I tried to duplicate the results with my next few armors (with different names of course), but with no success.

First armor (successfully in game)
1. I made a copy of the native module, and renamed it "Native 2.0".
2. I went to mount and blade warband game files, then went into the Textures and TextureHD files.
3. I then made copies of the "full_plate" , "full_plate_normalmap" and "full_plate_specular" .dds files, and renamed them into "blue_full_plate" , "blue_full_plate_normalmap" and "blue_full_plate_specular".
4. I then went into the CommonRes File and found "full_plate_armor" .brf file. I went on to copy that file and rename it "blue_full_plate".
5. I went on to only edit the "blue_full_plate" .dds file in paint.net. I did not add any new textures to it. All I did was manually change the color of the armor from silver to blue. I also added a picture of a reaper to the front facing chestplate.
6. I opened up "blue_full_plate" .brf in openbrf.
7. I first deleted all of the other brf files that were not directly the "full_plate" set. This left me with only "full_plate_armor" , "full_plate_armor.lod1" , "full_plate_armor.lod2" , "full_plate_armor.lod3" , and "full_plate_armor.lod4".
8. I selected all five of these brf files, and group renamed them to "blue_full_plate". This in term renamed all of the ".lod" files to have "blue_full_plate.lod(number)".
9. I then went into materials. The default material to "full_plate_armor" is called "full_plate". It is set up with it's diffuse a set to "full_plate", it's bump set to "full_plate_normalmap" and it's specular set to "full_plate_specular.
10. I made a copy of the material named "full_plate" and renamed it to say "blue_full_plate".
11. On the "blue_full_plate" material, I changed the diffuse a to "blue_full_plate" , then the bump to "blue_full_plate_normalmap" , and finally the specular to "blue_full_plate_specular".
12. I then saved everything I applied to the material and went back to the meshes tab. From there, I set the material for "full_blue_plate" .brf to be the material I just made.
13. The skin shows up in openbrf, and I was a happy Lope.

14. I then went into my module file "Native 2.0" and selected the "module.ini" file.
15. I made sure that scan_module_textures = 0 was changed to scan_module_textures = 1 .

Side tangent: Even though I was just loading textures I had saved into my vanilla CommonRes, Textures and TextureHD files. I still went on to add my .brf and .dds textures to the module's texture and resource files. I just am new to all of it, so I was covering all bases. Thinking about it now though, I didn't even put "load_mod_resource" (as you'll see, sorry for the tangent I just am doing my best to understand it all).

16. I went to the bottom of the "load_resources" and right above "load_resource = ccoop_extra_ui_meshes", I added a line that said "load_resource = blue_full_plate" and saved.
17. In "item_kinds1.txt" I put this line of text above the co-op item (the last one)

Text:
itm_blue_full_plate Blue_Full_Plate Blue_Full_Plate 1 blue_full_plate 0 16842765 0 10000 704643238 27.000000 100 0 70 28 14 0 0 0 0 0 0 0
0
0

(it was all lined up correctly) and pressed save.

18. I then loaded up my game, started a new character with cheats on, breezed through the opening, and found a market. I changed the abundance to 1,000 so I could find it, and sure enough it was in the game just fine.


Still with me? Yeah... me either lol.
I was really happy to see it worked, so I tried to make a couple of other versions of the armor. I tried a red version, followed all of the steps I stated before to a t. I even tried one where the texture was changed. None of these worked for me. They would load in openbrf, but in the game they all showed up white. It might be because I messed up the texture. It might be because I didn't change the normalmap or specular textures (which is confusing because with my successfully added mesh I didn't either). I honestly really don't know what it was. It wasn't file name, but other than that I am all ears.
I guess long post short is, I'm not sure why one armor loaded into the game and others did not. I think maybe the thing i'm looking for is a comprehensive guide to changing specifically Native textures. Also, how to add it into the game.

Let me know and many thanks, -Lope.

(P.S, I have pictures of all of my file work for the successfully added mesh, as well as screenshots of the mesh working in OpenBRF and in game, but I just made my account so I can't quite post them yet. I can also get screenshots for the other attempted armor of the code, materials, meshes, textures and pictures of them working in OpenBRF but being white in game.)
.
 

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
Side tangent: Even though I was just loading textures I had saved into my vanilla CommonRes, Textures and TextureHD files. I still went on to add my .brf and .dds textures to the module's texture and resource files. I just am new to all of it, so I was covering all bases. Thinking about it now though, I didn't even put "load_mod_resource" (as you'll see, sorry for the tangent I just am doing my best to understand it all).
As a first rule, you never edit the Native module or the Common Resource files. You already made a copy of the Native module, a good start, but everything which you create anew, even if it is a simple duplicate, should go into your module's texture and resource folder.
None of these worked for me. They would load in openbrf, but in the game they all showed up white.
Make sure that
  1. the brf file is getting loaded in module.ini via load_mod_resource,
  2. the material and texture entries are in the same brf file as the mesh (they can be inside different brf files but then you need to respect the loading order; for beginners it's easier to just put them all into the same brf file) and are referencing the new file properly,
  3. the texture has been added into your texture folder
OpenBRF has a search error function with which you can check, which misstake might have happened at your new added meshes. There are probably still a lot of Native errors but you can just load more errors and scroll until you see the lines for your new added items.

I can't really help you with adding the item to the files via Morgh's Editor since I am using the Module System and don't know the need-to-look-for's of Morgh's Editor. You might alternatively also start getting used to the Module System. It's not as difficult as it looks like and in the longrun, depending on what you want to achieve, you can do more stuff at your module.
 
Upvote 0

Chantalope

Recruit
As a first rule, you never edit the Native module or the Common Resource files. You already made a copy of the Native module, a good start, but everything which you create anew, even if it is a simple duplicate, should go into your module's texture and resource folder.

Make sure that
  1. the brf file is getting loaded in module.ini via load_mod_resource,
  2. the material and texture entries are in the same brf file as the mesh (they can be inside different brf files but then you need to respect the loading order; for beginners it's easier to just put them all into the same brf file) and are referencing the new file properly,
  3. the texture has been added into your texture folder
OpenBRF has a search error function with which you can check, which misstake might have happened at your new added meshes. There are probably still a lot of Native errors but you can just load more errors and scroll until you see the lines for your new added items.

I can't really help you with adding the item to the files via Morgh's Editor since I am using the Module System and don't know the need-to-look-for's of Morgh's Editor. You might alternatively also start getting used to the Module System. It's not as difficult as it looks like and in the longrun, depending on what you want to achieve, you can do more stuff at your module.
Wow what a quick response! I'm very appreciative for it, and so glad I didn't sleep like I needed to haha.
Ok so a couple of things: First off, I have noted what you said about not modifying the CommonRes file. I went ahead and reverted it back to basic vanilla warband.
Second off, you sir are my hero. You know what it was? I wasn't importing any of the meshes into the same BRF files as my meshes. The second I had the textures in my module's texture file, and imported them and the materials into the same BRF file, it all showed up in the game. I can't thank you enough ^_^
Lastly, Morghs was really cool for me to just do some really simple stuff, but I have such an interest in learning the Module System. This isn't the forum to ask too much about it, but that's definitely my next step. That's something i'll have to do on my own, and if I have more questions about it (which i'm sure I will), then i'll just have to make another post.
Genuinely, thank you again friend, and I am reading the hobbit now and appreciated the quote pinned with your replies, -Lope
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
I have noted what you said about not modifying the CommonRes file. I went ahead and reverted it back to basic vanilla warband.
As an additional remark, always think of the Native module and CommonRes as backup in case you mess something up.

Good thing that you have figured out your problem. If you want to get started with the Module System, here is your starting point:
You can download the documentation too (take note that it's still in work):
Within it you can also find a link to a documented version of header_operations.py (which is basically a list of all possible operations of which you can make use). Feel free to open up a new thread if new questions or problems appear :smile:

and I am reading the hobbit now and appreciated the quote pinned with your replies,
Cheers! :grin:
 
Upvote 0
Top Bottom