Difference between revisions of "HPL2/HPL2 Helper Scripts"
m (Changed credit from mrbehemo to Aetheric Games.) |
m |
||
Line 1: | Line 1: | ||
{{TocRight}} | {{TocRight}} | ||
=Introduction= | =Introduction= | ||
− | ''HPL2 Helper Scripts'' by Aetheric Games is a package of .hps files containing script classes and functions that may be useful to HPL2 modders and custom story creators | + | ''HPL2 Helper Scripts'' by Aetheric Games is a package of .hps files containing script classes and functions that may be useful to HPL2 modders and custom story creators. It is compatible with ATDD version 1.5 and later. |
Would you like to... | Would you like to... |
Revision as of 01:56, 23 November 2023
Introduction
HPL2 Helper Scripts by Aetheric Games is a package of .hps files containing script classes and functions that may be useful to HPL2 modders and custom story creators. It is compatible with ATDD version 1.5 and later.
Would you like to...
...make 500 candles blow out in a big wave? ...make haunted objects hover in the air? ...spawn dozens of random debris objects throughout an area? ...make a particle system move along a spline? ...manage a list of quest objectives? ...compare the distances between entities? ...make puzzles based on position and rotation? ...store an array in a global game variable? ...seamlessly teleport the player into an almost identical room? ...make a statue that twitches when the player has low sanity?
Well, this script package isn't going to magically do those things for you, but it gives you a lot of tools to help you do them yourself.
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 file. You'll find everything detailed on these pages:
Utilities
|
Features
|
Set-up
Requires version 1.5
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 yourmaps
folder. - Include
HelperScripts_FullPackage.hps
in your level's.hps
script file using the#include
directive. - Add
HelperScriptsUpdate(afStep)
to your mainOnUpdate()
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 yourmaps
folder. - Include
HelperScripts_UtilitiesOnly.hps
in your level's.hps
script file using the#include
directive. - Add
HelperScriptsUpdate(afStep)
to your mainOnUpdate()
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".