Post your modding questions here

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Post your modding questions here

by Byakuren » Wed Dec 07, 2016 19:17

Nyarg wrote:Is here something like on_collide for entities ?

No
Every time a mod API is left undocumented, a koala dies.
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: Post your modding questions here

by stu » Wed Dec 07, 2016 19:47

Byakuren wrote:
Nyarg wrote:Is here something like on_collide for entities ?

No

While there are no direct collision callbacks there are ways you can crudely implement collision detection. How you do that depends on what collisions you want to detect. Is it nodes, other entities or just the fact that you collided at all?
 

User avatar
nomohakon
Member
 
Posts: 207
Joined: Fri Aug 10, 2012 16:34
IRC: nomohakon
In-game: nomohakon

Re: Post your modding questions here

by nomohakon » Thu Dec 08, 2016 01:08

How to make schematic and how to use singlenode mapgen? Im trying to make underground version of skyblock game, and i need to know if its even posible (full map of stone, some ores, some generated structures, player spawning, etc.).
"To learn who rules over you, simply find out who you are not allowed to criticize." - Voltaire
"Knowledge, like air, is vital to life. Like air, no one should be denied it." - Alan Moore, V for Vendetta
- - -
"To never die... and to conquer all, that is winning." ―Illyria
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Post your modding questions here

by sofar » Thu Dec 08, 2016 01:21

nomohakon wrote:How to make schematic and how to use singlenode mapgen? Im trying to make underground version of skyblock game, and i need to know if its even posible (full map of stone, some ores, some generated structures, player spawning, etc.).


You can look at this project to see how to make them from lua (and then save as .mts).

https://github.com/minetest-mods/saveschems

Worldedit can also save them, but it's harder to set probability factors that way.
 

Nyarg
Member
 
Posts: 144
Joined: Sun May 15, 2016 04:32

Re: Post your modding questions here

by Nyarg » Thu Dec 08, 2016 03:08

stu wrote:...crudely implement collision detection.

Yeah ) I am looking trough *.lua in Minetest folder and understand that collision detecting makes directly via simple alhoritm like detect nearby laying nodes. (for examples [funCaves], [throwing], rain and snow in some mods)

It looks sadly when my future mod like airship with face over >1000 blocks navigates trought difficult path geometry with epic multiple collision and partially destroying self structure on it.

stu wrote: Is it nodes, other entities or just the fact that you collided at all?
Entities with nodes and other entities.
I am a noob. still yet. Not so noob ) [vml] WIP
"My english isn't well" I know. I'm sorry )
 

Nyarg
Member
 
Posts: 144
Joined: Sun May 15, 2016 04:32

Re: Post your modding questions here

by Nyarg » Sat Dec 10, 2016 10:42

Ooops. I'm found something sad.

3 entity was create and attached as chain or star.
Both experiment given same behaviour.

Only first entity (root) have collision with world and me.
Other two only with me but world.

Is it right or I'm doing something wrong ?

shoot
+ Spoiler
code
+ Spoiler
I am a noob. still yet. Not so noob ) [vml] WIP
"My english isn't well" I know. I'm sorry )
 

User avatar
Damien
New member
 
Posts: 7
Joined: Wed Mar 18, 2015 05:11
In-game: Damien

Re: Post your modding questions here

by Damien » Thu Dec 15, 2016 19:50

Hey chaps!
I was wondering : can one make voxel models and use them for entities here on Minetest?
And if so,may I also ask how many voxels would a minetest node be wide?
Thank you for your patience.
 

oscar14
Member
 
Posts: 34
Joined: Sat Dec 26, 2015 17:40
GitHub: camus14

Re: Post your modding questions here

by oscar14 » Thu Dec 15, 2016 20:15

A bronze pick have a max_drop_level=1, and a obsidian brick is a node level = 2.

I shouldn't be able to get any drop digging a obsidian brick with a bronze pick, but I do. Is just me or there is something I'm misunderstanding?
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Post your modding questions here

by D00Med » Thu Dec 15, 2016 20:30

max_drop_level is something else, it is "maxlevel" in "groupcaps" that defines what the tool can dig.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

oscar14
Member
 
Posts: 34
Joined: Sat Dec 26, 2015 17:40
GitHub: camus14

Re: Post your modding questions here

by oscar14 » Thu Dec 15, 2016 20:47

What is the max_drop_level then?

I want certain node to be digable whit all tools but not drop his item always, only with an specific tool.
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Post your modding questions here

by D00Med » Thu Dec 15, 2016 20:59

Maybe the size of the stack that can be dropped?
Then you need to put this in the node definition:
" drop = "", "
That will make it drop nothing, then you need to add a function for "on_destruct"
There might be a better way to do it.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

oscar14
Member
 
Posts: 34
Joined: Sat Dec 26, 2015 17:40
GitHub: camus14

Re: Post your modding questions here

by oscar14 » Thu Dec 15, 2016 21:36

Yeah, that would work. If I don't find any other option I think I'll go that way.
 

User avatar
Pyros
Member
 
Posts: 24
Joined: Thu Jul 07, 2016 19:45
In-game: Pyros

Re: Post your modding questions here

by Pyros » Tue Dec 20, 2016 02:37

Hello,

I would like to know the code for making an entity spawn another entity, such as a fighter jet firing a missile.
I would also like to do this without the use of any APIs such as vehicle_ mash, not that I have anything against them.
Is this possible?
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Post your modding questions here

by D00Med » Tue Dec 20, 2016 04:37

Using this will make an entity spawn:
local name = minetest.env:add_entity(pos, "entity_name")
If you want it to be spawned by another entity, then put that somewhere in the entity's "on_step" function, with a trigger of some sort to make it happen at the right time :)
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: Post your modding questions here

by orwell » Tue Dec 20, 2016 12:23

D00Med wrote:local name = minetest.env:add_entity(pos, "entity_name")

minetest.env is deprecated. Use this instead:
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 object = minetest.add_entity(pos, "entity_name")

it returns the ObjectRef (what that is see lua_api.txt) of the new entity or nil if it cannot be spawned.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

Robsoie
Member
 
Posts: 48
Joined: Fri Apr 29, 2016 16:22

Re: Post your modding questions here

by Robsoie » Wed Dec 21, 2016 12:23

On an old thread i asked on how to make those forests/jungle less dense (as i never had any fun with how they are set up) :
viewtopic.php?f=47&t=14545

And it worked great and can be tweaked a lot , by example on a v7 that usually generate very dense forests on my world i could obtain this with lower offset and scale for the tree decorations :
http://i.imgur.com/qcAcvQz.jpg

Now what i would like to try is to make biome smallers so instead of sometime being randomly and boringly near endless area of snow or grass, when exploring i would want to often move between visually different biomes .

Now looking at the biome definition, by example the snowy grassland one :
minetest.register_biome({
name = "snowy_grassland",
node_dust = "default:snow",
node_top = "default:dirt_with_snow",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
node_riverbed = "default:sand",
depth_riverbed = 2,
y_min = 5,
y_max = 31000,
heat_point = 20,
humidity_point = 35,

I don't seem to find anything controlling the actual size of this one as searching the board about what does those parameters mean (as there's no documentation about this) , they don't seem related to the actual biome size

And ther's this :
viewtopic.php?f=47&t=11603
They need to be evenly spaced out on a graph of heat agaiinst humidity for roughly equal size biomes, but even then because of the nature of perlin noise biomes will vary in size and sometimes be rare or huge.


So is it really impossible to limit biome sizes ?
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: Post your modding questions here

by orwell » Wed Dec 21, 2016 12:29

No. There was something about noise params. I think this question was asked and answered somewhere.

In minetest.conf:
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
mg_biome_np_heat = 50, 50, (n, n, n), 5349, 3, 0.5, 2.0
mg_biome_np_humidity = 50, 50, (n, n, n), 842, 3, 0.5, 2.0

the value 'n' is default 600 (or so), set it to the diameter that biomes should have (roughly).
this changes the perlin noise maps to be more dense.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

Robsoie
Member
 
Posts: 48
Joined: Fri Apr 29, 2016 16:22

Re: Post your modding questions here

by Robsoie » Wed Dec 21, 2016 12:56

Thank you very much, time for experimenting :)

edit : looks like it's working
http://i.imgur.com/oyj49n1.jpg
going to have fun testing around the values
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: Post your modding questions here

by TumeniNodes » Wed Dec 21, 2016 16:08

It might be worth looking over this section https://forum.minetest.net/viewtopic.php?f=47&t=15272, and even posting questions there it would keep any mapgen items in one place, which makes it far more helpful to others being in one section
Flick?... Flick who?
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: Post your modding questions here

by DS-minetest » Wed Dec 21, 2016 16:13

is there a way to give two or more different textures to an entities with mesh at once, some sides the one texture, some the other one?
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Post your modding questions here

by sofar » Wed Dec 21, 2016 16:22

DS-minetest wrote:is there a way to give two or more different textures to an entities with mesh at once, some sides the one texture, some the other one?


yes, as long as the model has the proper 2 materials defined. Use `textures = { texture1, texture2},` (off the top of my head)
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: Post your modding questions here

by ExeterDad » Wed Dec 21, 2016 16:32

sofar wrote:
DS-minetest wrote:is there a way to give two or more different textures to an entities with mesh at once, some sides the one texture, some the other one?


yes, as long as the model has the proper 2 materials defined. Use `textures = { texture1, texture2},` (off the top of my head)

That is correct

I would guess most models used in Minetest (think mobs) only contain one material though. A work around could be to overlay another texture to add something. For example if you wanted to give Sam a black eye, you would assign character.png^black_eye.png

The black eye texture would be exactly the same size as character.png. It would be transparent with a black eye drawn where Sams eye would be.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
Napiophelios
Member
 
Posts: 752
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: Post your modding questions here

by Napiophelios » Thu Dec 22, 2016 02:53

When using drawtype = "plantlike",
I use paramtype2 = "meshoptions",
then add place_param2 = 1,

but nothing is different, it looks the same as normal plantlike draw type.
what am I doing wrong?


EDIT:
AH. never mind. Figured out the problem :)
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Post your modding questions here

by D00Med » Thu Dec 22, 2016 05:03

paramtype2 should stay as "plantlike", and I think place_param2 = 1 will result in a normal plantlike node anyway(maybe not), try it with 3 or 4 to test.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

User avatar
Napiophelios
Member
 
Posts: 752
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: Post your modding questions here

by Napiophelios » Thu Dec 22, 2016 05:48

D00Med wrote:paramtype2 should stay as "plantlike", and I think place_param2 = 1 will result in a normal plantlike node anyway(maybe not), try it with 3 or 4 to test.


normal is an "x" pattern,
I wanted a "+" pattern.

It works, it just didn't seem to work with minetest.add_node
works fine with minetest.place_node
go figure right
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Post your modding questions here

by D00Med » Thu Dec 22, 2016 07:25

Oh ok, you are right, 1 is that shape.
It will work with: minetest.set_node(pos, {name="blah:blah", param2=1})
And I think there's a way to set it when a node is placed as a simple mapgen decoration.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Post your modding questions here

by D00Med » Sat Dec 24, 2016 03:52

Is there a way to check if the view is 3rd or 1st person?
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Post your modding questions here

by sofar » Sat Dec 24, 2016 04:07

Napiophelios wrote:it just didn't seem to work with minetest.add_node
works fine with minetest.place_node


add_node ignores any placement defaults, so you have to do

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.add_node(pos, {name = "plant:name", param2 = 1})


instead.
 

ManElevation
Member
 
Posts: 213
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation

Re: Post your modding questions here

by ManElevation » Sun Dec 25, 2016 10:23

can some one write a block lua script. just a plain block
with a {"front.png"} a {"side.png"} and a {"top.png"} {"back.png"}

a full one please
Hey there im going to be off minetest for a while because my company has been deleloping a game called Ground Conflict, if you wish to see some screenshots or have some info, than please join our discord server https://discord.gg/C9ygXJn
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: Post your modding questions here

by orwell » Sun Dec 25, 2016 10:36

D00Med wrote:Is there a way to check if the view is 3rd or 1st person?

That is not sent to the server, so no. Not possible without network protocol changes
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 6 guests

cron