Templar Battleforce

Templar Battleforce

评价数不足
Modding Guide
由 Trese Brothers 制作
Lead the charge into Templar Battleforce's modding scene. It's early days, but we're working on adding more new and exciting mod features!

Modding Changelog
v2.3.7: adding new armor designs by mod on 7/1/2016
v2.3.5: adding new Templar portraits by mod on 6/29/2016
   
奖励
收藏
已收藏
取消收藏
Introduction and What's Next

Modding support within Templar Battleforce is just getting off the ground. We are admittedly, a very small team of 3 brothers, so this is a large undertaking for our studio. The game was not shipped with modding support, but we are dedicated to meaningful post-launch support (30+ updates with new scenarios, features, content, weapons, armor, and art since launch).

While the feature set is small, if you are interested in modding the game and sharing that with others, we hope you will join us on the Modding discussion board. The more interest we are able to generate, the more features we will be able to add!

At this point the only 2 mod features available are to add new faces or armor designs to the game. We hope you'll help us spread the word and drive forward to work on additional features.


Installing Mods
Loading a mod requires at least v2.3.5, released 6/29/2016. Otherwise, no dice.

At the moment, Templar Battleforce does not have full Steam Workshop support, so loading mods is a manual process. However, we have made it as easy as possible. The fastest way to learn to use a Templar Battleforce mod is to install one of the examples that we provided.

The Story Faces mod allows you to assign your Templars the faces from the story characters -- Luthor, Nyra, Marielle, or the Cult Leader.

The Blue Armor mod allows you to use a blue and silver armor design for your Templars.

To install a mod, you can follow @Warlord Mal's instructional video on YouTube, or read the follow the instructions below.


Installing a Mod
1. Download the mod ZIP file the mod thread.
2. Unzip the mod file into the Templar Battleforce folder, creating a new folder named mods. The Templar Battleforce folder will be wherever you put your Steam library, such as:

C:\Program Files\Steam\SteamApps\common\Templar Battleforce\mods

3. Open the mod_config.json file with a text editor to confirm that it includes valid JSON and the mod settings you expect.

{ "faceCount":4, "armorCount":1 }

4. Double-check that the mods/dialogs folder contains 4 faces, in PNG and 2x size JPGs. If you are installing the Blue Armor mod, check the mods/sprites folder for a txt file and a PNG.


5. Start Templar Battleforce
6. Open the options panel. There will be a notice at the top of the panel indicating that a mod has been loaded and 4 faces have been added. If armors have been loaded, this will be mentioned.


7. Load your game and go to your Veterans design page. At the bottom of the list, pick any of the new faces that you fancy. If you have added the blue armor, it is at the end of the list.


8. Be aware that if you pick one of these faces for your Captain, this will could some conversations in the game very confusing where basically, it will look like Luthor is talking to himself.
Creating a Mod
As Templar Battleforce currently lacks Steam Workshop support, mods are created and uploaded by hand to the Mod discussion board.

Mod Structure
A mod is defined by a configuration file in JSON format and any other resources required to make the mod work.

All mod files are located in the mods/ subfolder under the game's main install in the Steam library, such as:

C:\Program Files\Steam\SteamApps\common\Templar Battleforce\mods

The mod configuration file is named mod_config.json and is in the simple to use and easy to extend JSON format[en.wikipedia.org]. A sample mod_config.json might look like this, and add 15 new faces to the game:

{"faceCount":15}

A different configuration could add both 4 faces and one armor design:

{ "faceCount":4, "armorCount": 1 }

Other resources files are located in sub-folders to the main mods/ folder, such as dialogs/ or sprites/

Adding Faces with a Mod
One currently enabled mod feature is to add new faces to the game for your Templars to use. Each new face requires a 100x150px PNG image and a 156x234 JPG image.

New faces are added to the game with an ID of 2001 or higher. It is important to use 2001 as the starting point, and each additional faces is +1 ID higher. There can be no gaps in the order of faces. The format for image names is as follows:

portrait_templar_ID.jpg
and
portrait_templar_ID.png

Where ID might be 2001, and therefore generate a filename such as portrait_templar_2001.png.

To build a mod that adds new faces to the game, create a new mod_config.json file based on the sample mod we provided. Change the number for the property faceCount to match the number of faces your mod will provide. Then, create a dialogs folder and fill it with the face images, remember to include a PNG and JPG for each.

Test the mod by loading it into your own installation of Templar Battleforce. Then, create a new thread on the Mod discussion board and post your mod for the community to enjoy!

Please do not post copyrighted material or mods you did not create or do not own.

To create a face that fits the theme of other faces in the game, use this background image:



Adding Armor Designs with a Mod
Another enabled mod feature is to add new armor designs to the game for your Templars to ride into battle. Each new armor designs requires a spritesheet containing all of the PNG pieces of the armor. If you are familiar with packing and unpacking spritesheets, you can use the assets the game's sprites/ folder to get the extract the required source files.

You can also copy an existing spritesheet and modify it directly. If you do so, be sure to rename the assets to a new numerical ID. The text file also contains the name of the image to use, so it is imperative to update the text file to point to the modified PNG.

New armor designs are added to the game with an ID of 2001 or higher. It is important to use 2001 as the starting point, and each additional armor designs is +1 ID higher. There can be no gaps in the order of armor designs. The format for the armor's two files are as follows:

char_templarID.txt
and
char_templarID.png

Where ID might be 2001, and therefore generate a filename such as char_templar2001.png.

To build a mod that adds new armor designs, create a new mod_config.json file based on the sample Blue Armor mod we provided. Change the number for the property armorCount to match the number of armor designs your mod will provide. Then, create a sprites/ folder and fill it with the new armor spritesheets, starting with ID 2001 and going up.

Test the mod by loading it into your own installation of Templar Battleforce. Then, create a new thread on the Mod discussion board and post your mod for the community to enjoy!

Please do not post copyrighted material or mods you did not create or do not own.

Merging Mods
Mods can be merged without too much trouble by updating the JSON file and renaming the image files within dialogs/
Troubleshooting Mods
If you have an issue with a game after you've loaded a mod, please leave a message on the Modding discussion board about it.

Very often, the answer will be to re-install the mod and undo the changes you made with the mod installed. For example, if you set your Captain's face to use that of Nyra, and then uninstalled the mod, you may encounter issues. The easiest fix is to re-install the mod and set your character to a non-mod installed face.
18 条留言
Emily Mewens 2018 年 3 月 18 日 下午 2:51 
sorry i must just be terrible at explaining this stuff xDD
Regardless, i do hope workshop support gets in there, the game has a ton of potential, and seeing custom missions definitely keep the game interesting :3 Ive quite enjoyed what ive played so far, and equally enjoyed templar's assault too XP You guys have definitely come far :3
Emily Mewens 2018 年 3 月 18 日 下午 2:51 
Idealy, the way it would work is, you have a bunch of fake ID's thats good enough for the game to register without erroring. With that a modder can come in, replace any number of those ID's with their own content, without worrying over whether or not another mod has those ID's, and the game would be able work with it. This gives modders more room to not step on other mods toes so to speak. Modders wouldnt need to make compatibility patches as often because they could use some random numbered ID that would normally be beyond the games ability to read.. Uhm.. It would allow something like what Lex was trying to do earlier in this thread, to be possible. Its just a work around to allow it to work xD
Emily Mewens 2018 年 3 月 18 日 下午 2:51 
Hmm... Let me try one more time xD

The solution im suggesting is for mods that excede the bounderies of the limitation. That way if the game sees the mod that has an id of 3000, itll have a way to handle it, theoretically making the game more mod friendly.. so long as people dont go super silly with their id numbers.

Unless the engine itself just simply stops looking once theres nothing beyond the last numarical ordered id.. then i suppose the engine making new filler id's would be a bit out of the question.. But still, making the dummy id's manually could still prove benificial, as a sort of mod that extends the ID capacity without hurting performance... unless the engine doesnt like that kinda foolery...

Trese Brothers  [作者] 2018 年 3 月 18 日 下午 2:24 
@emily - basically, this is the solution as it stands until we can add official workshop support, if we get there. Thanks for the feedback and I hope you enjoy the game!
Trese Brothers  [作者] 2018 年 3 月 18 日 下午 2:23 
@emily - its possible but we don't have any plans to modify the implementation as it stands today. I'm not sure what advantage you're trying to gain by adding this other than asking the game to do a lot of searching for files that may or may not exist.
Emily Mewens 2018 年 3 月 18 日 下午 2:18 
See thats what i was saying xD You could theoretically set up IDs that are just place holders, so when the engine looks for the ID's itll see that they are there, even though the IDs dont really plug into anything. Thats what i meant by Dummy IDs. They arent anything important.. just there to fill in the gaps between the ones that are~

In fact, it may even be possible to have the engine generate these Dummy IDs when it finds some missing between existing ones, so instead of it bouncing back an error saying 'looking for ID 3000, ID 2001 missing' itll just make a the filler Dummy ID's up to ID 3000... Though thats just an idea from my outside perspective.

does that make any sense? xD
Trese Brothers  [作者] 2018 年 3 月 18 日 下午 1:15 
@emily mewens - nope, you cannot skip ID numbers. Sorry, I guess I don't understand what you're suggesting. Hope the doc is clear about how it works at least!
Emily Mewens 2018 年 3 月 18 日 上午 11:29 
But if thats how it works, then why arent you able to skip id numbers? xD i feel like theres something missing here
Trese Brothers  [作者] 2018 年 3 月 18 日 上午 6:14 
@emily - I so believe that is what the game is doing. You give a count and it issues out there ID by adding it to the base number of 2000. This is important so that if we changes the face count on the standard game, all mods are protected.
Emily Mewens 2018 年 3 月 18 日 上午 1:45 
Wouldnt there be a way to make a dummy system to get around the ID limitation? I mean you must have an ID thats +1 of the highest ID, right? So theoretically if you add in dummy IDs up to say.. 5000, then technically you could use anything within that last 3000 IDs. That could clear up a ton of space for people that decide to make mods and want to make things compatible.

Just a mod idea i guess. xD Or possibly something to add to the game itself.. if this work around even works xD