2022-02-20 01:24:39 +00:00
# KF2-BuildTools
[![version ](https://img.shields.io/github/v/tag/genzmey/KF2-BuildTools )](https://github.com/GenZmeY/KF2-BuildTools/tags)
[![shellcheck ](https://github.com/GenZmeY/KF2-BuildTools/actions/workflows/shellcheck-master.yml/badge.svg )](https://github.com/GenZmeY/KF2-BuildTools/actions/workflows/shellcheck-master.yml)
[![docs-autoupdate ](https://github.com/GenZmeY/KF2-BuildTools/actions/workflows/docs-autoupdate.yml/badge.svg )](https://github.com/GenZmeY/KF2-BuildTools/actions/workflows/docs-autoupdate.yml)
[![license ](https://img.shields.io/github/license/GenZmeY/KF2-Server-Extension )](LICENSE)
2022-02-20 19:59:39 +00:00
# Features:
2022-02-20 01:24:39 +00:00
- Build, brew, test and upload to Steam Workshop;
- No need to edit KFEditor.ini at all;
- Sources can be stored in any path;
- Easily switch between different projects.
2022-02-20 19:59:39 +00:00
# Requirements
- [git-bash ](https://git-scm.com/download/win )
2022-02-20 01:24:39 +00:00
2022-02-20 19:59:39 +00:00
# Add to your project
2022-03-03 18:21:03 +00:00
Make sure that the location of folders and files in your project as follows (Correct it if it's not):
2022-02-20 19:59:39 +00:00
`/<PackageName>/Classes/*.uc`
2022-02-20 01:24:39 +00:00
2022-03-03 17:31:13 +00:00
**There are two ways to add KF2-BuildTools to your project:**
2022-02-20 19:59:39 +00:00
## 1. As [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
2022-02-20 01:24:39 +00:00
Open git-bash and go to your project: `cd <your_project_path>`
2022-02-20 19:59:39 +00:00
Add submodule: `git submodule add https://github.com/GenZmeY/KF2-BuildTools tools`
2022-02-20 01:24:39 +00:00
**updating build tools:**
2022-02-20 19:59:39 +00:00
Get updates: `pushd tools && git pull && popd`
Commit the changes: `git add tools && git commit -m 'update tools'`
## 2. As standalone script
2022-02-20 01:24:39 +00:00
Just create a `tools` folder and put [builder ](builder ) there.
Now you can use the script in the same way as in the first case, but you will have to update it yourself.
2022-02-20 19:59:39 +00:00
# Usage
Available commands can be found here: [USAGE.md ](USAGE.md )
2022-02-20 01:24:39 +00:00
2022-02-20 19:59:39 +00:00
If you have a simple mutator or game mode, then the usage is also simple: just use [the commands ](USAGE.md ) to compile, test and upload to the steam workshop.
2022-02-20 01:24:39 +00:00
2022-03-03 17:31:13 +00:00
![demo ](example.gif )
2022-02-20 01:24:39 +00:00
2022-03-03 17:31:13 +00:00
## The result can be found here:
**Compiled packages:**
`C:\Users\<username>\Documents\My Games\KillingFloor2\KFGame\Unpublished\`
2022-02-20 01:24:39 +00:00
2022-03-03 17:31:13 +00:00
**Brewed packages:**
`C:\Users\<username>\Documents\My Games\KillingFloor2\KFGame\Published\`
2022-02-20 01:24:39 +00:00
2022-03-03 17:31:13 +00:00
**Uploaded packages:**
your steam workshop 🙃
2022-02-20 01:24:39 +00:00
2022-03-03 17:31:13 +00:00
# Usage (Advanced)
2022-03-03 18:21:03 +00:00
If your project contains several mutators, *.upk files, external dependencies, or you want to customize the whole process in more details, then this section is for you.
2022-02-20 01:24:39 +00:00
2022-03-03 17:31:13 +00:00
## Setup
When you run compilation for the first time or do `./tools/builder --init` `builder.cfg` appears in your project folder.
Edit it to set build/test/upload options. The config contains the necessary comments inside.
Edit the files in the PublicationContent folder - they are responsible for the description in the Steam Workshop.
## Project filesystem
If you have *.upk or localization files, they must be in a specific location.
Change the filesystem of the project to such a form that everything works correctly:
```
/Localization
/INT
*.int
/PublicationContent
preview.png
description.txt
tags.txt
title.txt
/SomePackageName1
*.upk
/Classes
*.uc
*.upkg
/SomePackageName2
*.upk
/Classes
*.uc
*.upkg
/Config
*.ini
/tools
builder
builder.cfg
```
2022-03-03 17:38:26 +00:00
## Examples (Projects that use KF2-BuildTools)
2022-03-03 17:35:08 +00:00
[LightTIM ](https://github.com/GenZmeY/KF2-LightTIM ) - simplest case (one mutator)
[ServerExt ](https://github.com/GenZmeY/KF2-Server-Extension ) - Two mutators are compiled, there are *.upk files and localization
[UnofficialMod ](https://github.com/GenZmeY/UnofficialMod ) - Three mutators are compiled (one of them is a dependency), two mutators are uploaded to the steam workshop
2022-02-20 01:24:39 +00:00
2022-02-20 19:59:39 +00:00
# Other
2022-02-20 01:24:39 +00:00
[TODO List ](TODO.md )
2022-02-20 19:59:39 +00:00
# License
2022-02-20 01:24:39 +00:00
[GNU GPLv3 ](LICENSE )