Skip to content
Menu
SteamAH
  • Cheat
  • Guide
  • Tips
  • Game Lists
  • Privacy Policy
SteamAH

Warfork: A Guide to Custom Gametype Creation

Posted on August 28, 2019

All the scripting and tools necessary to make a custom gametype in Warfork

 

Table of Contents

  • Introduction
  • AngelScript Basics
  • Pk3 Structure
  • Scripting Preface
  • Scripting Hooks
  • Scripting Techniques
  • Scripting Reference
  • Loading and Playing
  • Related Posts:

Introduction

Warfork contains a very powerful system for creating new gametypes without editing the game source. In this guide you will learn the ins and outs of this system and learn how to make your very own custom gametypes!

AngelScript Basics

The basics of AngelScript scripting and general programming are out of the scope of this guide.

Excellent documentation on AngelScript and its features is available from the official AngelScript manual.[www.angelcode.com]

Pk3 Structure

You must include several files in your Pk3 in order to have your custom gametype be loaded.

Note: all paths are relative to the root of the Pk3. foo/bar refers to a file or folder bar contained under a folder foo, which is in the root of the Pk3.

For the following section, replace mygametype with the short name of your gametype. This is also the name that shows up in the server browser.

progs/gametypes/mygametype.gt

The gt file is a semicolon separated file containing the list of AngelScript files to be loaded when your gametype is started. Any script or function you intend on using must be included in this list.

For example, the bomb gametype gt file has the following contents:

/shared/constants.as; /shared/utils.as; /shared/files.as; generic/quickmenu.as; generic/matchstates.as; generic/bots.as; generic/items.as; generic/awards.as; bomb/main.as; bomb/player.as; bomb/bomb.as; bomb/site.as; bomb/round.as; bomb/media.as; bomb/bots.as; legacy/quake1.as;

Most of these scripts are actually commonly loaded in many gametypes. Documentation on these base .as scripts is covered later. These paths are relative to the progs/gametypes folder, but if prefixed with a slash, actually refers to a path under progs/.

READ:  Warfork: Console commands Guide

Notably, bomb includes bomb/main.as which happens to include many of the game hooks for the bomb gamemode. As we will see later, this is no more than an organizational trick. You are free to name your scripts however you please and put them in whatever folder (under gametypes) you wish.

progs/gametypes/mygametype.gtd

The gtd file is pretty straightforward. It is simply the ‘pretty’ title of your gamemode, as well as the description.

For example, the bomb gtd has the following contents:

Bomb and Defuse
Team game mode where in which players join either the attacking team or the defending team. Each team attempts to complete their mission objective, either planting the bomb or defending the bomb site, or eliminate the opposing team.

The first line of the gtd is the title, followed by a mandatory blank line, and then the description.

Both of these files are necessary in order to have your gametype be loaded.

AngelScript files

The custom AngelScript files you write should be included under progs/gametypes/. To avoid confusion and issues with identical names, it is best practice to put your scripts under a folder named after your gametype, like progs/gametypes/mygametype.

Scripting Preface

Due to the relatively large amount of control available to gametype AngelScripts, there is some non-obvious boilerplate code that must be written for certain features to work properly, such as config, item spawning, and instagib. I recommend not starting from scratch when making a new gametype. Leverage the base implementations available to you and change what you need.

READ:  Warfork: Guide for Beginners

The implementation for the Free For All gamemode can be found under data0_21pure.pak3/progs/gametypes/ffa.as. It’s commented quite nicely and contains at least a stub for all of the game hooks. This is a good base to start with.

Scripting Hooks

Hooks are the foundation of custom gametype scripting. Warfork has a list of functions it can call in your gametype to allow you to react to many different events and provide feedback to start or stop certain actions.

A complete list of these functions, along with documentation on what they mean and their parameters, can be found at http://livesow.net/wsw/api/game/gt_script_calls.h. You should also consult the provided implementations to see how gametypes typically react to these events.

Additional information on these functions and the interpretation of GT_ScoreEvent args can be found in the Scripting Reference section.

Scripting Techniques

todo

Scripting Reference

todo

Loading and Playing

When it comes time to play your gametype, you will need to have Warfork load your pk3 and select it as a gametype.

On Windows:
Place your pk3 under

C:\Program Files (x86)/Steam/steamapps/common/fvi/Warfork.app/Contents/Resources/basewf

You can then use your gametype to start a local game, or load it onto a server.
Be sure to keep an eye on the console for script errors!

Written by asterisk

MORE GAME GUIDES FOR YOU

Related Posts:

  • CARRION Custom Levels Guide (How to Load and Play)
  • Dead or School: Custom Language Guide
  • ScourgeBringer: Save Files Guide
  • Warfork: Guide for Beginners
  • A Hat in Time: How to Make Sticker Mods

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • The Life and Suffering of Sir Brante Tips and Secrets
  • Loop Hero All Cards Annex List
  • Loop Hero How to Kill the Lich Boss
  • Loop Hero General Tips And Combat Guide
  • Loop Hero All Talents (Perks) Detail List And Tier Rank
©2021 SteamAH | Powered by SuperbThemes & WordPress

Welcome to SteamAH!

We'd like to use cookies to help analyse, improve and personalise our service to you. Using cookies we are able to provide better contextual advertising (which pays to run this website) and share anonymised statistics with our partners and potential clients.

You can find out more in our Privacy Policy and customise your settings below.

Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.

Click below to consent to the use of the cookie technology provided by vi (video intelligence AG) to personalize content and advertising. For more info please access vi's website.

Show purposesShow vendors
Privacy settings