Basic questions about mobs

Post Reply
frootyloops
New member
Posts: 2
Joined: Tue Apr 20, 2021 00:47

Basic questions about mobs

by frootyloops » Post

Hi, I'm new to minetest, and have some basic questions about mobs (I've tried searching the forums but there's too much noise):

- where are mobs for worlds defined? I had a look in the files of a world directory that I downloaded,
and I couldn't find anything mentioning mobs, even though I know they are spawned when I play a
game in the world. I guess the mobs info is stored in the maps.sqlite file, since thats the only one
whose contents I cant' decipher (it contains blobs), but it doesn't make sense that the mob definitions
would be stored in the map data. I can't find any mods that mention the basic mobs

- how can I find the names of mob entities so that I can use the /spawnentity server command to add some to a game I'm hosting?

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Basic questions about mobs

by sorcerykid » Post

Mobs are not included with the vanilla installation of Minetest. You will need to install a mob framework along with corresponding mobs (some are bundled together).

https://wiki.minetest.net/Mods:Mobs

There's also my Mobs Lite engine, but it relies on an CPP patch to work due its more advanced feature-set. So if you have a compiler, then you should have no problem getting it up and running. The repo and wiki are found on GitHub:

https://github.com/sorcerykid/mobs/wiki

Anyway, welcome aboard Minetest!

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: Basic questions about mobs

by orwell » Post

If I understand correctly you already have a mobs mod installed (if not see sorcerykid).

The map.sqlite file is an SQLite database where each entry is a MapBlock (16x16x16 nodes). The MapBlock is stored in a binary format whose documentation can be found in the doc folder in the minetest githup repo.

Along with the actual nodes, each mapblock also stores the entities (mobs, sign texts etc) that are located in this mapblock. So yes, the mobs and their position and state are in the map.sqlite.

If you want to delete all entities from a world, there is the /clearobjects command.

As for the IDs (for /spawnentity), the easiest way is to press F5 to show the debug info and point at an entity, then it will show the ID. Or, you can look at the mob mod source code, the lines with "register_entity(<id>, ...)".
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

frootyloops
New member
Posts: 2
Joined: Tue Apr 20, 2021 00:47

Re: Basic questions about mobs

by frootyloops » Post

Thanks for the information, thats very useful.
I also figured out that <WORLD>/world.mt file contains a "gameid" entry which indicates the game that the world is used for. The mobs are defined in mod subdirs of the game directory.

Bulo
Member
Posts: 14
Joined: Tue Jan 26, 2021 19:46
Location: 3city, Poland
Contact:

Re: Basic questions about mobs

by Bulo » Post

What mob is this?

Image

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Basic questions about mobs

by TenPlus1 » Post

@Bulo - That's a Mese Monster from Mobs Redo, you can install Mobs Redo, Mobs Monster, Mobs Animal and Mobs NPC alongside many more from the content tab in minetest itself :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 20 guests