// FLYING CREATURE TEMPLATE // Use this as a guide when adding new flying small game (ducks, geese, etc.) // // This template ensures all flying creatures have consistent audio, spawning, and drops. /* ============================================================================ STEP 1: Add creature sound(s) near the top of src/world_state.nvgt ============================================================================ */ // Example: // string[] duck_sounds = {"sounds/game/duck.ogg"}; /* ============================================================================ STEP 2: Add constants to src/constants.nvgt ============================================================================ */ // Example for "duck": // const int DUCK_HEALTH = 1; // const int DUCK_MOVE_INTERVAL_MIN = 900; // const int DUCK_MOVE_INTERVAL_MAX = 2200; // const int DUCK_FLYING_HEIGHT_MIN = 8; // const int DUCK_FLYING_HEIGHT_MAX = 25; // const float DUCK_SOUND_VOLUME_STEP = 3.0; // const int DUCK_FLIGHT_SOUND_DELAY_MIN = 2500; // const int DUCK_FLIGHT_SOUND_DELAY_MAX = 6000; // const int DUCK_FALL_SPEED = 100; // const int DUCK_FLY_AWAY_CHANCE = 2; // const int DUCK_MAX_DIST_FROM_WATER = 4; // const int DUCK_MAX_COUNT = 3; // const int DUCK_HOURLY_SPAWN_CHANCE = 30; // const int DUCK_SIGHT_RANGE = 6; /* ============================================================================ STEP 3: Register config in init_flying_creature_configs() (src/world_state.nvgt) ============================================================================ */ // Example: // FlyingCreatureConfig@ duck_cfg = FlyingCreatureConfig(); // duck_cfg.id = "duck"; // duck_cfg.drop_type = "duck"; // duck_cfg.sounds = duck_sounds; // duck_cfg.fall_sound = "sounds/actions/falling.ogg"; // duck_cfg.impact_sound = "sounds/game/game_falls.ogg"; // duck_cfg.health = DUCK_HEALTH; // duck_cfg.move_interval_min = DUCK_MOVE_INTERVAL_MIN; // duck_cfg.move_interval_max = DUCK_MOVE_INTERVAL_MAX; // duck_cfg.min_height = DUCK_FLYING_HEIGHT_MIN; // duck_cfg.max_height = DUCK_FLYING_HEIGHT_MAX; // duck_cfg.sound_volume_step = DUCK_SOUND_VOLUME_STEP; // duck_cfg.sound_delay_min = DUCK_FLIGHT_SOUND_DELAY_MIN; // duck_cfg.sound_delay_max = DUCK_FLIGHT_SOUND_DELAY_MAX; // duck_cfg.fall_speed = DUCK_FALL_SPEED; // duck_cfg.fly_away_chance = DUCK_FLY_AWAY_CHANCE; // duck_cfg.max_dist_from_water = DUCK_MAX_DIST_FROM_WATER; // duck_cfg.hourly_spawn_chance = DUCK_HOURLY_SPAWN_CHANCE; // duck_cfg.max_count = DUCK_MAX_COUNT; // duck_cfg.sight_range = DUCK_SIGHT_RANGE; // duck_cfg.flee_on_sight = true; // flying_creature_configs.insert_last(duck_cfg); /* ============================================================================ STEP 4: Add butcher behavior (src/crafting.nvgt) if yields differ ============================================================================ */ // Example: // if (game_type == "duck") { // inv_meat++; // inv_feathers += random(2, 4); // inv_down += random(1, 2); // speak_with_history("Butchered duck. Got 1 meat, feathers, and down.", true); // }