NPC, Igor and Trader mobs for Mobs Redo on Minetest

tenplus1 804cc4ac04 code tidy преди 2 години
locale 7d10806bda add spanish translation (thanks mckaygerhard) преди 3 години
models 30f85bc5dc add 0.4.17 character model for npc's преди 6 години
textures 84af13342b add more npc and trader skins (thanks Astrobe) преди 2 години
depends.txt 5ca55f49ce fix dependency for 0.4.x clients преди 2 години
description.txt e590f637b2 Initial NPC upload преди 8 години
functions.lua 1b3c51e336 tweak mobs_npc.npc_talk() ordering (function msg's > self.messages) преди 2 години
igor.lua 804cc4ac04 code tidy преди 2 години
init.lua 804cc4ac04 code tidy преди 2 години
license.txt a7b6df80b1 Added license and new trader textures преди 8 години
lucky_block.lua 804cc4ac04 code tidy преди 2 години
mod.conf da5c5ce9be add support for smart_dialogs mod to npc only преди 2 години
npc.lua 804cc4ac04 code tidy преди 2 години
readme.md 1b3c51e336 tweak mobs_npc.npc_talk() ordering (function msg's > self.messages) преди 2 години
screenshot.png 50b19fec88 added screenshot преди 5 години
spawn_example.lua 7db2c2545a Added spawn.lua check for custom mob spawning, example file included преди 4 години
trader.lua 84af13342b add more npc and trader skins (thanks Astrobe) преди 2 години

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