[Mod] Mobs Redo [1.61] [mobs]

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

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

by TenPlus1 » Post

auouymous: any blast that destroys a sign will remove text or the itemframe, but the itemframe will drop the item inside.

chem817: that is up to the do_custom() function to handle, set an internal timer and when count is reached remove entity and replace with new one or change features etc.

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

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

by auouymous » Post

TenPlus1 wrote:auouymous: any blast that destroys a sign will remove text or the itemframe, but the itemframe will drop the item inside.
What about a node that can't be dug or blasted (a non-empty chest), and has an item entity in/on it. An explosive mob would destroy that entity because it doesn't check the entity's immortal flag or on_blast callback like the tnt mod does.

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

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

by TenPlus1 » Post

auouymous: the mobs blast function uses the tnt mod's boom function, so all checks are met.

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

Updated to version 1.46

by TenPlus1 » Post

- Mobs only drop rare items (drops.min = 0) if killed by player
- Mob line of sight cannot see through walkable nodes now
- Mob damage function changed, knockback and fire damage groups checked
- Code tidy and tweak
Last edited by TenPlus1 on Fri Sep 07, 2018 14:03, edited 3 times in total.

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

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

by Pyrollo » Post

Hi TenPlus1,

Before I dive into the code, do you think it can be easy to do change speed / jump / gravity of mobs ?

This would be a per mob instance (per entity), on the fly, change. Idea bellow that is to create jump/speed/gravity effects like those done with player:set_physics_override.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

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

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

by TenPlus1 » Post

Pyrollo: if you grab the mob as an entity ( local self = object:get_luaentity() ) you can change many of the mob values on the fly e.g. self.walk_velocity , self.jump_height , self.fall_speed etc. all of which are listed in the api.txt file.

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

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

by Pyrollo » Post

Thanks for the clear an quick reply :) That's a very good news !

(and sorry for not having read api.txt file before asking :( )
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

sir_sponge76
New member
Posts: 1
Joined: Thu Sep 06, 2018 00:05
In-game: sir_sponge76

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

by sir_sponge76 » Post

does this have shooting mobs? i want to know so i can make a hostile archer.

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

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

by Pyrollo » Post

sir_sponge76 wrote:does this have shooting mobs? i want to know so i can make a hostile archer.
Yes, the dungeon master is shooting fireballs (image on the right).
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

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

Updated to version 1.47

by TenPlus1 » Post

- Added min and max values for light level damage checks (defaults to 14 and 15)
- Lava damage checks for ignition nodes when dealing damage (fire, lava etc.)
- Mob arrows have custom on_punch and collisionbox added, dungeon master now uses these
- A new setting 'pushable' has been added to mob definition so that they can be pushed by players

totya
Member
Posts: 29
Joined: Sat Sep 08, 2018 19:34

Re: Updated to version 1.45

by totya » Post

TenPlus1 wrote:- Added new light_of_sight changes (thanks Astrobe)
- Added Fence Tops that can sit on top of any fence and stop mobs escaping/glitching free
(craft using 3x wood on top row and 1x wooden fence middle centre to give 12x tops)
Hi!

Thanks for this mod!

The fence doesn't stop the animals. Okay, I see the mob-fence-top. But the torch on the mob-fence-top is ugly, because the torch is in the air.:
minetest_2018_09_17_19_28_02_923.jpg
minetest_2018_09_17_19_28_02_923.jpg (48.27 KiB) Viewed 1164 times
- The fence gate doesn't stop the animals. I see in with cow.

- The sheep can't get in mob-fence, even two block spaces is few to come in, see:
minetest_2018_09_17_21_48_25_910.jpg
minetest_2018_09_17_21_48_25_910.jpg (68.16 KiB) Viewed 1164 times
Three free block needed.

- The (one block!) water kill te animals, for example the sheep:
minetest_2018_09_17_21_58_23_389.jpg
minetest_2018_09_17_21_58_23_389.jpg (58.88 KiB) Viewed 1164 times
- The sheep(all animals?) sometimes disappear when follow me. Slightly irritating bug.

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

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

by TenPlus1 » Post

mobs have a life timer that runs out eventually and the mob disappears, as for mob fences and tops, those are a stop gap measure until the engine issue for entities going through solid walls is fixed.

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

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

by gpcf » Post

I think I'm going to add a domestication mechanic soon, so e.g. wild boars change into pigs by breeding. This should make livestock farming more attractive, since domesticated animals would have more positive properties, such as giving more meat/milk/wool and being tamer.

totya
Member
Posts: 29
Joined: Sat Sep 08, 2018 19:34

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

by totya » Post

TenPlus1 wrote:mobs have a life timer that runs out eventually and the mob disappears, as for mob fences and tops, those are a stop gap measure until the engine issue for entities going through solid walls is fixed.
Thanks for this information :)

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

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

by TenPlus1 » Post

gpfc: the mob api has an on_breed function set so you can compare mother/father stats and change the offspring to any mob/settings you wish :)

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

Hopefully a quick question. I'm trying to use override on mobs_animal, specifically on the spawn eggs. I have what I think is correct string eg mobs_animal:bee by using the give command to confirm that works in game.

Is there something missing in my code or are these registered a little differently. I noticed with the bee's for example if I used give me mobs_animal:bee_set I would get tamed bees instead. I cant see anything obvious in the Lua code for mobs_animal or mobs_redo under egg.

This is what I'm trying as a test in clean mod with nothing else in the Init.lua. I can make it work for other items just not mobs_redo....

Code: Select all

minetest.override_item("mobs_animal:bee", {
	description ="buzz",
})
error

Code: Select all

2018-09-22 10:40:08: ERROR[Main]: ModError: Failed to load and run script from C:\Users\Rob\Minetest\minetest-0.4.17.1-win64\minetest-0.4.17.1-win64\bin\..\mods\mobs_scroll\init.lua:
2018-09-22 10:40:08: ERROR[Main]: ...minetest-0.4.17.1-win64\bin\..\mods\mobs_scroll\init.lua:1: Attempt to override non-existent item mobs_animal:bee
2018-09-22 10:40:08: ERROR[Main]: stack traceback:
2018-09-22 10:40:08: ERROR[Main]: 	[C]: in function 'error'
2018-09-22 10:40:08: ERROR[Main]: 	...minetest-0.4.17.1-win64\bin\..\builtin\game\register.lua:389: in function 'override_item'
2018-09-22 10:40:08: ERROR[Main]: 	...minetest-0.4.17.1-win64\bin\..\mods\mobs_scroll\init.lua:1: in main chunk
2018-09-22 10:40:08: ERROR[Main]: Check debug.txt for details.
thanks for any help

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

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

by texmex » Post

Yes, mobs are entities and not items, so that won’t work. There’s a mod called entity_override which should provide this function. https://github.com/taikedz-mt/entity_override

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

thanks texmex, extending my question a little :) - is that because the egg is essentially just a wrapper for the entity? I'm just curious as the code for registering an egg indicates it's a craftitem:

Code: Select all


	-- register new spawn egg containing mob information
	minetest.register_craftitem(mob .. "_set", {

		description = S("@1 (Tamed)", desc),
		inventory_image = invimg,
		groups = {spawn_egg = 2, not_in_creative_inventory = 1},
		stack_max = 1,

		on_place = function(itemstack, placer, pointed_thing)

			local pos = pointed_thing.above

			-- am I clicking on something with existing on_rightclick function?
			local under = minetest.get_node(pointed_thing.under)
			local def = minetest.registered_nodes[under.name]
			if def and def.on_rightclick then
				return def.on_rightclick(pointed_thing.under, under, placer, itemstack)
			end

			if pos
			and within_limits(pos, 0)
			and not minetest.is_protected(pos, placer:get_player_name()) then

				if not minetest.registered_entities[mob] then
					return
				end

				pos.y = pos.y + 1

				local data = itemstack:get_metadata()
				local mob = minetest.add_entity(pos, mob, data)
				local ent = mob:get_luaentity()

				-- set owner if not a monster
				if ent.type ~= "monster" then
					ent.owner = placer:get_player_name()
					ent.tamed = true
				end

				-- since mob is unique we remove egg once spawned
				itemstack:take_item()
			end

			return itemstack
		end,
	})

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

okay my bad - newbie mistake
I forgot to list default in the depends.txt
then I also had mobs_redo listed in the depends text not mobs...

need the embarrassed emoji...

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: Updated to version 1.45

by Chibi ghost » Post

totya wrote: Hi!

Thanks for this mod!

The fence doesn't stop the animals. Okay, I see the mob-fence-top. But the torch on the mob-fence-top is ugly, because the torch is in the air.:Image

- The fence gate doesn't stop the animals. I see in with cow.

- The sheep can't get in mob-fence, even two block spaces is few to come in, see:
Image
Three free block needed.

- The (one block!) water kill te animals, for example the sheep:
Image

- The sheep(all animals?) sometimes disappear when follow me. Slightly irritating bug.
I find doing the fence gates like this tends to reduce the number of hostile mobs that try to break through and attack me whilst I collect the crops
Image
Attachments
screenshot_20180921_084233.png
screenshot_20180921_084233.png (388.91 KiB) Viewed 1164 times

Darkwar
Member
Posts: 41
Joined: Fri Aug 17, 2018 18:28
GitHub: Darkwar
IRC: Darkwar
In-game: cooljar10

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

by Darkwar » Post

ok is there any away make rats medium rare so there wont be so many

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

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

by TenPlus1 » Post

Darkwar: edit your minetest.conf file and add this line to make them more rare:

mobs_animal:rat = 16000

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

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

by Byakuren » Post

Darkwar wrote:ok is there any away make rats medium rare
Heat until an internal temperature of 135F
Every time a mod API is left undocumented, a koala dies.

Darkwar
Member
Posts: 41
Joined: Fri Aug 17, 2018 18:28
GitHub: Darkwar
IRC: Darkwar
In-game: cooljar10

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

by Darkwar » Post

Byakuren wrote:
Darkwar wrote:ok is there any away make rats medium rare
Heat until an internal temperature of 135F
lmfao XD

Nordal
Member
Posts: 158
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall

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

by Nordal » Post

Is there anything to do against this monster shooting fireballs? How to protect yourself and how to kill it? It's down in the cave and sits on my bones and stuff. I want to have it back, please!
CFS - still widely unknown

Post Reply

Who is online

Users browsing this forum: rudzik8 and 24 guests