Skip to main content

Creating Custom AI - decls

This is an ADVANCED GUIDE. You are expected to have a decent understanding of decls, textures, and entities.

See the Following Books Before Proceeding

Basics

For starters, do all of your editing on an existing AI, so you know what the results will look like before you spend a large sum of time managing an entirely new AI variant.

For your custom AI, you want to copy all the decl files that will be changed. The entitydef file is the most important and mandatory for almost all custom AI. Paste the vanilla decls into a resource patch with a very high priority. Patch priority changes between each update, so you will most likely need to change it after each update. As of Update 6.66, e4m2_swamp_patch1 is a great patch to use.

Be sure to rename the decls too, so they do not replace properties of the vanilla AI.

After making changes to the decls, you will need to link them to the other modified decls if necessary. Make sure to do so for all of the modified decls. For example, to link the demon's FX, go to the entitydef file and change:
fxDecl = "character/stonegargoyle/gargoyle";
to
fxDecl = "character/stonegargoyle/stonegargoyle";

The stonegargoyle FX decl is a modification to the vanilla gargoyle decl.

For every added asset, you will need to add them to the EternalMod\assetsinfo JSON file. This must be done in BOTH the directory that contains all the added decls AND the level patch that holds your entities file(s). More info on this soon.

After everything is linked, move on to the level that you want to spawn your new custom AI.