squids mod help
squids mod help
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!
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
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!
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
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
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
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!
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
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
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.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
Thefamilygrog66 has made a mod that might help you with that:zoropig wrote:how do i make a mob egg or somthing to spawn these mobs?
http://forum.minetest.net/viewtopic.php?id=6214
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!
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
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:
You need to make an inksack texture and call it 'inksack' It must be a .png picture.
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",
})
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
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:You need to make an inksack texture and call it 'inksack' It must be a .png picture.Code: Select all
minetest.register_craftitem("evil_squid:inksack", { description = "Ink Sack", inventory_image = "inksack.png", })
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!
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
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:You need to make an inksack texture and call it 'inksack' It must be a .png picture.Code: Select all
minetest.register_craftitem("evil_squid:inksack", { description = "Ink Sack", inventory_image = "inksack.png", })
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.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
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.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
Who is online
Users browsing this forum: Google [Bot] and 30 guests