Page 23 of 29

PostPosted: Fri Oct 25, 2013 15:01
by ElectricSolstice
brunob.santos wrote:
PilzAdam wrote:
Nightshade wrote:I have this same problem too. Hostile mobs still hang around in the daytime, but they don't attack, and you can't kill them. Rats too--sometimes I try to kill/collect them and I get an error that says something along the lines of "this object exists, but it technically does not exist"...

AFAIK thats a bug in the engine, I cant do anything about it in the mod.

I believe that all bugs for a mod, belong to his own creator. The guilt of his existence is a bug, however, is not obliged to fix.
All entities that become altomaticamente stops should be excluded.
I must say here that you're a great creator of mods.

[spoiler=Ideas]Ideas. I believe it is already time to do this mod to work best, it is impossible to raise livestock when I need to be constantly cleaning.
A good idea would be to create a node that ensure the cattle.
example, "a house for the sheep." when this sheep is cleaned the server, you can spawn node (home) where it was saved.[/spoiler]


He's right though, the bug is in the engine if it's something you can't destroy. I'v seen it too and the entity ends up just walking against a wall being undestroyable and even just going black sometimes. Whenever this occurs, there's a message in my command line, since I run it from the command line, about trying to access a static entity that no longer exists. This mod is not the only thing this bug effects as I've seen it in my command line for other things. However, it seems to be the only mod you can easily notice while playing. As such, any code added to deal with this bug would be a work around rather than an actual bug fix. Off the top of my head, the easiest and quickest fix in the mod would probably be to see If I could just destroy them before they get too far from a player for that code in the engine to be called. However, the best and proper way to fix this mod would be to go and fix the bug in the engine. Also, if I understand correctly, PilzAdam is one of the developers of the engine, so he could fix the bug in the engine and would actually have the power to get such a fix pushed into the engine. However, he's pretty busy, so I wouldn't expect anything anytime soon.

PostPosted: Fri Oct 25, 2013 15:10
by BrunoMine
understood. This seems to be one of the reasons for the minetest be a game with the development so slow.

PostPosted: Fri Oct 25, 2013 22:35
by BrunoMine
Look, I changed some things, changed the sand_monster by a skeleton.
Image
spawning bones.

PostPosted: Sun Oct 27, 2013 00:52
by ElectricSolstice
brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.

O: Maybe should be used to spawn entities from the bones node lol.

PostPosted: Sun Oct 27, 2013 21:36
by ElectricSolstice
brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.


Can you give me a link to the blend files or whatever you used to make them? I might consider adding skeletons to my version of mobs.

PostPosted: Mon Oct 28, 2013 00:43
by BrunoMine
ElectricSolstice wrote:
brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.


Can you give me a link to the blend files or whatever you used to make them? I might consider adding skeletons to my version of mobs.


Replace this image in folder "models".
Image
I also changed the node spawn. (Bones)
https://github.com/PilzAdam/mobs/blob/master/init.lua#L124
It was interesting, however still needs tweaking. And then, it's time for you to act.

PostPosted: Mon Oct 28, 2013 10:46
by ElectricSolstice
brunob.santos wrote:
ElectricSolstice wrote:
brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.


Can you give me a link to the blend files or whatever you used to make them? I might consider adding skeletons to my version of mobs.


Replace this image in folder "models".
http://img7.imageshack.us/img7/8115/skqm.png
I also changed the node spawn. (Bones)
https://github.com/PilzAdam/mobs/blob/master/init.lua#L124
It was interesting, however still needs tweaking. And then, it's time for you to act.


Cool. Do whatever tweaking you need to.
What program did you use to make it? If blender, can I see the blend files too?

PostPosted: Mon Oct 28, 2013 14:30
by BrunoMine
I work with lines of code. Simply open like notepad and edit.
The model was edited with paint and GIMP.

Could you please pass me a link to a manual for creating mods. I want to expand my knowledge.

PostPosted: Tue Oct 29, 2013 16:25
by ElectricSolstice
brunob.santos wrote:I work with lines of code. Simply open like notepad and edit.
The model was edited with paint and GIMP.

Could you please pass me a link to a manual for creating mods. I want to expand my knowledge.


Here's a reference manual to the api.
Even talks about the mod directory structure in there. At the very least, if you make your own mod, make sure it has an init.lua and a depends.txt file. More than likely though, you'll also want to have inside depends.txt the word default. Also, you'll probably want a textures folder to put all the png files in.

PostPosted: Wed Oct 30, 2013 10:59
by lapinusplus
OwenBean wrote:Sorry - I get a failed to run init.lua


I had the same thing on Windows : it's because the mod's folder had a bad name. To resolve it, you have to :
- download the mod from https://github.com/PilzAdam/mobs/zipball/master,
- unzip
- copy the folder in minetest/mods
- change the name of this folder to "mobs"

If you have some problems with the init.lua for other mods, you can open this file and search de good name for the mod's folder. For example, in the Minetest/mods/mobs/init.lua, we can read :

dofile(minetest.get_modpath("mobs").."/api.lua")


"mobs" is the name to give to the folder.

PostPosted: Thu Oct 31, 2013 03:19
by Neon
The wool produced by these sheep doesn't seem like the same wool used in Homedecor or elsewhere. Is this true?

Nevermind. I finally dug into the code. The sheep do indeed provide the same wool (wool:white) as seen in the wool mod. The recipes I was thinking that used the wool had been changed, causing my confusion.

PostPosted: Wed Nov 06, 2013 05:11
by wcwyes
brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.

may I use your skin?

PostPosted: Wed Nov 06, 2013 20:08
by Silent-Hunter
I've got some sort of problem:

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
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
14:49:41: ERROR[main]: mod "mccarpet" has unsatisfied dependencies:  "wool"
14:49:41: ERROR[main]: ========== ERROR FROM LUA ===========
14:49:41: ERROR[main]: Failed to load and run script from
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:49:41: ERROR[main]: stack traceback:
14:49:41: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:49:41: ERROR[main]: =======END OF ERROR FROM LUA ========
14:49:41: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:49:41: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:57:55: ERROR[main]: ========== ERROR FROM LUA ===========
14:57:55: ERROR[main]: Failed to load and run script from
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:57:55: ERROR[main]: stack traceback:
14:57:55: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:57:55: ERROR[main]: =======END OF ERROR FROM LUA ========
14:57:55: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:57:56: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:58:23: ERROR[main]: ========== ERROR FROM LUA ===========
14:58:23: ERROR[main]: Failed to load and run script from
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:58:23: ERROR[main]: stack traceback:
14:58:23: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:58:23: ERROR[main]: =======END OF ERROR FROM LUA ========
14:58:23: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:58:23: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ========== ERROR FROM LUA ===========
15:02:47: ERROR[main]: Failed to load and run script from
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
15:02:47: ERROR[main]: stack traceback:
15:02:47: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
15:02:47: ERROR[main]: =======END OF ERROR FROM LUA ========
15:02:47: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua

PostPosted: Wed Nov 06, 2013 20:10
by PilzAdam
Silent-Hunter wrote:I've got some sort of problem:

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
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
14:49:41: ERROR[main]: mod "mccarpet" has unsatisfied dependencies:  "wool"
14:49:41: ERROR[main]: ========== ERROR FROM LUA ===========
14:49:41: ERROR[main]: Failed to load and run script from
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:49:41: ERROR[main]: stack traceback:
14:49:41: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:49:41: ERROR[main]: =======END OF ERROR FROM LUA ========
14:49:41: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:49:41: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:57:55: ERROR[main]: ========== ERROR FROM LUA ===========
14:57:55: ERROR[main]: Failed to load and run script from
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:57:55: ERROR[main]: stack traceback:
14:57:55: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:57:55: ERROR[main]: =======END OF ERROR FROM LUA ========
14:57:55: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:57:56: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:58:23: ERROR[main]: ========== ERROR FROM LUA ===========
14:58:23: ERROR[main]: Failed to load and run script from
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:58:23: ERROR[main]: stack traceback:
14:58:23: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:58:23: ERROR[main]: =======END OF ERROR FROM LUA ========
14:58:23: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:58:23: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ========== ERROR FROM LUA ===========
15:02:47: ERROR[main]: Failed to load and run script from
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
15:02:47: ERROR[main]: stack traceback:
15:02:47: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
15:02:47: ERROR[main]: =======END OF ERROR FROM LUA ========
15:02:47: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua

The correct name for the modfolder is "mobs".

PostPosted: Wed Nov 06, 2013 22:15
by Silent-Hunter
Oh OK, thanks! Although, gfor some reason I can't seem to add only_peaceful_mobs = true to the minetest.conf, as it reverts when the game starts.

I'm very new at this, I'm probably missing something.

PostPosted: Wed Nov 06, 2013 22:48
by kaeza
Silent-Hunter wrote:I can't seem to add only_peaceful_mobs = true to the minetest.conf, as it reverts when the game starts.

Do not edit `minetest.conf' while the game is running.

PostPosted: Wed Nov 06, 2013 22:59
by Silent-Hunter
Thanks! That's odd, I didn't think I did. I must have forgotten to close it first.

PostPosted: Thu Nov 07, 2013 01:25
by wcwyes
Is there a way to add a function to the spawn command? Like
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:register_spawn("dwarves:dwarf", {"default:stone"}, 3, -1, 7000, 3, -7000)
If spawn then
    local name=dwarves:dwarf
    if minetest.get_node(pos.x-2, pos.y, pos.z).name=="air" then
        minetest.env:add_entity(pos.x-2, pos.y, pos.z, name)
    end
    if minetest.get_node(pos.x+2, pos.y, pos.z).name=="air" then
        minetest.env:add_entity(pos.x+2, pos.y, pos.z, name)
    end
    if minetest.get_node(pos.x, pos.y, pos.z-2).name=="air" then
        minetest.env:add_entity(pos.x, pos.y, pos.z-2, name)
    end
    if minetest.get_node(pos.x, pos.y, pos.z+2).name=="air" then
        minetest.env:add_entity(pos.x, pos.y, pos.z+2, name)
    end
end

I know this isn't how it's done but it's a start. I only know of two other options, of one which is improper programming methods, the other just more complicated. I would rather keep it in the mobs family.

PostPosted: Thu Nov 14, 2013 05:09
by Ikishida
hey,pilzadam,is it okay if i change the textures
to make a pokemon mod?(also,I'll change the
names)

PostPosted: Thu Nov 14, 2013 16:41
by PilzAdam
Ikishida wrote:hey,pilzadam,is it okay if i change the textures
to make a pokemon mod?(also,I'll change the
names)

Hmmm.... Let me quote the WTFPL:
WTFPL wrote:You just DO WHAT THE FUCK YOU WANT TO.

PostPosted: Fri Nov 15, 2013 03:32
by Ikishida
PilzAdam wrote:
Ikishida wrote:hey,pilzadam,is it okay if i change the textures
to make a pokemon mod?(also,I'll change the
names)

Hmmm.... Let me quote the WTFPL:
WTFPL wrote:You just DO WHAT THE FUCK YOU WANT TO.


uhh...I mean,can I post when I made a fork?

PostPosted: Fri Nov 15, 2013 03:58
by VanessaE
22:58:27: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: attempt to index local 'p' (a nil value)
22:58:27: ERROR[main]: stack traceback:
22:58:27: ERROR[main]: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: in function <...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:115>

PostPosted: Fri Nov 15, 2013 08:05
by ElectricSolstice
VanessaE wrote:22:58:27: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: attempt to index local 'p' (a nil value)
22:58:27: ERROR[main]: stack traceback:
22:58:27: ERROR[main]: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: in function <...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:115>


I don't know why that happened, but I do know that the local p is supposed to be the position of a player and it uses minetest.get_connected_players to get this player. Do you have any other details on this error?

I was thinking in his version of the mod though that something was slightly off about the code for following, but I can't remember offhand what I changed. Although, I don't think it'll fix whatever that occured.

Also, people keep in mind my commits that still has yet to be reviewed. My version has the mobs actually jumping to chase you.

https://github.com/ElectricSolstice/mobs


Do you somehow have players that return nil when you get their position?

PostPosted: Fri Nov 15, 2013 11:49
by VanessaE
I'm not at all sure what the circumstances were that caused this error to pop up - it was just one of those random things (I see a restart on the servers' IRC channel, check the log, and... like that).

PostPosted: Fri Nov 15, 2013 14:43
by PilzAdam
VanessaE wrote:22:58:27: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: attempt to index local 'p' (a nil value)
22:58:27: ERROR[main]: stack traceback:
22:58:27: ERROR[main]: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: in function <...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:115>

proller reported that too. I think it might happen since https://github.com/minetest/minetest/commit/2170c9958a455c228459c795857ec1a890cd05c5.
My guess is that on_step() runs before register_on_leaveplayer(). (That would be a bug in the engine then.)

PostPosted: Fri Nov 15, 2013 17:25
by ElectricSolstice
VanessaE wrote:I'm not at all sure what the circumstances were that caused this error to pop up - it was just one of those random things (I see a restart on the servers' IRC channel, check the log, and... like that).


If all you care about is a quick fix for the mod on your server, you could probably wrap that bit of code in an if statement. All that code there does is check for players to start following and a mob wouldn't need to follow a non existant player if pilzAdam is right about step being called before register_on_leaveplayer.

change right after line 242
so if starting at line 241, change it to look like this
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
local s = self.object:getpos()
local p = player:getpos()
if p~= nil then
   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


PostPosted: Sat Nov 16, 2013 00:14
by VanessaE
Thanks, I'll give it a try.

PostPosted: Sat Nov 16, 2013 06:42
by VanessaE
Seems to help - a similar fix was needed for the subroutine near line 222 also.

PostPosted: Sat Nov 16, 2013 19:28
by Dukie
PilzAdam wrote:Depends:
default
fire


I'm new to Minetest, and recently setup a server for my and my two boys to play on. Working very nicely!

This mod looked interesting, but I can't seem to find the "fire" mod, which it appears to be dependent on.

I've dug through the "Mod Releases" area, and have found other mods mentioning fire, but have had no luck finding a mod specifically titled simply "Fire".

Does anyone have a link please?

Thanks so much! :)

PostPosted: Sat Nov 16, 2013 19:30
by PilzAdam
Dukie wrote:
PilzAdam wrote:Depends:
default
fire


I'm new to Minetest, and recently setup a server for my and my two boys to play on. Working very nicely!

This mod looked interesting, but I can't seem to find the "fire" mod, which it appears to be dependent on.

I've dug through the "Mod Releases" area, and have found other mods mentioning fire, but have had no luck finding a mod specifically titled simply "Fire".

Does anyone have a link please?

Thanks so much! :)

Fire is part of minetest_game, so you dont need to install it as an external mod.