Skip to content

Setting Up ESE

NarcoMarshDev edited this page Sep 28, 2022 · 7 revisions

Getting ESE set up properly is an important first step to start working with the library, thankfully it is a simple process and here is a step by step guide on how.

Downloading and adding to your project

After downloading ESE from the workshop here (find in game), simply include it as a dependency in your own project by opening your project and going to:

Workbench -> Options -> Game Project -> Unsorted -> Dependencies

And adding a new dependency by pressing the + icon and copying ESE's project GUID 5A313B660B04D926 into the new dependency slot. If you're creating a new project, you can easily include ESE as a dependency by selecting it as one when creating the project.

Making your ESE config

Once added as a dependency, all the basic functionality of the library is available as is, if however you want to enable/disable different features you can create a config to do just that.

Start by navigating to EnforceScriptExtensions/scripts/Game/ESE_Config.c and right click -> Duplicate to 'Your Project'

Name your duplicate !ESE_Config_YourModName.c to ensure it always compiles before anything else, and open it.

NOTE: It's recommended to use your full mod name here instead of an abbreviation to avoid naming conflicts with other mods in the future, eg. !ESE_Config_WastelandReforged.c

In this file are all the #define statements for enabling different functionality, and all are explained in the file, but here is a quick reference of the most important ones:

Define Functionality
ESE_VERBOSE Enables verbose error logging on ESE methods.
ESE_ENABLE_WIP Enables work in progress methods, these may be broken or otherwise not work as excepted, so check the source code before using.
ESE_EXPERIMENTAL Enables experimental custom data types and modded classes, these will most likely break a lot of things or crash the workbench when restarting. If this happens, open your config outside the workbench and manually comment off #define ESE_EXPERIMENTAL so this feature is disabled when you start the workbench.
ESE_OBSOLETE Enables older, now obsolete methods. These methods are all named _OLD_MethodName() and may be useful in some cases.
ESE_ALIASES_ALL Enables ESE resource aliases, see this wiki page for more info. (There are specific alias defines all explained there)
ESE_ALIASES_DEBUG Enables some extra debugging features to help with implementing custom aliases.

Adding your own aliases

Check out the wiki page Adding Custom Aliases In Your Mod