https://drive.google.com/file/d/1HcrATe ... sp=sharing

HOW TO USE:
- Extract these files in the zip into your level or episode folder, renaming the NPC files where necessary
- In the extra settings of the stack NPC you specify the properties of the stack. They are in JSON format.

As you can see, JSON is a pain to write. It's not meant to be written, after all, so it makes sense to be that way. Thus, I recommend using an external tool to type your JSON and have it be formatted for you. I use https://beta5.objgen.com/json/local/design for this job. Here's what that looks like:

WARNING: WHEN USING JSON LIKE THIS YOU NEED TO MAKE SURE THAT NUMBERS ON THE RIGHTHANDSIDE OF A COLON ARE NOT IN QUOTATION MARKS. USING THE SITE ABOVE YOU WILL NEED TO REMOVE THEM MANUALLY, BUT IT'S STILL EASIER THAN MAKING SURE ALL OF THE SYNTAX IS CORRECT
Once you have pasted the JSON data into the text field, your NPC is ready to go!
JSON FIELDS (recursive as part of the "child" field):
- id (required) the ID of the NPC at this level
- ai1 (optional) the starting ai1 value of the NPC. For some NPCs this is the "contained ID" field.
- ai2 (optional) the starting ai2 value of the NPC. Used by certain NPCs in the editor like firebars.
- settings (optional) a table containing extra settings data for the NPC. For applying fields in this table, I recommend having the extra settings files for the IDs you're adding to the stack available to cross-reference the internal variable name.
- child (optional) a table that contains a table that may contain any of the fields listed here. If present, the code will try to spawn a child NPC of the given specifications. See the images for instance.
Specifications:
- The root NPC's friendly, direction and layer flags are carried over to all child NPCs
- Stacks break only directly at a destroyed NPC
- NPC ID change is not destruction and will maintain the stack
Enjoy!