[Mod] Mobs Redo [1.61] [mobs]

User avatar
DreamKeeper
Member
Posts: 20
Joined: Mon Oct 24, 2016 17:37

Re: [Mod] Mobs Redo [1.32] [mobs]

by DreamKeeper » Post

Please, help me to install mobs on my server.
And NPC also..

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Mobs Redo [1.32] [mobs]

by azekill_DIABLO » Post

yeah, it has been added to voxellar!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
snoopy
Member
Posts: 263
Joined: Thu Oct 20, 2016 16:49
Location: DE, European Union

Re: [Mod] Mobs Redo [1.32] [mobs]

by snoopy » Post

DreamKeeper wrote:Please, help me to install mobs on my server.
And NPC also..
Have a look at the intro page, get all four zip files from the four downloads, rename unzipped folder accordingly by removing the "-master" part, move folders into the "mods" folder of your minetest installation.

Start and stop minetest with the mods copied. In your applicable world folder edit "world.mt" and set the b.m. listed variables to true as these default to "false" after the first run.

Code: Select all

load_mod_mobs = true
load_mod_mobs_animal = true
load_mod_mobs_monster = true
load_mod_mobs_npc = true
Alternatively you may use the GUI of minetest to activate the mods.

User avatar
Andrey01
Member
Posts: 2577
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: [Mod] Mobs Redo [1.32] [mobs]

by Andrey01 » Post

DreamKeeper wrote:Please, help me to install mobs on my server.
And NPC also..
And what don`t have you get?What do need you help?

User avatar
snoopy
Member
Posts: 263
Joined: Thu Oct 20, 2016 16:49
Location: DE, European Union

Re: [Mod] Mobs Redo [1.32] [mobs]

by snoopy » Post

On my local server we are quite happy with the mobs_redo (i.e. mobs, monster, animal, npc) mod compilation as of 2016-10-31 master. The new spawn rates seem to be reasonable. A little glitch may be some of the cows are seeking the deeper waters and dying there regularly.

Thanks a lot for the nice work.

luigipacheco
New member
Posts: 8
Joined: Mon Jul 20, 2015 05:51
GitHub: luigipacheco
In-game: luigi

Re: [Mod] Mobs Redo [1.32] [mobs]

by luigipacheco » Post

now working for me i did all the steps but once in game it wont spawn mobs

User avatar
snoopy
Member
Posts: 263
Joined: Thu Oct 20, 2016 16:49
Location: DE, European Union

Re: [Mod] Mobs Redo [1.32] [mobs]

by snoopy » Post


ph8jPf9M
Member
Posts: 77
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: [Mod] Mobs Redo [1.32] [mobs]

by ph8jPf9M » Post

TenPlus1 wrote:The latest update changed mob spawning so that it actually counts the number of a specific mob inside the area beforehand and spawns a new one only if within limits... Here is an example of a new spawn command which is easier to use:

Code: Select all

mobs:spawn({
	name = "mobs_animal:cow",
	nodes = {"group:soil"}, -- default is {"group:soil", "group:stone"}
	neighbors = {"air"} -- default is {"air"}
	min_light = 5, -- default is 0
	max_light =15 -- default is 15
	interval = 30, -- default is 30
	chance = 9000, -- default is 5000
	active_object_count = 1, -- default is 1 (per map block)
	min_height = 0, -- default is -31000
	max_height = 31000, default is 31000
	day_toggle = true -- default is nil (true for day, false for night, nil for both)
	on_spawn = nil, -- function on spawn (nil by default)
})
...also minetest.conf setting has been changed so that mob chance AND numbers per map block can be changed, e.g. This changes cow spawn chance to 7000 and number per block to 5:

Code: Select all

mobs_animal:cow = 7000,5
...if you only wish to change numbers per block do this instead:

Code: Select all

mobs_animal:cow = ,5
Sorry if it was already asked/explained before but i have some mob spawning questions:

The latest update changed mob spawning so that it actually counts the number of a specific mob inside the area beforehand and spawns a new one only if within limits...
How big is the area in nodes that it checks for a specific mob?

Interval = 30 --means every 30 seconds new mob spawns?
chance = 9000 -- 1 mob every 9000 nodes or 1 in 9000 chance to spawn a mob?
active_object_count = 1 -- only one mob per mapblock? - what is mapblock? and how big is it in nodes?

Sounds

Also is there a way to add 5 different sounds for random, attack ,damage and how?

Code: Select all

	sounds = {
		  random = "mobs_chicken1",
        random = "mobs_chicken2",
        random = "mobs_chicken3",
        random = "mobs_chicken4",
        random = "mobs_chicken5",
		  damage = "mobs_chickenaw1",
        damage = "mobs_chickenaw2",
        damage = "mobs_chickenaw3",
		  death = "mobs_chickendeath1",
        death = "mobs_chickendeath2",
        death = "mobs_chickendeath3",
        death = "mobs_chickendeath4",
	},

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

Re: [Mod] Mobs Redo [1.32] [mobs]

by TenPlus1 » Post

A map block is 16x16x16 and I cover this by having it check 32 node radius to be sure (active_object_count is counted inside this area)

Interval is indeed 30 seconds default and chance is 1 in every 9000th node (e.g. spawn a cow on dirt, every 9000'th node will have a chance of a cow).

As for sounds, just have random = "mobs_chicken" and rename sound files to "mobs_chicken.1.ogg" "mobs_chicken.2.ogg" etc and it randomly selects a sound from the list.

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

Re: [Mod] Mobs Redo [1.32] [mobs]

by TenPlus1 » Post

Update:

- Tamed mobs can now be protected from harm by crafting a Protection Rune (8x stone with 1x gold block in centre) and right-clicking mob with it.

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Mod] Mobs Redo [1.32] [mobs]

by maikerumine » Post

TenPlus1 wrote:Update:

- Tamed mobs can now be protected from harm by crafting a Protection Rune (8x stone with 1x gold block in centre) and right-clicking mob with it.
+100!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [Mod] Mobs Redo [1.32] [mobs]

by ExeterDad » Post

TenPlus1 wrote:Update:

- Tamed mobs can now be protected from harm by crafting a Protection Rune (8x stone with 1x gold block in centre) and right-clicking mob with it.
Fantastic! Whats the use of taming and keeping chickens if someone could just come up and slaughter them.

User avatar
firefox
Member
Posts: 1709
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox
Location: Xanadu

Re: [Mod] Mobs Redo [1.32] [mobs]

by firefox » Post

TenPlus1 wrote:Update:

- Tamed mobs can now be protected from harm by crafting a Protection Rune (8x stone with 1x gold block in centre) and right-clicking mob with it.
+100
✨🏳️‍🌈♣️✨

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod] Mobs Redo [1.32] [mobs]

by D00Med » Post

Nice update!, this is really useful
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

u34

Re: [Mod] Mobs Redo [1.32] [mobs]

by u34 » Post

TenPlus1 wrote:Update:

- Tamed mobs can now be protected from harm by crafting a Protection Rune (8x stone with 1x gold block in centre) and right-clicking mob with it.
+1

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

Re: [Mod] Mobs Redo [1.32] [mobs]

by KCoombes » Post

TenPlus1 wrote:Update:

- Tamed mobs can now be protected from harm by crafting a Protection Rune (8x stone with 1x gold block in centre) and right-clicking mob with it.
Will this prevent /clearobjects from killing livestock off?

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

Re: [Mod] Mobs Redo [1.32] [mobs]

by TenPlus1 » Post

Nope, the /clearobjects command kills ALL entities.

zorman2000
Member
Posts: 84
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [Mod] Mobs Redo [1.32] [mobs]

by zorman2000 » Post

Hi Tenplus1, I'm trying to expand the functionality of the NPC mob. I would like to do so without editing the API, just implement using existing functions and variables. With that in mind, I have the following questions:

- Where do I define "do_custom()" function? Alongside "on_rightclick()", for example?
- Is "do_custom" called in intervals? If so, how frequently it is called?
- Can I add more variables to the "self" object without changing the main API?
- What are the accepted values for "self.child"? Is it boolean?
- I'm using a custom spawner for mobs (basically a copy of yours but with some slight modifications). Is there a way I can set the self.* variables to some specific value at spawn time?

Thanks!

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

Re: [Mod] Mobs Redo [1.32] [mobs]

by TenPlus1 » Post

Check out the rat.lua file in mobs_animal as examples are usually pasted there :) do_custom is called every tick so you would need to add your own timer for specific intervals...

You can add as many self.* variables as you like since they will all be saved in the entity itself, and yes, self.child is a boolean value.

On spawn you have a on_spawn function which you can use to read/set variables for the entity, or you can do a simple lua example like this:

Code: Select all

local mob = minetest.add_entity(pos, "mobs:creeper")
if mob and mob:get_luaentity() then
	local ent = mob:get_luaentity()
	ent.nametag = "Mr. Boombastic"
	ent.tamed = true
	ent.owner = "TenPlus1"
else
	mob:remove() -- entity not found, remove unknown.
end

zorman2000
Member
Posts: 84
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [Mod] Mobs Redo [1.32] [mobs]

by zorman2000 » Post

Awesome!! I just checked rat.lua and definetely it has the examples I need. Thank you so much for the quick and comprehensive answer!!

zorman2000
Member
Posts: 84
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [Mod] Mobs Redo [1.32] [mobs]

by zorman2000 » Post

Hi Tenplus1,

I'm using the spawn function that is in the rat.lua file, and I notice that almost all the time (think I have seen a negative case 1 or 2 times), the nametag for the mob and any other visual attribute (like resizing) doesn't works until I restart the server. It looks like the entity needs a refresh. Do you know about this? Is there any way to "refresh" the visual entity?

Edit: For clarity, this is very similar to what I'm doing:

Code: Select all

local function npc_spawn(self, pos)
  minetest.log("Spawning new NPC...")
  local ent = self:get_luaentity()
  ent.nametag = "Name"

  minetest.log(dump(ent))
end

-- Spawn
mobs:spawn({
	name = "advanced_npc:npc",
	nodes = {"default:stone"},
	min_light = 3,
	active_object_count = 1,
  interval = 5,
  chance = 1,
	--max_height = 0,
	on_spawn = npc_spawn,
})
Sometimes the entity seems to be stuck (I have changed default behavior to follow so they wander about) and it is not until I quit and start again that the nametag shows and it starts moving around.

Thanks!

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

Re: [Mod] Mobs Redo [1.32] [mobs]

by TenPlus1 » Post

Adding this line will force an update of an entity:

self.object:set_properties(self)

zorman2000
Member
Posts: 84
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [Mod] Mobs Redo [1.32] [mobs]

by zorman2000 » Post

TenPlus1 wrote: self.object:set_properties(self)
Yes, that did it! Thanks a lot!!

ph8jPf9M
Member
Posts: 77
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: [Mod] Mobs Redo [1.32] [mobs]

by ph8jPf9M » Post

Is there a way to make mobs bigger with an item growray? Growray is a tool with durability. When you rightclick a mob with it it changes mobs visual size from visual_size = {x=4, y=4}, to visual_size = {x=5, y=5}, and each time we growray a mob it grows by 1 in x and y until he is a giant mob then we cant grow him any further. Also there is shrinkray that makes mobs smaller just the oposite of growray. How can this be done?

User avatar
Christian9
Member
Posts: 338
Joined: Fri Sep 19, 2014 20:29
In-game: Christian9
Location: Hell Creek

Re: [Mod] Mobs Redo [1.32] [mobs]

by Christian9 » Post

How do you install the new version?

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests