HPL2/HPL2 Helper Scripts
Introduction
Requires version 1.5
HPL2 Helper Scripts is a collection of .hps files containing script classes and functions that may be useful to HPL2 modders and custom story creators (for ATDD and AAMFP). It is compatible with ATDD version 1.5 and later.
The scripts are divided into two categories: utilities and features. The utilities scripts include tools for general scripting, like new maths functions, or linked lists and vector classes. The features scripts are more specific solutions that make use of the utilities, such as a way to spawn entities at specific locations, script a large chain of events or to make entities twitch and flicker. Some modders might prefer to just adopt the utilities scripts. It's up to you!
See below for download and set-up instructions.
Contents
The documentation and help is organised by the .hps file. You'll find everything detailed on these pages:
Set-up
First, download HPL2 Helper Scripts via Steam Workshop or ModDb. Once you have it, there are three options for how you add it into your mod. If you are unsure, just go with option A.
Option A: The full feature-set package
If you want to be able to use all the new functions and classes, go with option A.
- Copy the folder HPL2HelperScripts into your maps folder.
- Include HelperScripts_FullPackage.hps in your level's .hps script file using the #include directive.
- Add HelperScriptsUpdate(afStep) to your main OnUpdate() function in your level's .hps script file.
E.g., in myLevel.hps:
#include "HelperScripts_FullPackage.hps"
void OnUpdate(float afStep)
{
HelperScriptsUpdate(afStep);
}
Option B: The utilities-only package
Choose option B if you want to have access to the functions and classes in the utilities category, but don't need the stuff in the features category.
- Copy the folder HPL2HelperScripts into your maps folder.
- Include HelperScripts_UtilitiesOnly.hps in your level's .hps script file using the #include directive.
- Add HelperScriptsUpdate(afStep) to your main OnUpdate() function in your level's .hps script file.
E.g., in myLevel.hps:
#include "HelperScripts_UtilitiesOnly.hps"
void OnUpdate(float afStep)
{
HelperScriptsUpdate(afStep);
}
Option C: Pick-n-mix
Advanced modders might prefer to only adopt the specific script files they need. Go nuts! But also be aware of the #include dependencies in each script file, as many of them are interdependent. You might find it easiest to start with option A or B and then remove scripts later that you definitely haven't used. You're also fully allowed and encouraged to just use HPL2HelperScripts as a learning resource or even to just copy snippets here and there.
Support
HPL2 Helper Scripts is made by mrbehemo of Aetheric Games. If you need support, first be sure to check this documentation. If you're still stuck and have a question about these scripts, come and find me on the Frictional Discord server.
Licence
You are free to use HPL2 Helper Scripts in whatever way you see fit, no rights reserved by Aetheric Games. If you find it helpful, it would be nice to include a credit. You can list it as "HPL2 Helper Scripts by Aetheric Games".