Add "mobs_goblins" mod.

master
AntumDeluge 2016-08-01 03:52:51 -07:00
parent 7ce0a031b9
commit 0e7a8a2647
36 changed files with 3277 additions and 0 deletions

View File

@ -35,6 +35,7 @@ The following mods are also included:
* sheep ([Creatures MOB-Engine][cme])
* hostils/
* ghost ([Creatures MOB-Engine][cme])
* [mobs_goblins][] ([CC-BY-SA / CC-BY / CC0](mobs/hostils/mobs_goblins/README.md))
* oerrki ([Creatures MOB-Engine][cme])
* zombie ([Creatures MOB-Engine][cme])
* lib/
@ -99,6 +100,7 @@ The following mods are also included:
[lightning]: https://forum.minetest.net/viewtopic.php?t=13886
[mesecons]: https://forum.minetest.net/viewtopic.php?t=628
[mobf]: https://github.com/sapier/mobf_core
[mobs_goblins]: https://forum.minetest.net/viewtopic.php?t=13004
[moreblocks]: https://forum.minetest.net/viewtopic.php?t=509
[moreores]: https://forum.minetest.net/viewtopic.php?t=549
[moretrees]: https://forum.minetest.net/viewtopic.php?t=4394

View File

@ -0,0 +1,38 @@
# mobs_goblins Goblins mod for Minetest
## by Francisco "FreeLikeGNU" Athens
https://forum.minetest.net/viewtopic.php?f=9&t=13004
https://github.com/FreeLikeGNU/mobs_goblins
* code based on MOBS-MOD by PilzAdam, KrupnovPavel, Zeg9, TenPlus1
https://forum.minetest.net/viewtopic.php?f=9&t=9917
This mod adds several Goblins to Minetest that should spawn near ore deposits or lairs underground.
* Goblins dig caves, destroy torches, create lairs, set traps and some are aggressive.
License of Media Files:
---------------------------------------
* goblins_goblin.b3d and goblins_goblin.blend
Copyright 2015 by Francisco "FreeLikeGNU" Athens Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
* above meshes based on character from minetest_game
by MirceaKitsune (WTFPL)
https://github.com/minetest/minetest_game/blob/master/mods/default/README.txt#L71
* goblins_goblins*.png files and goblins_goblin.xcf files
Copyright 2015 by Francisco "FreeLikeGNU" Athens Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
* Sound files by:
* artisticdude http://opengameart.org/content/goblins-sound-pack CC0-license
* Ogrebane http://opengameart.org/content/monster-sound-pack-volume-1 CC0-license
* spookymodem http://opengameart.org/content/mining-pick CC-BY 3.0
* Thanks to Napiophelios for the goblin king skin
https://forum.minetest.net/viewtopic.php?f=9&t=13004#p186921
goblins_goblin_king.png
License: Creative Commons CC-BY-SA-3.0 SummerFeilds TP
* --Thanks to duane-r for his work on making traps nastier!: https://github.com/duane-r/mobs_goblins/blob/work/goblin_traps.lua

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
{
"name": "mobs_goblins",
"description": "goblins for minetest",
"keywords": [
"mobs_goblins"
],
"homepage": "https://github.com/FreeLikeGNU/mobs_goblins",
"screenshots": [
"https://cloud.githubusercontent.com/assets/51875/9214313/50cbf752-40db-11e5-8661-ce8be773bc92.png"
],
"authors": [
"FreeLikeGNU"
],
"license": "CC-BY-SA-3.0"
}

View File

@ -0,0 +1 @@
default

View File

@ -0,0 +1,356 @@
--[[some nasty things goblins can do]]
--Super thanks to duane-r for his work: https://github.com/duane-r/mobs_goblins/blob/work/goblin_traps.lua
minetest.register_node("mobs_goblins:mossycobble_trap", {
description = "Messy Gobblestone",
tiles = {"default_mossycobble.png"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
paramtype = "light",
light_source = 4,
})
minetest.register_node("mobs_goblins:stone_with_coal_trap", {
description = "Coal Trap",
tiles = {"default_cobble.png^default_mineral_coal.png"},
groups = {cracky = 1, level = 2},
drop = 'default:coal_lump',
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_punch = function(pos, node, puncher)
if puncher:is_player() then
if math.random(0,100) < 10 then -- chance player will get hurt mining this
if puncher:get_hp() > 0 then
puncher:set_hp(puncher:get_hp()-1)
minetest.sound_play("goblins_goblin_pick", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end
end,
})
minetest.register_node("mobs_goblins:stone_with_iron_trap", {
description = "Iron Gore",
tiles = {"default_cobble.png^default_mineral_iron.png"},
groups = {cracky = 1, level = 2},
drop = 'default:iron_lump',
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_punch = function(pos, node, puncher)
if puncher:is_player() then
if math.random(0,100) < 25 then -- chance player will get hurt mining this
if puncher:get_hp() > 0 then
puncher:set_hp(puncher:get_hp()-1)
minetest.sound_play("goblins_goblin_pick", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end
end,
})
minetest.register_node("mobs_goblins:stone_with_copper_trap", {
description = "Copper Gore",
tiles = {"default_cobble.png^default_mineral_copper.png"},
groups = {cracky = 1, level = 2},
drop = 'default:copper_lump',
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_punch = function(pos, node, puncher)
if puncher:is_player() then
if math.random(0,100) < 50 then -- chance player will get hurt mining this
if puncher:get_hp() > 0 then
puncher:set_hp(puncher:get_hp()-1)
minetest.sound_play("goblins_goblin_pick", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end
end,
})
minetest.register_node("mobs_goblins:stone_with_gold_trap", {
description = "Gold Gore",
tiles = {"default_cobble.png^default_mineral_gold.png"},
groups = {cracky = 1,level = 2},
drop = 'default:gold_lump',
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_punch = function(pos, node, puncher)
if puncher:is_player() then
if math.random(0,100) < 50 then -- chance player will get hurt mining this
if puncher:get_hp() > 0 then
puncher:set_hp(puncher:get_hp()-1)
minetest.sound_play("goblins_goblin_pick", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end
end,
})
minetest.register_node("mobs_goblins:stone_with_diamond_trap", {
description = "Diamond Gore",
tiles = {"default_cobble.png^default_mineral_diamond.png"},
groups = {cracky = 1, level = 3},
drop = 'default:diamond',
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
on_punch = function(pos, node, puncher)
if puncher:is_player() then
if math.random(0,100) < 75 then -- chance player will get hurt mining this
if puncher:get_hp() > 0 then
puncher:set_hp(puncher:get_hp()-1)
minetest.sound_play("goblins_goblin_pick", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end
end,
})
minetest.register_node("mobs_goblins:molten_gold_source", {
description = "Molten Gold Source",
inventory_image = minetest.inventorycube("default_lava.png"),
drawtype = "liquid",
tiles = {
{
name = "goblins_molten_gold_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.0,
},
},
},
special_tiles = {
-- New-style lava source material (mostly unused)
{
name = "goblins_molten_gold_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.0,
},
backface_culling = false,
},
},
paramtype = "light",
light_source = default.LIGHT_MAX - 1,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "mobs_goblins:molten_gold_flowing",
liquid_alternative_source = "mobs_goblins:molten_gold_source",
liquid_viscosity = 7,
liquid_renewable = false,
liquid_range = 3,
damage_per_second = 4 * 2,
post_effect_color = {a=192, r=255, g=64, b=0},
groups = {lava=3, liquid=2, hot=3, igniter=1},
})
minetest.register_node("mobs_goblins:molten_gold_flowing", {
description = "Flowing Molten Gold",
inventory_image = minetest.inventorycube("default_lava.png"),
drawtype = "flowingliquid",
tiles = {"default_lava.png"},
special_tiles = {
{
name = "goblins_molten_gold_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.3,
},
},
{
name = "goblins_molten_gold_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.3,
},
},
},
paramtype = "light",
paramtype2 = "flowingliquid",
light_source = default.LIGHT_MAX - 1,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "mobs_goblins:molten_gold_flowing",
liquid_alternative_source = "mobs_goblins:molten_gold_source",
liquid_viscosity = 7,
liquid_renewable = false,
liquid_range = 3,
damage_per_second = 4 * 2,
post_effect_color = {a=192, r=255, g=64, b=0},
groups = {lava=3, liquid=2, hot=3, igniter=1, not_in_creative_inventory=1},
})
--[[ too bad we can't keep track of what physics are set too by other mods...]]
minetest.register_abm({
nodenames = {"mobs_goblins:mossycobble_trap"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 0.95)) do -- IDKWTF this is but it works
if object:is_player() then
object:set_physics_override({speed = 0.1})
minetest.after(1, function() -- this effect is temporary
object:set_physics_override({speed = 1}) -- we'll just set it to 1 and be done.
end)
end
end
end})
minetest.register_abm({
nodenames = {"mobs_goblins:stone_with_coal_trap"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 3)) do
if object:is_player() then
minetest.set_node(pos, {name="fire:basic_flame"})
if object:get_hp() > 0 then
object:set_hp(object:get_hp()-2)
minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.5, max_hear_distance = 10})
minetest.after(6, function() --this hell ends after a few seconds
minetest.set_node(pos, {name = "air"})
end)
end
end
end
end})
-- summon a metallic goblin?
-- pit of iron razors?
minetest.register_abm({
nodenames = {"mobs_goblins:stone_with_iron_trap"},
interval = 2,
chance = 2, --this may be a dud
action = function(pos, node, active_object_count, active_object_count_wider)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 2)) do
if object:is_player() then
if object:get_hp() > 0 then
object:set_hp(object:get_hp()-1)
minetest.sound_play("goblins_goblin_pick", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end
end})
local function lightning_effects(pos, radius)
minetest.add_particlespawner({
amount = 30,
time = 1,
minpos = vector.subtract(pos, radius / 2),
maxpos = vector.add(pos, radius / 2),
minvel = {x=-10, y=-10, z=-10},
maxvel = {x=10, y=10, z=10},
minacc = vector.new(),
maxacc = vector.new(),
minexptime = 1,
maxexptime = 3,
minsize = 16,
maxsize = 32,
texture = "goblins_lightning.png",
})
end
--[[ based on dwarves cactus]]
minetest.register_abm({
nodenames = {"mobs_goblins:stone_with_copper_trap"},
interval = 1,
chance = 2,
action = function(pos, node, active_object_count, active_object_count_wider)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 3)) do
if object:is_player() then
if object:get_hp() > 0 then
object:set_hp(object:get_hp()-1)
-- sprite
lightning_effects(pos, 3)
minetest.sound_play("goblins_goblin_pick", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end
end})
minetest.register_abm({
nodenames = {"mobs_goblins:stone_with_gold_trap"},
interval = 1,
chance = 2,
action = function(pos, node, active_object_count, active_object_count_wider)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 2)) do
if object:is_player() then
minetest.set_node(pos, {name="mobs_goblins:molten_gold_source"})
if object:get_hp() > 0 then
object:set_hp(object:get_hp()-2)
minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.5, max_hear_distance = 10})
minetest.after(6, function() --this hell ends after a few seconds
minetest.set_node(pos, {name = "air"})
end)
end
end
end
end})
local setting = minetest.setting_getbool("enable_tnt")
if setting == true then
print("enable_tnt = true")
else
print("enable_tnt ~= true")
end
if (not singleplayer and setting ~= true) or (singleplayer and setting == false) then
-- wimpier trap for non-tnt settings
minetest.register_abm({
nodenames = {"mobs_goblins:stone_with_diamond_trap"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 3)) do
if object:is_player() then
minetest.set_node(pos, {name="default:lava_source"})
if object:get_hp() > 0 then
object:set_hp(object:get_hp()-2)
minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.5, max_hear_distance = 10})
minetest.after(6, function() --this hell ends after a few seconds
minetest.set_node(pos, {name = "air"})
end)
end
end
end
end})
else
-- 5... 4... 3... 2... 1...
minetest.register_abm({
nodenames = {"mobs_goblins:stone_with_diamond_trap"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 3)) do
if object:is_player() then
minetest.set_node(pos, {name="tnt:tnt_burning"})
minetest.get_node_timer(pos):start(5)
minetest.sound_play("tnt_ignite", {pos = pos, gain = 0.5, max_hear_distance = 10})
end
end
end})
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
local path = minetest.get_modpath("mobs_goblins")
-- Mob Api
dofile(path.."/api.lua")
dofile(path.."/goblins.lua") -- TenPlus1 and FreeLikeGNU
dofile(path.."/goblin_traps.lua")
dofile(path.."/nodes.lua")
--if minetest.setting_get("log_mods") then
minetest.log("action", "GOBLINS is lowdids!")
--end

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,9 @@
minetest.register_node(":default:mossycobble", {
description = "Mossy Cobblestone",
tiles = {"default_mossycobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 1},
sounds = default.node_sound_stone_defaults(),
paramtype = "light",
light_source = 4,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,2 @@
goblins_lightning https://openclipart.org/detail/36343/lightning-08
goblins_molten_gold* http://commons.wikimedia.org/wiki/File:Villarrica_lava_fountain.jpg and VanessaE (HDX Textures)