[Mod] Mobs Redo [1.61] [mobs]

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

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

by duckgo » Post

Hello, I wanted to ask something that maybe exists but I couldn't find it..
It has a feature for, for example, the mob "during the day, don't move", this other one may not have it, "don't move sideways"?.. I don't know if it has these features, but if not, although I know that it would be used a lot, but it would be interesting and a suggestion..
This question came to my mind, when I was trying to make a "Huggy Wuggy" where during the day he stands still, at night he attacks the player.. :)

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

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

by TenPlus1 » Post

You can use the do_custom() function inside each mob to detect wether it is daytime and to force a self.state = "stand" so it doesn't move. Check out the API.txt file for information.

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

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

by duckgo » Post

TenPlus1 wrote:
Sat Oct 15, 2022 06:16
You can use the do_custom() function inside each mob to detect wether it is daytime and to force a self.state = "stand" so it doesn't move. Check out the API.txt file for information.
I looked at the API, and thought maybe I hadn't seen these features..
I'll look again, I'm quite a noob, I've already tried to figure out how to tell if it's day and night, but I'll keep trying..
Thanks again for your help and attention :)

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

Test

by TenPlus1 » Post

@duckgo - Here's a quick example of a "Samgolye" npc that turns to stone at night time:

Code: Select all

mobs:register_mob("mymod:samgoyle", {
	type = "npc",
	passive = false,
	damage = 3,
	attack_type = "dogfight",
	attacks_monsters = true,
	attack_npcs = false,
	owner_loyal = true,
	hp_min = 10,
	hp_max = 20,
	armor = 100,
	collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
	visual = "mesh",
	mesh = "character.b3d", -- player model
	drawtype = "front",
	textures = {
		{"character.png"} -- player skin
	},
	makes_footstep_sound = true,
	sounds = {},
	walk_velocity = 2,
	run_velocity = 3,
	jump = true,
	drops = {
		{name = "default:stone", chance = 1, min = 1, max = 3},
	},
	water_damage = 0,
	lava_damage = 2,
	light_damage = 0,
	view_range = 8,
	fear_height = 3,
	animation = {
		speed_normal = 30,
		speed_run = 30,
		stand_start = 0,
		stand_end = 79,
		walk_start = 168,
		walk_end = 187,
		run_start = 168,
		run_end = 187,
		punch_start = 200,
		punch_end = 219
	},

	-- custom function that runs while mob is active
	do_custom = function(self, dtime)

		-- 1 second timer
		self.tod_timer = (self.tod_timer or 0) + dtime
		if self.tod_timer < 1 then return end
		self.tod_timer = 0

		-- check for night time
		local tod = (minetest.get_timeofday() or 0) * 24000
		local night = true
		if tod > 4500 and tod < 19500 then
			night = false
		end

		-- if night turn to stone and stop moving or attacking
		if night then
			-- only change npc texture once
			if not self.tod_night then
				self.object:set_properties({
					textures = {"default_stone.png"}
				})
			end
			-- do these every second to be sure
			self.state = "statue" -- not in api
			self:set_animation("stand")
			self:set_velocity(0)
			self.attack = nil
		else -- otherwise go back to normal
			-- only chance npc texture once
			if self.tod_night then
				self.object:set_properties({
					textures = {"character.png"}
				})
				self.state = "stand"
			end
		end
		self.tod_night = night -- backup night status for once only checks
	end
})

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

Re: Test

by duckgo » Post

TenPlus1 wrote:
Sun Oct 16, 2022 08:07
@duckgo - Here's a quick example of a "Samgolye" npc that turns to stone at night time:

Code: Select all

mobs:register_mob("mymod:samgoyle", {
	type = "npc",
	passive = false,
	damage = 3,
	attack_type = "dogfight",
	attacks_monsters = true,
	attack_npcs = false,
	owner_loyal = true,
	hp_min = 10,
	hp_max = 20,
	armor = 100,
	collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
	visual = "mesh",
	mesh = "character.b3d", -- player model
	drawtype = "front",
	textures = {
		{"character.png"} -- player skin
	},
	makes_footstep_sound = true,
	sounds = {},
	walk_velocity = 2,
	run_velocity = 3,
	jump = true,
	drops = {
		{name = "default:stone", chance = 1, min = 1, max = 3},
	},
	water_damage = 0,
	lava_damage = 2,
	light_damage = 0,
	view_range = 8,
	fear_height = 3,
	animation = {
		speed_normal = 30,
		speed_run = 30,
		stand_start = 0,
		stand_end = 79,
		walk_start = 168,
		walk_end = 187,
		run_start = 168,
		run_end = 187,
		punch_start = 200,
		punch_end = 219
	},

	-- custom function that runs while mob is active
	do_custom = function(self, dtime)

		-- 1 second timer
		self.tod_timer = (self.tod_timer or 0) + dtime
		if self.tod_timer < 1 then return end
		self.tod_timer = 0

		-- check for night time
		local tod = (minetest.get_timeofday() or 0) * 24000
		local night = true
		if tod > 4500 and tod < 19500 then
			night = false
		end

		-- if night turn to stone and stop moving or attacking
		if night then
			-- only change npc texture once
			if not self.tod_night then
				self.object:set_properties({
					textures = {"default_stone.png"}
				})
			end
			-- do these every second to be sure
			self.state = "statue" -- not in api
			self:set_animation("stand")
			self:set_velocity(0)
			self.attack = nil
		else -- otherwise go back to normal
			-- only chance npc texture once
			if self.tod_night then
				self.object:set_properties({
					textures = {"character.png"}
				})
				self.state = "stand"
			end
		end
		self.tod_night = night -- backup night status for once only checks
	end
})

Thanks a lot ... From what I saw here, I had done something very similar, but when it was daytime, the animation was still the same, this will be very useful as a reference :)

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

Update:

by TenPlus1 » Post

- Tree Monster textures changed (reported as too close to minecraft textures)
- Cobweb texture changes (same reason)

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

Update:

by TenPlus1 » Post

- Peaceful Player setting works properly for all players, and privelage for individuals.

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

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

by duckgo » Post

Hello Tenplus1, today I edited the sounds of Mobs Animal , balanced the volumes, tried to remove as much noise as possible, and some other things, I hope you like it, I put it here for download:
https://codeberg.org/duckgo/animals_songs/releases

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

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

by Festus1965 » Post

empty, I see just the readme.txt ?
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

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

by duckgo » Post

Festus1965 wrote:
Sat Oct 29, 2022 01:09
empty, I see just the readme.txt ?
did you download " animals_edit.zip "?
, the files are inside it ;)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

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

by Festus1965 » Post

reload, and see them, even now in the old file
but the one I was looking for is not included - so nothing change for me
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
duckgo
Member
Posts: 205
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

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

by duckgo » Post

Festus1965 wrote:
Sat Oct 29, 2022 14:17
reload, and see them, even now in the old file
but the one I was looking for is not included - so nothing change for me
it's just the animal sounds, it's not a mod, they were just edited... :)

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

Update:

by TenPlus1 » Post

- 'looting_level' can be read from a tool's registered tool_capabilities to drop more items on mob death.
- 'looting_level' can also be read from a tool's metadata to override above setting.
- A max level of 3 is set for looting (you get number of drops + looting level, chance doesn't change).

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

Update:

by TenPlus1 » Post

- Replaced meatblock textures with licensed one's (not as pretty)
- Added raw meatblock which can be crafted with raw meat
- Raw meatblock can be cooked into meatblock (faster then induvidually)

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

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

by Liil » Post

I really love this API.

What I would like to have is an "flee by damage" option. If a mobs gets a defined amount of damage in a specific time of seconds, it flees.
Why this ability? Because you can guide monsters to a place where they cannot attack you (House, Tree top) but you can attack them. This makes it easy to kill also monsters with much HP. By adding the "flee by damage" function, they will flee, if they get a specific amount of damage in a specific time range. This allows the monsters to flee to a defined range of nodes, if heavily attacked.

Another thing I would really like would be swimming on water. Now it is possible to make mobs die in water, let them walk bouncy on water, or let them swim into fluids. But what I am missing is that mobs can elegant swim onto the surface of water, not jumping around.
cdb_xMf8awymgVmp

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

Request:

by TenPlus1 » Post

Can anyone remember who donated the mobs_monster sound effects for the mod ? I'm having trouble locating the license for them.

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: Request:

by wsor4035 » Post

TenPlus1 wrote:
Tue Dec 20, 2022 09:21
Can anyone remember who donated the mobs_monster sound effects for the mod ? I'm having trouble locating the license for them.
viewtopic.php?p=165803&sid=7501ac3f8bec ... 38#p165803 comment, looking up from there viewtopic.php?p=165613#p165613 would imply that they came from someone named Cyberpangolen - unfortunately the link seems broken, and the only other instance of that name i can find on the forums is the same person with the same message in carbone mobs
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

isaiah658
Member
Posts: 168
Joined: Sun Jan 24, 2016 14:58
Contact:

Re: Request:

by isaiah658 » Post

wsor4035 wrote:
Tue Dec 20, 2022 23:42
viewtopic.php?p=165803&sid=7501ac3f8bec ... 38#p165803 comment, looking up from there viewtopic.php?p=165613#p165613 would imply that they came from someone named Cyberpangolen - unfortunately the link seems broken, and the only other instance of that name i can find on the forums is the same person with the same message in carbone mobs
I'm thinking it was Cyberpangolin. Relevant forum topic. viewtopic.php?f=9&t=10798&p=165265#p165265

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

Update:

by TenPlus1 » Post

- Mobs Redo media freely licensed
- Mobs Animal media freely licensed
- Mobs Monster media freely licensed
- Mobs NPC media freely licensed
- Mob Horse media freely licensed

Apologies if any of your favourite skins were replaced, all mods should appear on ContentDB once more when approved.

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

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

by snoopy » Post

Hi,

I really love this API together with the affiliated mods.

@TenPlus1 - I highly value your family of mods and I admire your everlasting commitment to constant improvements. In particular I very much appreciate how your variants of forked mods are specifically aimed at MT servers. This is no easy task and quite an achievement.

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: Request:

by wsor4035 » Post

isaiah658 wrote:
Wed Dec 21, 2022 02:30
wsor4035 wrote:
Tue Dec 20, 2022 23:42
viewtopic.php?p=165803&sid=7501ac3f8bec ... 38#p165803 comment, looking up from there viewtopic.php?p=165613#p165613 would imply that they came from someone named Cyberpangolen - unfortunately the link seems broken, and the only other instance of that name i can find on the forums is the same person with the same message in carbone mobs
I'm thinking it was Cyberpangolin. Relevant forum topic. viewtopic.php?f=9&t=10798&p=165265#p165265
thanks for digging further into it. since the part of the url matches that one, makes sense
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

DeepT
New member
Posts: 3
Joined: Sun Jan 15, 2023 21:05
IRC: DeepThgt

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

by DeepT » Post

This may be a stupid question, but how are you supposed to spawn mobs from eggs?

specifically I have gull eggs (tamed) in mobs_sky, and also bats (tamed) from the same mod. How are you supposed to spawn mobs from these items?

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

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

by Festus1965 » Post

just drop them on ground ? ... right click ? I did it some time, but so easy that I have no special memory of some special code to do this, I just placed an egg like another node
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

DeepT
New member
Posts: 3
Joined: Sun Jan 15, 2023 21:05
IRC: DeepThgt

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

by DeepT » Post

at least with the ones i have that seems to do nothing, they wont place

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

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

by TenPlus1 » Post

@DeepT - Spawn eggs are hatched by right-clicking on any surface with them outwith another players protected area.

Note: Issue sorted!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 26 guests