Giter Site home page Giter Site logo

kf2-buildtools's Introduction

KF2-BuildTools

version shellcheck MegaLinter docs-autoupdate license

Features

  • 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.

Requirements

(*) Should also work fine on MSYS2 with git installed (pacman -S git). But I don't test it.

Add to your project

Make sure that the location of folders and files in your project as follows (Correct it if it's not):
/<PackageName>/Classes/*.uc

There are two ways to add KF2-BuildTools to your project:

Open git-bash and go to your project: cd <your_project_path>
Add submodule: git submodule add https://github.com/GenZmeY/KF2-BuildTools tools

updating build tools (manual)
Get updates: pushd tools && git pull origin master ; popd
Commit the changes: git add tools && git commit -m 'update tools'

2. As standalone script

Just create a tools folder and put builder there.

Updating build tools

Since version 1.9.0 build script can update itself:
./tools/builder --update

if you have an older version you need to update once manually to start using this feature

Usage

Available commands can be found here: USAGE.md

If you have a simple mutator or game mode, then the usage is also simple: just use the commands to compile, test and upload to the steam workshop.

demo

The result can be found here

Compiled packages:
C:\Users\<username>\Documents\My Games\KillingFloor2\KFGame\Unpublished\

Brewed packages:
C:\Users\<username>\Documents\My Games\KillingFloor2\KFGame\Published\

Uploaded packages:
your steam workshop ๐Ÿ™ƒ

Usage (Advanced)

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.

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:

๐Ÿ“‚ <ProjectName>
โ”œโ”€โ”€ ๐Ÿ“ <SomePackageName1>
โ”‚ย  ย โ”œโ”€โ”€ ๐Ÿ“ Classes
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ๐Ÿ“„ *.uc
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“„ *.upkg
โ”‚ย ย  โ”œโ”€โ”€ ๐Ÿ“„ *.uci
โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“ฆ *.upk
โ”œโ”€โ”€ ๐Ÿ“ <SomePackageName2>
โ”‚ย  ย โ”œโ”€โ”€ ๐Ÿ“ Classes
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ๐Ÿ“„ *.uc
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“„ *.upkg
โ”‚ย ย  โ”œโ”€โ”€ ๐Ÿ“„ *.uci
โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“ฆ *.upk
โ”œโ”€โ”€ ๐Ÿ“ PublicationContent
โ”‚ย ย  โ”œโ”€โ”€ ๐ŸŒ† preview.png
โ”‚ย ย  โ”œโ”€โ”€ ๐Ÿ“„ description.txt
โ”‚ย ย  โ”œโ”€โ”€ ๐Ÿ“„ tags.txt
โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“„ title.txt
โ”œโ”€โ”€ ๐Ÿ“ Localization
โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“ INT
โ”‚ย ย      โ””โ”€โ”€ ๐Ÿ“„ *.int
โ”œโ”€โ”€ ๐Ÿ“ Config
โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“„ *.ini
โ”œโ”€โ”€ ๐Ÿ“ BrewedPC
โ”‚ย ย  โ””โ”€โ”€ ๐Ÿ“ฆ *.*
โ”œโ”€โ”€ ๐Ÿ“ tools
โ”‚ย ย  โ””โ”€โ”€ โš™๏ธ builder
โ””โ”€โ”€ ๐Ÿ“„ builder.cfg

Note: Use the BrewedPC folder for additional content such as sound files for your weapons or other stuff. This will be copied to the final BrewedPC before being uploaded to the workshop.
By the way, this allows you to use a script to upload maps (although this was not its original purpose). Just put the map(s) in BrewedPC (don't forget to edit the PublicationContent) and run ./tools/builder -u.

Examples (Projects that use KF2-BuildTools)

Simplest case (one mutator):

Mutator + Localization:

Two mutators are compiled, there are upk and localization:

Three mutators are compiled (one of them is a dependency),
two mutators are uploaded to the steam workshop:

License

license

kf2-buildtools's People

Contributors

genzmey avatar github-actions[bot] avatar xamionex avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.