smart mobs
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
smart mobs
Smart Mobs by rnd
License: LGPL
Depends: default
Download: https://github.com/ac-minetest/smart_mobs
Description
In an attempt to make more challenging mobs i added pathfinding to great Mobs Redo [1.26] by TenPlus1.
Note: this mod is far from being perfect since builtin pathfinding it uses doesnt seem to work that well, its rather enhancement to previously dumb mobs.
Added:
1. when mob follows you and gets stuck in one place, it will attempt to calculate path to you
2. if it cant do that and if digging option is on, it will attempt to break down wall or place stone block to climb to you. It will even remove one block above its head to do so so it can get to you from cellar. It will only do this if there is no protection around.
3. if it has path it will slow down to walk speed for more precision and follow path until it gets to you
mobs from spawner (blue box) coming around up stairs and killing players. Note that protector prevents them from building upwards or digging
they can and will find path to you, even if its more complex spiral staircase as in this example, where mobs find way from blue box below and already attack
I thank WSDGuy2014 for testing
License: LGPL
Depends: default
Download: https://github.com/ac-minetest/smart_mobs
Description
In an attempt to make more challenging mobs i added pathfinding to great Mobs Redo [1.26] by TenPlus1.
Note: this mod is far from being perfect since builtin pathfinding it uses doesnt seem to work that well, its rather enhancement to previously dumb mobs.
Added:
1. when mob follows you and gets stuck in one place, it will attempt to calculate path to you
2. if it cant do that and if digging option is on, it will attempt to break down wall or place stone block to climb to you. It will even remove one block above its head to do so so it can get to you from cellar. It will only do this if there is no protection around.
3. if it has path it will slow down to walk speed for more precision and follow path until it gets to you
mobs from spawner (blue box) coming around up stairs and killing players. Note that protector prevents them from building upwards or digging
they can and will find path to you, even if its more complex spiral staircase as in this example, where mobs find way from blue box below and already attack
I thank WSDGuy2014 for testing
- Attachments
-
- smart_mobs3.jpg (95.41 KiB) Viewed 1575 times
-
- smart_mobs2.jpg (149.37 KiB) Viewed 1575 times
Last edited by rnd on Tue Sep 13, 2016 13:06, edited 6 times in total.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
Re: smart mobs
A little buggy, but it'll make fighting mobs a lot harder!!
Re: smart mobs
Wow, ncicely done rnd :) love the new features... may I add this to mobs redo ?
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: smart mobs
Boom! my favourite topic! Excellent work on this RND, it is a must add to esmobs as well. Keep up the great work, this is a game changer for sure.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: smart mobs
Sure.TenPlus1 wrote:Wow, ncicely done rnd :) love the new features... may I add this to mobs redo ?
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
Re: smart mobs
What if say, dirt monsters placed dirt, sand monsters placed sand, Oerkkis placed Obsidian, etc?
Also:
Also:
Perhaps making so that if player is within a certain range, mobs will walk to player until within sight, which it will then chase player in the standard strait line.
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: smart mobs
https://www.youtube.com/watch?v=_nxiMBJ ... e=youtu.be
Some testing your pathfinding code with esmobs and excitement!
Some testing your pathfinding code with esmobs and excitement!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: smart mobs
Watched maikerumine's video and tried to improve what i could:
update:
1.Fixed bug where mob would go to player stand there and do nothing: when player is in attack range stop following path and reset stuck timer to 0 so attack can begin immidiately
2. mob will now drop one block above its head so it can now dig its way up from the cellar
3. make mob placed blocks temporary ( 30 s) to prevent map looking bad
4. prevent occasional block placing by requiring some time more than 1 second to pass in stuck state
unfixable problems ( due to minetest built in find_path)
- there is no setting in minetest.find_path to consider stuff like grass not solid
- there is no setting in find_path to consider path unpassable if there is not enough head space (2 block tall mob cant crawl through 1 block vertical hole) this in particular can sometimes cause mobs stuck under stairs
update:
1.Fixed bug where mob would go to player stand there and do nothing: when player is in attack range stop following path and reset stuck timer to 0 so attack can begin immidiately
2. mob will now drop one block above its head so it can now dig its way up from the cellar
3. make mob placed blocks temporary ( 30 s) to prevent map looking bad
4. prevent occasional block placing by requiring some time more than 1 second to pass in stuck state
unfixable problems ( due to minetest built in find_path)
- there is no setting in minetest.find_path to consider stuff like grass not solid
- there is no setting in find_path to consider path unpassable if there is not enough head space (2 block tall mob cant crawl through 1 block vertical hole) this in particular can sometimes cause mobs stuck under stairs
Last edited by rnd on Wed Feb 10, 2016 09:49, edited 2 times in total.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
-
- Member
- Posts: 1482
- Joined: Fri Apr 19, 2013 16:19
- GitHub: twoelk
- IRC: twoelk
- In-game: twoelk
- Location: northern Germany
Re: smart mobs
how about a pestering salesman or a beggar to add life to some medieval market.
I wonder if pickpockets would be possible.
I wonder if pickpockets would be possible.
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: smart mobs
update: careful rewrote of "mob trying to get to player" process, more responsive mobs, no more "frozen in state" mobs
mobs are now much more aggressive in trying to build/dig to get to you, they dont "daydream" or are "buggy" anymore
mobs are now much more aggressive in trying to build/dig to get to you, they dont "daydream" or are "buggy" anymore
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
Re: smart mobs
Hi Rnd
i got the error in init.lua error in the mod when i tryed in single player world
idk what to do can u plz help me
i got the error in init.lua error in the mod when i tryed in single player world
idk what to do can u plz help me
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: smart mobs
There is very little Rnd can do to help you if you don't post the full error text.snowflake wrote:Hi Rnd
i got the error in init.lua error in the mod when i tryed in single player world
idk what to do can u plz help me
This can be found at the end of your debug.txt file after a crash or mod error.
Avatar by :devnko-ennekappao:
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: smart mobs
indeed.snowflake wrote:Hi Rnd
i got the error in init.lua error in the mod when i tryed in single player world
idk what to do can u plz help me
Sno, please post in the code section the following file:
minetest/bin/debug.txt
BUT!!!!!!!!!!
Before you do, please do the following:
1. Open the debug.txt and delete everything and save.
2. Start minetest with the configuration that breaks for you.
3. Test it until error.
4. Go back to the fresh debug.txt and copy all the code and paste in the post according to the mod that errors. Please use the code button to place all that text.
5. Tell us about your computer with the information such as:
operating system: Linux, OSX, windoze, android, etc...
system specs: amount of ram you have, size of video card, processor speed and number of processors.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: smart mobs
update:
-randomized unstucker to prevent mobs from getting stuck near cliff edges on complex paths
-code tidying (main pathfind code now in separate function, by TenPlus1)
example of mob navigating complex path (successfuly)
note: it is best to set "walk_velocity = 2" for mobs, this ensures smooth navigation and is not too slow/too fast
-randomized unstucker to prevent mobs from getting stuck near cliff edges on complex paths
-code tidying (main pathfind code now in separate function, by TenPlus1)
example of mob navigating complex path (successfuly)
note: it is best to set "walk_velocity = 2" for mobs, this ensures smooth navigation and is not too slow/too fast
- Attachments
-
- mobs_navigating.jpg (131.73 KiB) Viewed 1575 times
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
-
- Member
- Posts: 4282
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: smart mobs
But...there ought to be friendly mobs as well! Those that just go to the player in order to say hello :-)rnd wrote: 1.Fixed bug where mob would go to player stand there and do nothing: when player is in attack range stop following path and reset stuck timer to 0 so attack can begin immidiately
A list of my mods can be found here.
- programmingchicken
- Member
- Posts: 540
- Joined: Sat Apr 18, 2015 02:20
- GitHub: pchicken
- IRC: chicken pchicken
- Location: not here
- Contact:
Re: smart mobs
yea +1Sokomine wrote:But...there ought to be friendly mobs as well! Those that just go to the player in order to say hello :-)rnd wrote: 1.Fixed bug where mob would go to player stand there and do nothing: when player is in attack range stop following path and reset stuck timer to 0 so attack can begin immidiately
Spoiler
lol the notorious necroposter pchicken is back mwahaha
<gamerdude> I apologize for the above content
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
- csirolli
- Member
- Posts: 133
- Joined: Mon Jan 15, 2018 21:46
- GitHub: HeyITGuyFixIt
- IRC: CSirolli
- In-game: CSirolli
- Location: Florida, USA
- Contact:
Re: smart mobs
So is there still a difference between mobs redo and this since tenplus1 added it to mobs redo?
Re: smart mobs
Mobs Redo API is more up to date and honors protection when using smart mob functions.
Who is online
Users browsing this forum: No registered users and 8 guests