[Mod] Mobs Redo [1.55] [mobs]

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

Looks like line 64 is trying to call 'effect' function which isn't defined locally inside the .lua file, so here ya go, put this at very top:

Code: Select all

local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)

	radius = radius or 2
	min_size = min_size or 0.5
	max_size = max_size or 1
	gravity = gravity or -10
	glow = glow or 0

	minetest.add_particlespawner({
		amount = amount,
		time = 0.25,
		minpos = pos,
		maxpos = pos,
		minvel = {x = -radius, y = -radius, z = -radius},
		maxvel = {x = radius, y = radius, z = radius},
		minacc = {x = 0, y = gravity, z = 0},
		maxacc = {x = -20, y = gravity, z = 15},
		minexptime = 0.1,
		maxexptime = 1,
		minsize = min_size,
		maxsize = max_size,
		texture = texture,
		glow = glow,
	})
end

User avatar
thunderdog1138
Member
Posts: 66
Joined: Sun Dec 08, 2019 00:45
GitHub: thunderdog1138
In-game: thunderdog
Location: Venator-class Star Destroyer in the Xanadu System

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

by thunderdog1138 » Post

Thanks. However, I looked into the code and found that I don't need the on_die function for this mob.
Check out my Star Wars subgame.

User avatar
Wuzzy
Member
Posts: 4142
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Why do all mobs have the immortal=1 group set?

I know that mobs have their own health attribute, but why?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

the mobs api deals with all damage for mobs and the immortal group is needed for special features to work properly.

User avatar
Walker
Member
Posts: 1174
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

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

by Walker » Post

my server crash with

Code: Select all

2020-04-01 09:50:18: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_animal' in callback luaentity_Step(): ...a/sda3/Minetest/server0/.minetest/mods/mobs_redo/api.lua:2520: attempt to index local 'v' (a nil value)
2020-04-01 09:50:18: ERROR[Main]: stack traceback:
2020-04-01 09:50:18: ERROR[Main]: 	...a/sda3/Minetest/server0/.minetest/mods/mobs_redo/api.lua:2520: in function 'falling'
2020-04-01 09:50:18: ERROR[Main]: 	...a/sda3/Minetest/server0/.minetest/mods/mobs_redo/api.lua:3145: in function <...a/sda3/Minetest/server0/.minetest/mods/mobs_redo/api.lua:3095>
stats and versions:
Server: German-Carpathian-server
Minetest: 5.2.0-dev-9953145a
mobs_redo: 1.50

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

@Walker, the line error in question is wrong, could you try using the latest mobs redo from notabug.org/tenplus1

Nordal
Member
Posts: 125
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall
Location: Germany

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

by Nordal » Post

@Nordal - Mob_Horse has been updated and applying horse shoes will now show an overlay on the feet of the horses :)

Note: You have to right-click shoes onto a horse now :)
@TenPlus1, cool! Thanks a lot for this fast implementation of this feature. The shoes look funny and cool. If shoed horses make a litte horse, it has shoes, too. I have not yet found out, if it inherits the shoes from mother or father. :-) Thank you!

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

Ooh, that'll be a texture glitch, the shoes will not be applied though :) Will check and fix...

oscar14
Member
Posts: 50
Joined: Sat Dec 26, 2015 17:40
GitHub: camus14

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

by oscar14 » Post

I'm using minetest 5.1.0 and the latest version of mobs_redo:

1) When I punch a mob with a weapon/tool it doesn't add any wear to the weapon/tool.

2) Mobs can't hit me in the snow (walkable snow, 0.25 of high).

Is this normal?

I'm not using any other mod that can cause conflict. I'm testing with the zombie mob and with my own mobs.

User avatar
Walker
Member
Posts: 1174
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

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

by Walker » Post

TenPlus1 wrote:@Walker, the line error in question is wrong, could you try using the latest mobs redo from notabug.org/tenplus1

Code: Select all

2020-04-06 17:07:30: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_animal' in callback luaentity_Step(): ...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:2538: attempt to index local 'v' (a nil value)
2020-04-06 17:07:30: ERROR[Main]: stack traceback:
2020-04-06 17:07:30: ERROR[Main]: 	...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:2538: in function 'falling'
2020-04-06 17:07:30: ERROR[Main]: 	...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:3166: in function <...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:3113>
> 2538

minetest version = 5.2.0 ( stable )
mobs_redo version = from 2020-04-06 ( git "9c60e96336" )

but ...

i think "610cef16f4" fix it

User avatar
Walker
Member
Posts: 1174
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

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

by Walker » Post

Walker wrote:[...]but ...

i think "610cef16f4" fix it
no ... crash again -.-

same error message

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Updated...

by TenPlus1 » Post

@Walker - Added some more sanity checks to the API.

User avatar
Walker
Member
Posts: 1174
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

Re: Updated...

by Walker » Post

TenPlus1 wrote:@Walker - Added some more sanity checks to the API.
thanks i will try it

User avatar
Walker
Member
Posts: 1174
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

Re: Updated...

by Walker » Post

Walker wrote:
TenPlus1 wrote:@Walker - Added some more sanity checks to the API.
thanks i will try it
YAY it seems to be working ^^
if there are further problems I will get in touch;)

User avatar
Walker
Member
Posts: 1174
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

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

by Walker » Post

aaaaand a new error ^^

sorry ;(

Code: Select all

2020-04-09 12:43:57: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_animal' in callback luaentity_Step(): ...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:1022: bad argument #1 to 'sin' (number expected, got nil)
2020-04-09 12:43:57: ERROR[Main]: stack traceback:
2020-04-09 12:43:57: ERROR[Main]: 	[C]: in function 'sin'
2020-04-09 12:43:57: ERROR[Main]: 	...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:1022: in function 'do_jump'
2020-04-09 12:43:57: ERROR[Main]: 	...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:3271: in function <...a/sda3/Minetest/server3/.minetest/mods/mobs_redo/api.lua:3116>

User avatar
Codesound
Member
Posts: 334
Joined: Thu Jun 09, 2016 14:56

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

by Codesound » Post

Minetest 5.2

Hi,

when right click with the mouse on the turtle, minetest crashes...

Code: Select all

AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_turtles' in callback luaentity_run_simple_callback(): ...odesound/.minetest/mods/mobs_water/mobs_turtles/init.lua:54: attempt to call global 'set_velocity' (a nil value)
stack traceback:
	...odesound/.minetest/mods/mobs_water/mobs_turtles/init.lua:54: in function <...odesound/.minetest/mods/mobs_water/mobs_turtles/init.lua:52>

Nordal
Member
Posts: 125
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall
Location: Germany

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

by Nordal » Post

I changed to 5.2.0 and got this Error:

Code: Select all

AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_monster' in callback luaentity_Step(): ...land/minetest-dev/minetest/bin/../mods/mobs_redo/api.lua:2520: attempt to index local 'v' (a nil value)
stack traceback:
	...land/minetest-dev/minetest/bin/../mods/mobs_redo/api.lua:2520: in function 'falling'
	...land/minetest-dev/minetest/bin/../mods/mobs_redo/api.lua:3145: in function <...land/minetest-dev/minetest/bin/../mods/mobs_redo/api.lua:3095>
Because of Wlker's troubles I exchanged mobs_redo with the latest version, but experience these messages now:

Code: Select all

2020-04-10 08:54:28: ERROR[Main]: The following mods could not be found: "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_birds" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_butterfly" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_crocs" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_fish" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_jellyfish" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_sharks" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_turtles" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mob_horse" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_animal" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_bat" has unsatisfied dependencies:  "mobs"
2020-04-10 08:54:28: ERROR[Main]: mod "mobs_monster" has unsatisfied dependencies:  "mobs"
...
2020-04-10 08:54:42: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:bee" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_monster:stone_monster" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:sheep_white" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:chicken" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:sheep_white" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:sheep_white" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:sheep_white" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:sheep_white" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_bat:bat" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_turtles:turtle" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:sheep_white" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_animal:sheep_white" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_monster:oerkki" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_wolf:wolf" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_wolf:wolf" not defined
2020-04-10 08:54:45: ERROR[Server]: LuaEntity name "mobs_bat:bat" not defined
2020-04-10 08:55:24: ACTION[Main]: Server: Shutting down
Do you have an idea, what happens? Other mods load without problems.

Nordal
Member
Posts: 125
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall
Location: Germany

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

by Nordal » Post

Everything seems to work! My fault!

EDIT: Oh, Error

Code: Select all

2020-04-10 21:10:28: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_monster' in callback luaentity_Step(): ...inetest-dev/minetest/bin/../mods/mobs_monster/spider.lua:8: attempt to index local 'v' (a nil value)
2020-04-10 21:10:28: ERROR[Main]: stack traceback:
2020-04-10 21:10:28: ERROR[Main]: 	...inetest-dev/minetest/bin/../mods/mobs_monster/spider.lua:8: in function 'get_velocity'
2020-04-10 21:10:28: ERROR[Main]: 	...inetest-dev/minetest/bin/../mods/mobs_monster/spider.lua:114: in function 'do_custom'
2020-04-10 21:10:28: ERROR[Main]: 	...land/minetest-dev/minetest/bin/../mods/mobs_redo/api.lua:3221: in function <...land/minetest-dev/minetest/bin/../mods/mobs_redo/api.lua:3116>

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

Quick note, mobs_water and mobs_sky were redone to fix many errors and posted on my notabug.org/tenplus1 mod page incase anyone is still using the oldder versions with issues.

@Nordal - A few more sanity checks have been added, turns out there's an issue with minetest SAO's that is causing these errors so it's not all mobs' fault :) https://github.com/minetest/minetest/issues/9528

User avatar
Walker
Member
Posts: 1174
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

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

by Walker » Post

TenPlus1 wrote:[...], turns out there's an issue with minetest SAO's that is causing these errors so it's not all mobs' fault :) https://github.com/minetest/minetest/issues/9528
minetest 5.2.1 is coming xD
i hope quickly ^^

Nordal
Member
Posts: 125
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall
Location: Germany

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

by Nordal » Post

@Nordal - A few more sanity checks have been added, turns out there's an issue with minetest SAO's that is causing these errors so it's not all mobs' fault :) https://github.com/minetest/minetest/issues/9528
I didn't really believe that :) First I forgot to delete the subfolder "mobs_redo" and paste the files into the mobs_redo folder up. The panic posting reflex was faster than me. :)

After the AsyncError and the crash I suspected changes in the new minetest version to be primarily responsible. Thank you for the link!

Adnunano
Member
Posts: 42
Joined: Thu Feb 13, 2020 09:28

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

by Adnunano » Post

TenPlus1 wrote:Quick note, mobs_water and mobs_sky were redone to fix many errors and posted on my notabug.org/tenplus1 mod page incase anyone is still using the oldder versions with issues.
They had already been fixed and modified by other forks.Have you checked them before fixing the bugs?
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

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

by acidzebra » Post

Working on some mobs, I see in the API

'stay_near' when set allows mobs the chance to stay around certain nodes.
'runaway_from' contains a table with mob names/player to run away from

I have two suggestions:
1. the opposite of 'stay_near', so 'avoid_node' (effectively 'runaway_from' for certain blocks instead of other mobs)
2. 'avoid_light_level' or something to make mobs smarter about avoiding light if they are the type to take damage from light sources. If a mob takes damage from light level 8 and they move into with that light level coming from a node with lower light, they should turn around and go back to the previous node.

Hope that makes sense and is feasible :)

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

by TenPlus1 » Post

removeme
Last edited by TenPlus1 on Sun Apr 12, 2020 11:20, edited 1 time in total.

User avatar
TenPlus1
Member
Posts: 2964
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Update...

by TenPlus1 » Post

- Re-enabled raycasting for line_of_sight when using minetest 5.x
- Added some sanity checks to api for SAO issue checking

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 8 guests