Content Packs

* A Content Pack that changes the appearance of the Sound outfit.
* The original and altered texture file used in the Content Pack.
* Full image to use yourself!
1/3
**Content packs** are files that players can install to use customized visual and audio elements in *Toontown: Corporate Clash*. These changes can range from something simple, such as changing the glove color to black, to a full fledged content pack that fully alters every textures appearance. In addition to textures, audio files, cursors, and fonts can also be altered.

**NOTE: Do not alter any of the .mf files in the default folder, i.e. renaming them. This will cause issues to your game such as causing it to not launch.**

## How to Install a Content Pack

* Download a content pack from the website
* Click the gear icon on the launcher
* Click "Show/open game directory folder"
* Locate the resources folder
* Locate the contentpacks folder
* Place the content pack .mf file in the folder
1/6
Public content packs can be viewed and downloaded at contentpacks.net, which is a website partnered with Corporate Clash. After downloading your chosen content pack, there should be a folder containing an ".mf" file. This file is what the Corporate Clash launcher reads to know to use the altered files. Navigate to the Corporate Clash folder by opening your launcher, selecting an account, and clicking on the gear icon near the social media icons. Next, click on “Show/open game directory folder” and open the folder labelled "resources". In this folder, there will be another folder inside named "contentpacks". Paste the .mf file from the downloaded content pack into that folder and you're done! Once you launch the game the content pack should immediately be applied.

## Content Pack Creation

In order to create your own content pack, the game engine for Corporate Clash must be installed. This engine allows the user to directly extract and open the various files used to run the game. This engine is called Panda3D. To install this program, visit it's official website and choose the download suitable for your device. After installing, to view the necessary files for a content pack, navigate to the "resources" folder located in the Corporate Clash file directory. Open the "default" folder and inside will be the various "phase" files that Corporate Clash uses to categorize the different sections of the game. These phases range from phase 3 up to phase 14. The only phase files that should be interacted with are the files ending in ".map" and ."audio" as the other files are not relevant in content pack creation. For example, character models can be viewed using Panda3D, but cannot be altered with the use of content packs.

### Types of Phase Files

In order to alter the textures or audio of your choice, it is important to understand how each file is organized and where different parts are located. Each file located in the Corporate Clash directory is labelled as "phase\_#\_part.mf" (i.e. "phase\_3.5\_maps.mf") with .mf being the file format for Panda3D. Each phase number refers to a specific part of the game, while the end part refers to what types of files are contained in the compressed file.

\*Note: Certain files are not in their "typical" location, so depending on what you are looking for it may be in an alternate phase. For example, the Cog Facility textures are in many different locations as well as the C.E.O.'s.

### Suit Voices & Names

In the 1.2.7 patch notes, Corporate Clash released a detailed document covering the locations of each Suit voice as well as the abbreviations for each Cog.

### Limitations of Content Packs

It's important to be wary of the limitations of content packs, you may not always be able to achieve the desired result. Some textures get reused in multiple areas of the game, and as such any change made to the texture would be seen across all areas it's used in. A notable example would be the tunnel entrances, being used in most every Playground. Some textures get color coded in-game, meaning their color is assigned not by the texture, but rather the server. Examples of this include windows, Toons, and Cog hands. While these textures still can be recolored, know that the color code will still be applied afterwards. Some objects may not even have textures at all, making them impossible to edit, and filters which can drastically change the look of certain areas in the game (e.g. the fog in Barnacle Boatyard).

There are also limitations for some sounds. In Cog Battles, custom sounds can delay the Toon/Cog rounds past their intended runtime, but this has a maximum cap of 20 seconds before the game is forced to continue.

Keeping these limitations in mind is important when making a content pack.

### Music.json

The music.json is a file used to determine what music tracks play in specific areas of the game. Content pack creators can change the directory for areas in the game to play different tracks.

### Extracting & Installing

After locating the phase file(s) that you want to modify, right click on the file name(s) and click "extract" from the pop-up menu. After doing so, a folder will be created containing your chosen files. The files inside this folder can now be easily viewed and modified to your liking. It is recommended that you copy and paste the phase files into a different folder so that your workspace does not feel cluttered. Leaving this folder inside the directory will have no impact on game itself. Do **not** rename any of the files you wish to modify as the game will not be able to read and tie them to the correct parts.

Once you’re done modifying the files you will now repack them to reflect the changes you made. In order to this you will click the address bar to highlight the file hierarchy, then write cmd and press enter. This should open a command prompt within the folder, after that write this in the command prompt and press enter:

```
multify -c -f contentpackname.mf phase_#
```

With "contentpackname" being your chosen name for your content pack, and "#" being the phase number you worked with. If there were multiple phases modified add and additional phases by putting a space and listing the additional phases. For example, to repack phases 3.5-6 enter:

```
multify -c -f MYEPICPACK.mf phase_3.5 phase_4 phase_5 phase_6
```

After repacking the phase files, copy and paste the new .mf file to your "contentpack" folder inside the "resources" folder of the Corporate Clash file directory. Once you launch the game the content pack should immediately be applied.

## Models

Models cannot be altered, but can still be exported and viewed. By doing so, you can view things such as a models different parts and animations. Models can be viewed by either using Panda3D itself, another program capable of running the language Python, or altering the file type to be usable in an alternative program such as Blender.

### Loading Models with Python

If you want to go beyond just viewing the models with Panda3D, you must first install a program that can run Python code. You will also need to have Python installed if it isn't already. The version of Python you are using must match the version of Panda3D you are using. When downloading Panda3D, it downloads Python as well if selected. The program that this tutorial will primarily use is Geany.

Before dabbling with models, it is recommended to first extract all of the models and map files (textures) from every phase file. After extracting, move the folders to your Panda3D folder, this ensures that there won't be any missing texture issues later on. The Panda3D folder should be in your main drive (typically the C: drive) labelled Panda3D(version number). They do not need to be placed into another folder or any folders inside the Panda3D folder.

### Cogs

This first tutorial will give directions on how to build and see animations for a Cog's model. Cog models are built by combining unique head models to a variety of different bodies.

First, open Geany and create a new file and save it as a .py file. This can be done by simply adding .py at the end of the file name. After that, you will then import the needed "imports" to make model viewing possible. Paste the following code at the very top of the file:

```
from direct.actor.Actor import Actor
from direct.showbase.ShowBase import ShowBase
base = ShowBase()

```

This code is just telling the program what you would like to do (view models) and providing the base commands for viewing them. After you've added the code you will then add the camera. This will be inserted at the very bottom:

```
base.oobe()
camera.hide()
base.run()

```

**Note: All code should only be inserted between the imports and base.run().**

Let's now load a model. For simplicity's sake, we will load the buff Cog body model. First, define a variable and call it Model. Next, we can make it an "actor" in order to allow for animations to be applied to it. The model for the buff Cog body is located in phase\_3.5, under models, then "char". The buff Cog model is named "suitA-mod.bam". Since this model is an actor, we can apply the neutral Cog animation to it. This specific animation can be found in phase\_4. Animations are located in the same folder as the models. Let's also make it loop the animation we've added to the actor. Make sure to also re-parent the variable (the model) to render, to make Panda3D actually render the actor.

```
Model = Actor('phase\_3.5/models/char/suitA-mod.bam', {'Animation': 'phase\_4/models/char/suitA-neutral.bam'})
Model.loop('Animation')
Model.reparentTo(render)
Model.setH(180)

```

You can run this code to test if it is working correctly by pressing the gear icon at the top of the ribbon in Geany. A Panda3D window should open with the Cog body loaded and animated. If an error appears stating that there is no module named "direct" you will need to change your build settings. You can do this in Geany by clicking the down arrow next to "build" in the ribbon (brick icon). If you look at the bottom you should see an execute command and "py "%f"". Replace that text with your Panda3D folder location\python\ppython.exe %f. It will look something like this:

```
C:\Panda3D-1.10.13-x64\python\ppython.exe %f

```

Once the model has loaded, you should see the buff Cog body. The tie won't look quite right, but this will be dealt with later on. The camera can be adjusted by using your scroll wheel to turn the model around, right click to zoom in and out, and left click to move the position of the camera. Since this is only the body, let's add a head. For this tutorial, we will use the Major Player's head model. His head can be located in phase\_12, under "char", then "suits". You can add this code directly under the code that was used to load the body:

```
Head = Actor('phase\_12/models/char/suits/ttcc\_ene\_majorplayer-zero.bam', {'HeadAnimation': 'phase\_12/models/char/suits/ttcc\_ene\_majorplayer-neutral.bam'})
Head.loop('HeadAnimation')
Head.reparentTo(Model.find('\*\*/joint\_head'))

```

Now if you run the code, you will see the head is animated and is attached to the body. Let's now fix the "tie" issue, where both the normal tie and bow tie are both present. The code below will hide both the bowtie and necktie. Simply omit (by adding a # at the beginning of the line of code you're omitting) the correct code to get the results you want:

```
Model.find('\*\*/bowtie').hide() #Omit this for bowties
Model.find('\*\*/necktie-s').hide() #Omit this for neckties
Model.find('\*\*/necktie-w').hide()

```

Both neckties need to be hidden for only the bowtie to appear. If you want only neckties, you can either omit both or one. For this instance, the Major Player, the lines of code hiding the neckties needs to be omitted.

Let's now move on to textures. Loading and applying textures is relatively simple. Let's try loading in the Major Player's suit texture for our example. This line of code tells the program to use his textures when loading other parts of his body:

```
SuitTexture = loader.loadTexture('phase\_12/maps/ttcc\_ene\_suittex\_mplayer.png')

```

After that, let's apply the texture to the Cog model's body, necktie and bowtie.

After that, let's apply the texture to the Cog model's body, necktie, and bowtie. After running this code the Major Player's suit texture should be applied:

```
Model.find('\*\*/body').setTexture(SuitTexture,1)
Model.find('\*\*/bowtie').setTexture(SuitTexture,1)
Model.find('\*\*/necktie-s').setTexture(SuitTexture,1)
Model.find('\*\*/necktie-w').setTexture(SuitTexture,1)

```

Let's now load in the Cog's emblem.

```
Emblem = loader.loadModel('phase\_3.5/models/char/ttcc\_ene\_insignias.bam')
Emblem.reparentTo(Model.find('\*\*/joint\_attachMeter'))
Emblem.setH(180)

```

If you want the emblem to show the Cog's department, input the following code. This code will hide the HP texture, which will instead show the department icons. To change it to a specific department, hide all other departments except the department you're setting it by omitting the line similar to the bowties and neckties. Sales is Sellbot, Legal is Lawbot, Money is Cashbot, Board is Boardbot, and Corp is Bossbot. This example code already has the hidden Bossbot texture omitted:

```
Emblem.find('\*\*/emblem\_hp').hide()
Emblem.find('\*\*/emblem\_sales').hide()
Emblem.find('\*\*/emblem\_legal').hide()
Emblem.find('\*\*/emblem\_money').hide()
Emblem.find('\*\*/emblem\_board').hide()
#Emblem.find('\*\*/emblem\_corp').hide()

```

If after adding the emblem, the textures do not appear, add the following line:

```
EmblemTexture = loader.loadTexture('phase\_3/maps/ttcc\_suit\_insignias\_palette.png')
Emblem.setTexture(EmblemTexture, 1)

```

Let's now move on to colors. When loading a Cog body model the hands will always default to white. For the Major Player, this is correct, but for most other Cogs it is not. You can find the correct color by color picking an image of the Cog and entering it into the code. However, Panda3D does not use normal RGB. Instead, it uses floating-point values ranging from 0 to 1. To get accuracy colors, first get the RGB values of the wanted color and then divide it by 255. For this example, we will change the Major Player's hand color to match his head color:

```
Model.find('\*\*/hands').setColor(0.56, 0.48, 0.39)

```

Congratulations! You have successfully loaded in the Major Player!

The final code should look like this:

```
from direct.actor.Actor import Actor
from direct.showbase.ShowBase import ShowBase
base = ShowBase()

Model = Actor('phase\_3.5/models/char/suitA-mod.bam', {'Animation': 'phase\_4/models/char/suitA-neutral.bam'})
Model.loop('Animation')
Model.reparentTo(render)
Model.setH(180)
Head = Actor('phase\_12/models/char/suits/ttcc\_ene\_majorplayer-zero.bam', {'HeadAnimation': 'phase\_12/models/char/suits/ttcc\_ene\_majorplayer-neutral.bam'})
Head.loop('HeadAnimation')
Head.reparentTo(Model.find('\*\*/joint\_head'))
Model.find('\*\*/bowtie').hide()
# Model.find('\*\*/necktie-s').hide()
Model.find('\*\*/necktie-w').hide()
SuitTexture = loader.loadTexture('phase\_12/maps/ttcc\_ene\_suittex\_mplayer.png')
Model.find('\*\*/body').setTexture(SuitTexture, 1)
Model.find('\*\*/bowtie').setTexture(SuitTexture, 1)
Model.find('\*\*/necktie-s').setTexture(SuitTexture, 1)
Model.find('\*\*/necktie-w').setTexture(SuitTexture, 1)
Emblem = loader.loadModel('phase\_3.5/models/char/ttcc\_ene\_insignias.bam')
Emblem.reparentTo(Model.find('\*\*/joint\_attachMeter'))
Emblem.setH(180)
Emblem.find('\*\*/emblem\_hp').hide()
Emblem.find('\*\*/emblem\_sales').hide()
Emblem.find('\*\*/emblem\_legal').hide()
Emblem.find('\*\*/emblem\_money').hide()
Emblem.find('\*\*/emblem\_board').hide()
#Emblem.find('\*\*/emblem\_corp').hide()
EmblemTexture = loader.loadTexture('phase\_3/maps/ttcc\_suit\_insignias\_palette.png')
Emblem.setTexture(EmblemTexture, 1)
Model.find('\*\*/hands').setColor(0.56, 0.48, 0.39)

base.oobe()
camera.hide()
base.run()

```

Some models are a bit unique and have some features that require additional lines of code. For example, the Chainsaw Consultant and the Scapegoat require you to turn on backface culling. Without this turned on, the Chainsaw Consultant's saw will only be one sided and the Scapegoat's ear will be backwards. To fix this, add the line: **render.setTwoSided(True)**. The Witch Hunter's head model is also a bit smaller than it should be compared to how it is in game. To adjust the size, add the line: **Head.setScale(1.25)**.

Additionally, due to how the Rainmaker's textures are set up, in order to change the weather of her hair a specific code needs to written. Change "offset" to one of the listed numbers to choose which weather phase to have visible.

```
for Hair in Head.findAllTextureStages("\*hair"):
    Head.setTexOffset(Hair, 0, 0.2)
# 0 - inversion, 0.2 - heavy rain, 0.4 - oil rain, 0.6 - storm cell, 0.8 - fog

```

There is also currently no known way to set the Duck Shuffler's slot position with the model from the phase files, although an edited model can be used for that purpose. This also requires specific code, similar to the Rainmaker.

Patched Duck Shuffler head (bam model)

Patched Duck Shuffler head (egg source code)

```
for Hair in Head.findAllTextureStages("slot1"):
    Head.setTexOffset(Hair, 0, 0.25)
# Modify the second number to set the texture

## Trivia

* Corporate Clash models were encrypted under the .ef files for most of the game's lifespan. This was changed with the release of the v1.3.2.3 update.