Enemy - pk-hack/CoilSnake GitHub Wiki
Enemy Placement Overview
When working in Enemy Mode within the map editor, you'll notice large, numbered squares scattered across the map grid. These represent Map Enemy Groups, which dictate where specific groups of enemies will spawn in the game. It is important to distinguish Map Enemy Groups from Enemy Groups, as they serve different purposes:
- Map Enemy Groups specify where enemy groups appear on the map.
- Enemy Groups define the composition of enemies encountered during battles.
Below is a detailed breakdown of these two elements.
Map Enemy Groups
Map Enemy Groups determine enemy spawns and are defined in the map_enemy_groups.yml
file. Here’s an example layout for Group 167:
167:
Event Flag: 0x7e
Sub-Group 1:
0: {Enemy Group: 360, Probability: 3}
1: {Enemy Group: 361, Probability: 5}
Sub-Group 1 Rate: 64
Sub-Group 2: {}
Sub-Group 2 Rate: 0
Key Fields:
Event Flag:
Indicates the condition under which a sub-group will spawn. Commonly used to disable spawns or modify them based on story progression.Sub-Group 1:
Defines the default group of enemies spawned when the event flag is not set.0:
and1:
List enemy groups included in the spawn.Probability:
Specifies the likelihood of a given group spawning.
Sub-Group 2:
Activated when the event flag is set, functioning similarly to Sub-Group 1.- Sub-Group Rates: Adjust the likelihood of enemies from a specific sub-group appearing.
Note: Some elements in the file remain undocumented and should be left untouched until more information becomes available.
Enemy Groups
Enemy Groups contain the actual enemy configurations used during battles. These are defined in the enemy_groups.yml
file. Example:
360:
Background 1: 286
Background 2: 0
Enemies:
- {Amount: 1, Enemy: 67}
- {Amount: 1, Enemy: 68}
Fear event flag: 0
Fear mode: run away if flag is unset
Letterbox Size: 1
Key Fields:
Background 1:
andBackground 2:
Define the battle backgrounds.Amount:
Specifies how many of each enemy will appear in the battle.Enemy:
Identifies the enemy type in the group.Fear event flag:
Determines when enemies flee from the party.Fear mode:
Configures additional conditions for enemy retreat.Letterbox Size:
Controls the size of the letterbox overlay during battle.
map_enemy_groups.yml
Unused Entries in Some entries are defined in the file but are either unused or inactive.
Completely Unused:
- 9: Unused Winters invasion plate
- 31: Unused Insane Cultist plate
- 38: Unused New Age Retro Hippie plate
- 52, 149, 195, 196: Empty and unused
Present on the Map but Inactive:
Remove the original plates before reusing these.
- 131: Two plates under Dept. Store Spook
- 151: Multiple plates near the bathroom on the first floor of Dungeon Man
- 158: Several plates on the third floor of Dungeon Man
- 159: Plates on the top floor of Dungeon Man near exit holes
- 194: Two plates in a Fourside tunnel
Other:
- 97: A Giant Step plate in an invalid location off Titanic Ant’s room
By managing these elements effectively, you can fine-tune enemy placement and behavior, creating a more engaging gameplay experience.