Guide: Replacing a Model

FrenzY

Chaos Connoisseur
Moderator
Movie Battles II Team
Posts
582
Likes
536
NOTICE: This method of adding custom models will be deprecated in a future release. Please follow this guide instead.

With v1.6 came a new feature to add custom models for whichever class you decide. This is more-or-less copied from how Base JKA works, but with a twist - you can now choose which custom model you want per class with a bit of work. All that requires is a tool for opening .pk3s, editing text files and a bit of time understanding how it all works after duplicating and properly renaming directories.

Since one has not been made yet, I have taken the liberty of making this guide to create non-replacing custom models which show up in the custom models section of MBII! If you want to know how to replace a model already in MBII, check out Peneke's video guide which is stickied in this very sub-forum. For those not aware of what I mean by 'custom model', I am referring the screenshot below seen in open/duel mode where if you click the 'custom' tab below the model scroll you are able to select your own shlew of non-officially supported custom models from packs that anyone has made (which show up as default models, like Shadowtrooper for Sith or Jedi Trainer for Jedi classes / etc on the server if the other player does not have it).

Most large packs like H.B. or Peneke use this method now, along side a few ported models which overwrite current MBII models.
1591919084298.png

Alright, now... let's get to it.

You will need:
Part 1 - Choose your process
is it in MBII already or are you adding an external model from JKhub or wherever?

There are a few ways to start by adding a custom model. One way is to add one from an external source, the other is to find an already existing one in MBII's many .pk3s and convert it to a custom model. These are two different processes, I will describe both below:

Process 1 - converting a model from a place like JKHUB to be a custom model.
When you download a model from a place like JKHub or wherever, it usually comes as a .zip-file that contains the .pk3.

First off - Put the MyNewModel.zip on your desktop and unpack it into a folder. (The name of the folder is up to you, it has no importance)

Open the folder and locate the MyNewModel.pk3-file in there. Open it with 7zip, Pakscape, Winrar (or whatever program you are using for Linux/Mac). In case Windows pops up a dialog asking you which Application you want to use to open this file, pick the option that allows you to select the program by yourself and choose that program.

Now that you opened the .pk3 - Unpack it into a folder. (you can name itz z_zz_MyNewModel if you want to, but you can also rename it later)

you'll now see a few of the following folders (Note: in most cases not all of these will be there):

- botfiles (that's for bot-support)
- ext_data (that's for npc-support and hilt-references)
- models (that's the most important one)
- scripts (also for bot-support)
- shaders (well, that's for the shader...)
- sound (here are the taunts, etc...)


First off - you'll delete the folders botfiles ext_data and scripts
These are not required for MBII (if your model doesn't have them, be happy, less work for you).

Now double-click the models folder, you'll find a players folder inside. double-click that too. Now you're almost there, you will see a folder now that is called \"MyNewModel\" (with MyNewModel being whatever model it was you downloaded or are using). You will want to rename this to have the correct prefix of the class you wish for it to be a custom model in.

Here are the class prefixes:
Imperial Soldier: +sol
Rebel Soldier: +tro
Commander: +com
Elite Trooper: +eli
Sith: +sit
Jedi: +jed
Bounty Hunter: +bou
Hero: +her
SBD: +sbd
Wookiee: +woo
Droideka: +dek
Clone: +clo
Mandalorian: +man
ARC: +arc
In this case, we want MyNewModel to be a custom Hero model, so we will rename the directory from MyNewModel to +her_mynewmodel. Anywhere this directory is referenced will now need to be changed, or else you will have messed up shaders and missing textures.

Inside the MyNewModel (now named +her_MyNewModel in this case) make sure to check that the icon is renamed to MB2_Icon_Default or else it may not show up in the custom model area!

I have attached an example of a custom Sith replacement attached at the bottom of this post, Darth Jar Jar!

Now skip to Part 2 to edit the (ignoring Process 2)

Process 2 - converting an already-existing-in-MBII model into a custom model

If the model already exists in MBII, you need to create your own new .pk3 (I advise instead of making a new one, simple copy a current one, add in your new stuff and remove anything old, .pk3s are a bit weird and sometimes creating a new .pk3 will cause issues) and copy those files into this new replacement .pk3.

Where to find the model directory per pack:
- Official models: Most of the officially supported models are found in zz_MBModels, zz_MBModels2 and FAMBmodels .pk3s.
- CMP models: MB2_CMP_Assets2.pk3
- uMad? Pack models: MB2_uM_Assets2.pk3
- Movie Game Map Pack: both 02_MovieGameMappack and 03_MovieGameMappack

Where to find the text assets (.skin and .shader files) you will need to edit with the proper +prefix directory per pack:
- Official models: MBassets3.pk3
- CMP models: MB2_CMP_Assets3.pk3
- uMad? Pack models: MB2_uM_Assets3.pk3
- Movie Game Map Pack: 03_MovieGameMappack

Your process for making this work involves a bit of snooping around and moving text and model assets into your new pk3. The .skin files should be easy to find as they share the same directory as the model directory, but shaders might not be as easy to find as they are not necessarily named in an organized manner. Some models might not be using shaders as well, so maybe get to this at the end once you get your custom model working.
  1. Locate the assets you need for your replacement .pk3
    • find the model directory
    • find the model directory in one of the text asset.pk3s
      • You need to find the .skin of the file you are looking for
      • If the model uses a .shader, you need to edit that shader file with a text editor to have the new +prefix
  2. Put the contents of both model and text asset model directories (in this case we will use MyNewModel as the name of our example) into this new replacement .pk3
    1. copy all assets within the model/nameofplayermodel into your new pk3
    2. Copy any corresponding shader and .skin files into this new pk3
    3. Look for the shader file for your model
Here is an example of how I turned this CMP FA model:
1591951094450.png

Into a custom model replacement .pk3 (attached at the bottom of this guide)
I played this class in the CMP map Snow Facility, and I quite like those models/skins so I looked it up in the MB2_CMP_asset3.pk3's ext_data directory -> ext_data/mb2/teamconfig. opened up sf_jediteam.mbtc with a notepad editor and figured out that sf_facilitycommander was the name of the character file. I opened up that .mbch (found in ext_data/mb2/character) and discovered the model was jedi_hm with the skin hothelite4. I copied that .skin file from models/players/jedi_hm as well as grabbed the icon from mb2_cmp_asset2 and (here is the trickier part) since I recognized that jedi_hm is a base asset, I went out of the mb2 folder and into the base assets to find the .glm! So, after finding the .skin, icon (which I had to rename to match the .skin) and glm, I put it all in in .pk3, renaming that directory and added it's own modeldata.cfg to properly direct this new model to sounds!


Once you have your shader directory, model and sound directory (if using custom sounds) in your new replacement pk3, let's try making it into a Hero! Rename your directory within model/players/MyNewModel to +Her_MyNewModel

Or another class
Imperial Soldier: +sol
Rebel Soldier: +tro
Commander: +com
Elite Trooper: +eli
Sith: +sit
Jedi: +jed
Bounty Hunter: +bou
Hero: +her
SBD: +sbd
Wookiee: +woo
Droideka: +dek
Clone: +clo
Mandalorian: +man
ARC: +arc

You are not done yet, though as you still need to edit the text files (models/player/nameofmodel/model_nameofskin.skin + shaders/nameofshaderfile) regarding MyNewModel that point to the MyNewModel directory. These need to be adjusted to the new +her_MyNewModel directory!


Part 2 - renaming proper directories

Ok, you made it into the heart of the model. If you followed either processes, you should have a .pk3 with three sub directories:

model
shaders
sound (this may be optional if you wish to use already-baked-in-mbii sounds)

Let's start with the model directory. Within models\players\MyNewModel\ you should see a bunch of .jpg's, .tga's, .skin's and a .glm-file. There also should a few .cfg files (modeldata.cfg and holster.cfg being the most important ones)

Let's start by getting your .skin file correct. First, you need to determine which .skin you are using if there are multiple. You also need to rename it to be
Double-click the "model_default.skin" file with Notepad. (Again, if windows gives you a dialogue, chose the option to select the program manually and pick Notepad). Now you'll see some text that'll look something like this:

head,models/players/MyNewModel/hair.tga

If the model is already in MBII, you do not need to change this directory.

If it is a new model which does not exist in MBII, you will need to add your new prefix, in this example it is +her_

(I personally use the search-funtion [shortcut: CTRL+F] to find all the references i need to replace and just paste [shortcut: CTRL+V] the new reference)

head,models/players/+her_MyNewModel/hair.tga

If you also see lines like this:

hips_cap_torso_off,models/players/stormtrooper/caps.tga

Leave them as they are, all lines that point to the /stormtrooper/-folder are just for the caps. (the caps are what tells the game where to dismember a limb if it's cut off by a saber. you see them too when you f.i. cut somebody's arm off, they are the burnt wound you see at the end of the stump)

Once you're done, save the file. (Keep it's exact name - \"model_default.skin\")

If you want to have multiple skins per custom model, just remember to have the icon jpg named appropriately as well. if the skin is named model_haha, the icon should be named mb2_icon_haha.

Delete everything from the folder that you don't use. That means if your model comes with teamsupport, it will have .jpg's, .tga's and .skin-files for a red and a blue skin. If you don't use these skins, you should delete the files that belong to them. (If you delete these unused skins here you should remove their reference in the shader too, it's your choice, i personally do it because having too many shaders can cause a variety of bugs)


Now rename the file "icon_default to "mb2_icon_default" or mb2_icon_nameofskin. Now the icon of your MyNewModel will be seen instead of the icon of the model you wish to replace.


Once you're done, move up two folders until you see the directory called shaders. (If your model doesn't have it, skip this). If you followed process 1 you will need to rename your shaders with the new prefix similarly to how you edited the .skin files. If you followed process 2, you don't need to rename them as they already exist in game.


Again there is only text in the .shader, so it can be opened via a text editor. What you need to do is similar to the job at the \"model_default.skin\"-file. Find and replace every reference that has the name \"MyNewModel\" in it and replace it with \"+her_MyNewModel\" (or whatever the class prefix you want it to be.


Part 3 - Finishing it off / double checking your work

Don't forget to throw in a modeldata.cfg into your model's directory, use other model's modeldata as an easy method to creating your own.

If you did things right, your folder workspace should have just these directories:

models
shaders
sound

Grab a currently-working .pk3 and remove it of contents, and add these in (this is the safest way to avoid a weird .pk3 error)
or
Select all three of them and create a .zip-file called z_z_MyNewModel.zip. Rename this file to z_z_MyNewModel.pk3.

Now put it into your "MBII" folder, delete everything you have on your Desktop from making this custom model and play!

Hop in game and test it! If you see missing textures, you probably made a typo in your .skin file. If you don't see the model at all in the custom models, make sure the mb2_icon_nameofskin is named properly! If you are hearing 'take that!' instead of your expected sounds, you are missing a modeldata.cfg!

I'll be editing this more if there are any updates or typos to fix. Have fun!

FrenzY
 

Attachments

  • z_z_FacilityEliteTrooper.pk3
    508.9 KB · Views: 625
  • z_z_darthjarjar.pk3
    1.3 MB · Views: 621
Last edited by a moderator:

FrenzY

Chaos Connoisseur
Moderator
Movie Battles II Team
Posts
582
Likes
536
thanks this guide is really helpful, i want to get into model sounds where should i look?
Good start, should include information on modeldata.cfg and give a template, also more information on troubleshooting.
Here is some important basic information:

Your modeldata.cfg is what points to your sounds, if you are making new character sounds, just try to follow the basic directory setup other sounds use (sound/chars/nameofmodel/misc/soundsgohere). Gotta keep in mind if you make your own modeldata.cfg for a model which already has one, you might be overwriting important information. If you are working on a .skin for a model already in game, you should go and find that modeldata.cfg and add to it instead of replace it entirely.

Be sure to take a look at other modeldata.cfgs to get a vibe of how it works. I'll take palpatine's modeldata for example:

// soundsets sounds_default palpatine m sounds_sith palpatine_sith m

The first few lines are for the default palpatine skin, the first line sounds_default is pointing to the skin, the second line after that, palpatine is pointing to the palpatine directory which is found within sounds/chars/palpatine
Set your project rate to be 44100hz, export at no higher than 192kbps, .mp3 or .wav and your audio needs to be mono, not stereo (stereo is only really ok for music in JKA)

Proper sound format:

Another important thing regarding proper naming of sound files You need to also be sure not to break the 'chain' of numerical order, so for example if you had just 'taunt.wav' and 'taunt2.mp3' but not 'taunt1.mp3' you would break the chain and the model would default to 'Take that!".

These are all the general sounds per any character in MBII:

death1.mp3
death2.mp3
death3.mp3
jump1.mp3
pain25.mp3
pain50.mp3
pain75.mp3
pain100.mp3
falling1.mp3
choke1.mp3
choke2.mp3
choke3.mp3
gasp.mp3
land1.mp3
victory1.mp3
victory2.mp3
victory3.mp3
taunt1.mp3
taunt2.mp3
taunt3.mp3
taunt4.mp3
taunt5.mp3

gloat1.mp3 -- if jedi class, this is your 'Flourish sounds'
gloat2.mp3
gloat3.mp3``
These are all the sounds used by any MBII Character. And yeah, like I said... if you want to get really advanced, you can add a sound for ANY base voice_cmd.

So, within your misc folder where all of these go, you could add a properly exported mp3/wav named req_medic for example if you wanted a sound to REPLACE the original 'I need a medic' sound used by default.

You can find all the voice commands here (keep in mind, you can only replace the 'base list' found at the bottom of this post): Voice Commands

Hope that helps some, feel free to ask any other sound related questions. Sometimes sounds don't work because they are not converted properly. Other than opening and manually converting in Audacity, I found that TAudioConverter and FlicFlac worked pretty well. Both are decent freewares for such a thing!
 
Last edited:

FrenzY

Chaos Connoisseur
Moderator
Movie Battles II Team
Posts
582
Likes
536
also i tested my model in game and it won't play the death sounds it plays the generic ones. i'll show the sound file.
Just showing me a screenshot of your folder isn't helping. I'd warrant a guess those sounds are not properly formatted or your modeldata.cfg is not properly pointing to the right folder - does the console provide you any errors? Try converting them again using the converters I mentioned in my original post or re-exporting them via Audacity or a similar program using the specs provided.
 
Posts
87
Likes
50
hey i'll get a screen shot of my modeldata.cfg and also i get this error when i join a server that certain models fail loading using defaults.
Screenshot (6).png
(including the one i'm making).
 

Jvne

Internal Beta Team
US Official Server Admin
Posts
46
Likes
92
hey i'll get a screen shot of my modeldata.cfg and also i get this error when i join a server that certain models fail loading using defaults. View attachment 4772(including the one i'm making).


the error your getting is for the hats, that will go away when the hats do.(any custom model.glms were not fitted for hats, so MBII uses the default for these.)
also, I've already made a working stormurai, feel free to just use mine or look at it for reference!

also, about the custom sounds, you probably don't have them formatted correctly so MBII cant read them.
Set your project rate to be 44100hz, export at no higher than 192kbps, .mp3 or .wav and your audio needs to be mono, not stereo (stereo is only really ok for music in JKA)
 

Attachments

  • z_zz_stormurai.pk3
    2.5 MB · Views: 374
Posts
87
Likes
50
oh and i have another question, is there some way that i can set sounds to go off when certain commands are activated for example the command /rq could i set a sound file to go off when someone rage quits?
 
Last edited:

Jvne

Internal Beta Team
US Official Server Admin
Posts
46
Likes
92
i figured it out with the sound error, and the other error i talked about happens with movie battle 2 models.

the error your getting is for the hats, that will go away when the hats do.(any custom model.glms were not fitted for hats, so MBII uses the default for these.)
I told you what the model error was lmao

oh and i have another question, is there some way that i can set sounds to go off when certain commands are activated for example the command /rq could i set a sound file to go off when someone rage quits?
I don't know how you would do that but this isn't the thread for such a thing.
Either make a thread asking about it, or look around and see if anyone else has asked about it here.

If you have any questions about porting models from JKhub or errors your getting with custom models ask away.
 

Nai

Posts
7
Likes
5
Hello Frenzy, first, thanks for the tutorial.
Anyway i have a problem that i cannot figure out, my modified skin dosent appear in the "Custom" tab of the models selection screen.
i may have done a mistake somewhere, but even your "Dark jarjar" dosent show up in the custom tab so i think the problem is elsewhere...

Any idea ?

--------
SOLVED
--------

I had to clean my game folders, i had an old version with japlus,clanmod and lugormod installed, there was some conflicting files (duh)
if you have a similar problem, re-install JK and only MB2.
 
Last edited:

Noob

Nerd
Donator
Movie Battles II Team
Posts
1,520
Likes
1,637
Hello Frenzy, first, thanks for the tutorial.
Anyway i have a problem that i cannot figure out, my modified skin dosent appear in the "Custom" tab of the models selection screen.
i may have done a mistake somewhere, but even your "Dark jarjar" dosent show up in the custom tab so i think the problem is elsewhere...

Any idea ?

Make sure you meet the requirements.

  • have an mb2_icon_default (non-progressive jpg)
  • have a model and skin file (making sure they point to proper textures)
  • your model name is following proper naming convention
    • Imperial Soldier: +sol
      Rebel Soldier: +tro
      Commander: +com
      Elite Trooper: +eli
      Sith: +sit
      Jedi: +jed
      Bounty Hunter: +bou
      Hero: +her
      SBD: +sbd
      Wookiee: +woo
      Droideka: +dek
      Clone: +clo
      Mandalorian: +man
      ARC: +arc
  • Also if you are compressing the files to pk3 yourself, make sure you are compressing with ZIP and not RAR
  • Last but not least, are you putting it in your GameData/MBII folder? lol
 

The Unguided

Moderator
Movie Battles II Team
Posts
285
Likes
260
Proper sound format:

Another important thing regarding proper naming of sound files You need to also be sure not to break the 'chain' of numerical order, so for example if you had just 'taunt.wav' and 'taunt2.mp3' but not 'taunt1.mp3' you would break the chain and the model would default to 'Take that!".

These are all the general sounds per any character in MBII:

death1.mp3
death2.mp3
death3.mp3
jump1.mp3
pain25.mp3
pain50.mp3
pain75.mp3
pain100.mp3
falling1.mp3
choke1.mp3
choke2.mp3
choke3.mp3
gasp.mp3
land1.mp3
victory1.mp3
victory2.mp3
victory3.mp3
taunt1.mp3
taunt2.mp3
taunt3.mp3
taunt4.mp3
taunt5.mp3

gloat1.mp3 -- if jedi class, this is your 'Flourish sounds'
gloat2.mp3
gloat3.mp3``
These are all the sounds used by any MBII Character. And yeah, like I said... if you want to get really advanced, you can add a sound for ANY base voice_cmd.

These are also workable sounds ingame:

anger1.mp3
anger2.mp3
anger3.mp3
(Available when manually pressing taunt button, and can also be activated automatically during dueling actions - just like gloat and victory lines)
[Note: it can also be triggered when pressing gloat, but only when there are less than 3 gloat lines.]

combat1.mp3
combat2.mp3
combat3.mp3
(When doing special melee attacks)

deflect1.mp3
deflect2.mp3
deflect3.mp3
(Available when manually pressing the same button as for gloat, and/or when deflecting a blaster bolt successfully)

pushed1.mp3
pushed2.mp3
pushed3.mp3
(When being the victim of special melee attacks or superpush)

drown.mp3
(When dying of suffocating underwater)

gurp1.mp3
gurp2.mp3
(pre-effects of the latter)

Also, "taunt.mp3" functions but only if there are one or two anger sounds instead of three. At the same time, it supersedes the case of Take That-ing by the way.

Unique voice commands will work only when you adust the line "flag_simpleSiegeSounds", let's say like this:
sounds_default
kyle
m
flag_simpleSiegeSounds


I can also recommend Audacity for editing, that one worked for me the best personally.
 
Last edited:
Top