Initial commit of files

master
FreeLikeGNU 2015-08-09 20:42:46 -07:00
parent c54a197b8e
commit 5b798f112e
21 changed files with 1730 additions and 0 deletions

28
README.txt Normal file
View File

@ -0,0 +1,28 @@
= MOBS_GOBLINS-MOD for MINETEST =-
by PilzAdam, KrupnovPavel, Zeg9, TenPlus1, and FreeLikeGNU
https://forum.minetest.net/viewtopic.php?f=9&t=13004
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 coal deposits.
v0.01 This is a test version and all the goblins act like an NPC and will not attack unless attacked.
License of Media Files:
---------------------------------------
goblins_goblin.b3d and goblins_goblin.blend
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) by FreeLikeGNU
http://creativecommons.org/licenses/by-sa/3.0/
above meshes based on character from minetest_game
MirceaKitsune (WTFPL)
https://github.com/minetest/minetest_game/blob/master/mods/default/README.txt#L71
mobs_goblins*.png and mobs_goblin.xcf files by FreeLikeGNU
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) FreeLikeGNU
http://creativecommons.org/licenses/by-sa/3.0/

1568
api.lua Normal file

File diff suppressed because it is too large Load Diff

121
goblins.lua Normal file
View File

@ -0,0 +1,121 @@
-- Npc by TenPlus1 converted for FLG Goblins :D
mobs_goblins.goblin_drops = {
"default:pick_steel", "default:sword_steel",
"default:shovel_steel", "farming:bread", "bucket:bucket_water"
}
mobs_goblins:register_mob("mobs_goblins:goblin", {
type = "npc",
passive = false,
damage = 3,
attack_type = "dogfight",
attacks_monsters = true,
hp_min = 10,
hp_max = 20,
armor = 100,
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.0,0.35},
visual = "mesh",
mesh = "goblins_goblin.b3d",
drawtype = "front",
textures = {
{"mobs_goblin1.png"},
{"mobs_goblin2.png"},
{"mobs_goblin3.png"},
{"mobs_goblin4.png"},
{"mobs_goblin5.png"},
{"mobs_goblin6.png"},
{"mobs_goblin7.png"},
{"mobs_goblin8.png"},
{"mobs_goblin9.png"},
{"mobs_goblin10.png"},
{"mobs_goblin11.png"},
},
makes_footstep_sound = true,
sounds = {
random = "mobs_pig",
},
walk_velocity = 2,
run_velocity = 3,
jump = true,
drops = {
{name = "default:wood",
chance = 1, min = 1, max = 3},
{name = "default:apple",
chance = 2, min = 1, max = 2},
{name = "default:axe_stone",
chance = 5, min = 1, max = 1},
},
water_damage = 0,
lava_damage = 2,
light_damage = 0,
follow = "default:diamond",
view_range = 15,
owner = "",
order = "follow",
animation = {
speed_normal = 30,
speed_run = 30,
stand_start = 0,
stand_end = 79,
walk_start = 168,
walk_end = 187,
run_start = 168,
run_end = 187,
punch_start = 200,
punch_end = 219,
},
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local name = clicker:get_player_name()
-- feed to heal goblin
if item:get_name() == "default:apple"
or item:get_name() == "farming:bread" then
local hp = self.object:get_hp()
-- return if full health
if hp >= self.hp_max then
minetest.chat_send_player(name, "goblin at full health.")
return
end
hp = hp + 4
if hp > self.hp_max then hp = self.hp_max end
self.object:set_hp(hp)
-- take item
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
-- right clicking with gold lump drops random item from mobs_goblins.goblin_drops
elseif item:get_name() == "default:gold_lump" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs_goblins.goblin_drops[math.random(1, #mobs_goblins.goblin_drops)]})
else
-- if owner switch between follow and stand
if self.owner and self.owner == clicker:get_player_name() then
if self.order == "follow" then
self.order = "stand"
else
self.order = "follow"
end
-- else
-- self.owner = clicker:get_player_name()
end
end
mobs_goblins:capture_mob(self, clicker, 0, 5, 80, false, nil)
end,
})
-- spawn like stone monster, but for coal
mobs_goblins:register_spawn("mobs_goblins:goblin", {"default:stone_with_coal"}, 5, 0, 7000, 1, 0)
mobs_goblins:register_egg("mobs_goblins:goblin", "goblin", "default_cobble.png", 1)

13
init.lua Normal file
View File

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

BIN
models/goblins-goblin.blend Normal file

Binary file not shown.

BIN
models/goblins_goblin.b3d Normal file

Binary file not shown.

BIN
sounds/mobs_pig.ogg Normal file

Binary file not shown.

BIN
sounds/mobs_pig_angry.ogg Normal file

Binary file not shown.

BIN
textures/mobs_blood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

BIN
textures/mobs_goblin.xcf Normal file

Binary file not shown.

BIN
textures/mobs_goblin1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
textures/mobs_goblin10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
textures/mobs_goblin11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
textures/mobs_goblin2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
textures/mobs_goblin3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
textures/mobs_goblin4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
textures/mobs_goblin5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
textures/mobs_goblin6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
textures/mobs_goblin7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
textures/mobs_goblin8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
textures/mobs_goblin9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB