From 31a1a1dd46d1df6b5c1f30075539ac6b9d82594e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Mussoi=20Mendon=C3=A7a?= Date: Wed, 26 Feb 2020 00:09:13 -0300 Subject: [PATCH] extra_map_options compatibility Added boss wave at level 20 glory --- components/weather_stone/weather_stone.lua | 8 +-- data/extra_map_options.json | 8 +++ data/firefly_clan_population.json | 25 -------- .../warrior_hearth/orc/cleric.json | 29 +++++++++ .../warrior_hearth/orc/footman.json | 29 +++++++++ .../warrior_hearth/orc/kobold.json | 29 +++++++++ .../warrior_hearth/orc/ogre.json | 35 +++++++++++ .../warrior_hearth/orc/warchief.json | 32 ++++++++++ data/monster_tuning/warrior_hearth/readme.txt | 14 ++--- data/monster_tuning/warrior_hearth/waves.json | 49 ++++++++++++--- locales/en.json | 3 +- manifest.json | 14 +++-- .../population/data/warrior_hearth.json | 62 ++++++++++++++++++- .../world_generation/custom_overview_map.lua | 26 +++----- swamp_goblins_server.lua | 5 +- 15 files changed, 301 insertions(+), 67 deletions(-) create mode 100644 data/extra_map_options.json create mode 100644 data/monster_tuning/warrior_hearth/orc/cleric.json create mode 100644 data/monster_tuning/warrior_hearth/orc/footman.json create mode 100644 data/monster_tuning/warrior_hearth/orc/kobold.json create mode 100644 data/monster_tuning/warrior_hearth/orc/ogre.json create mode 100644 data/monster_tuning/warrior_hearth/orc/warchief.json diff --git a/components/weather_stone/weather_stone.lua b/components/weather_stone/weather_stone.lua index 50fcae1..eebe456 100644 --- a/components/weather_stone/weather_stone.lua +++ b/components/weather_stone/weather_stone.lua @@ -99,10 +99,10 @@ function WeatherStone:change_weather() --avoid picking the same weather by removing it out of the set weighted_set:remove(current_weather) - local chosen_weather = weighted_set:choose_random() or "stonehearth:weather:sunny" - - stonehearth.weather:_switch_to(chosen_weather, self.player_id) - + local chosen_weather = weighted_set:choose_random() + if chosen_weather then + stonehearth.weather:_switch_to(chosen_weather, self.player_id) + end radiant.effects.run_effect(self._entity, "stonehearth:effects:buff_tonic_energy_added") self:full_reset() diff --git a/data/extra_map_options.json b/data/extra_map_options.json new file mode 100644 index 0000000..7040571 --- /dev/null +++ b/data/extra_map_options.json @@ -0,0 +1,8 @@ +{ + "biome_options": { + "swamp_goblins:biome:swamp": { + "world_size":1, + "dirt_holes":false + } + } +} \ No newline at end of file diff --git a/data/firefly_clan_population.json b/data/firefly_clan_population.json index 685593c..7c58930 100644 --- a/data/firefly_clan_population.json +++ b/data/firefly_clan_population.json @@ -377,35 +377,24 @@ "Belchy", "Blinks", "Blinky", - "Bloats", "Bubble", - "Bubbles", "Buffy", "Bufonia", "Cherry", "Chops", - "Chubbles", - "Chubby", "Clawdia", "Cookie", "Cosmo", - "Cricket", - "Croaks", "Daphne", "Dirty", "Faye", "Fern", "Fiddle", "Flubby", - "Flye", "Freakey", - "Freckles", - "Frogzilla", "Fye", "Fyre", "Geo", - "Gobbles", - "Gooey", "Hippity", "Hipscotch", "Hoppity", @@ -414,43 +403,32 @@ "Kirby", "Kiss", "Kisses", - "Leaps", - "Leapy", "Lilo", "Lily", "Lilypad", "Lips", - "Mello", "Muddy", - "Muds", "Mystique", "Noodles", - "Patches", "Peeps", "Penelope", "Pepper", - "Pickle", - "Pickles", "Princess", "Puds", "Pugs", "Pumpkin", "Raisin", - "Ribbit", "Ribbits", "Sally", "Shirly", - "Shmoo", "Shmooches", "Slimey", - "Slippy", "Smiley", "Smooch", "Snaile", "Sparkle", "Sparkles", "Speckles", - "Spot", "Spots", "Squee", "Squiggy", @@ -466,9 +444,6 @@ "Waddle", "Waddles", "Wiggle", - "Wiggles", - "Wobble", - "Wobbles", "Xena" ] }, diff --git a/data/monster_tuning/warrior_hearth/orc/cleric.json b/data/monster_tuning/warrior_hearth/orc/cleric.json new file mode 100644 index 0000000..7f47109 --- /dev/null +++ b/data/monster_tuning/warrior_hearth/orc/cleric.json @@ -0,0 +1,29 @@ +{ + "type": "monster_tuning", + "job": "stonehearth:jobs:npc:cleric", + "attributes": { + "max_health": 150, + "muscle": 40, + "menace": 40, + "courage": 150, + "speed": 80, + "exp_reward": 120 + }, + "equipment": { + "weapon": [ + "stonehearth:weapons:tome" + ] + }, + "loot_drops": { + "entries": { + "default": { + "items": { + "small_healing_tonic" : { + "uri": "stonehearth:consumables:healing_tonic:small", + "weight" : 1 + } + } + } + } + } +} \ No newline at end of file diff --git a/data/monster_tuning/warrior_hearth/orc/footman.json b/data/monster_tuning/warrior_hearth/orc/footman.json new file mode 100644 index 0000000..2a01502 --- /dev/null +++ b/data/monster_tuning/warrior_hearth/orc/footman.json @@ -0,0 +1,29 @@ +{ + "type": "monster_tuning", + "job": "stonehearth:jobs:npc:footman", + "attributes": { + "max_health": 250, + "muscle": 20, + "menace": 80, + "courage": 250, + "speed": 100, + "exp_reward": 120 + }, + "equipment": { + "weapon": [ + "stonehearth:weapons:giant_bone_axe" + ] + }, + "loot_drops": { + "entries": { + "default": { + "items": { + "small_healing_tonic": { + "uri": "stonehearth:consumables:stamina_tonic", + "weight": 1 + } + } + } + } + } +} \ No newline at end of file diff --git a/data/monster_tuning/warrior_hearth/orc/kobold.json b/data/monster_tuning/warrior_hearth/orc/kobold.json new file mode 100644 index 0000000..c34fd2d --- /dev/null +++ b/data/monster_tuning/warrior_hearth/orc/kobold.json @@ -0,0 +1,29 @@ +{ + "type": "monster_tuning", + "job": "stonehearth:jobs:npc:archer", + "attributes": { + "max_health": 150, + "muscle": 0, + "menace": 80, + "courage": 130, + "speed": 85, + "exp_reward": 50 + }, + "equipment": { + "weapon": [ + "stonehearth:weapons:kobold_bow" + ] + }, + "loot_drops": { + "entries": { + "default": { + "items": { + "small_healing_tonic" : { + "uri" : "stonehearth:consumables:stamina_tonic", + "weight" : 1 + } + } + } + } + } +} \ No newline at end of file diff --git a/data/monster_tuning/warrior_hearth/orc/ogre.json b/data/monster_tuning/warrior_hearth/orc/ogre.json new file mode 100644 index 0000000..0fa4a7f --- /dev/null +++ b/data/monster_tuning/warrior_hearth/orc/ogre.json @@ -0,0 +1,35 @@ +{ + "type": "monster_tuning", + "job": "stonehearth:jobs:npc:knight", + "attributes": { + "max_health": 500, + "muscle": 0, + "menace": 100, + "courage": 300, + "speed": 80, + "exp_reward": 200 + }, + "equipment_scale": 0.15, + "equipment": { + "abilities": "stonehearth:abilities:door_breaker_abilities", + "equipment": "stonehearth:abilities:ogre_attack_abilities", + "invisible_weapon": "stonehearth:monsters:ogres:ogre_foot_weapon", + "weapon": [ + "stonehearth:weapons:giant_bone_mace" + ], + "shield": "stonehearth:armor:cracked_wooden_buckler", + "outfit": "stonehearth:monsters:ogres:outfits:tank" + }, + "loot_drops": { + "entries": { + "default": { + "items": { + "small_healing_tonic": { + "uri": "stonehearth:consumables:stamina_tonic", + "weight": 1 + } + } + } + } + } +} \ No newline at end of file diff --git a/data/monster_tuning/warrior_hearth/orc/warchief.json b/data/monster_tuning/warrior_hearth/orc/warchief.json new file mode 100644 index 0000000..b4f2859 --- /dev/null +++ b/data/monster_tuning/warrior_hearth/orc/warchief.json @@ -0,0 +1,32 @@ +{ + "type": "monster_tuning", + "job": "stonehearth:jobs:npc:knight", + "scale": 0.13, + "attributes": { + "max_health": 500, + "muscle": 100, + "menace": 80, + "courage": 300, + "speed": 80, + "exp_reward": 200 + }, + "equipment": { + "weapon": [ + "stonehearth:weapons:giant_bone_axe" + ], + "shield": "stonehearth:armor:cracked_wooden_buckler", + "outfit": "stonehearth:monsters:orcs:outfits:warchief_boss" + }, + "loot_drops": { + "entries": { + "default": { + "items": { + "small_healing_tonic": { + "uri": "stonehearth:consumables:healing_tonic:small", + "weight": 1 + } + } + } + } + } +} \ No newline at end of file diff --git a/data/monster_tuning/warrior_hearth/readme.txt b/data/monster_tuning/warrior_hearth/readme.txt index e57fc1b..e0b87fe 100644 --- a/data/monster_tuning/warrior_hearth/readme.txt +++ b/data/monster_tuning/warrior_hearth/readme.txt @@ -1,6 +1,6 @@ Instructions on how to use the waves.json file -It is a list of waves, each wave needs an unique name identifier, can't repeat names. +It is a list of possible waves, each wave entry needs an unique name identifier, can't repeat names. For example: { @@ -14,9 +14,9 @@ For example: Each wave has 4 fields. bulletin, weight, at_glory_level and members. * "bulletin" is optional, it is the custom message that appears when confirmation window asks to accept or decline a challenge. When ommited, a default message is used instead. -* "at_glory_level" is optional too. It defaults to {"min":1,"max":9999}. It restricts at which glory levels this wave can appear. -* "weight" is optional, defaults to 1. weight measures the chance this wave has to be picked (has to be on the correct glory level) against other wave options. -* "members" is a required field. It should contain a list of unique members, using this format: +* "at_glory_level" is optional too. It defaults to {"min":1,"max":9999}. It restricts at which glory levels this wave can happen. +* "weight" is optional, defaults to 1. Weight measures the chance this wave has to be picked (has to be on the correct glory level) against other wave options. +* "members" is a required field. It should contain a list of possible members, with unique names, using this format: "members": { "cool_member": { @@ -37,10 +37,10 @@ Examples: Each member has 5 fields. role, tuning, job_level, weight and max_allowed. * "weight" is optional and defaults to 1. Weight measures the chance this member has to be picked against other member options. -* "max_allowed" is optional and defaults to 9999. The randomizer will not try to pick this member again if it already spawned this amount of times -* "tuning" is optional, points to a monster_tuning file. Those files can set a bunch of parameters for the entity, such as job, hp, speed, loot, equipments, etc... (vanilla has it too, for more examples) +* "max_allowed" is optional and defaults to 9999. The randomizer will not try to pick this member again if it already spawned this amount of times in this wave +* "tuning" is optional, points to a monster_tuning file. Those files can set a bunch of parameters for the entity, such as job, hp, speed, loot, equipments, etc... (vanilla has it too, far more examples) * "job_level" is optional and defaults to {"min":1, "max":1}. It randomly set the level of the job for each member spawned. Do not use if the member had no job set in its tuning file (or no tuning) -* "role" points to a role in the "swamp_goblins:kingdoms:warrior_hearth" file. It is a kingdom population file. Each role in the population can have male and female variations, each with random uris and names. As long as the role is correctly set in the population file, you can use it in a wave. (check any population file for examples, plenty in vanilla) +* "role" points to a role set in the "swamp_goblins:kingdoms:warrior_hearth" file, which is a kingdom population file. Each role in the population can have male and female variations, each with random uris and names. As long as the role is correctly set in that population file, you can use it in a wave. (check any population file for examples, plenty in vanilla) Here two new waves added as an example, explanation below it: diff --git a/data/monster_tuning/warrior_hearth/waves.json b/data/monster_tuning/warrior_hearth/waves.json index cc665df..7d17285 100644 --- a/data/monster_tuning/warrior_hearth/waves.json +++ b/data/monster_tuning/warrior_hearth/waves.json @@ -8,7 +8,7 @@ }, "members": { "worker": { - "role": "goblin", + "role": "firefly_goblin", "tuning":"swamp_goblins:monster_tuning:warrior_hearth:firefly:worker" } } @@ -21,13 +21,13 @@ }, "members": { "worker": { - "role": "goblin", + "role": "firefly_goblin", "tuning":"swamp_goblins:monster_tuning:warrior_hearth:firefly:worker", "weight": 2, "max_allowed": 2 }, "warrior": { - "role": "goblin", + "role": "firefly_goblin", "tuning":"swamp_goblins:monster_tuning:warrior_hearth:firefly:warrior", "weight": 1 } @@ -185,12 +185,12 @@ }, "members": { "worker": { - "role": "goblin", + "role": "firefly_goblin", "tuning":"swamp_goblins:monster_tuning:warrior_hearth:firefly:worker", "max_allowed": 2 }, "warrior": { - "role": "goblin", + "role": "firefly_goblin", "tuning":"swamp_goblins:monster_tuning:warrior_hearth:firefly:warrior", "job_level":{ "min":1, @@ -198,12 +198,12 @@ } }, "beast_tamer": { - "role": "goblin", + "role": "firefly_goblin", "tuning":"swamp_goblins:monster_tuning:warrior_hearth:firefly:beast_tamer", "max_allowed": 1 }, "spirit_walker": { - "role": "goblin", + "role": "firefly_goblin", "tuning":"swamp_goblins:monster_tuning:warrior_hearth:firefly:spirit_walker", "max_allowed": 1 } @@ -227,5 +227,40 @@ "weight": 1 } } + }, + "boss_at_20": { + "bulletin":"i18n(swamp_goblins:data.monster_tuning.warrior_hearth.boss_at_20)", + "weight": 9999, + "at_glory_level": { + "min":20, + "max":20 + }, + "members": { + "warchief": { + "role": "orc_warchief", + "tuning":"swamp_goblins:monster_tuning:warrior_hearth:orc:warchief", + "max_allowed":1 + }, + "kobold": { + "role": "kobold", + "tuning":"swamp_goblins:monster_tuning:warrior_hearth:orc:kobold", + "max_allowed":1 + }, + "ogre": { + "role": "ogre", + "tuning":"swamp_goblins:monster_tuning:warrior_hearth:orc:ogre", + "max_allowed":1 + }, + "orc_cleric": { + "role": "orc", + "tuning":"swamp_goblins:monster_tuning:warrior_hearth:orc:cleric", + "max_allowed": 1 + }, + "orc_footman": { + "role": "orc", + "tuning":"swamp_goblins:monster_tuning:warrior_hearth:orc:footman", + "max_allowed": 1 + } + } } } \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index 935dc79..a7f5d31 100644 --- a/locales/en.json +++ b/locales/en.json @@ -533,7 +533,8 @@ "easy_hearthlings_2":"A well organized human group wants some glory", "boss_at_10":"⚔️ We, The Golden Conquering Arm, have returned, this time with reinforcements, to test our skills one more time", "recurring_boss_from_10":"We, The Golden Conquering Arm, have returned, this time with reinforcements, to test our skills one more time", - "boss_at_15":"⚔️ The Protectors, the famous party of paladins, send their best apprentices to test their skills" + "boss_at_15":"⚔️ The Protectors, famous paladins guild, send their best apprentices to test their skills", + "boss_at_20":"⚔️ Warchief Oghar Norwind is here with her troops to train with you" } }, "population": { diff --git a/manifest.json b/manifest.json index 796c6e7..b3b2629 100644 --- a/manifest.json +++ b/manifest.json @@ -337,10 +337,15 @@ "monster_tuning:warrior_hearth:hearthling:footman": "file(data/monster_tuning/warrior_hearth/hearthling/footman.json)", "monster_tuning:warrior_hearth:hearthling:knight": "file(data/monster_tuning/warrior_hearth/hearthling/knight.json)", "monster_tuning:warrior_hearth:hearthling:paladin": "file(data/monster_tuning/warrior_hearth/hearthling/paladin.json)", - "monster_tuning:warrior_hearth:vanilla_goblin:boss": "file(data/monster_tuning/warrior_hearth/vanilla_goblin/boss.json)", - "monster_tuning:warrior_hearth:vanilla_goblin:wolf": "file(data/monster_tuning/warrior_hearth/vanilla_goblin/wolf.json)", - "monster_tuning:warrior_hearth:vanilla_goblin:thief": "file(data/monster_tuning/warrior_hearth/vanilla_goblin/thief.json)", - "monster_tuning:warrior_hearth:vanilla_goblin:marauder": "file(data/monster_tuning/warrior_hearth/vanilla_goblin/marauder.json)", + "monster_tuning:warrior_hearth:orc:cleric": "file(data/monster_tuning/warrior_hearth/orc/cleric.json)", + "monster_tuning:warrior_hearth:orc:footman": "file(data/monster_tuning/warrior_hearth/orc/footman.json)", + "monster_tuning:warrior_hearth:orc:kobold": "file(data/monster_tuning/warrior_hearth/orc/kobold.json)", + "monster_tuning:warrior_hearth:orc:ogre": "file(data/monster_tuning/warrior_hearth/orc/ogre.json)", + "monster_tuning:warrior_hearth:orc:warchief": "file(data/monster_tuning/warrior_hearth/orc/warchief.json)", + "monster_tuning:warrior_hearth:vanilla_goblin:boss": "file(data/monster_tuning/warrior_hearth/vanilla_goblin/boss.json)", + "monster_tuning:warrior_hearth:vanilla_goblin:wolf": "file(data/monster_tuning/warrior_hearth/vanilla_goblin/wolf.json)", + "monster_tuning:warrior_hearth:vanilla_goblin:thief": "file(data/monster_tuning/warrior_hearth/vanilla_goblin/thief.json)", + "monster_tuning:warrior_hearth:vanilla_goblin:marauder":"file(data/monster_tuning/warrior_hearth/vanilla_goblin/marauder.json)", "music:audience": "file(entities/music/audience)", "music:bongo": "file(entities/music/bongo)", @@ -584,6 +589,7 @@ "stonehearth_ace:mason:workbench_bone": "file(jobs/bonesmith/bonesmith_workbench/equivalents.json)", "stonehearth:data:constants": "file(data/constants.json)", + "extra_map_options:data:extra_map_options":"file(data/extra_map_options.json)", "stonehearth:data:gm_index": "swamp_goblins:data:gm_index", "stonehearth/data/gm/campaigns/amberstone/arcs/trigger/discovery/discovery_arc.json":"file(data/gm/campaigns/amberstone/arcs/trigger/discovery/discovery_arc.json)", diff --git a/services/server/population/data/warrior_hearth.json b/services/server/population/data/warrior_hearth.json index 13623d6..4f3ba6b 100644 --- a/services/server/population/data/warrior_hearth.json +++ b/services/server/population/data/warrior_hearth.json @@ -1,7 +1,7 @@ { "mixins": "swamp_goblins:kingdoms:firefly_clan", "type": "kingdom", - "kingdom_name": "The Golden Conquering Arm", + "kingdom_name": "The Challengers", "kingdom_id": "warrior_hearth", "amenity_to_strangers": "hostile", "amenity_to": { @@ -10,7 +10,7 @@ "rabbit_biped_npcs": "neutral" }, "roles": { - "goblin": { + "firefly_goblin": { "male": { "uri": [ "swamp_goblins:goblins:goblin" @@ -61,6 +61,64 @@ "i18n(swamp_goblins:data.monster_tuning.warrior_hearth.challenger.display_name)" ] } + }, + "kobold": { + "male": { + "uri": [ + "stonehearth:monsters:kobolds:kobold" + ], + "given_names": [ + "i18n(swamp_goblins:data.monster_tuning.warrior_hearth.challenger.display_name)" + ] + } + }, + "ogre": { + "male": { + "uri": [ + "stonehearth:monsters:ogres:ogre" + ], + "given_names": [ + "i18n(swamp_goblins:data.monster_tuning.warrior_hearth.challenger.display_name)" + ] + } + }, + "orc": { + "male": { + "uri": [ + "stonehearth:monsters:orcs:orc_male" + ], + "given_names": [ + "i18n(swamp_goblins:data.monster_tuning.warrior_hearth.challenger.display_name)" + ] + }, + "female": { + "uri": [ + "stonehearth:monsters:orcs:orc_female" + ], + "given_names": [ + "i18n(swamp_goblins:data.monster_tuning.warrior_hearth.challenger.display_name)" + ] + } + }, + "orc_warchief": { + "male": { + "uri": [ + "stonehearth:monsters:orcs:orc_female" + ], + "given_names": [ + "i18n(swamp_goblins:data.monster_tuning.warrior_hearth.challenger.display_name)" + ] + } + }, + "kobold_wolf": { + "male": { + "uri": [ + "stonehearth:monsters:kobolds:kobold_wolf" + ], + "given_names": [ + "i18n(swamp_goblins:data.monster_tuning.warrior_hearth.challenger.display_name)" + ] + } } }, "task_groups": "stonehearth:data:player_task_groups" diff --git a/services/server/world_generation/custom_overview_map.lua b/services/server/world_generation/custom_overview_map.lua index 2648274..1550b13 100644 --- a/services/server/world_generation/custom_overview_map.lua +++ b/services/server/world_generation/custom_overview_map.lua @@ -17,25 +17,19 @@ function CustomOverviewMap:derive_overview_map(full_elevation_map, full_feature_ for i=1, overview_width do a, b = _overview_map_to_feature_map_coords(i, j) + macro_block_info = { + terrain_code = self:_get_terrain_code(a, b, full_elevation_map, full_feature_map), + forest_density = self:_get_forest_density(a, b, full_feature_map), + wildlife_density = self:_get_wildlife_density(a, b, full_elevation_map), + vegetation_density = self:_get_vegetation_density(a, b, full_feature_map), + mineral_density = self:_get_mineral_density(a, b, full_elevation_map) + } if self._is_sky then --extra_map_options mod compatibility - macro_block_info = { - terrain_code = self:_get_terrain_code(a, b, full_elevation_map, full_feature_map), - is_sky = self:_is_sky(a, b, full_feature_map), - forest_density = self:_get_forest_density(a, b, full_feature_map), - wildlife_density = self:_get_wildlife_density(a, b, full_elevation_map), - vegetation_density = self:_get_vegetation_density(a, b, full_feature_map), - mineral_density = self:_get_mineral_density(a, b, full_elevation_map) - } - else - macro_block_info = { - terrain_code = self:_get_terrain_code(a, b, full_elevation_map, full_feature_map), - forest_density = self:_get_forest_density(a, b, full_feature_map), - wildlife_density = self:_get_wildlife_density(a, b, full_elevation_map), - vegetation_density = self:_get_vegetation_density(a, b, full_feature_map), - mineral_density = self:_get_mineral_density(a, b, full_elevation_map) - } + macro_block_info.is_sky = self:_is_sky(a, b, full_feature_map) end + --removed code that removed trees from appearing over water + overview_map:set(i, j, macro_block_info) end end diff --git a/swamp_goblins_server.lua b/swamp_goblins_server.lua index 79132be..12543e2 100644 --- a/swamp_goblins_server.lua +++ b/swamp_goblins_server.lua @@ -1,8 +1,11 @@ swamp_goblins = {} -print("Swamp Goblins Mod version 20.1.28") +print("Swamp Goblins Mod version 20.2.25") --[[ +spirit walker ranged attack as a high level skill (spirit ball attack) +ranged attack for beast tamer + waves: boss, bunnies, orcs, kobolds, ogres