Post your modding questions here

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

Re: Post your modding questions here

by Nyarg » Sun Feb 19, 2017 10:48

Oops I found SAO (new entity) haven't something like get_rotate(), only getyaw() present.
Is it right ?
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

User avatar
Krock
Developer
 
Posts: 4395
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Post your modding questions here

by Krock » Sun Feb 19, 2017 11:02

Nyarg wrote:Oops I found SAO (new entity) haven't something like get_rotate(), only getyaw() present.

There is the function get_yaw() for LuaEntities (mobs, dropped items, etc) that returns the rotation in radians, which represents the rotation of the entity. If you need it in degrees, multiply it with (180 / math.pi).
For players, this function is called get_look_horizontal().
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

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

Re: Post your modding questions here

by Nyarg » Sun Feb 19, 2017 12:51

Krock wrote:There is the function get_yaw() for LuaEntities
Yes. But I mean something get_rotate3d() of course.
I need rotate entity in xyz, but see not a way for single entity.
Now I see only one way it use paired entity invisibleRoot+attachedVisibleWithRotation.
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

User avatar
DS-minetest
Member
 
Posts: 1117
Joined: Thu Jun 19, 2014 19:49
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
GitHub: DS-Minetest
In-game: DS

Re: Post your modding questions here

by DS-minetest » Sun Feb 19, 2017 16:08

Nyarg wrote:
Krock wrote:There is the function get_yaw() for LuaEntities
Yes. But I mean something get_rotate3d() of course.
I need rotate entity in xyz, but see not a way for single entity.
Now I see only one way it use paired entity invisibleRoot+attachedVisibleWithRotation.

You don't need to attach an entity to set a bone pos. You can add a bone to the mesh in blender.
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.
 

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

Re: Post your modding questions here

by Nyarg » Mon Feb 20, 2017 10:32

DS-minetest wrote:You can add a bone to the mesh in blender.

Thank for remind me about bones.
Have minetest default bone (something like "root") if I use visual = "cube" not "mesh" ?
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

User avatar
DS-minetest
Member
 
Posts: 1117
Joined: Thu Jun 19, 2014 19:49
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
GitHub: DS-Minetest
In-game: DS

Re: Post your modding questions here

by DS-minetest » Mon Feb 20, 2017 15:50

Nyarg wrote:
DS-minetest wrote:You can add a bone to the mesh in blender.

Thank for remind me about bones.
Have minetest default bone (something like "root") if I use visual = "cube" not "mesh" ?

I don't know but I don't think so, I never saw any documentation for this.
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.
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Post your modding questions here

by Byakuren » Mon Feb 20, 2017 18:26

I thought all entity meshes had a root bone (maybe called ""?) so that you can attach things. Not sure though.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
BrunoMine
Member
 
Posts: 1048
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

Re: Post your modding questions here

by BrunoMine » Mon Feb 20, 2017 18:56

How can I keep a node unchanged after a minetest.place_schematic method?
For example, "default:chest" can not be removed.
 

User avatar
orwell
Member
 
Posts: 788
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell

Re: Post your modding questions here

by orwell » Tue Feb 21, 2017 09:24

AFAIK, the root bone of any object is called "" (empty string)
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
Wuzzy
Member
 
Posts: 3629
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Post your modding questions here

by Wuzzy » Tue Feb 21, 2017 12:30

How do I make entities/objects non-pointable (like pointable=false for nodes) without changing the collision box?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

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

Re: Post your modding questions here

by Nyarg » Tue Feb 21, 2017 14:25

I'm still fail again and again with tests to rotate entity. So I rephrase my question:
I want to pitch or to roll single entity, is somewhere worked example or mod ?
Quick search in forum and collection of mods give no result for set_bone_position().
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

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

User avatar
stu
Member
 
Posts: 923
Joined: Sat Feb 02, 2013 02:51
Location: United Kingdom
GitHub: stujones11

Re: Post your modding questions here

by stu » Tue Feb 21, 2017 19:39

I might also point out that bone rotation is only possible with 'rigged' models exported as an animated format like b3d or directx.
 

User avatar
stu
Member
 
Posts: 923
Joined: Sat Feb 02, 2013 02:51
Location: United Kingdom
GitHub: stujones11

Re: Post your modding questions here

by stu » Tue Feb 21, 2017 19:57

Wuzzy wrote:How do I make entities/objects non-pointable (like pointable=false for nodes) without changing the collision box?

AFAIK there is no other way to do that but there really should be.
 

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

Re: Post your modding questions here

by Nyarg » Wed Feb 22, 2017 15:00

wow something works at least now for mycube.x entity ) Thank you all ) but:
Does collision box inherit rotate of entity in roll and pitch via set_bone_position() ?
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

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

Re: Post your modding questions here

by Nyarg » Thu Feb 23, 2017 00:06

Next problem:
When I do set_bone_position() to root of assembled entities then child entity disappear.
Is it possible to rotate assembled entity ?
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

User avatar
Wuzzy
Member
 
Posts: 3629
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Post your modding questions here

by Wuzzy » Thu Feb 23, 2017 00:43

I have gone crazy in trying to disable caves and dungeons for the mapgen at subgame-level.
I want to make a perfectly flat map without all the mapgen garbage floating around.
And it MUST be the “flat” mapgen because the user should be able to select it from the main menu.

I tried to clean minetest.conf, just to make sure it doesn't conflict.

I tried this:
Code: Select all
minetest.set_mapgen_setting("mg_flags", "nocaves,nodungeons,nodecorations")


But it did nothing. When I create a new flat world, caves, dungeons and decorations still appear.
The file “map_meta.txt” showed the default flags instead of the flags I chose.

What's the point of minetest.set_mapgen_setting if I can't even use it to set the most basic mapgen flags? :-(
Yes, I'm in a bad mood.

EDIT:
I also tried editing the subgame-level minetest.conf.
When I add “mg_flags=nocaves,nodungeons,nodecorations”, it works for “flat”.
BUT this also removes all caves and decorations from the other mapgens, so having a minetest.conf at subgame level is also not helping. :O
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
TumeniNodes
Member
 
Posts: 2827
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: Post your modding questions here

by TumeniNodes » Thu Feb 23, 2017 02:14

In my subgame, I used the default mod folder, and just used the mapgen from there, to set up the mapgen the way I prefer...

I only mention this as I notice MC2 does not have a "default" mod folder.
So, maybe if you add the MT default mod folder and strip out all you do not need and just keep the mapgen.lua in it and set it to your preferences?

nevermind, sorry... I completely forgot you use "core".... rather than default. and you have mapgen in there...
Please disregard my ignorance

in the code you used above, I think you may need to specify mg_flat, if you only want those flags to effect mg flat?
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

User avatar
ACrazyNewfie
Member
 
Posts: 12
Joined: Thu Dec 03, 2015 10:34

Re: Post your modding questions here

by ACrazyNewfie » Thu Feb 23, 2017 14:19

I'm trying to make a bunch of status effects similar to Minecraft but I'm having trouble. Please answer whatever questions you can.

How do I stop a player from taking damage in certain blocks, e.g. fire?

How do I reduce a player's fall damage?
Last edited by ACrazyNewfie on Sat Feb 25, 2017 11:17, edited 3 times in total.
 

User avatar
ACrazyNewfie
Member
 
Posts: 12
Joined: Thu Dec 03, 2015 10:34

Re: Post your modding questions here

by ACrazyNewfie » Fri Feb 24, 2017 11:19

-- Already Answered --

Along with my other questions (see post above) I have a new one: How would I give a player "night vision", allowing them to see everything as if in daylight?
Last edited by ACrazyNewfie on Sat Feb 25, 2017 11:18, edited 2 times in total.
 

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

Re: Post your modding questions here

by Nyarg » Fri Feb 24, 2017 12:11

why entity have setyaw() but haven't setroll() and setpitch() ?
[answered IRC] <Calinou> entities have no pitch and roll in Minetest

so set_bone_position() works for single entity but attached entity seems immediatelly detach from root entity
is there a way to rotate assembled entity not even in horizont ?
Last edited by Nyarg on Fri Feb 24, 2017 12:23, edited 2 times in total.
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

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

Re: Post your modding questions here

by Nyarg » Fri Feb 24, 2017 12:25

azekill_DIABLO wrote:set troll? :D
))) minetest trolls me )
Now I am stuck about rotate ship maked via attached entities and have no idea (quick rotate huge object) about any way it reach )
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
 

User avatar
yzelast
Member
 
Posts: 54
Joined: Sun Oct 02, 2016 01:18
Location: Far Far Away
GitHub: yzelast
In-game: yzelast

Re: Post your modding questions here

by yzelast » Fri Feb 24, 2017 20:17

Hey guys, i have a little question: There's a way to get how the node is rotated?

What a want to do is basically:
  • get node's rotation
  • set the pos with air
  • placa another node with the same rotation
G84mU6AQ9dKaNhxn6dq8P5C0y5r8NssE
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: Post your modding questions here

by burli » Fri Feb 24, 2017 20:30

yzelast wrote:Hey guys, i have a little question: There's a way to get how the node is rotated?

What a want to do is basically:
  • get node's rotation
  • set the pos with air
  • placa another node with the same rotation

What you want is param2. Take a look in the stairs mod.

or try swap_node()

https://github.com/minetest/minetest/bl ... .txt#L2188

And you don't need to set air first
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: MSN [Bot] and 4 guests