Author Topic: Have a question about Modding? Ask Here!  (Read 311878 times)

0 Members and 1 Guest are viewing this topic.

Offline usnavy30

  • Colonel
  • *
  • Posts: 1983
  • Former Freelance Modder
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1500 on: June 03, 2016, 04:55:30 pm »
Spoiler
is it possible to make a mod where prussian soldiers in NW doenst get random hats so regiments doesnt look so undisciplined with half of the soldiers wearing one kind of hat and the other wearing another kind of hat? if i edit the troop.txt i get auto kicked for cheating, so i hoping to some could maybe help with a neat BRF trick or something :)

This mostly considers prussian_8_infantry_ranker witch uses the prussian_shako and prussian_shako_2
and prussian_23_infantry_ranker witch uses the prussian_shako, prussian_shako_2 and 23_fourage_hat.

Depends on what you're trying to achieve, client or server side change? Client side change would be visible only by those who use modified version of the game, meaning you and your regiment members, everyone else would see the same old. For easiest client side change, lets say you have a hat_a and hat_b and you want your troops to use hat_a only, in this case you would use openBRF to rename hat_b to something like hat_b_old, then duplicate hat_a and rename the duplicate into hat_b and that's it. To distribute this modification you would just share the one .brf file you modified.

A server side change would work only on the server which has modification installed, but everyone on this server would see the change. Removing the unwanted hat variation from troops.txt should do the trick, but this change should be done on dedicated server only. If you modify your actual game (client) you will see errors you described as your game client is no longer compatible with server. If for some reason this doesn't work, you would have to add custom code to module system, make a script which checks if a player who spawns is wearing the unwanted type of hat, and replace it with another one.

im trying to make prussian_8_infantry_ranker only use prussian_shako and prussian_23_infantry_ranker to only use 23_fourage_hat as a client mod, while not doing anything to prussian_shako_2 becuase its also jaeger and freikorps shako witch looks fine :)
[close]
So what you actually want is to pare clothes with appropriate hats. This might be possible using openBRF alone, but you may run into strange behaviors and errors to overcome.
For a solution which involves openBRF alone, it would involve something like replacing clothes_a with a model which has both clothes_a and hat_a combined, then if the model has no rigging apply some from other existing model (you can copy/paste rigging), do the same for clothes_b, and replace hats a and b with empty models so they are invisible. But I would expect some bumps on the road, good luck.
The only (minor) problem with that is first person. Hats that are not assigned in openBRF as headwear, but rather as part of a uniform mesh will appear in first person possibly obstructing the field of view. Client side option is probably the most do-able for what wiener_snitzel wants to accomplish.
« Last Edit: June 03, 2016, 04:58:47 pm by usnavy30 »
How To Run A Mod Installer.exe
Quote
Hello.. I have a problem... It says I don't have Mount&Blade Warband: Napoleonic War and I have to buy it
Try joining a regular Napoleonic Wars server and then re-running the installer.

Offline wiener_snitzel

  • Sergeant Major
  • *
  • Posts: 117
    • View Profile
  • Nick: 32nd_Gdm_Wiener_Snitzel
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #1501 on: June 03, 2016, 05:09:46 pm »
So what you actually want is to pare clothes with appropriate hats. This might be possible using openBRF alone, but you may run into strange behaviors and errors to overcome.
For a solution which involves openBRF alone, it would involve something like replacing clothes_a with a model which has both clothes_a and hat_a combined, then if the model has no rigging apply some from other existing model (you can copy/paste rigging), do the same for clothes_b, and replace hats a and b with empty models so they are invisible. But I would expect some bumps on the road, good luck.

Could you explain deeper how to copy paste rigging? i have done similar stuff with hats that where already rigged, the only issue with doing it this way is when you go first person the hat does not go invisible so you can see it in the top of your screen, but i dont mind that :)

Edit - No need to explain anyways figured it out
« Last Edit: June 03, 2016, 05:59:08 pm by wiener_snitzel »

Offline Johny_Nawalony

  • First Lieutenant
  • *
  • Posts: 762
    • View Profile
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #1502 on: June 05, 2016, 10:12:05 am »
Simple question, is the "musket2_volly" sound used in anything?
I can do paid skin comissions so yeah msg if ya want one

Offline Gokiller

  • Almost Pride of Ni
  • Major General
  • **
  • Posts: 3913
  • Bydand in the chat lads!
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1503 on: June 08, 2016, 01:00:26 am »
Simple question, is the "musket2_volly" sound used in anything?
I don't have a NW source code currently at my disposal. But that's pretty easy to check. Simply use Notepad++ -> Search -> Find in Files and type in "musket2_volly". Then you will get a simple oversight on where it is used. If it is used at all, but that's unlikely otherwise it probably wouldn't be there.

Offline Friedrich Staps {58th}

  • First Sergeant
  • *
  • Posts: 102
  • Veliki-Loutsk Pehotniy Polk
    • View Profile
  • Nick: Bluenose
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1504 on: June 14, 2016, 05:00:16 am »
Okay so I got Alistair's Nr25 mod so the Jaegers have freikorps coats. The problem is, the Jaeger officer pants in game (austrian_officer_boots) pop through the coat and look bad. How do I get rid of the pants so I can make the officer pants the freikorps ones given that I know how to put on? In other words, I can already add the standard freikorps pants, but how do I make it so the white pants (austrian_officer_boots) do not show up so I can use the ones I have?

A look:
https://steamcommunity.com/sharedfiles/filedetails/?id=703312423
« Last Edit: June 14, 2016, 10:09:01 pm by Friedrich Staps {58th} »

Offline usnavy30

  • Colonel
  • *
  • Posts: 1983
  • Former Freelance Modder
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1505 on: June 14, 2016, 11:43:30 pm »
Okay so I got Alistair's Nr25 mod so the Jaegers have freikorps coats. The problem is, the Jaeger officer pants in game (austrian_officer_boots) pop through the coat and look bad. How do I get rid of the pants so I can make the officer pants the freikorps ones given that I know how to put on? In other words, I can already add the standard freikorps pants, but how do I make it so the white pants (austrian_officer_boots) do not show up so I can use the ones I have?

A look:
https://steamcommunity.com/sharedfiles/filedetails/?id=703312423

This may help, first a big useful and informative quote after this section. The search function is quite useful for digging up information. You will want to know the unit's pants model name in openBRF to find. And I highly recommend to just have the NW source code downloaded to use to cross-reference which units share what pants in module_troops file. In the module_items file you can check what a item's mesh/model name is. Sometimes the item name from openBRF is changed in the troop's inventory . CTRL+F search is your friend here. Also, Notepad++ can make a search to highlight and retrieve all matches of a word(s) search.

Navy, You know how the Austrian Grenadiers, Grenzers, and Hungarians use the same pants? how do I make it so the Grenzers have, say, pink pants but the Grenadiers and Hungarians still have the origanel?
The easiest way to do this and since only being visual is to attach your specific pants you want in the brfs by making the pants mesh
mesh_name.3 aka the number after the last attached mesh for the uniform. This will assign the pants to the uniform itself let me see if I can dig up Parrot's method on this matter. Here we go.
To quote Parrot
Not possible without editing the code because those pants are shared with a lot of units.

It's possible, I managed to separate all of the British, French, and Russian pants in my mod. It takes quite a bit of time and patience though, so grab a nice beer and some good music, and settle down with OpenBRF.

-----------------------------------------------

What you'll want to do first is single out which unit you want to change the pants mesh for, let's take the French as an example, because apparently their trousers were so comfortable everyone decided to wear them. The basic French pants are located in the mm_french_uniforms.brf file, they are called french_basic_infantry_pants and they are currently linked to all basic French infantry units, and some others in other factions.

I'm going to take a second to explain how the unit meshes are currently set up in the uniform BRFs. For all units, you have the torso meshes and the pants, the torso stuff will all have the same name with a number behind it. The pants are all separate, either with the unit's name in, or shared with a pool of other units. MW looks at the torso meshes and then combines them with the correct pants mesh that it has been told to combine the torso with. If it can't find one of these meshes, it won't load it, and you'll get an invisible body part.

Now back to business....

First thing, rename your French infantry pants something else. I renamed mine "french_basic_infantry_pants (old)", now NW won't load that mesh because it can't find the right name. Load up NW and have a look at which regiments are missing their pants, make a note as this will save time later.

Head back into OpenBRF and copy paste the "french_basic_infantry_pants" mesh underneath all the torso meshes of the units that were missing their pants in-game. Rename the meshes to the name of the torso and add the next number in sequence at the end. Here's an example:

This:

Code
french_84e_body_ranker
french_84e_body_ranker.1
french_84e_body_ranker.2
french_basic_infantry_pants

Becomes:

Code
french_84e_body_ranker
french_84e_body_ranker.1
french_84e_body_ranker.2
french_84e_body_ranker.3

Because you changed the name of the normal French infantry pants, NW won't load them, but because the torso mesh now includes the pants, they'll be loaded with the torso. Great hmm? Simply do this with all the units you listed as not having pants and you're almost there.

To make sure that they don't vanish at certain distances, right click on the mesh and choose the option "Compute LODs". Save the BRF and you're done!

Hope this helps anyone who was wondering about the pants problems. I'll have a look at breaking the shared shako problem as well.
[close]

That happens with pants being shared, what you can do to get around this issue is assign (a bit tedious) the pants to every rank's uniform in openBRF. Of course with this method you would have to disable the old shared pants with a rename and replace the other units pants that uses the old model with this method, which is why it can be tedious.

Like so (pictures)
[close]
This method works, adding customized pants as a uniform's attached mesh will do the trick if you do each individually to have no pants-less ranks. If you have pants as an attached mesh AND as a separate mesh then they will clip if they are the same, which never looks good. So it is either adding pants to a uniform as an attached mesh shown above or replacing a pants model that is shared. Your choice, most likely you want to try adding pants customized, to each uniform as attached meshes again shown above.
« Last Edit: June 14, 2016, 11:59:47 pm by usnavy30 »
How To Run A Mod Installer.exe
Quote
Hello.. I have a problem... It says I don't have Mount&Blade Warband: Napoleonic War and I have to buy it
Try joining a regular Napoleonic Wars server and then re-running the installer.

Offline Johny_Nawalony

  • First Lieutenant
  • *
  • Posts: 762
    • View Profile
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #1506 on: June 15, 2016, 06:12:07 pm »
(The specular map is fine)Anyone here to help with this glowing bug?
I can do paid skin comissions so yeah msg if ya want one

Offline Grozni

  • Second Lieutenant
  • *
  • Posts: 308
    • View Profile
  • Nick: RRA_10thRH_SoH_Grozni
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1507 on: June 15, 2016, 06:28:03 pm »
(The specular map is fine)Anyone here to help with this glowing bug?


Spec RGB settings for the material in openBRF?

Offline Johny_Nawalony

  • First Lieutenant
  • *
  • Posts: 762
    • View Profile
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #1508 on: June 15, 2016, 09:48:49 pm »
Repaired, thanks :D
How it looks after fixing
[close]
« Last Edit: June 15, 2016, 09:54:12 pm by Johny_Nawalony »
I can do paid skin comissions so yeah msg if ya want one

Offline cwca

  • Volunteer
  • *
  • Posts: 11
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1509 on: June 16, 2016, 09:04:10 pm »
hello, I am making a mod with many new units. in the troop.txt file, you can assign troops different uniforms. however, how do I give the units a custom skin?
I have created a skin called 'british_64th_ranker.dds' but when I assign the unit the uniform ( [itm_british_64th_ranker,...]) and then run the build, it doesn't work! it says that it is invalid! please  help!

Offline Grozni

  • Second Lieutenant
  • *
  • Posts: 308
    • View Profile
  • Nick: RRA_10thRH_SoH_Grozni
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1510 on: June 16, 2016, 11:35:50 pm »
hello, I am making a mod with many new units. in the troop.txt file, you can assign troops different uniforms. however, how do I give the units a custom skin?
I have created a skin called 'british_64th_ranker.dds' but when I assign the unit the uniform ( [itm_british_64th_ranker,...]) and then run the build, it doesn't work! it says that it is invalid! please  help!
You should look around for some basic tutorials before attempting to do this. But main workflow (if you're talking about adding completely new clothes and not just reskin) goes like this:
- Use openBRF to import new model (if any), texture and create new material. Setup the material to use the new texture(s) and the model to use the new material.
- In items.txt or module_items.py add a new item to the list, and make sure it references the new model by the name you gave it in openBRF (the 3d mesh model itself, not the .dds texture). Look at other clothes items for examples.
- In troops.txt or module_troops.py equip the troop with the new clothes item by referencing it by the name you gave it in items.txt

If you're not sure about how to do some of these steps you should really look more into basic tutorials, search around these forums.

Offline Friedrich Staps {58th}

  • First Sergeant
  • *
  • Posts: 102
  • Veliki-Loutsk Pehotniy Polk
    • View Profile
  • Nick: Bluenose
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1511 on: June 17, 2016, 09:31:19 pm »
I have resolved the Jaeger pants. But now another issue has arose. I have a few other mods that change bavarians to french and KGL to british. How can I make it so the german cries can be french or british?

Offline usnavy30

  • Colonel
  • *
  • Posts: 1983
  • Former Freelance Modder
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1512 on: June 18, 2016, 05:42:39 pm »
I have resolved the Jaeger pants. But now another issue has arose. I have a few other mods that change bavarians to french and KGL to british. How can I make it so the german cries can be french or british?
Without the module system, you cannot disable the coded german warcries using German sounds. The other way without the MS, you can replace the German warcry sounds in question but then the regular speaking units will have it replaced as well. If you wish to accomplish this, it is worth the experiment time to test with the module system.
How To Run A Mod Installer.exe
Quote
Hello.. I have a problem... It says I don't have Mount&Blade Warband: Napoleonic War and I have to buy it
Try joining a regular Napoleonic Wars server and then re-running the installer.

Offline Malkolm R. Lind

  • Major
  • *
  • Posts: 1591
  • Why do drugs when you can listen to music?
    • View Profile
  • Nick: Illya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1513 on: June 18, 2016, 11:27:18 pm »
Good evening chaps! Does anyone here know a way to making a unit in a Napoleonic Wars module to use other warcries than what they already use? I'm trying to change this Scottish speaking unit in North & South into a French speaking unit. I mean without editing the actual sound files themselves. Help would be heavily appreciated.

Offline cwca

  • Volunteer
  • *
  • Posts: 11
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1514 on: June 19, 2016, 05:57:46 pm »
hello, I am making a mod with many new units. in the troop.txt file, you can assign troops different uniforms. however, how do I give the units a custom skin?
I have created a skin called 'british_64th_ranker.dds' but when I assign the unit the uniform ( [itm_british_64th_ranker,...]) and then run the build, it doesn't work! it says that it is invalid! please  help!
You should look around for some basic tutorials before attempting to do this. But main workflow (if you're talking about adding completely new clothes and not just reskin) goes like this:
- Use openBRF to import new model (if any), texture and create new material. Setup the material to use the new texture(s) and the model to use the new material.
- In items.txt or module_items.py add a new item to the list, and make sure it references the new model by the name you gave it in openBRF (the 3d mesh model itself, not the .dds texture). Look at other clothes items for examples.
- In troops.txt or module_troops.py equip the troop with the new clothes item by referencing it by the name you gave it in items.txt

If you're not sure about how to do some of these steps you should really look more into basic tutorials, search around these forums.

hi
 I have managed to do that today, creating a custom body for my 64th soldier. I have added the name in the Module.txt file as well. However, when I click on the soldier in the menu he has no body! I have checked everything but cant get it right, please help?