Go to file
tenplus1 13a7535d47 add nil check to trader block 2022-08-06 17:59:49 +01:00
locale add spanish translation (thanks mckaygerhard) 2022-01-22 08:20:09 +00:00
models add 0.4.17 character model for npc's 2018-07-05 21:23:44 +01:00
textures add trader spawn block (8x stone, 1x diamond block in center) 2022-08-04 09:31:35 +01:00
depends.txt fix dependency for 0.4.x clients 2022-06-07 08:47:43 +01:00
description.txt Initial NPC upload 2016-04-15 15:01:56 +01:00
functions.lua tweak mobs_npc.npc_talk() ordering (function msg's > self.messages) 2022-08-06 07:32:39 +01:00
igor.lua tweak mobs_npc.npc_talk() ordering (function msg's > self.messages) 2022-08-06 07:32:39 +01:00
init.lua simplify mob definitions, add functions.lua for shop and quick drop items, stop using mob global and use mob_npc global for mod functions 2022-08-03 08:58:15 +01:00
license.txt Added license and new trader textures 2016-08-19 19:11:38 +01:00
lucky_block.lua update npc drops and skins 2021-04-25 13:20:08 +01:00
mod.conf add support for smart_dialogs mod to npc only 2022-06-07 08:06:53 +01:00
npc.lua tweak mobs_npc.npc_talk() ordering (function msg's > self.messages) 2022-08-06 07:32:39 +01:00
readme.md tweak mobs_npc.npc_talk() ordering (function msg's > self.messages) 2022-08-06 07:32:39 +01:00
screenshot.png added screenshot 2019-03-02 10:12:17 +00:00
spawn_example.lua Added spawn.lua check for custom mob spawning, example file included 2020-09-21 10:20:51 +01:00
trader.lua add nil check to trader block 2022-08-06 17:59:49 +01:00

readme.md

Minetest mod NPC MOBS

MOBS for simpler NPC and trader

Information

This added simple but working entities NPC or simpler non-player character, and also traders non-player characters. Check the table names below for eggs or more.

Technical information

Downloads

This version is compatible backguard with 0.4 and also 5.X, can be downloaded from ContentDB or from tenplus1 notabug repos.

Eggs for spawns

name internal Notes
NPC mobs_npc:npc Acts like normal player, just a bot
Trader mobs_npc:trader Will just trade but does nothing more
Igor mobs_npc:igor IT also will fight if you attack

NPC

  • While NPC's don't actually spawn in the world just yet, they do have a spawn egg available to drop him/her into the world and wander around defending himself if attacked.

  • It will also he will help you attack any monsters in the area and will follow you if you hold a diamond. Right-clicking the NPC with a gold lump will make him drop steel tools or food, right-clicking with an empty hand orders the NPC to stay or follow if owned.

Trader

  • Traders are new and still being tested but can be placed into the world using a spawn egg. Right-clicking on a trader opens his shop and allows you to buy his wares inside.

  • If provoked a trader will attack a player or monster. Note: self.npc_drops and self.igor_drops are used for random item list when trading for gold and may be changed within the mob itself, if not found the global mobs.npc_drops and mobs.igor_drops are used instead for a default list.

API's

mobs_npc.drop_trade(self, player, item_to_trade, item_drop_list)

mobs_npc.npc_talk(self, player, message_list)

  • Note that message_list table overrides self.messages from mob definition.

mobs_npc.shop_trade(self, player, trader_list[names, items])

mobs_npc.add_trader_list(def)

'def' includes:

  • block (block name in front of trader_block to use custom list e.g. "default:coalblock")
  • nametag (name of trader e.g. "Larry")
  • textures (trader texture list e.g. {"mobs_trader2.png"})
  • item_list (items for trade e.g. { {"default:dirt 5", "default:gold_ingot 2"} })

Trader Block

Craft a trader block using 7x stone, 1x diamond block centre, 1x tin block bottom middle)

Once placed, punch the trader block to spawn a Trader, only one can be spawned at a time, and by placing specific blocks below where the trader appears, custom traders can be created with their own textures, names and special item lists for sale.

License

Check license.txt file