[Mod] Simple Mobs [mobs]

User avatar
AndrOn
Member
 
Posts: 38
Joined: Fri May 31, 2013 22:32

by AndrOn » Thu Jul 25, 2013 15:15

I can't get the sheep to follow me! I do my best, and I checked the code and it seems to work but it doesn't in game.
sorry for bad english
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Thu Jul 25, 2013 15:40

Andr0n, you need farming:wheat for a sheep to follow you. Or you are using an old version of simple mobs.
Last edited by Jordach on Thu Jul 25, 2013 15:41, edited 1 time in total.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Thu Jul 25, 2013 21:44

VERY GOOD!!

For more impossible it is, try to make the mods do not lock the server!
I feel that lack a monster that throws something on the player. but one mobs that walk the earth
STILL MISSING A GOOD MOD THAT ADDS WEAPONS OR BOW ARROW
Last edited by BrunoMine on Thu Jul 25, 2013 21:46, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11

by Josh » Fri Jul 26, 2013 04:51

PilzAdam, I have adopted a pet Sheep named Alexander, He is doing very well, i even made a cage for him! But he has something to say: https://dl.dropboxusercontent.com/u/102401091/screenshot_424355542.png
It would be really great if you did, if you did, it would get him out of the cage :-)
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Fri Jul 26, 2013 12:58

How do I cancel a mob? I want to remove the mob and desert rats.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Jul 26, 2013 13:04

brunob.santos wrote:How do I cancel a mob? I want to remove the mob and desert rats.

Does this help: https://forum.minetest.net/viewtopic.php?pid=62292#p62292?
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Sat Jul 27, 2013 00:29

I wrote these two lines in the file but nothing changed minetest
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mobs.spawning_mobs["mobs:sand_monster"]=false
mobs.spawning_mobs["mobs:rat"]=false
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Jul 27, 2013 00:37

brunob.santos wrote:I wrote these two lines in the file but nothing changed minetest
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mobs.spawning_mobs["mobs:sand_monster"]=false
mobs.spawning_mobs["mobs:rat"]=false

Have you added them at the end of init.lua?
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11

by Josh » Sun Jul 28, 2013 02:58

 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Tue Jul 30, 2013 21:01

I'm working on a snowman, and I have a couple questions/confirmations about the API.
"chance" means for every block/node the mob could spawn on, it has a 1/chance probability of doing so? would that be every second?
"animation" is used for speeding up/slowing down walk cycles when the mob's speed changes (e.g. in pursuit of a player)?
I'm not entirely sure what "active_object_count" does.
a "max height" of 0 is at sea level?
why do most min_light values use -1 instead of 0 as total darkness?

unrelated: still can't figure out how to feed wheat to a sheep.

I've got him saying "Welcome to the Himalayas!" (monsters inc) randomly, but I was wondering if it could be based off chance instead? because random has him saying it WAYYYYYY To often. Better yet, play it when the mob notices a player and begins pursuit.
Would that be as simple as adding
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
            if self.sounds and self.sounds.follow then
                minetest.sound_play(self.sounds.follow, {object = self.object})
            end

into the API under
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
            if self.follow ~= "" and not self.following then
                for _,player in pairs(minetest.get_connected_players()) do
                    local s = self.object:getpos()
                    local p = player:getpos()
                    local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
                    if self.view_range and dist < self.view_range then
                        self.following = player
                    end
                end
            end

and if so, where? if not, what else? It'd be nice to add a sound mode for noticing you. E.g. a sheep baaing complacently when being led on by wheat, a cave monster growling at you.
Last edited by ak399g on Tue Jul 30, 2013 21:38, edited 1 time in total.
aka SAFR
 

User avatar
Mossmanikin
Member
 
Posts: 599
Joined: Sun May 19, 2013 16:26

by Mossmanikin » Tue Jul 30, 2013 21:45

ak399g wrote:"chance" means for every block/node the mob could spawn on, it has a 1/chance probability of doing so? would that be every second?


"chance" means indeed there's a 1/chance probability.
"interval = 30" means this is checked every 30 seconds.

About the rest I'm not entirely sure.

Noob 4 life!
My stuff
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Jul 30, 2013 21:47

ak399g wrote:"chance" means for every block/node the mob could spawn on, it has a 1/chance probability of doing so? would that be every second?

It would be every second if "chance" is 2, every third if "chance" is 3, etc.
ak399g wrote:"animation" is used for speeding up/slowing down walk cycles when the mob's speed changes (e.g. in pursuit of a player)?

No, animation is just the animation of the model, it has nothing to do with velocity.
ak399g wrote:I'm not entirely sure what "active_object_count" does.

Its the number of objects in the mapblock and the surrounding mapblocks. So its possible to limit the number of mobs per mapblock.
ak399g wrote:a "max height" of 0 is at sea level?

Yes.
ak399g wrote:why do most min_light values use -1 instead of 0 as total darkness?

To make it clear that it doesnt matter how dark it is.
ak399g wrote:I've got him saying "Welcome to the Himalayas!" (monsters inc) randomly, but I was wondering if it could be based off chance instead? because random has him saying it WAYYYYYY To often. Better yet, play it when the mob notices a player and begins pursuit.
Would that be as simple as adding
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
            if self.sounds and self.sounds.follow then
                minetest.sound_play(self.sounds.follow, {object = self.object})
            end

into the API under
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
            if self.follow ~= "" and not self.following then
                for _,player in pairs(minetest.get_connected_players()) do
                    local s = self.object:getpos()
                    local p = player:getpos()
                    local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
                    if self.view_range and dist < self.view_range then
                        self.following = player
                    end
                end
            end

and if so, where? if not, what else?

Add it where "self.attack.player" is set.
ak399g wrote:It'd be nice to add a sound mode for noticing you. E.g. a sheep baaing complacently when being led on by wheat, a cave monster growling at you.

If someone provides sounds Ill gladly add them.
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Tue Jul 30, 2013 23:07

PilzAdam wrote:Add it where "self.attack.player" is set.

doing this seemed to do the trick:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if self.type == "monster" and minetest.setting_getbool("enable_damage") then
                for _,player in pairs(minetest.get_connected_players()) do
                    local s = self.object:getpos()
                    local p = player:getpos()
                    local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
                    if dist < self.view_range then
                        if self.attack.dist then
                            if self.attack.dist < dist then
                                self.state = "attack"
                                self.attack.player = player
                                self.attack.dist = dist
                            end
                        else
                            self.state = "attack"
                            self.attack.player = player
                            self.attack.dist = dist
                            -- ADDED LINES BEGIN
                            if self.sounds and self.sounds.follow then
                                minetest.sound_play(self.sounds.follow, {object = self.object})
                            end
                            -- ADDED LINES END
                        end
                    end
                end
            end

and of course changing the snowman's
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    sounds = {
        random = "mobs_snowman",

to
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    sounds = {
        follow = "mobs_snowman",

makes use of the new category.

Thanks!

I'll also look into finding some more nice sounds for the mobs.
aka SAFR
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Tue Jul 30, 2013 23:15

When following me, they don't seem to want to jump when confronted with an obstacle. They will jump up hills and such when casually walking, but they don't in pursuit.
aka SAFR
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Jul 30, 2013 23:24

ak399g wrote:When following me, they don't seem to want to jump when confronted with an obstacle. They will jump up hills and such when casually walking, but they don't in pursuit.

That will be fixed with a new engine feature in 0.4.8, then I disable jumping completly and the mobs can just walk 1 node high.
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Tue Jul 30, 2013 23:30

PilzAdam wrote:That will be fixed with a new engine feature in 0.4.8, then I disable jumping completly and the mobs can just walk 1 node high.

I take it that players will also be able to walk one node high?
Guess I just have to be patient then :)
aka SAFR
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Jul 31, 2013 00:12

ak399g wrote:I take it that players will also be able to walk one node high?

Of course not, that would be stupid.
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Wed Jul 31, 2013 00:20

PilzAdam wrote:
ak399g wrote:I take it that players will also be able to walk one node high?

Of course not, that would be stupid.

Maybe I'm confused as to what you mean by "walk one node high." I think it means "when the mob encounters a node, it can step up onto it." Why shouldn't players function that way too? Unless that's not what you mean.
aka SAFR
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Jul 31, 2013 00:28

ak399g wrote:
PilzAdam wrote:
ak399g wrote:I take it that players will also be able to walk one node high?

Of course not, that would be stupid.

Maybe I'm confused as to what you mean by "walk one node high." I think it means "when the mob encounters a node, it can step up onto it." Why shouldn't players function that way too? Unless that's not what you mean.

Thats exactly what I mean (its called "stepheight" in the engine).
Its "stupid" to do that for players because we already have a nice moving system with jumping to get up nodes; Why change it if it works out well?
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Wed Jul 31, 2013 00:32

PilzAdam wrote:Its "stupid" to do that for players because we already have a nice moving system with jumping to get up nodes; Why change it if it works out well?

Sure, I get that.
aka SAFR
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Sun Aug 04, 2013 16:53

does not work in version 0.4.1
where can I find a mod for monsters in this version?
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Aug 04, 2013 23:29

0.4.1 is badly out-of-date and generally unsupported. Please download the latest build, which is current at 0.4.7.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

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

by TenPlus1 » Sat Aug 10, 2013 10:30

Any chance of adding mob sounds so you know when something is about to attack, even a hurt sound when it does... Thanks, great mod btw...
Last edited by TenPlus1 on Sun Aug 11, 2013 09:21, edited 1 time in total.
 

Secret_Guy_3
Member
 
Posts: 16
Joined: Mon Mar 25, 2013 00:10

by Secret_Guy_3 » Mon Aug 12, 2013 23:27

Will there be more mobs?
Map Maker and other stuff.
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Tue Aug 13, 2013 01:35

TenPlus1 wrote:Any chance of adding mob sounds so you know when something is about to attack, even a hurt sound when it does... Thanks, great mod btw...

You can add your own sounds by dropping them in the sounds folder and editing the .lua file, allowing them to make noise randomly, or when attacking you. I've also been able to add a third instance that allows for sound upon them noticing you.
Secret_Guy_3 wrote:Will there be more mobs?

You can copypaste a mob in the .lua, change the name, upload your own textures/sounds, change speed/damage/spawn locations/frequency, pretty much anything you'd need.

I'm on vacation now, but I could post tutorials after I get back.
aka SAFR
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Tue Aug 13, 2013 09:18

ak399g wrote:
TenPlus1 wrote:Any chance of adding mob sounds so you know when something is about to attack, even a hurt sound when it does... Thanks, great mod btw...

You can add your own sounds by dropping them in the sounds folder and editing the .lua file, allowing them to make noise randomly, or when attacking you. I've also been able to add a third instance that allows for sound upon them noticing you.
Secret_Guy_3 wrote:Will there be more mobs?

You can copypaste a mob in the .lua, change the name, upload your own textures/sounds, change speed/damage/spawn locations/frequency, pretty much anything you'd need.

I'm on vacation now, but I could post tutorials after I get back.


Have a look at the camo mod NPCs to see how I modified code from PilzAdam to make player-shaped NPC character mobs.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

User avatar
Emgogall
New member
 
Posts: 9
Joined: Thu Aug 15, 2013 15:57

by Emgogall » Fri Aug 16, 2013 18:52

i know i sound like a noob but how do you download that?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Aug 16, 2013 19:33

Emgogall wrote:i know i sound like a noob but how do you download that?

Look at the first post, there is a download link. Click on it and you get a .zip, then you follow this instructions to install it: http://dev.minetest.net/Installing_Mods
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Tue Aug 27, 2013 09:23

I want to make mobs that only spawn on mountains. Is there a way to add min_height to the API?
Last edited by wcwyes on Tue Aug 27, 2013 09:24, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Wed Aug 28, 2013 11:37

I know this goes against the idea of game content being in Lua Mods, but how hard would it be to implement Simple Mobs in C++, compiling it into the engine, and having a menu item to enable or disable simple mobs? Wouldn't this make Simple Mobs run blazingly fast? Or like I suggested somewhere else implement more of the framework of mobs into the engine, but allow for customizations along the lines of what Sapier is trying to do, but implement his framework in C++?
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 8 guests

cron