[Mod] Simple Mobs [mobs]

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

by wcwyes » Thu Aug 29, 2013 02:17

can I add my own api for my mod on top of the api for mobs to add min_height, or can I add it directly in the new mob mod file?
I don't want to have to edit all of the mobs to make this work.
Last edited by wcwyes on Thu Aug 29, 2013 02:39, edited 1 time in total.
 

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

by wcwyes » Thu Aug 29, 2013 02:57

can I use spawn_func to do this?
 

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

by wcwyes » Thu Aug 29, 2013 03:40

I think this looks right
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("mountain:mountain_monster", {"default:dirt_with_grass"}, 2, -1, 7000, 1, 1000, function(pos, node))
    pos.y > 30
    return true
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Thu Aug 29, 2013 06:52

That code won't do anything try 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
mobs:register_spawn("mountain:mountain_monster", {"default:dirt_with_grass"}, 2, -1, 7000, 1, 1000, function(pos, node)
    return (pos.y > 30)
end)
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

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

by TenPlus1 » Thu Aug 29, 2013 09:04

Any chance of adding a knock-back effect when hitting a mob, so it cannot just run up and kill you and gives you a chance to fend it off, or knock it into water/lava/a hole etc :)
 

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

by wcwyes » Thu Aug 29, 2013 17:36

sfan5 wrote:That code won't do anything try 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
mobs:register_spawn("mountain:mountain_monster", {"default:dirt_with_grass"}, 2, -1, 7000, 1, 1000, function(pos, node)
    return (pos.y > 30)
end)

Thanks
 

Wrestlerpbeast
Member
 
Posts: 12
Joined: Sat Aug 31, 2013 18:14

by Wrestlerpbeast » Sat Aug 31, 2013 18:17

I'm new to minetest and everytime i try to put on ANY mod what so ever i always get a error before it even lets me in the world i was wondering if you could put a photo example on how to install a mod. Thank you.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sat Aug 31, 2013 18:22

Did you rename this mod's folder to just "mobs"?
 

Wrestlerpbeast
Member
 
Posts: 12
Joined: Sat Aug 31, 2013 18:14

by Wrestlerpbeast » Sat Aug 31, 2013 18:29

yes but i still get an error :(
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Aug 31, 2013 18:31

What is the error? It doesn't help if you just say "there's an error" and don't say what it is.

You should have a file called debug.txt beside the minetest executable. Please post that file here.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

Wrestlerpbeast
Member
 
Posts: 12
Joined: Sat Aug 31, 2013 18:14

by Wrestlerpbeast » Sat Aug 31, 2013 18:32

Do i need to make another folder ? I have one mods folder and i have 2 or 3 mods in it and none of them work
 

Wrestlerpbeast
Member
 
Posts: 12
Joined: Sat Aug 31, 2013 18:14

by Wrestlerpbeast » Sat Aug 31, 2013 18:33

GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
13:08:51: ERROR[main]: ========== ERROR FROM LUA ===========
13:08:51: ERROR[main]: Failed to load and run script from
13:08:51: ERROR[main]: C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua:
13:08:51: ERROR[main]: cannot open C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua: No such file or directory
13:08:51: ERROR[main]: =======END OF ERROR FROM LUA ========
13:08:51: ERROR[main]: Server: Failed to load and run C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua
13:08:51: ERROR[main]: ModError: Failed to load and run C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua
13:08:59: INFO: event_handler(): Ctrl+C, Close Event, Logoff Event or Shutdown Event, shutting down.
 

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

by PilzAdam » Sat Aug 31, 2013 18:55

Wrestlerpbeast wrote:GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
13:08:51: ERROR[main]: ========== ERROR FROM LUA ===========
13:08:51: ERROR[main]: Failed to load and run script from
13:08:51: ERROR[main]: C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua:
13:08:51: ERROR[main]: cannot open C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua: No such file or directory
13:08:51: ERROR[main]: =======END OF ERROR FROM LUA ========
13:08:51: ERROR[main]: Server: Failed to load and run C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua
13:08:51: ERROR[main]: ModError: Failed to load and run C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua
13:08:59: INFO: event_handler(): Ctrl+C, Close Event, Logoff Event or Shutdown Event, shutting down.

What is the directory structure? The init.lua, api.lua and textures/ files/folders should be directly in mods/mobs/
 

Wrestlerpbeast
Member
 
Posts: 12
Joined: Sat Aug 31, 2013 18:14

by Wrestlerpbeast » Sat Aug 31, 2013 22:41

I'm sorry but what does all that mean? I'm very new.
 

User avatar
onpon4
Member
 
Posts: 517
Joined: Thu Mar 21, 2013 01:54

by onpon4 » Sun Sep 01, 2013 01:40

cannot open C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua: No such file or directory


init.lua. It's missing.

I think Windows Explorer by default adds an extra folder when you extract Zip files. That might be the problem. Look in the mobs folder; it should have init.lua and some other files and folders for the mod. If you don't see it there but see it somewhere else, it's whatever folder it's in that should be directly in that mobs folder.
 

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

by Dan Duncombe » Sun Sep 01, 2013 09:23

onpon4 wrote:
cannot open C:\Documents and Settings\rick\My Documents\Minetest\minetest-0.4.7\bin\..\mods\mobs\init.lua: No such file or directory


init.lua. It's missing.

I think Windows Explorer by default adds an extra folder when you extract Zip files. That might be the problem. Look in the mobs folder; it should have init.lua and some other files and folders for the mod. If you don't see it there but see it somewhere else, it's whatever folder it's in that should be directly in that mobs folder.

If you tell Windows Explorer to extract a zip file it often makes a new folder of the same name, where you are extracting, with the zip file contents inside. Si it basically converts zip to normal.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

Rhys
Member
 
Posts: 379
Joined: Wed May 22, 2013 15:22

by Rhys » Sun Sep 01, 2013 11:14

Someone could make a NPC Villager mod out of this.
 

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

by Neuromancer » Mon Sep 02, 2013 17:16

Another idea, if you hit a mob with a flaming arrow from PilzAdam's throwing Mod, the mob should catch on fire run around setting things on fire, die and leave you with cooked meat. Kind of gruesome, but really convienient. It kind of stinks that the throwing mod doesn't do any damage to Mobs anymore. Maybe just make Mobs flammable? Maybe there should be other ways to catch them on fire, if they go into a burning forest?
Last edited by Neuromancer on Mon Sep 02, 2013 18:18, edited 1 time in total.
 

Rhys
Member
 
Posts: 379
Joined: Wed May 22, 2013 15:22

by Rhys » Sun Sep 15, 2013 18:28

I would like a pig added. So, I am working on a texture for you, Adam.
 

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

by ak399g » Mon Sep 16, 2013 02:51

How do I create a mob with a plantlike drawtype? I see it uses "visual =" instead of "drawtype".
aka SAFR
 

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

by Dan Duncombe » Mon Sep 16, 2013 06:33

ak399g wrote:How do I create a mob with a plantlike drawtype? I see it uses "visual =" instead of "drawtype".

Try upright_sprite, that gives a flat plane, change the side or front values later on to say whether it moves sideways or flat-on forwards
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

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

by PilzAdam » Mon Sep 16, 2013 12:13

ak399g wrote:How do I create a mob with a plantlike drawtype? I see it uses "visual =" instead of "drawtype".

There is no plantlike drawtype for entities.
 

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

by Neuromancer » Tue Sep 17, 2013 01:17

PilzAdam wrote:
ak399g wrote:How do I create a mob with a plantlike drawtype? I see it uses "visual =" instead of "drawtype".

There is no plantlike drawtype for entities.

But you can make something that looks just like a plantlike drawtype by doing this:

node_box = {
type = "fixed",
fixed = {
-- {left,bottom,front,right,top,back}
{0, -1/2, -1/2, 0, 1/2, 1/2},
{-1/2, -1/2, 0, 1/2, 1/2, 0}
},
},
 

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

by Dan Duncombe » Tue Sep 17, 2013 06:31

Neuromancer wrote:
PilzAdam wrote:
ak399g wrote:How do I create a mob with a plantlike drawtype? I see it uses "visual =" instead of "drawtype".

There is no plantlike drawtype for entities.

But you can make something that looks just like a plantlike drawtype by doing this:

node_box = {
type = "fixed",
fixed = {
-- {left,bottom,front,right,top,back}
{0, -1/2, -1/2, 0, 1/2, 1/2},
{-1/2, -1/2, 0, 1/2, 1/2, 0}
},
},

You can't set a drawtype for entities can you? I know their is a wielditem drawtype, but not nodeboxes. Forgive me if I'm wrong.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

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

by Mossmanikin » Tue Sep 17, 2013 09:41

ak399g wrote:How do I create a mob with a plantlike drawtype? I see it uses "visual =" instead of "drawtype".


Example:
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
minetest.register_node("entitytest:plantlike_node", {
    drawtype = "plantlike",
    tiles = {"default_apple.png"},
    groups = {not_in_creative_inventory=1},
})

minetest.register_entity("entitytest:plantlike_entity",{
    visual = "wielditem",
    visual_size = {x=2/3, y=2/3, z=2/3},
    textures = {"entitytest:plantlike_node"},
    collisionbox = {-1/4, -1/2, -1/4, 1/4, 0, 1/4},
})


and to check what it looks 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
minetest.register_tool("entitytest:test_spawner", {
    description = "Test Spawner",
    inventory_image = "default_nc_front.png",
    on_place = function (itemstack, placer, pointed_thing)
        minetest.add_entity(pointed_thing.above, "entitytest:plantlike_entity")
        return itemstack
    end,
})

Noob 4 life!
My stuff
 

derpswa99
Member
 
Posts: 78
Joined: Sun Mar 24, 2013 21:26

by derpswa99 » Sun Sep 29, 2013 03:43

Can you please make the mobs have a bit more health, I ask this because anything above a steel sword will 1-shot them, and I want to change to mobf, but I want to stay in simple mobs because it's easy to run on my computer. If you do this or not, thank you.
 

jenova99sephiros
Member
 
Posts: 158
Joined: Sat Aug 03, 2013 15:16
In-game: Jenova

by jenova99sephiros » Sun Sep 29, 2013 05:12

Please3DModel
I english google translator
 

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

by PilzAdam » Sun Sep 29, 2013 10:16

derpswa99 wrote:Can you please make the mobs have a bit more health, I ask this because anything above a steel sword will 1-shot them, and I want to change to mobf, but I want to stay in simple mobs because it's easy to run on my computer. If you do this or not, thank you.

You can change that yourself, simply adjust "hp_max" in the register_mob() calls in the init.lua. Maybe look at "armor" too, its the percentage of damage taken by a punch (e.g. the stone monster has armor=80, that means it only gets 80% of the damage).
If you found good values for these fields then please share them with us.
 

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

by PilzAdam » Sun Sep 29, 2013 10:16

jenova99sephiros wrote:Please3DModel

What?
 

SFFP
New member
 
Posts: 5
Joined: Sat Sep 28, 2013 01:12

by SFFP » Mon Sep 30, 2013 00:40

Hi I like this mod alot but I found a bug: Sometimes the hostile mobs are not hostile and just walk around
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 79 guests

cron