Post your modding questions here

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

Re: Post your modding questions here

by Nyarg » Post

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: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Post your modding questions here

by Krock » Post

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

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
Desour
Member
Posts: 1473
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: Post your modding questions here

by Desour » Post

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.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

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

Re: Post your modding questions here

by Nyarg » Post

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
Desour
Member
Posts: 1473
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: Post your modding questions here

by Desour » Post

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.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

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

Re: Post your modding questions here

by Byakuren » Post

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: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: Post your modding questions here

by BrunoMine » Post

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: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: Post your modding questions here

by orwell » Post

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: 4804
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Post your modding questions here

by Wuzzy » Post

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

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

Re: Post your modding questions here

by Nyarg » Post

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: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Post your modding questions here

by sofar » Post


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

Re: Post your modding questions here

by stu » Post

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
GitHub: stujones11
Location: United Kingdom

Re: Post your modding questions here

by stu » Post

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

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

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: 4804
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Post your modding questions here

by Wuzzy » Post

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

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

Re: Post your modding questions here

by TumeniNodes » Post

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?
A Wonderful World

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

Re: Post your modding questions here

by ACrazyNewfie » Post

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: 30
Joined: Thu Dec 03, 2015 10:34

Re: Post your modding questions here

by ACrazyNewfie » Post

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

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: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Post your modding questions here

by azekill_DIABLO » Post

set troll? :D
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Post your modding questions here

by Nyarg » Post

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
GitHub: yzelast
In-game: yzelast
Location: Far Far Away

Re: Post your modding questions here

by yzelast » Post

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: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your modding questions here

by burli » Post

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

Locked

Who is online

Users browsing this forum: No registered users and 7 guests