DevLog4


Dev Log 4: Monster Creation System and Random Encounter System

Overview: This update covers the addition of two major systems: the Monster Creation System and the Random Encounter System. The Monster Creation System allows for flexible monster generation using ScriptableObjects, while the Random Encounter System introduces chance-based battles as players explore designated areas, adding excitement and unpredictability to the gameplay.

Details:

  1. Monster Creation with ScriptableObjects:
    • Developed a MonsterBase ScriptableObject class that defines the core attributes of each monster, including name, description, sprite, type, max HP, attack, and defense.
    • The Monster class allows individual monster instances to scale with level, dynamically adjusting stats like HP, attack, and defense. Skills are also assigned based on level, with each monster able to learn up to four skills.
    • This system makes it easy to create and manage a diverse roster of monsters with different strengths, weaknesses, and abilities, all from the Unity Inspector.
  2. Random Encounter System:
    • Implemented a BattleTrigger script that attaches to specific zones. A battleChance variable controls the probability that a battle will start when the player enters a zone.
    • The Encounter class in BattleTrigger defines possible monsters for each zone, with an encounterRate determining each monster’s chance of appearing if a battle is triggered.
    • Battle Triggering: When the player enters the zone, the system rolls for a random encounter. If successful, a monster is selected based on cumulative encounter rates and passed to BattleManagerMain to start the battle. The system includes a cooldown to prevent frequent encounters.

Get Ultra Shapes

Leave a comment

Log in with itch.io to leave a comment.