[Mod] Mobs Redo [1.61] [mobs]

cuthbertdoublebarrel
Member
Posts: 348
Joined: Tue Apr 14, 2020 16:03
GitHub: cuthbert

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

by cuthbertdoublebarrel » Post

FreeGamers wrote:
Mon Jun 01, 2020 16:20
TenPlus1, can you help me understand why mobs are flashing and losing their textures momentarily when hit by players? I'm using the latest version. I created most of these mobs I'm using about a year ago. Something seems to have changed with the API since then? I went through the documentation and commit log but nothing jumped out at me what could be causing this.
noticing this in the game LOTT too .not sure if its an adaptation of latest version . the game has been recently updated
Project BrutalTest...hide your Petz

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

Re: Updated to Version 1.52

by acidzebra » Post

TenPlus1 wrote:
Sat May 16, 2020 09:47
- Added 'mob_active_limit' setting to limit number of mobs in-game (default is 0 for unlimited)
- Removed {immortal} group from mob armor so mobs flash when hit
- Added 'texture_mods' to add overlay textures onto mob (mob_horse uses this for horseshoes)
- The usual code tidy :)
bold this is why they flash I think - I kind of like it.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

Thanks, but I am still left with some confusion. In my game they kind of flash but the texture goes invisible and it will show a random texture usually.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

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

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

by TenPlus1 » Post

@FreeGamers - The mob api previously used the {immortal} tag in armor so when hit nothing would happen, it was all api controlled but lately I removed this for the mobs own on_punch function which handles custom damage but they now flash to show damage.

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

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

by wziard » Post

[deleted bugreport]

nevermind. I was running mobs_redo from another directory than I thought I was...

StaticCurrent
New member
Posts: 4
Joined: Wed Dec 25, 2019 01:31
GitHub: Johnnyreyman
IRC: StaticCurrent
In-game: StaticCurrentGL
Contact:

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

by StaticCurrent » Post

Hey, Had an issue when trying to install Mobs_monster mod on my survival server. My server would always crash a few seconds in. I have mobs redo installed and this is the resulting errors I am getting:
2020-06-17 04:33:40: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_monster' in callback luaentity_Step(): /home/minetest/.minetest/mods/mobs/api.lua:838: bad argument #1 to 'sin' (number expected, got nil)

2020-06-17 04:33:40: ERROR[Main]: stack traceback:

2020-06-17 04:33:40: ERROR[Main]: [C]: in function 'sin'

2020-06-17 04:33:40: ERROR[Main]: /home/minetest/.minetest/mods/mobs/api.lua:838: in function 'is_at_cliff'

2020-06-17 04:33:40: ERROR[Main]: /home/minetest/.minetest/mods/mobs/api.lua:2107: in function 'do_states'

2020-06-17 04:33:40: ERROR[Main]: /home/minetest/.minetest/mods/mobs/api.lua:3249: in function </home/minetest/.minetest/mods/mobs/api.lua:3104>

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

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

by TenPlus1 » Post

@StaticCurrent - Going by the line number the error is on, you are using an older mob api, please update to latest version either from my git page or contentdb.

User avatar
MirceaKitsune
Member
Posts: 939
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

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

by MirceaKitsune » Post

It's so nice to see a mob mod that's simple, offers just the right features, and is actively still in development. Gave it a try in the MineClone game and I love the functionality!

Wanted to ask one question for the time being... which if false you can take as a feature request if you'd like. Do mobs use realistic factor checks to detect and attack players? What I mean is:
  • Do they have a field of view (virtual cone) for spotting targets, or is anything within range automatically seen?
  • Is there an additional raytrace test for targets, or do mobs see targets through walls?
  • Does the light value of the target's location affect the mob's ability to see it, so hiding in the shadows can make the player harder to spot? Though I know we aren't making a stealth game, this can be a very fun little addition!
  • Do mobs hear sounds, so even if the player is out of their FOV or hidden behind a wall, they can still detect you if you jump or walk or dig or take damage out loud?

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

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

by TenPlus1 » Post

@MirceaKitsune - The mobs api doesn't use fov, light vision or hear sounds and only uses the new raycast for line of sight when attacking player, not to say that these couldn't be added within the api itself or as a custom function for certain mobs :)

The api.txt shows what can be done using some imagination and the mobs themselves hold specific features like spiders climbing walls, lava flan becoming obsidian monsters if they die in water etc. and as always, ideas and pull requests are more than welcome to improve the mod or mob packs :)

https://notabug.org/TenPlus1/mobs_redo/ ... er/api.txt

User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

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

by BlockStar » Post

Hi,

I'm trying to understand the mob spawner. I'm using nssm and I want it to spawn in the mob named mordain, so I used "nssm:mordain 10 15 0 0" and waited a while, nothing happened. Then I tried "nssm:mobs/mordain 10 15 0 0" (because the file mordain.lua is actually in a subfolder called "mobs"), waited, still nothing. Also, I don't know what the four numbers at the end mean. Couldn't find an explanation anywhere, so if someone could explain it (or link a page that explains it), I'd really appreciate it.

Thanks!

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

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

by TenPlus1 » Post

The spawner example sets number to 0 so it doesn't start spawning straight away, the format is as follows:

<mob name> <min light> <max light> <mobs in area> <player distance [0 to disable]> <y offset>

nssm:mordain 10 15 1 0 1

User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

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

by BlockStar » Post

Thanks for that information. Is there a file or web page somewhere with basic instructions like that? I googled it and searched the forums before asking, and couldn't seem to track that information down.

Also, another question: non-aggroed mobs despawn when you quit the game. So if a hostile mob is in your way, all the player has to do is quit and restart to get rid of mob. Is there a way to change this?

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

TenPlus1 wrote:
Tue Jun 02, 2020 05:17
@FreeGamers - The mob api previously used the {immortal} tag in armor so when hit nothing would happen, it was all api controlled but lately I removed this for the mobs own on_punch function which handles custom damage but they now flash to show damage.
I don't see a flash effect though. All mobs turn invisible or grab a random texture temporarily for the flash texture (usually a texture in the vicinity) and it is really weird. Am I the only one seeing this? I'm on Minetest 5.2.0 and have not modified mobs_redo api.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

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

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

by TenPlus1 » Post

@FreeGamers - The default entity when hit flashes white when damaged, I don't know why you see a random texture ?!

@BlockStar - Mobs Redo has an api.txt file which shows all of the settings and how to use them, also mobs that aren't tamed despawn when the area is unloaded, this can be disabled with the 'remove_far_mobs' setting so they stick around but have a lifetimer instead :)

https://notabug.org/TenPlus1/mobs_redo/ ... er/api.txt

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

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

by Nathan.S » Post

FreeGamers you are not alone, I get the same problem when mobs take damage. Using the latest code for Mobs_redo and Minetest 5.2. Interestingly if I use a daily build the problem doesn't seem to exist.
<img>download/file.php?mode=view&id=22155&si ... 7d2b2</img>
Attachments
mobs_damage_flash.png
mobs_damage_flash.png (203.41 KiB) Viewed 1032 times
Last edited by Nathan.S on Mon Jun 22, 2020 16:09, edited 1 time in total.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

So the mob flashing a random texture seems to be a 5.2.0 bug with mobs_redo? Strange. That would correlate roughly to when I started seeing this.
I never saw this issue on 5.2.0-dev with an older version of mobs_redo that did not have flashing.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

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

Updated:

by TenPlus1 » Post

- Added mobs:add_mob() function to properly add a mob into the world with checks and counter.
- Mobs_Monster updated which has new Obsidian Flan that spawns when Lava Flan dies in water.

@FreeGamers - The {immortal} flag stopped the flashing before which was removed so that mobs could have proper armor and damage for things like fire, fleshy, cracky tools etc.

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

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

by Linuxdirk » Post

With Minetest 5.2.0 (and Minetest Game) and mob mods of previous Git version this happened when a dungeon master shot a fireball.

Code: Select all

2020-06-21 21:23:25: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_monster' in callback luaentity_Step(): Unknown node: tnt:tnt
2020-06-21 21:23:25: ERROR[Main]: stack traceback:
2020-06-21 21:23:25: ERROR[Main]: 	[C]: in function 'get_content_id'
2020-06-21 21:23:25: ERROR[Main]: 	/usr/share/minetest/games/minetest/mods/tnt/init.lua:295: in function 'tnt_explode'
2020-06-21 21:23:25: ERROR[Main]: 	/usr/share/minetest/games/minetest/mods/tnt/init.lua:410: in function 'boom'
2020-06-21 21:23:25: ERROR[Main]: 	/home/dirk/.minetest/mods/mobs_redo/api.lua:4021: in function 'boom'
2020-06-21 21:23:25: ERROR[Main]: 	/home/dirk/.minetest/mods/mobs_monster/dungeon_master.lua:137: in function 'hit_node'
2020-06-21 21:23:25: ERROR[Main]: 	/home/dirk/.minetest/mods/mobs_redo/api.lua:3925: in function </home/dirk/.minetest/mods/mobs_redo/api.lua:3891>
2020-06-21 21:23:25: ACTION[Server]: Linuxdirk leaves game. List of players: 
2020-06-21 21:23:25: ACTION[Main]: Server: Shutting down
Any idea what combination of mods could cause that?

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

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

by TenPlus1 » Post

this is an error in tnt mod with content id's that was fixed in 5.3dev, or you can use my version of tnt mod to override default:

https://notabug.org/TenPlus1/tnt

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

its good to know what was causing this.
I updated my game to use your tnt mod until 5.3.0

Tested mobs_redo with tnt (tenplus1) branch and the texture glitch is resolved.

Thanks
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

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

by Linuxdirk » Post

TenPlus1 wrote:
Tue Jun 23, 2020 14:22
this is an error in tnt mod with content id's that was fixed in 5.3dev
Good to know, thanks! I keep the Dungeon Master disabled till 5.3 will be released (RC2 was released already so it should not take too long *g*). Are there any benefits using your TNT mod (better explosion mechanics, better performance, etc.), or is it just a bugfixed version?

Another issue (same version as described). Hitting mobs changes their textures to seemingly random ones for that hit (returns back to correct texture right after hitting the mobs).

Image

Gallery using the Mese Monster as example: https://imgur.com/a/4ub50D7

Seems to happen with all mobs.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

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

by FreeGamers » Post

I might have spoken too soon. I'm still seeing this with the TNT mod. I'll get more data and respond later. Sorry.

EDIT: Just tested again. Your version of it is definitely not resolving it for me. I'll wait until 5.3.0 if needed. Either way good to nail down what this issue is.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

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

by BlockStar » Post

Hello,

Rather than just moving around randomly, I'm trying to have a mob walk to a specific coordinate, wait a few seconds, then walk to a second coordinate, waits a few seconds, repeat. The kind of thing you see guards do in stealth games.

I couldn't really find anything in api.txt that seemed to address this. It does appear to be addressed in mobkit's api, with

Code: Select all

function mobkit.goto_next_waypoint(self,tpos)
and

Code: Select all

function mobkit.lq_turn2pos(self,tpos)
and

Code: Select all

function mobkit.lq_idle(self,duration)
but I was kind of hoping to use mobs redo, and I don't think I can really use them both at the same time (right?).

So... is there a way to do this with mobs redo?

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

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

by TenPlus1 » Post

We have a do_custom function that can be used for this, the variable self.path.way holds the positions for any pathfinding when pathfinding=1 is set and the mob is attacking, also turn_to_pos() can be used but timers can easily be setup in the custom function using self.pause_timer ... I'll look into making it easier to control mob movements in the api...

There are also settings for the stay_near variable to have mobs move towards certain blocks like hay or grass for animals, or signs/doors for npc's etc.

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

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

by TenPlus1 » Post

@BlockStar - This is a quick example for a do_custom function to handle pathfinding:

Code: Select all

do_custom = function(self, dtime)

	-- set positions
	local pos1 = self.object:get_pos() -- mob
	local pos2 = ??? -- what you want to follow

	-- if no path set then setup mob
	if not self.path or not self.path.way then
		self.pathfinding = 1 -- just incase it's not set in mobdef
		self.walk_velocity = 0.5 -- sneaky speed :)
	end

	-- call pathfinding function to control player movement
	if self.pathfinding then
		local dist = get_distance(pos1, pos2)
		if dist > 1 then
			self:smart_mobs(pos1, pos2, dist, dtime)
		else
			self.pathfinding = nil -- if no longer needed
			self.walk_velocity = 1.0 -- back to norm when goal reached
		end
	end

end)

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests