How to: Create a ContentPack

How to: Create a ContentPack

Table of content:
  • 1. What is a ContentPack
  • 2. Preparation, directories and in-game activation
  • 3. Basic structure
  • 4. Adding textures
  • 4.1 The exceptions.dat file to replace certain textures
  • 4.2 The exceptions.dat file to scale certain textures
  • 5. Adding songs and sounds
  • 6. Adding fonts
  • 7. Adding models
  • 8. Adding a background to the ContentPack
  • 9. Tips for testing a ContentPack

1. What is a ContentPack?

At first, lets start with the basics: What is a ContentPack?
A ContentPack is a bundle of files stored in a folder in the Pokemon\ContentPacks\ directory that can change:
  • Music
  • Sounds
  • Textures
  • Fonts
  • Models
in the game.
One can have multiple ContentPacks activated and they replace the content that they find.
Content Packs are essentially a way to customize the game experience without altering any game features. All changes done by ContentPacks are aesthetic.

2. Preparation, directories and in-game activation
In order to properly create a ContentPack, you should create a new game, get a Pokémon on that new save file and enable the SandBoxMode. You can do that by opening the player.dat file with Notepad.
All ContentPacks are located in the ContentPacks directory, and each ContentPack is represented by a directory with a "info.dat" file in it.
They will appear in the game when you click on the Pokéball icon on the top right corner of the main menu. (The ContentPack menu) All ContentPacks can be activated there. The order in which the ContentPacks are represented in this list is the same as their loading order.
ContentPacks can be used with Online profiles.

3. Basic Structure
A ContentPack consists of at least a folder in the ContentPacks directory and the "info.dat" file.
If you want to add content files like music and textures to the ContentPack, the game searches the ContentPack folders as if they were the "Content" folder of the game.
This means if you have a file located in "Pokemon\Content\Textures\test.xnb", to replace that file ingame with your own version, you put that file here: "Pokemon\ContentPacks\<yourcontentpack>\Textures\test.xnb".
A ContentPack can replace all texture, song and sound files (.xnb files) inside the original Content folder of the game, except the "GameJolt" logo which will always be loaded through the original Content folder.

3.1 The "info.dat" file
The info.dat file consists of 3 lines of text:
Code:
The version of your ContentPack.
The name of your ContentPack.
Additional information about your ContentPack.
None of these have to contain the intended information.

4. Adding textures
If you want to add a texture replacement to your ContentPack, you have to add the .xnb OR .png file to the respective folder in the ContentPack. The game always prefers an .xnb file over a .png file. If the original file in the Content folder is an .xnb file, you can still replace it with a .png file in the ContentPack, as long as it is in the correct location.
As an example, if you want to replace the file "Pokemon\Content\Textures\Routes.xnb" with your own .png file, place it in "Pokemon\ContentPacks\<yourcontentpack>\Textures\Routes.png".
Not only textures from the "Pokemon\Content\Textures" folder can be replaced like this. All textures inside the Content folder can be replaced.

4.1 The exceptions.dat file to replace certain textures
Additionally, you can add a file called "exceptions.dat" into the root folder of your ContentPack. In this file, you can specify a replacement for a specific piece of a texture file with another one.
"What does that mean?"
A texture file often holds more than one texture, for example the Routes.xnb file. It contains multiple textures like trees, doors, windows etc.
The game splits those texture files up and puts them on the ingame models. If you only want to replace the tree texture, but not the door texture, you would have a problem because you can only replace the entire texture file, not the single pieces.
This is where the exceptions.dat file comes into play:
It can replace a certain rectangle from a texture with another one from a different texture.
An example line looks like this:
Code:
Textures\Routes|0,64,32,32|IlexForestHD|64,0,64,64
This replaces the texture that is at the position 0,64 and 32x32 in size in the "Pokemon\Content\Textures\Routes.xnb" file with the texture that is at the position 64,0 with the size of 64x64 in the "Pokemon\ContentPacks\<yourcontentpack>\IlexForestHD.xnb or .png" file.
Note how you can place the texture outside of the Textures folder.
Each line in this file can handle one replacement.

4.2 The exceptions.dat file to scale certain textures
Instead of replacing certain textures as explained in 4.1, you can also scale up textures with the exceptions.dat file. This works as follows:
If you would want to make a higher resolution texture pack that will increase the texture size by 2, the game would not know that by itself. So if the game gets the texture 0,0,16,16 from the Routes texture file and you made it twice as big, it will only get the first 16 by 16 pixels still, even though you want the game to take the first 32 by 32 pixels.
And so you don't have to manually input every single texture from the texture file in the way it is described in 4.1, there's an easy way to scale textures up with the exceptions.dat file:
Add a line that contains the path to the texture file and the scale factor.
Example:
Code:
Textures\Routes|2
This will scale up the Routes texture by 2. You can also insert values smaller than 1, if you want to make a low resolution texture pack, for example.

5. Adding songs and sounds
All songs of the game are stored in the "Pokemon\Content\Songs" folder. They consist of an ".xnb" and a ".wma" file. If you want to replace those song files, you can either use a ".xnb" and ".wma" file in your ContentPack folder, or use an ".mp3" file instead of both. The mp3 file has to have the same name as the ".xnb" file.
Sounds are stored in "Pokemon\Content\Sounds" and can be replaced the same way with files in the "Pokemon\ContentPacks\<yourcontentpack>\Sounds\" folder. Here, just an .xnb file is needed. Alternatively, sounds can be replaced by .wav files as well.
6. Adding fonts
Your ContentPack can replace the fonts used in the game. Fonts are only recognized if they are in the folder "Pokemon\ContentPacks\<yourcontentpack>\Fonts\BMP\". They need to be in the correct format and an .xnb file.


7. Adding models
Models can also be replaced by your ContentPack. All models of the game to be replaced can be found in the "Pokemon\Content\Models" folder.

8. Adding a background to your ContentPack
If you want to, you can add a personalized background to your ContentPack that will be displayed instead of the rotating level in the background when a user clicks on the "Information" button in the ContentPack menu.
For this to happen, put a file called "splash.png" into the root directory of your ContentPack.

9. Tips for testing the ContentPack
If you changed a texture while the game is running and you reload a map, you should notice that the texture doesn't change until you completely restart the game. This is because the game having a buffer, which stores loaded textures to reduce map loading times.
To clear said buffer, press F3 and F at the same time.

To manually reload a map, you can press the R button in the game. You can also enter the command "level.reload" into the console.


-------------------------------------------------------------------------------------------------------------
If you still have questions regarding the ContentPacks, you can ask in the thread for this resource. I might add answers to those questions to the guide.
Author
nilllzz
First release
Last update
Rating
3.00 star(s) 1 ratings

More resources from nilllzz

Latest reviews

It would help if there was an update on how to now that it's based on Gamejolt instead of the usual launcher. Either I'm a noob or there's no sandbox mode access which renders the availability of being able to install the mod. I'd appreciate any feedback.
Top