[Mod] Mobs Redo [1.63] [mobs]

SFENCE
Member
Posts: 324
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

TenPlus1 wrote:
Mon Nov 17, 2025 16:15
@SFENCE - So effectively randomizing the attack time, speed and damage ?

The self.arrow_override() is checked for every single arrow so that if the function inside the mob is changed, the arrows change too e.g.

https://codeberg.org/tenplus1/mobs_mons ... onster.lua
Precisely, I would like to randomize the direction of the arrow. For it, I need the ability to control all speed/velocity axes somehow.

Thanks for the punch_interval integration.
cdb_3P0AYqjEIn68

User avatar
Nininik
Member
Posts: 955
Joined: Thu Apr 06, 2023 01:55
GitHub: nininik0
IRC: nininik
In-game: nininik
Location: CA, Team thunderstrike headquarters
Contact:

Re: Update:

by Nininik » Post

TenPlus1 wrote:
Mon Nov 17, 2025 09:19
- Add Spanish translation to Mob_Horse.
- Set animation to "stand" when dismounting.

@Nininik - If you need further examples to ride a mob check out Mob Horse.

https://codeberg.org/tenplus1/mob_horse ... r/init.lua
Dosent say anything about flying mobs
↯Glory to Team Thunderstrike!↯
↯T.T.S.↯

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

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

by TenPlus1 » Post

@SFENCE - Currently the only arrow movement flag is setting 'homing' to true in mob definition so it follows the player when in sight. I'll need to have a good think about alternative flags for controlling arrow movement and offset.

@Nininik - The mobs:drive on line:81 can be changed to mobs.drive(self, "walk", "stand", true, dtime) so that jumping makes you fly upwards and sneak makes you fly downwards.

SFENCE
Member
Posts: 324
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

TenPlus1 wrote:
Mon Nov 17, 2025 18:05
@SFENCE - Currently the only arrow movement flag is setting 'homing' to true in mob definition so it follows the player when in sight. I'll need to have a good think about alternative flags for controlling arrow movement and offset.
Sure. My attempt now is to add some kind of imprecision to arrow.

So something like:

Code: Select all

function on_projectile_fired(obj)
    local vel = obj:get_velocity()
    local speed = vector.length(vel)
    local rot = {
        x = math.random() * math.pi * imprecision_coef, 
        y = math.random() * math.pi * imprecision_coef, 
        z = 0, 
    }

    local new_dir = vector.rotate(vector.normalize(vel), rot)

    obj:set_velocity(vector.multiply(new_dir, speed))
 end
cdb_3P0AYqjEIn68

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

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

by TenPlus1 » Post

@SFENCE - We can already use arrow_override to do this e.g.

Code: Select all

arrow_override = function(self)
	self.velocity = 6
	self.damage = 3

	core.after(0.1, function(self) -- wait a fraction for arrow to begin then change direction

		if not obj then return end -- just to be sure it's still there
		local vel = self.object:get_velocity()
		local imprecision_coef = 0.1
		local speed = vector.length(vel)
		local rot = {
			x = math.random() * math.pi * imprecision_coef, 
			y = math.random() * math.pi * imprecision_coef, 
			z = 0, 
		}

		local new_dir = vector.rotate(vector.normalize(vel), rot)

		self.object:set_velocity(vector.multiply(new_dir, speed))

	end, self)
end

User avatar
Nininik
Member
Posts: 955
Joined: Thu Apr 06, 2023 01:55
GitHub: nininik0
IRC: nininik
In-game: nininik
Location: CA, Team thunderstrike headquarters
Contact:

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

by Nininik » Post

jara25 wrote:
Mon Nov 17, 2025 06:26
Well, the function signature is this:

Code: Select all

mobs.drive(self, move_animation, stand_animation, can_fly, dtime)
...so I think this should work:

Code: Select all

mobs.drive(self, "fly", "stand", true, dtime)
This should replace the mobs.fly call entirely. It's untested, but let me know if it works out.
Yes it successfully worked 🥳
↯Glory to Team Thunderstrike!↯
↯T.T.S.↯

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

Update:

by TenPlus1 » Post

- Increase DM fireball damage to 2.

SFENCE
Member
Posts: 324
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

@TenPlus1:

Thanks for the tip. Looks to be a little hacky, but it looks to be working well.
cdb_3P0AYqjEIn68

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

Update:

by TenPlus1 » Post

- Fish in mobs_water now flop towards nearby water when on land.

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

Update:

by TenPlus1 » Post

- Add 'can_spawn_protect' flag to mobs:register_egg so that certain mobs can be spawned inside protected areas.
- Set above setting to True for mob_horse so players can spawn their horses in protected areas to ride.

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

Update:

by TenPlus1 » Post

- Dont attack if dead or running away.

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

Update:

by TenPlus1 » Post

- Tweak pathfinding.

User avatar
Don
Member
Posts: 1893
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

I got this message. I have Luanti 5.14.0. Let me know if you need any more info from me.

Code: Select all

AsyncErr: Lua: Runtime error from mod 'pmobs' in callback luaentity_Step(): "Invalid vector (expected table got number)."
stack traceback:
	[C]: in function 'punch'
	/home/serfdon/.minetest/mods/pmobs/ninja.lua:73: in function 'hit_mob'
	/home/serfdon/.minetest/mods/mobs/api.lua:3892: in function </home/serfdon/.minetest/mods/mobs/api.lua:3810>
Last edited by Blockhead on Sat Jan 17, 2026 01:35, edited 1 time in total.
Reason: icode->code
My mods on ContentDB. My profile on the forum. Over 50 000 Downloads!

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

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

by TenPlus1 » Post

@Don - Just to check, are you using the updated pmobs mod from my git page ? The error doesnt match up with the line numbers ?

https://codeberg.org/tenplus1/pmobs

User avatar
Don
Member
Posts: 1893
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

TenPlus1 wrote:
Sat Jan 17, 2026 07:43
@Don - Just to check, are you using the updated pmobs mod from my git page ? The error doesnt match up with the line numbers ?

https://codeberg.org/tenplus1/pmobs
I used the link from the spoiler list on the original post.
My mods on ContentDB. My profile on the forum. Over 50 000 Downloads!

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

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

by TenPlus1 » Post

Sadly that mod hasn't been updated in the longest time and the very last post in the thread links to the reworked version on my git page.

User avatar
Don
Member
Posts: 1893
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

TenPlus1 wrote:
Sat Jan 17, 2026 12:46
Sadly that mod hasn't been updated in the longest time and the very last post in the thread links to the reworked version on my git page.
I see the issue now. I got the latest now and they work. You need to update the links i the original post.
My mods on ContentDB. My profile on the forum. Over 50 000 Downloads!

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

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

by TenPlus1 » Post

The original post isnt mine to update unfortunately, I could only add a new link as the last post.

User avatar
Don
Member
Posts: 1893
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

TenPlus1 wrote:
Sat Jan 17, 2026 15:43
The original post isnt mine to update unfortunately, I could only add a new link as the last post.
Can't they give the thread to you? You are the mob man. Or you could start a new thread for it.
My mods on ContentDB. My profile on the forum. Over 50 000 Downloads!

User avatar
Blockhead
Moderator
Posts: 2991
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

Don wrote:
Sat Jan 17, 2026 17:57
TenPlus1 wrote:
Sat Jan 17, 2026 15:43
The original post isnt mine to update unfortunately, I could only add a new link as the last post.
Can't they give the thread to you? You are the mob man. Or you could start a new thread for it.
As a forum mod, it would depend on if TenPlus1 forked pmobs or is considered the successor maintainer to CProgrammerRu. If it's a fork, I'd rather TenPlus1 starts a new thread and we move the old one to Old Mods.

Thread in question for reference
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

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

Update:

by TenPlus1 » Post

- Add {food=[1=other,2=food,3=drink]} group to food items for further mod support.
- Add mobs:scale_mob() function.
- Tidy API

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

Update:

by TenPlus1 » Post

- Add protection check to mobs:boom()
- Add missing return statement when stopping attack.
- Lower Panda attack chance.

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

Update:

by TenPlus1 » Post

- Mob sounds can now be both strings or sound tables e.g. {name = "mobs_cow", pitch = 1.2, gain = 2}
- Fix initial baby spawn size.

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

Update:

by TenPlus1 » Post

- Fixed mob sounds (thanks Rage87)
- Add nil check to tag updates (thanks Monk-AFK)
- Add gravel drop to stone monster.

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

Update:

by TenPlus1 » Post

- Mob Horse has new sound effects added.
- Added BB lucky block to mobs_npc.

Happy Chinese New Year All!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests