------------------------------------------ Custom Encounter Scripting Template README ------------------------------------------ By Konvaz Recommend to view as plain text or copy-pasted into a text editor. Template Maps that help ease new users into level modding. To get into the map, start ANY campaign from a new save slot. YOU HAVE FULL REIGN OVER THESE FILES SO FEEL FREE TO CHANGE ANYTHING YOU CAN CHANGE. ----------Level Editing Resources---------- M347h00k (or Meath00k) by Chrispy, maintained by SamPT: https://github.com/brongo/m3337ho0o0ok/releases > Mandatory tool that unlocks dev commands and allows maps to be edited in-game. > To install: Place the only file (XINPUT1_3.dll) in DOOM Eternal's installation directory, just like how you install the Mod Injector. EntityHero by Scorp04X0r: https://github.com/nopjne/EntityHero/releases/ > Optional tool that can be helpful for newer modders. > To install: Extract files to whatever directory you want. Make sure to copy "oo2core_8_win64.dll" from Doom Eternal's installation directory to the directory of EntityHero. NOTE: EntityHero is known to be unstable and prone to crashes. Doom Eternal Modding Wiki: https://wiki.eternalmods.com/ > Here you can browse for tutorials in how to create mods. Here is a playlist of level editing tutorials for both EntityHero and Notepad++ (by ProdeusDoom): https://www.youtube.com/playlist?list=PLWLwtxDtHUmFJIbdD9BbxKQHBIj7arNqB If you are editing through Meath00k overrides, make sure your directory path is as follows: "DOOMEternal\overrides\maps\game\pvp\pvp_darkmetal\pvp_darkmetal.entities" > Be sure your entities file is decompressed (can be viewed with a text editor) then recompress the file when publicly releasing your mod. > Once you are done working on the entities file, you should move it outside of the overrides folder so it will not interfere with the game. ----------File Contents---------- Within the .zip file for the Template, you can see: - gameresources (Loadout for Base Campaign new save) - gameresources_patch1 (Strings - Only for English at the moment) - gameresources_patch2 (Loadout for TAG1 & TAG2 new save) - pvp_darkmetal (Files to get all demons loaded into map) - pvp_darkmetal_patch1 (Map file for Corrosion & AssetsInfo Loading) - tutorial_demons (Custom Files) - EternalMod.json (Mod Info) Using a text editor, be sure to change to your username in "EternalMod.json" AND "gameresources_patch1\EternalMod\strings\english.json" when submitting. Feel free to further edit the text in those two files, changing the title or adding extra notes if you wish. You start the map with a full loadout. If you wish to change your initial loadout, edit the decl file: "tutorial_demons\generated\decls\devinvloadout\devinvloadout\pvp\full.decl" Adding custom demons or new files is a complicated process, but you would normally place those kinds of files within "tutorial_demons". Have both "pvp_darkmetal_patch1" and "tutorial_demons" reference them in their assetsinfo to get it working. ----------CORROSION MAP---------- -------- Contents -------- - 1 Music Entity (Plays Blood Swamps Music) - 2 Encounter Managers (where the encounter is scripted) - 1 Checkpoint - 1 Master Spawn Parent - 50 Ground Spawn Positions - 13 Air Spawn Positions - 10 Tentacle Spawn Positions - 5 Buff Totem Spawn Positions - 10 Spectre Spawn Positions (Spectre Whiplashes and Regular Whiplashes cannot be spawned at the same spawn positions) - 3 Archvile Spawn Templates (Fodder, Heavies, & Superheavies) - 6 Fog Volumes (all disabled by default) - 1 Hide Portal Command - 1 Show Portal Command - 5 Flag Triggers (Triggers for when you enter a specific area) - 15 Energy Barriers (all disabled by default) - 1 Meathook Node - 1 Mega Health - 1 BFG Ammo - 2 Hammer Refills - 2 Blood Punch Refills - 3 Chainsaw Fuel - 2 Shell Ammo Pickups - 2 Bullet Ammo Pickups - 2 Cell Ammo Pickups - 3 Rocket Ammo Pickups - 3 Small Armor Pickups - 2 Medium Armor Pickups - 1 Large Armor Pickup - 3 Small Health Pickups - 2 Medium Health Pickups - 1 Large Health Pickup - 1 Extra Life Pickup - Health/Armor/Ammo Refill Command ------------ Map Sections (REFER TO THE CORROSION MAP LAYOUT IN NEXUS MODS) ------------ - Blue Portal - Red Portal - Catacombs - Courtyard - Upper Courtyard - Battlements - Lower Battlements - Trophy Room - Boneyard * Upper Courtyard and Lower Battlements are not labeled in the Corrosion Map, but they are self-explanatory. ----------Designing the Encounter---------- "encounter_manager_1" is what you should be editing when spawning demons. (NOT "game_encounter_manager_1_88340617") "encounter_manager_2" is a followup encounter that would run after the checkpoint. Feel free to create more encounter managers. ----------- Terminology ----------- - entity: A "chunk of code" encased in brackets preceded by the word "entity". This is basically everything that is in a level other than its geometry. Entities include spawn positions, weather effects, demon AI, actual encounters, etc. - eventCall: A part of the encounter array. Runs in sequential order, performing actions such as spawning demons, creating wait delays, activating entities, etc. --------------- Spawning Demons --------------- - Again, refer to the image in the Nexus Mods page, called "Corrosion Map Layout" - Be sure to get familiar with each map section, as all the spawn positions are labeled by each section. - Every entity has a "spawnPosition" section, even if it does not make sense for some of them to have one. - If you are stuggling on finding an entity, you can always type the command "mh_spawninfo" in the console and look at the first three numbers to compare spawnPositions. Level Modding: https://wiki.eternalmods.com/books/5-level-modding Go here to look up the syntax for scripting encounters. ------------ Spawn Groups ------------ For Ground Demons: - mod_spawn_group_all - mod_spawn_group_blue_portal - mod_spawn_group_red_portal - mod_spawn_group_catacombs - mod_spawn_group_courtyard - mod_spawn_group_upper_courtyard - mod_spawn_group_battlements - mod_spawn_group_lower_battlements - mod_spawn_group_trophy_room - mod_spawn_group_boneyard For Aerial Demons: - mod_spawn_group_air_all - mod_spawn_group_blue_portal_air - mod_spawn_group_red_portal_air - mod_spawn_group_courtyard_air - mod_spawn_group_battlements_air - mod_spawn_group_trophy_room_air - mod_spawn_group_boneyard_air For Tentacles: - mod_spawn_group_tentacle_all - mod_spawn_group_catacombs_tentacle - mod_spawn_group_courtyard_tentacle - mod_spawn_group_lower_battlements_tentacle For Buff Totems: - mod_spawn_group_buff_totem_all For Whiplash Spectres: (or Pinky Spectres) - mod_spawn_group_spectre_all For Turrets: - mod_spawn_group_turret_all Look at all of their "spawners" for specific spawn points. ----------------- Default Encounter ----------------- A basic encounter with various example eventCalls is present for you to reference. Here is a step-by-step summary of what the default encounter does in order: (through eventCalls) - Wait 4 seconds (just so the demons do not immediately spawn the second the map finishes loading) - Sets Music to Light Blood Swamps - Spawns 2 Tentacles to hide in the Courtyard - Spawns 1 Hell Knight - Wait 2 seconds - Spawns 1 Cacodemon - Continuously respawn 4 Imps across the entire map - Make the AI aware of the Player - Waits for all demons who have the "main" string to be killed, which is the Hell Knight and Cacodemon - Sprinkle spawns 4 Hell Soldiers, with the spawns starting after 1 second and ending 1 second later - The encounter waits for all 4 Hell Soldiers to spawn before progressing - Spawns 1 Buff Totem in the Courtyard - Waits for all demons who have the "totem" string to be killed, which is the Buff Totem - Spawns 2 Prowlers with no exact spawn position - Waits for all demons who have the "main" string to be killed, which are the Prowlers - Waits for the player to enter a trigger in the Courtyard - Disables the center Meathook Node - Activates Energy Barriers that traps the player in the Courtyard - Sets Music to Heavy Blood Swamps - Wait 1 second - Spawns 1 Baron - Waits for all demons who have the "main" string to be killed, which is the Baron - Wait 1 second - Enables the center Meathook Node - Remove all the Energy Barriers in the Courtyard - Spawns 1 Possessed Arachnotron - the Spirit will only possess demons with the "main" string - Waits for the Arachnotron to be roughly 25% health - Spawns 1 Hell Knight with no exact spawn position - Waits for all demons who have the "main" string to be killed, which is the Possessed Arachnotron and Hell Knight - Stops all demons from respawning, which are the Imps - Kills all the Tentacles who have not been killed yet - Triggers all remaining demons to charge at the player - Waits for all demons to be killed - Sets Music to Ambient Blood Swamps - Saves a Checkpoint - Wait 3 seconds - Activates the next encounter Analyze the above list and compare what is looks like as eventCalls in the "encounterComponent" section of "encounter_manager_1". NOTE: Most encounters in a normal level would have commitTriggers and exitTriggers, which are volume triggers that would start and end encounters respectively. -------------- Next Encounter -------------- This encounter exists for demonstrating how to load in another encounter after reloading a checkpoint. Summary: - Wait 1 second - Continuously respawn 4 Zombies across the entire map - Wait 10000000 seconds (lol) - Loops the encounter "setNextScriptIndex" and "proceedToNextScript" are used to run different sections of an encounter. In this case, it justs reruns the encounter. You will not need to worry about those types of eventCalls unless you want to loop through specific encounters. ------- Strings ------- The strings section for eventCalls are used to help categorize them. In the Default Encounter, some demons are labeled as "main" so a waitAIRemaining eventCall with the same string will only include those demons in the logic. You can name the strings to whatever you want. ---------------- Activate Targets ---------------- https://wiki.eternalmods.com/books/5-level-modding/page/activatetarget Use this when trying to perform actions other than spawning demons in an encounter. This is an eventCall, so just insert it in the encounterComponent just as you would spawn a demon. Most entities are simply "toggled" when activated, meaning that using activateTarget on them once would turn them on, and activating them again would turn them off. You can see an example of this in the Default Encounter. Fog Volumes: - mod_catacombs_fog - mod_lower_battlements_fog - mod_courtyard_fog - mod_upper_courtyard_fog - mod_boneyard_fog - mod_all_fog Portals: - mod_hide_portals - mod_show_portals * These entities cannot be "toggled". You must activate the "hide" then "show" Energy Barriers: - mod_toggle_blue_portal_gates - mod_toggle_red_portal_gates - mod_toggle_courtyard_gates - mod_toggle_battlements_gates - mod_toggle_boneyard_gates Meathook Nodes: - mod_meathook_node_handler_1 Give Full Health, Armor, & Ammo Command: - mod_refill Level End: - mod_end_of_level Checkpoints: - mod_checkpoint_1 Encounters: - encounter_manager_2 The End of Level Trigger is not activated in the Default Encounter just so you have time to analyze the arena after the encounter ends. If you choose to use "mod_end_of_level" and exit the level through it, the save slot used to enter the level will be completely blank and clicking it will only offer the New Game prompt. Ending the level would not mean much since it is basically one encounter in one arena, and there are no checkpoints. Transitioning the music to ambient should be enough to convey the encounter's end. ----------- Checkpoints ----------- You can activate checkpoints like any other entity. "mod_checkpoint_1" is the checkpoint present in the Template Maps, and "mod_checkpoint_player_start_1" is the position you will start in after reloading. What the game recognizes the checkpoint as. Be sure to change it when creating new checkpoints The entity that sets your spawn point and activates the specified entities. Gives the loading screen tips while reloading. This level does not have any loading screen tips so this can be ignored. As you can see, "mod_checkpoint_player_start_1" targets "encounter_manager_2", so it will activate the encounter with the respawning Zombies. ------------------ User Flag Triggers ------------------ https://wiki.eternalmods.com/books/5-level-modding/page/idencountertrigger-raiseuserflag When used, the encounter waits until a trigger is activated, or a "flag" is raised. In the Template Maps, these Flag Triggers activate when entering a certain section of the map. This is useful if you want to activate Energy Barriers to lock you in that section, which is demonstrated in the Default Encounter. (Use this for waitForEventFlag eventCalls) - at_blue_portal - at_red_portal - at_courtyard - at_battlements - at_boneyard - mod_blue_portal_flag_trigger - mod_red_portal_flag_trigger - mod_courtyard_flag_trigger - mod_battlements_flag_trigger - mod_boneyard_flag_trigger ----- Music ----- https://wiki.eternalmods.com/books/5-level-modding/page/idmusicentity "musicentity_1" is the only music entity present. For CORROSION, it plays Blood Swamps music. With setMusicState, you can set the music to "main_ambient", "main_light", and "main_heavy". Some Music States include "boss_phase1" and "boss_phase2" if the level's music has a boss fight. (For Blood Swamps, they play Trial of Maligog Music) Normally, the bottom-most music entity is the one that plays by default, but you can use activateTarget to switch music in an encounter. ---------- Other Info ---------- - "make_us_sp" is just the entity that registers the map as Single Player rather than as a BATTLEMODE match. - "mod_remove_layers" is used to remove certain objects that would normally load for the podium animations and Demon Players. - "mod_player_start" is your spawn position. Change its "spawnPosition" and "spawnOrientation" if you want to spawn at a different location.