From 9a6a3a05a11a2c37851547c62d8a714b26b9ba03 Mon Sep 17 00:00:00 2001 From: IsseW Date: Tue, 25 Oct 2022 00:31:04 +0200 Subject: [PATCH] bat config --- .../custom/simpleflyingmelee/singlestrike.ron | 2 +- assets/common/entity/wild/aggressive/bat.ron | 11 +++++++++++ .../loot_tables/calendar/halloween/bat.ron | 4 ++++ assets/common/loot_tables/creature/bat.ron | 9 +++++++++ .../voxel/bird_medium_central_manifest.ron | 12 ++++++------ .../voxel/bird_medium_lateral_manifest.ron | 16 ++++++++-------- assets/voxygen/voxel/npc/bat/male/leg_r.vox | 2 +- assets/voxygen/voxel/npc/bat/male/wing_r.vox | 2 +- .../spawn/calendar/halloween/halloween.ron | 1 + assets/world/wildlife/spawn/desert/hot.ron | 1 + .../wildlife/spawn/jungle/rainforest_area.ron | 1 + .../wildlife/spawn/temperate/rainforest.ron | 1 + common/src/comp/body.rs | 1 + voxygen/anim/src/bird_medium/mod.rs | 4 ++-- world/src/layer/cave.rs | 12 ++++++++++++ 15 files changed, 60 insertions(+), 19 deletions(-) create mode 100644 assets/common/entity/wild/aggressive/bat.ron create mode 100644 assets/common/loot_tables/calendar/halloween/bat.ron create mode 100644 assets/common/loot_tables/creature/bat.ron diff --git a/assets/common/abilities/custom/simpleflyingmelee/singlestrike.ron b/assets/common/abilities/custom/simpleflyingmelee/singlestrike.ron index d78682ef8a..3b15069f86 100644 --- a/assets/common/abilities/custom/simpleflyingmelee/singlestrike.ron +++ b/assets/common/abilities/custom/simpleflyingmelee/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 4.0, + base_damage: 1.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, diff --git a/assets/common/entity/wild/aggressive/bat.ron b/assets/common/entity/wild/aggressive/bat.ron new file mode 100644 index 0000000000..a21793f3a3 --- /dev/null +++ b/assets/common/entity/wild/aggressive/bat.ron @@ -0,0 +1,11 @@ +#![enable(implicit_some)] +( + name: Automatic, + body: RandomWith("bat"), + alignment: Alignment(Enemy), + loot: LootTable("common.loot_tables.calendar.halloween.bat"), + inventory: ( + loadout: FromBody, + ), + meta: [], +) \ No newline at end of file diff --git a/assets/common/loot_tables/calendar/halloween/bat.ron b/assets/common/loot_tables/calendar/halloween/bat.ron new file mode 100644 index 0000000000..c5bef9a83c --- /dev/null +++ b/assets/common/loot_tables/calendar/halloween/bat.ron @@ -0,0 +1,4 @@ +[ + (1.0, Item("common.items.food.pumpkin_spice_brew")), + (5.0, Item("common.items.food.honeycorn")), +] \ No newline at end of file diff --git a/assets/common/loot_tables/creature/bat.ron b/assets/common/loot_tables/creature/bat.ron new file mode 100644 index 0000000000..8d6d484afb --- /dev/null +++ b/assets/common/loot_tables/creature/bat.ron @@ -0,0 +1,9 @@ +[ + // halloween event loot + (2.0, Item("common.items.food.pumpkin_spice_brew")), + (5.0, Item("common.items.food.honeycorn")), + + // crafting + (1.0, Item("common.items.crafting_ing.hide.animal_hide")), + (1.0, Item("common.items.crafting_ing.animal_misc.shar_fang")), +] \ No newline at end of file diff --git a/assets/voxygen/voxel/bird_medium_central_manifest.ron b/assets/voxygen/voxel/bird_medium_central_manifest.ron index acdc812b28..418fbaef0e 100644 --- a/assets/voxygen/voxel/bird_medium_central_manifest.ron +++ b/assets/voxygen/voxel/bird_medium_central_manifest.ron @@ -225,29 +225,29 @@ ), (Bat, Male): ( head: ( - offset: (-4.5, 2.0, -9.0), + offset: (-4.5, 2.0, -11.0), central: ("npc.bat.male.head"), ), torso: ( - offset: (-3.5, -5.0, -4.5), + offset: (-3.5, -5.0, -6.5), central: ("npc.bat.male.torso"), ), tail: ( - offset: (-2.5, -0.5, 1.5), + offset: (-2.5, -1.5, -1.5), central: ("npc.bat.male.tail"), ) ), (Bat, Female): ( head: ( - offset: (-4.5, 2.0, -9.0), + offset: (-4.5, 2.0, -11.0), central: ("npc.bat.male.head"), ), torso: ( - offset: (-3.5, -5.0, -4.5), + offset: (-3.5, -5.0, -6.5), central: ("npc.bat.male.torso"), ), tail: ( - offset: (-2.5, -0.5, 1.5), + offset: (-2.5, -1.5, -1.5), central: ("npc.bat.male.tail"), ) ), diff --git a/assets/voxygen/voxel/bird_medium_lateral_manifest.ron b/assets/voxygen/voxel/bird_medium_lateral_manifest.ron index 1320966923..364e8c440b 100644 --- a/assets/voxygen/voxel/bird_medium_lateral_manifest.ron +++ b/assets/voxygen/voxel/bird_medium_lateral_manifest.ron @@ -289,37 +289,37 @@ ), (Bat, Male): ( wing_l: ( - offset: (-1.0, 2.5, -18.0), + offset: (-13.0, 2.5, -3.5), lateral: ("npc.bat.male.wing_r"), ), wing_r: ( - offset: (-1.0, 2.5, -18.0), + offset: (-1.0, 2.5, -3.5), lateral: ("npc.bat.male.wing_r"), ), foot_l: ( - offset: (-2.0, -2.0, -7.0), + offset: (-2.0, 2.0, -8.5), lateral: ("npc.bat.male.leg_r"), ), foot_r: ( - offset: (-2.0, -2.0, -7.0), + offset: (-2.0, 2.0, -8.5), lateral: ("npc.bat.male.leg_r"), ) ), (Bat, Female): ( wing_l: ( - offset: (-1.0, 2.5, -18.0), + offset: (-13.0, 2.5, -3.5), lateral: ("npc.bat.male.wing_r"), ), wing_r: ( - offset: (-1.0, 2.5, -18.0), + offset: (-1.0, 2.5, -3.5), lateral: ("npc.bat.male.wing_r"), ), foot_l: ( - offset: (-2.0, -2.0, -7.0), + offset: (-2.0, 2.0, -8.5), lateral: ("npc.bat.male.leg_r"), ), foot_r: ( - offset: (-2.0, -2.0, -7.0), + offset: (-2.0, 2.0, -8.5), lateral: ("npc.bat.male.leg_r"), ) ), diff --git a/assets/voxygen/voxel/npc/bat/male/leg_r.vox b/assets/voxygen/voxel/npc/bat/male/leg_r.vox index e62c3c300e..17bee2d3a0 100644 --- a/assets/voxygen/voxel/npc/bat/male/leg_r.vox +++ b/assets/voxygen/voxel/npc/bat/male/leg_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d17fc3c09de234e00b7e09aecaacec046869820fce9a0bfc42a0bff83b1130e +oid sha256:6f291cc978b6825689c9144be29efaef6093ed16bf61eb736fc0c8a9db5aedcf size 1148 diff --git a/assets/voxygen/voxel/npc/bat/male/wing_r.vox b/assets/voxygen/voxel/npc/bat/male/wing_r.vox index 787eb63df4..dab3f84466 100644 --- a/assets/voxygen/voxel/npc/bat/male/wing_r.vox +++ b/assets/voxygen/voxel/npc/bat/male/wing_r.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a88f725949d5f42891f3b7cb20e7e13b086632051d6469344cbc728218819e1 +oid sha256:ded179cd04c8f42c4a8a8e247eb10d1daaf85ac1bcefd815313ed9a2d0969cf3 size 1544 diff --git a/assets/world/wildlife/spawn/calendar/halloween/halloween.ron b/assets/world/wildlife/spawn/calendar/halloween/halloween.ron index 692a48082a..ab70bea12c 100644 --- a/assets/world/wildlife/spawn/calendar/halloween/halloween.ron +++ b/assets/world/wildlife/spawn/calendar/halloween/halloween.ron @@ -6,6 +6,7 @@ SpawnEntry ( groups: [ (1, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_harvester")), (2, (1, 1, "common.entity.calendar.halloween.aggressive.halloween_dullahan")), + (3, (4, 8, "common.entity.wild.aggressive.bat")), (3, (3, 6, "common.entity.calendar.halloween.aggressive.trickster")), ], spawn_mode: Land, diff --git a/assets/world/wildlife/spawn/desert/hot.ron b/assets/world/wildlife/spawn/desert/hot.ron index 9b087d09e7..ad6a707e1b 100644 --- a/assets/world/wildlife/spawn/desert/hot.ron +++ b/assets/world/wildlife/spawn/desert/hot.ron @@ -20,6 +20,7 @@ SpawnEntry ( (1, (1, 1, "common.entity.wild.peaceful.holladon")), (1, (1, 1, "common.entity.wild.peaceful.porcupine")), (1, (1, 1, "common.entity.wild.peaceful.pangolin")), + (1, (4, 8, "common.entity.wild.aggressive.bat")), ], spawn_mode: Land, day_period: [Night], diff --git a/assets/world/wildlife/spawn/jungle/rainforest_area.ron b/assets/world/wildlife/spawn/jungle/rainforest_area.ron index 1bc0dcaccc..03e0f4886d 100644 --- a/assets/world/wildlife/spawn/jungle/rainforest_area.ron +++ b/assets/world/wildlife/spawn/jungle/rainforest_area.ron @@ -22,6 +22,7 @@ SpawnEntry ( groups: [ (5, (1, 1, "common.entity.wild.peaceful.quokka")), (1, (1, 1, "common.entity.wild.peaceful.tortoise")), + (5, (4, 8, "common.entity.wild.aggressive.bat")), ], spawn_mode: Land, day_period: [Night], diff --git a/assets/world/wildlife/spawn/temperate/rainforest.ron b/assets/world/wildlife/spawn/temperate/rainforest.ron index 2e441dc34e..09ef34c004 100644 --- a/assets/world/wildlife/spawn/temperate/rainforest.ron +++ b/assets/world/wildlife/spawn/temperate/rainforest.ron @@ -45,6 +45,7 @@ SpawnEntry ( // Pack (5, (1, 3, "common.entity.wild.peaceful.rat")), (5, (1, 3, "common.entity.wild.peaceful.squirrel")), + (10, (4, 8, "common.entity.wild.aggressive.bat")), ], spawn_mode: Land, day_period: [Night], diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index c93459c768..3981b75fe5 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -424,6 +424,7 @@ impl Body { bird_medium::Species::Duck => Vec3::new(0.9, 1.0, 1.4), bird_medium::Species::Goose => Vec3::new(1.0, 1.2, 1.5), bird_medium::Species::Peacock => Vec3::new(1.3, 1.1, 1.4), + bird_medium::Species::Bat => Vec3::new(2.0, 2.0, 1.5), _ => Vec3::new(2.0, 1.0, 1.5), }, Body::BirdLarge(body) => match body.species { diff --git a/voxygen/anim/src/bird_medium/mod.rs b/voxygen/anim/src/bird_medium/mod.rs index 124753f418..e5f9694efa 100644 --- a/voxygen/anim/src/bird_medium/mod.rs +++ b/voxygen/anim/src/bird_medium/mod.rs @@ -153,7 +153,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Owl, Female) => (3.5, -6.0, 3.5), (Parrot, _) => (2.0, -4.5, 3.0), (Penguin, _) => (4.0, 0.5, 1.0), - (Bat, _) => (3.0, -8.0, 4.0), + (Bat, _) => (3.0, -8.0, -1.0), }, foot: match (body.species, body.body_type) { (Duck, _) => (2.5, -2.0, 4.0), @@ -166,7 +166,7 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Owl, Female) => (1.5, -3.0, 6.5), (Parrot, _) => (1.5, -3.0, 3.0), (Penguin, _) => (2.5, -2.0, 6.0), - (Bat, _) => (2.0, -2.0, 8.0), + (Bat, _) => (5.0, -1.0, 8.0), }, feed: match (body.species, body.body_type) { (Chicken, _) => 1.2, diff --git a/world/src/layer/cave.rs b/world/src/layer/cave.rs index d99e4b52d2..932c1b22e9 100644 --- a/world/src/layer/cave.rs +++ b/world/src/layer/cave.rs @@ -828,6 +828,10 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio Some("common.entity.wild.peaceful.fungome"), (biome.mushroom + 0.02) * 0.5, ), + ( + Some("common.entity.wild.aggressive.bat"), + (biome.mushroom + 0.1) * 0.5, + ), // Leafy biome ( Some("common.entity.wild.peaceful.holladon"), @@ -869,6 +873,10 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio Some("common.entity.wild.aggressive.swamp_troll"), (biome.leafy + 0.0) * 0.1, ), + ( + Some("common.entity.wild.aggressive.bat"), + (biome.leafy + 0.1) * 0.5, + ), // Dusty biome ( Some("common.entity.wild.aggressive.dodarock"), @@ -890,6 +898,10 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio Some("common.entity.wild.peaceful.rat"), (biome.dusty + 0.1) * 0.3, ), + ( + Some("common.entity.wild.aggressive.bat"), + (biome.dusty + 0.1) * 0.5, + ), // Icy biome ( Some("common.entity.wild.aggressive.blue_oni"),