Creating your first FA

## Getting Started

You will need:

* An app to open .pk3s - WinRAR for Windows or SLADE, Dr. Unarchiver for OSX
* A text editor (recommended: Notepad++ for Windows, Sublime)
	+ Important, if using Notepad++, you will really benefit from these steps:
		- Settings -> Style Configurator -> Language -> select C -> type in extra file extensions separated by space in the User ext. box -> Save & Close
* A lot of free time!
* Patience

## Navigation

While making an FA seems quite daunting at first, you do not need coding experience to create one.

So, how does it all work? It's best to first start your exploration by opening some .pk3s. This guide has been created to help those of all levels learn how to make their first FA. You do not need to know how to code, you just need patience and curiosity. Start by opening up .pk3s and checking out various directories! After going through many of them, you'll get a feel for the general architecture of files. Most files can be opened up with Notepad++. It is advised to also familiarize yourself with the Jedi Academy SDK, but this is not necessarily required for making FAs which are essentially glorified .txts.

Movie Battles II is a mod based on the siege gametype of Jedi Academy, and thusly relies on how the original Jedi Academy devs organized/structured things. Each map within that mode has a Siege File. This is another text file which configures your map to align with things like UI, gives objectives, mission info, mini maps and other such things. .siege text files are located within the maps directory, not within ext\_data. ext\_data is where all of your text assets for FA are to be located. These include things like custom sabers (located within ext\_data/sabers), vehicles (ext\_data/vehicles) and npcs (ext\_data/npcs) as well as the mb2 directory which contains your team config (ext\_data/mb2/teamconfig) and charcter config (ext\_data/mb2/character). A working siege file would have a team file (.mbtc) linked to it and each team file would reference all of the character files (.mbch). A .siege, two .mbtc files and as many .mbch files as you want per team are required to get your FA up and running. The main thing to be careful of is properly formatting. Good formatting and not making errors are the most important parts of FA making, so try to move slow and test often.

To reiterate: Each map file (.bsp) uses a .siege file (open-able by Notepad++) that has important information for what the names of teams are, what the mission menu reads out, and most importantly which .mbtc file is read for that map. .siege files are located within the maps directory and .mbtc and .mbch files are located within the ext\_data/mb2 directory. Open up some .pk3s within the MBII folder and poke around, eventually you will get a feel for how things are organized. It takes a bit of time to get used to where files and FA code is located. As of 2020, all siege/mbch/mbtc files are organized in .pk3s per map pack:

* MB2assets3
* MB2\_CMP\_assets3
* MB2\_uM\_assets3
* MB2\_PB\_assets2
* 03\_MovieGameMappack

A good place to start is by opening up these .pk3s and looking around. Open team files, character files, and more to get a feel for how it's all done.

Here is a nice guide by Ricks which should help for those who are more visual learners.

Here is a .pk3 which has your basic directories and guides inside to help you get started on your project![1]

## Create Directories

Ready to try and make your own now? Create two folders named *ext\_data* and *maps*.

Within the MBII folder found in Gamedata (or Contents if on Mac), create a folder entitled ext\_data. You will later package this into a .pk3 (be careful about creating a .pk3 from scratch, use an already made .pk3 to avoid this issue).

Within ext\_data, create a few folders. If this FA includes custom models, you may need to also add the models/sounds directories as well. That's entirely dependent on what other assets you want to be included in this FA.

* 'MB2'
	+ *inside this folder create two more:*
		- Character
		- TeamConfig
* sabers - an optional folder you can create if you wish to add your own custom saber weapons or hilts.
* vehicles - an optional folder you can create if you wish to add your own custom vehicles.
 maps
* You will be placing both .bsp and .siege files here. I'd recommend if you are looking to overwrite mb2\_dotf for example, renaming both the .siege and .bsp mb2\_dotf\_rework.

For the most part, you will be working within the Character and TeamConfig folders found within the ext\_data/MB2 folder you just created. Sabers and Vehicles directories are in ext\_data as well and are for just that... advanced .sab and .veh editing. There are pages on this wiki for explaining their use, but save those for later if this is your first time.

## Start editing!

You have two choices starting out:

If you wish to replace an existing map FA with your own FA (or make a small revision which is server-side only):

1. Do not add any new classes to the .mbtc file, clients will not see those!
2. Revise only .mbch files which exist already!
	* clients will not need to download this .pk3 if you use assets already in MBII. They will, however not see any new descriptions you add to the classes and you will need to only use the classes currently provided by the fa you are overwriting.

If you wish to use an existing map but not overwrite that map's current FA:

1. Find the .siege file (example: mb2\_dotf.siege) in that .pk3's maps directory. *All official map .siege files are found in MBAssets3, while other map packs may exist elsewhere.*
2. Modify the two 'useTeam' lines within that map's .siege file to direct to the corresponding .mbtc file (example below being "test\_redteam") so that the .siege directs properly to this new Team file.
3. Rename both the .siege file and .bsp file (example: mb2\_dotf\_rework.siege / mb2\_dotf\_rework\_.bsp).
	* Clients will need to download this .pk3.

Next, either create two .mbtc team files and two .mbch files with your text editor or, find already-existing .mbch / .mbtc files and begin modifying those to your liking! If you are editing already existing .mbch/.mbtc files that is okay, just be sure to name them differently!

### .MBTC - Team Config

Here is a nice base default config to start with. Open up a notepad and copy the below text in. Create one per team. Define the names and define the class names. ifdef (which means type // before the line) any classes you want to keep disabled.

In this case we will call our team1 test\_readteam and our team2 test\_blueteam. Create two .mbtc files with this difference for starters, rename your class1 and class2 per team (otherwise they will share the same class) and disable classes which do not direct to anything for starters. It should look like this:

```
//Siege team definition file.

name "test\_redteam" //this is read by the .siege file

// See Wiki for more information on these three values below

ClassesAllowed 4
TimePeriod 3
EUAllowed 0

Classes
{
    class1    "mb2\_observer\_r" //this is the default spectator class

    class2    "testmap\_red\_FrenzY2"
    //class3 "testmap\_red\_FrenzY3"

    //class4 "testmap\_red\_FrenzY4"

    //class5 "testmap\_red\_FrenzY5"

    //class6 "testmap\_red\_FrenzY6"

}

```

Take a look at this post for more detail on how .mbtc files are formatted.

***If your goal is to only have one class per a team***, make sure you add a spectator class so that the line is queued up for the next person waiting in line to join after waiting.

Here is an example of if you wanted to add subclasses to any of the 6 slots above.

```
SubclassesForClass1
{
    Subclass1 "testmap\_red\_subFrenzY1"
    Subclass2 "testmap\_red\_subFrenzY2"
}

SubclassesForClass2
{
    Subclass1 "testmap\_red\_anotherexample1"
}

SubclassesForClass3
{
    Subclass1 "testmap\_red\_do\_you\_get\_it\_yet"
}

```

*If you want to look at some examples for how this work, as stated above a good place to start would be inside assets numbered 3. Start with MB2Assets3.pk3 /, MovieGameAssets3 or mb2\_pb\_assets2 for some good examples of all the really strange things you can add into each character's build. Go into those .pk3's ext\_data directories and see how other .mbtc/.mbch files were created, then copy-paste one for yourself (remember to give it a new name).*

### .mbch - Class Configuration

Alright, now that you have a .siege and two .mbtc files, it is time to make your first class!

Generally, you will be using the MBCH Values wiki page a lot during this process in tandem with the .MBCH Guide. This will be your bible.

To avoid any bugs, remember to have at least one class without the ClassNumberLimit line (duel maps use the spectator .mbch class).

At the bottom are two examples of both a Jedi and a Gunner .mbch file to get you started. In our example case, make sure you name these .mbch the same as they are defined in your .mbtc or else your FA will not load.

From there, it's all about proper formatting and creativity! If you want to see ALL the possibilities, check out the big example .mbch file Frenzy Created here. One of the best ways to get ideas or to make sure you are doing things right is to look at what other people have already made! Check out other .mbch files to get a good feel for how everything works. Sometimes it is easiest to simply copy the .mbch of a class you like and make minor modifications.

### Tips

* It is really easy to make mistakes while editing .mbch and .mbtc files! Test often and make backups of working builds in case you need to roll back when running into problems!
* If you are hosting a server, try having your jamp or openjk client start with `+set fs_direbeforepak "1"`. With this on, MBII will read folders within MBII enabling you to more easily edit .mbch and .mbtc files on the fly. Use `/rcon map_restart 0` after making tweaks.
* To test locally:
	1. `devmapall nameofthemap`
	2. `mbmode 2`

Okay, on to the example classes. Gunner class:

```
//Siege Class def file.

Classinfo
{
    name           "testmap\_red\_FrenzY2"
    weapons        WP\_MELEE|WP\_BLASTER\_PISTOL
    attributes     MB\_ATT\_PISTOL,2|MB\_ATT\_AMMO,2|MB\_ATT\_FIRE\_GRENADES,2
    forcepowers    FP\_LEVITATION,3
    model          "stormie" //this is optional, if it's here it forces the model to this.

    skin           "default" //this is optional, if it's here it forces the skin to this.

    uishader       "models/players/stormie/mb2\_icon\_default"
    maxhealth      100
    maxarmor       50
    forcepool      100
    forceregen     1
    MBclass        MB\_CLASS\_JEDI
    WP\_ConcussionFlags        HELD\_ALTRELOAD|HELD\_EXPLOSIVE
    WP\_StunBatonFlags         HELD\_ALTRELOAD
    WP\_RocketLauncherFlags    HELD\_ALTRELOAD
    WP\_FlechetteFlags         HELD\_EXPLOSIVE
    WP\_BryarOldFlags          HELD\_EXPLOSIVE
    classNumberLimit    1
}

WeaponInfo0
{
    WeaponToReplace        WP\_BLASTER\_PISTOL
    WeaponBasedOff         WP\_BLASTER\_PISTOL
    NewWorldModel          "models/weapons2/droidblaster/bd\_blaster\_w.glm
 NewViewModel "models/weapons2/droidblaster/padme\_blaster.md3"
 CorrectedWorldModel "models/weapons2/droidblaster/bd\_blaster\_w.glm"
 MissileEffect "blaster/shot"
 AltMissileEffect "blaster/shot"
 Missile3Effect "blaster/shot"
 FlashSound0 "sound/weapons/westar/fire.mp3"
 AltFlashSound0 "sound/weapons/westar/alt\_fire.mp3"
 ChargeEffect "gfx/effects/bryarfrontflash"
 ChargeSound "sound/weapons/bryar/altcharge.mp3"
 Icon "gfx/hud/w\_icon\_droidblaster.tga"
 WeaponName "Blaster of Awesomeness"
 ReloadTimeModifier 0.5
 ProjSpeedModifier 0.2
}

WeaponInfo1
{
 WeaponToReplace WP\_STUN\_BATON
 WeaponBasedOff WP\_STUN\_BATON
 NewWorldModel "models/weapons2/droidblaster/bd\_blaster\_w.glm"
 NewViewModel "models/weapons2/droidblaster/padme\_blaster.md3"
 CorrectedWorldModel "models/weapons2/droidblaster/bd\_blaster\_w.glm"
 MissileEffect "blaster/shot"
 AltMissileEffect "blaster/shot"
 Missile3Effect "blaster/shot"
 FlashSound0 "sound/weapons/westar/fire.mp3"
 AltFlashSound0 "sound/weapons/westar/alt\_fire.mp3"
 ChargeEffect "gfx/effects/bryarfrontflash"
 ChargeSound "sound/weapons/bryar/altcharge.mp3"
 Icon "gfx/hud/w\_icon\_droidblaster.tga"
 WeaponName "Not so useful sniper rifle"
 ReloadTimeModifier 0.25
 ProjSpeedModifier 0.01
}

Description "Debug Class

Equipment:
Sniper Rifle
Special Reload Blaster Pistol (2)
Fire nades

Attributes:
Fast Reload
Ammo (2)
Force Jump (3)

"

```

You'll note there are quite a few areas in WeaponInfo# which direct to either models, sounds or effects. These are advanced options and are not required, but have been put in this guide to give you an idea of how far you can go with FA creation. The guide has even more possibilities. Weaponinfo stuff is clearly defined in the .MBCH Guide.

Jedi Class example (from Powerbattles).

~~The rosh\_spear is from a .sab defined within ext\_data/sabers. For more information on customizing sabers see: Creating a .Sab file.~~

```
//Siege class def file.

ClassInfo
{
    name             "pbfa\_6\_r\_kyle"
    weapons          WP\_MELEE|WP\_SABER|WP\_BLASTER\_PISTOL
    saber1           "katarn"
    sabercolor       4
    saberstyle       SS\_FAST|SS\_MEDIUM|SS\_STRONG|SS\_DESANN
    classflags       CFL\_BPFREEJUMPS
    maxhealth        100
    maxarmor         100
    APmodifier       1.6
    BPmodifier       1.6
    forceregen       1.5
    speed            1.1
    model            "kyle"    //this is optional, if it's here it forces the model to this.

    skin             "kylelol" //this is optional, if it's here it forces the skin to this.

    uishader         "models/players/kyle/mb2\_icon\_default"
    extralives       1
    MBClass          MB\_CLASS\_JEDI
    classNumberLimit 1
}

WeaponInfo0
{
    WeaponToReplace   WP\_BLASTER\_PISTOL
    WeaponBasedOff    WP\_BLASTER\_PISTOL
    NewWorldModel     "models/weapons2/kyle\_bryar\_pistol/briar\_pistol\_w.glm"
    NewViewModel      "models/weapons2/kyle\_bryar\_pistol/briar\_pistol.md3"
    Icon              "gfx/hud/w\_icon\_briar"
    WeaponName        "Bryar Pistol"
    MuzzleEffect      "Blaster/MuzzleFlash01Y"
    AltMuzzleEffect   "Blaster/MuzzleFlash01Y"
    MissileEffect     "Blaster/Shot02Y"
    Missile3Effect    "Blaster/Shot02Y"
    AltMissileEffect  "Blaster/Shot02Y"
    PowerupShotEffect "Blaster/Shot04Y"
    ChargeEffect      "gfx/effects/yellow\_bryarFrontFlash"
}

description "Kyle

He finally had enough.

160% of regular attack points (AP).
160% of regular block point (BP).
100 shields

Weapons:
Bryar Pistol
Lightsaber

Abilities:
Push (3)
Pull (3)
Lightning (3)
Grip (3)
Defense (3)
Deflect (3)
Force Block (3)
Jump (3)
Sense (3)
Mindtrick (3)
Speed (3)

Extra Life
"

```

Practice makes perfect. Don't feel ashamed asking a dev for help, FAs are a tricky beast to make at first, but once you get good at creating them, they are a lot of fun and allow insane amounts of customization.