squids mod help

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

squids mod help

by zoropig » Post

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
Location: Germany

by PilzAdam » Post

RTFM

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

by zoropig » Post

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 » Post

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 » Post

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 » Post

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: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post

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 » Post

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 » Post

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
Location: where we don't speak english.

by Mossmanikin » Post

Does your mod load now?

Noob 4 life!
My stuff

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

by LionsDen » Post

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
Location: In the unknown depths of Earth

by Dan Duncombe » Post

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: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post

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 » Post

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 » Post

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 » Post

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 » Post

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: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

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
Location: where we don't speak english.

by Mossmanikin » Post

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
Location: In the unknown depths of Earth

by Dan Duncombe » Post

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:

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 » Post

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:

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
Location: In the unknown depths of Earth

by Dan Duncombe » Post

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:

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 » Post

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
Location: In the unknown depths of Earth

by Dan Duncombe » Post

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 » Post

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!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 30 guests