squids mod help

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

squids mod help

by zoropig » Tue Jun 25, 2013 00:54

ok so im trying to make a squids mod.(maybe for a SDMC map) but i dont know how to do the code thng for the init thing so can you help me plz
i'm new too all this still but i will try to make mods and textures check out my map too!
 

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

by PilzAdam » Tue Jun 25, 2013 01:00

RTFM
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Tue Jun 25, 2013 01:06

any ways SDMC means skydoesminecraft
i'm new too all this still but i will try to make mods and textures check out my map too!
 

User avatar
NakedFury
Member
 
Posts: 151
Joined: Thu Dec 08, 2011 03:55

by NakedFury » Tue Jun 25, 2013 01:18

What do you mean "how to do the code thing"?
Last edited by NakedFury on Tue Jun 25, 2013 01:23, edited 1 time in total.
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Tue Jun 25, 2013 01:32

like the well this is part of the simple mobs mod thing so like this:dofile(minetest.get_modpath("mobs").."/api.lua")

mobs:register_mob("mobs:dirt_monster", {
type = "monster",
hp_max = 5,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_stone_monster.x",
textures = {"mobs_dirt_monster.png"},
visual_size = {x=3, y=2.6},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 2,
drops = {
{name = "default:dirt",
chance = 1,
min = 3,
max = 5,},
},
armor = 100,
drawtype = "front",
water_damage = 1,
lava_damage = 5,
light_damage = 2,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 14,
walk_start = 15,
walk_end = 38,
run_start = 40,
run_end = 63,
punch_start = 40,
punch_end = 63,
}
})
mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass"}, 3, -1, 7000, 3, 31000)

mobs:register_mob("mobs:stone_monster", {
type = "monster",
hp_max = 10,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
blah blah blah
Last edited by zoropig on Tue Jun 25, 2013 15:45, edited 1 time in total.
i'm new too all this still but i will try to make mods and textures check out my map too!
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Tue Jun 25, 2013 15:44

i need hlp with somthing so every time i try to play with it theres an mod failed to load thing.

can you help plz?
i'm new too all this still but i will try to make mods and textures check out my map too!
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Tue Jun 25, 2013 18:40

1. An important help for a modder is the file debug.txt. Delete it. Start a game. Wait till the error happens. Exit minetest. Open debug.txt. Scroll till the ERROR part. That part gives you essential information about the first error you made it encountered.

If you don't understand the ERROR, paste those error-lines in a post in this topic.

2. Your approach to use an existing mob-mod is good. You could start to change 1 thing at a time in the code, then another one. What important is, is that if you change a name, you'll also need to have a texture with the same name. When you change the mod name, you'll need to change all the 'old' mod names in the new one, including those in the textures folder.

3, The attitude of your mob and its environment will be the hardest part to code. See also the api.lua file of PilzAdams' simple mobs mod.

4. Last but not least. When you have managed to make a working mod, check the licences of the parts you copied and apply those and find a license for your own contribution. Give the one(s) you copied code or textures from the proper credit.

Starting with entities isn't the easiest way to start modding. There are only a few modders that have made moving mods. So the best of luck.

Some Lua documentation that might help you in the long term:

http://lua.gts-stolberg.de/en/index.php
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Wed Jun 26, 2013 00:54

its saying: ERROR[main]: Error loading mod "evil squids": modname does not follow naming conventions: Only chararacters [a-z0-9_] are allowed.
17:42:29: ERROR[main]: Server: Failed to load and run C:\Users\name\Downloads\minetest-0.4.7\minetest-0.4.7\bin\..\mods\evil squids\init.lua
17:42:29: ERROR[main]: ModError: Failed to load and run C:\Users\name\Downloads\minetest-0.4.7\minetest-0.4.7\bin\..\mods\evil squids\init.lua
i'm new too all this still but i will try to make mods and textures check out my map too!
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Wed Jun 26, 2013 01:52

how do i make a mob egg or somthing to spawn these mobs?
i'm new too all this still but i will try to make mods and textures check out my map too!
 

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

by Mossmanikin » Wed Jun 26, 2013 03:28

Does your mod load now?

Noob 4 life!
My stuff
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Wed Jun 26, 2013 06:14

If your mod is still not loading, try removing the space or changing it to an underscore _. That may fix that part of your problem.
 

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

by Dan Duncombe » Wed Jun 26, 2013 06:28

In other words change the name of your mod to evil_squids
Make sure that this mobs:register_mob("evil_squids:randomsquidname", {
is what is at the top. Put the name of your squid type, no spaces (although you can put _ ) and preferably no capitals, where I have written arandomsquidname
Last edited by Dan Duncombe on Wed Jun 26, 2013 06:28, edited 1 time in total.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Jun 26, 2013 09:04

zoropig wrote:how do i make a mob egg or somthing to spawn these mobs?


Thefamilygrog66 has made a mod that might help you with that:

http://forum.minetest.net/viewtopic.php?id=6214
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Wed Jun 26, 2013 14:29

Mossmanikin wrote:Does your mod load now?

no
i'm new too all this still but i will try to make mods and textures check out my map too!
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Wed Jun 26, 2013 14:42

its still not working this is hard.... but it will be done
i'm new too all this still but i will try to make mods and textures check out my map too!
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Wed Jun 26, 2013 14:45

oh yeah maybe its the depends thing. it just says default. is there somthing else to put? and i'll tell you whats in my init ok?
i'm new too all this still but i will try to make mods and textures check out my map too!
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Wed Jun 26, 2013 14:47

zoropig wrote:oh yeah maybe its the depends thing. it just says default. is there somthing else to put? and i'll tell you whats in my init ok?



it says: dofile(minetest.get_modpath("evil_squid").."/api.lua")

mobs:register_mob("evil_squid:squid", {
type = "animal",
hp_max = 100,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "evil_squid_derpy squid",
textures = {"evil squids_derpy squid.png"},
visual_size = {x=3, y=2.6},
makes_footstep_sound = false,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 0,
drops = {
{name = "default:inksack",
chance = 1,
min = 3,
max = 5,},
},
armor = 200,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
on_rightclick = nil,
animation = {
speed_normal = 20,
speed_run = 30,
stand_start = 0,
stand_end = 14,
walk_start = 15,
walk_end = 38,
run_start = 40,
run_end = 63,
punch_start = 40,
punch_end = 63,
}
})
i'm new too all this still but i will try to make mods and textures check out my map too!
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Wed Jun 26, 2013 15:21

Does the model for the squid exist already? A (modified) friendly squid would be welcomed in my waters :-)
A list of my mods can be found here.
 

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

by Mossmanikin » Wed Jun 26, 2013 16:05

zoropig wrote: mesh = "evil_squid_derpy squid",
textures = {"evil squids_derpy squid.png"},


Looks like the problem here is the empty spaces in the names.

Noob 4 life!
My stuff
 

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

by Dan Duncombe » Wed Jun 26, 2013 17:14

Also, there is no such thing as an inksack in default (Not that I know of)
However, making an item version of one would be easy with:
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_craftitem("evil_squid:inksack", {
    description = "Ink Sack",
    inventory_image = "inksack.png",
})


You need to make an inksack texture and call it 'inksack' It must be a .png picture.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Wed Jun 26, 2013 22:07

Dan Duncombe wrote:Also, there is no such thing as an inksack in default (Not that I know of)
However, making an item version of one would be easy with:
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_craftitem("evil_squid:inksack", {
    description = "Ink Sack",
    inventory_image = "inksack.png",
})


You need to make an inksack texture and call it 'inksack' It must be a .png picture.



do i put this in api or init?
i'm new too all this still but i will try to make mods and textures check out my map too!
 

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

by Dan Duncombe » Wed Jun 26, 2013 22:24

Add it (I think) to the end of the init.lua
zoropig wrote:
Dan Duncombe wrote:Also, there is no such thing as an inksack in default (Not that I know of)
However, making an item version of one would be easy with:
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_craftitem("evil_squid:inksack", {
    description = "Ink Sack",
    inventory_image = "inksack.png",
})


You need to make an inksack texture and call it 'inksack' It must be a .png picture.



do i put this in api or init?
Last edited by Dan Duncombe on Wed Jun 26, 2013 22:25, edited 1 time in total.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Thu Jun 27, 2013 14:26

what should i put in depends? (sorry for all the Q. this is my first mod)
i'm new too all this still but i will try to make mods and textures check out my map too!
 

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

by Dan Duncombe » Thu Jun 27, 2013 15:02

In the depenbds you should the name, one per line, of any mod that this mod cannot work without. In this case you will probably need to put in the Simple Mobs mod (put the actual modname, not just Simple Mobs)
zoropig wrote:what should i put in depends? (sorry for all the Q. this is my first mod)
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Fri Jun 28, 2013 14:43

it still does not work for me. i dont know why
i'm new too all this still but i will try to make mods and textures check out my map too!
 

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

by Dan Duncombe » Fri Jun 28, 2013 15:06

Instructions for debugging:
1) Go to your minetest/bin folder
2)Find the debug.txt (should be at the top)
3)Delete it
4)Open Minetest and try to play the world so that you get the mod error
5)Close Minetest
6)Open the debug.txt
7)Post all of the contents here, preferably in a code box
8)Also post the mod code
9)Someone will try and see what's wrong with it
Last edited by Dan Duncombe on Fri Jun 28, 2013 15:06, edited 1 time in total.
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 » Fri Jun 28, 2013 18:16

zoropig wrote:it still does not work for me. i dont know why


Neither do I.

Maybe you should post the error message(s) from debug.txt...

EDIT: Aye, see previous post.
Last edited by Mossmanikin on Fri Jun 28, 2013 18:17, edited 1 time in total.

Noob 4 life!
My stuff
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Sun Jun 30, 2013 14:18

Mossmanikin wrote:
zoropig wrote:it still does not work for me. i dont know why


Neither do I.

Maybe you should post the error message(s) from debug.txt...

EDIT: Aye, see previous post.




07:07:04: ERROR[main]: ========== ERROR FROM LUA ===========
07:07:04: ERROR[main]: Failed to load and run script from
07:07:04: ERROR[main]: C:\Users\name\Downloads\minetest-0.4.7\minetest-0.4.7\bin\..\mods\evil_squids\init.lua:
07:07:04: ERROR[main]: cannot open C:\Users\name\Downloads\minetest-0.4.7\minetest-0.4.7\bin\..\mods\evil_squids\init.lua: No such file or directory
07:07:04: ERROR[main]: =======END OF ERROR FROM LUA ========
07:07:04: ERROR[main]: Server: Failed to load and run C:\Users/ <--- woops:name\Downloads\minetest-0.4.7\minetest-0.4.7\bin\..\mods\evil_squids\init.lua
07:07:04: ERROR[main]: ModError: Failed to load and run C:\Users\name\Downloads\minetest-0.4.7\minetest-0.4.7\bin\..\mods\evil_squids\init.lua
i'm new too all this still but i will try to make mods and textures check out my map too!
 

zoropig
Member
 
Posts: 50
Joined: Fri May 03, 2013 13:18

by zoropig » Sun Jun 30, 2013 14:21

my init thing right now is


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

mobs:register_mob("evil_squid:squid", {
type = "animal",
hp_max = 100,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "evil_squid_derpy_squid",
textures = {"evil squids_derpy_squid.png"},
visual_size = {x=3, y=2.6},
makes_footstep_sound = false,
view_range = 15,
walk_velocity = 1,
run_velocity = 3,
damage = 0,
drops = {
{name = "default:inksack",
chance = 1,
min = 3,
i'm new too all this still but i will try to make mods and textures check out my map too!
 

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

by Mossmanikin » Mon Jul 01, 2013 01:38

Have you read this?
And this?
Does the "evil_squid" folder exist?
Does the "evil_squids" mod exist?
Does the file "api.lua" exist?
Have you added the word "mod" (without "") to "depends.txt"?
Does the mesh "evil_squid_derpy_squid" exist?
Is there something wrong with "evil squids_derpy_squid.png"?
Is "default:inksack" in the mod "default"?
Is this the complete code you have?
Last edited by Mossmanikin on Mon Jul 01, 2013 01:39, edited 1 time in total.

Noob 4 life!
My stuff
 

Next

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron