Post your modding questions here

Gerald
Member
 
Posts: 91
Joined: Sun Dec 28, 2014 10:35
Location: Germany
In-game: gerald7

Re: Post your modding questions here

by Gerald » Sun May 28, 2017 21:15

texmex wrote:
Gerald wrote:
texmex wrote:How do i populate the right side of this node box with texture? Can I make a texture stretch the whole area or do I divide the textures (like I've started on here)?


I think the clean solution is to define two nodes like doors.

Turns out doors are mesh and not nodeboxes.

For example doors by BlockMen uses nodebox. But the trick should be the same:
Define two nodes "up" and "down". In on_place of "down" try to place "up" above. In after_dig_node of "up" dig the node below and vice versa.
 

User avatar
Linuxdirk
Member
 
Posts: 2010
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: Post your modding questions here

by Linuxdirk » Sun Jun 04, 2017 09:07

I wonder what’s the maximum amounts of recipes and nodes are. My xFurniture mod adds a shit-ton of objects to craft. Each of the objects is craftable from all solid nodes from default and from some other mods it opt-depends on.

When loaded with all supported mods available and nothing disabled it registers 78 objects each craftable from all of the 312 supported nodes resulting in 10608 new nodes and recipes.
 

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

User avatar
BirgitLachner
Member
 
Posts: 379
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: Post your modding questions here

by BirgitLachner » Sun Jun 04, 2017 19:13

Does anybody know a mod that shows the names of players that are currently online? Or maybe even the players that has been online at least once? I need seomthing like this for a TeacherTool-Mod.
 

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 » Sun Jun 04, 2017 20:13

BirgitLachner wrote:Does anybody know a mod that shows the names of players that are currently online? Or maybe even the players that has been online at least once? I need seomthing like this for a TeacherTool-Mod.


You can get a list of connected players with minetest.get_connected_players
Every time a mod API is left undocumented, a koala dies.
 

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

Re: Post your modding questions here

by Nyarg » Sun Jun 04, 2017 21:21

BirgitLachner wrote:Does anybody know a mod that shows the names of players that are currently online?.
may be viewtopic.php?f=53&t=17695&hilit=who
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
Lone_Wolf
Member
 
Posts: 2160
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: Post your modding questions here

by Lone_Wolf » Sun Jun 04, 2017 22:38

BirgitLachner wrote:Does anybody know a mod that shows the names of players that are currently online? Or maybe even the players that has been online at least once? I need seomthing like this for a TeacherTool-Mod.

/status shows all players currently on the server. /last-login (playername) to see the last login of the player selected.
 

User avatar
BirgitLachner
Member
 
Posts: 379
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: Post your modding questions here

by BirgitLachner » Mon Jun 05, 2017 07:14

Thanks to all of your replies.

The mod "Who" offers what I want. A list in a formspec. I need the list because hopefully it would be possible to choose a player from the list and then execute some commands WITHOUT keyboard. Not because it is for mobile devices but it should be easy to use for teachers just to click and have an action.
 

User avatar
christoferlevich
Member
 
Posts: 323
Joined: Thu Dec 01, 2016 23:44
Location: Athol, Massachusetts
GitHub: ChristoferL

Re: Post your modding questions here

by christoferlevich » Mon Jun 05, 2017 12:30

There is a mod called "Who"?

Found it - didnt click the links in previous posts
everything can be a learning experience...
 

User avatar
texmex
Member
 
Posts: 1414
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Post your modding questions here

by texmex » Mon Jun 05, 2017 19:04

I want to do override_item but on whole groups, how can I do that?

I got it down to work with single nodes, but I don't know how to step through a whole group to then do the same thing…

Code: Select all
local floodables = {
  { node = "default:torch" },
  { node = "default:torch_wall", drop = "default:torch" },
  { node = "default:torch_ceiling", drop = "default:torch" },
  { node = "default:junglegrass"},
  { group = "group:grass" },
  { group = "group:dry_grass" },
}

for _,c in ipairs(floodables) do
  if c.node ~=nil then
    minetest.override_item(c.node, {
      floodable = true,
      on_flood = function(pos, oldnode, newnode)
        minetest.remove_node(pos)
        if c.drop == nil then c.drop = c.node end
        minetest.add_item(pos, {name = c.drop})
      end
    })
  elseif c.group ~=nil then
  end
end

Edit: Found a solution. Wrote it here.

I'm also open for critique of anything else about the code.
 

User avatar
texmex
Member
 
Posts: 1414
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Post your modding questions here

by texmex » Wed Jun 07, 2017 14:21

Can I modify the screwdriver so that it rotates the node shape but not the texture?
 

User avatar
TumeniNodes
Member
 
Posts: 2701
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 » Wed Jun 07, 2017 16:59

the secret would be within texture assignment itself, not so much the screwdriver's code.
definitely a good question and interesting idea, and I know the reason, and it would be a big deal to figure this out.

if textures could be fixated, regardless of the position of the node.
now my brain is spinning, gonna try a couple ideas.

edit, I found something looks interesting tex
http://wiki.bk.tudelft.nl/toi-pedia/Tex ... on_mapping

This may be a better place to start researching (the above is related to Maya)
http://www.ozone3d.net/tutorials/glsl_texturing_p08.php

I think the first questions will be, will MT have limitations blocking this, and what cost to fps will it be
shaders are not an easy animal to tame : /
I couldn't fix your brakes, so I made your horn louder.
 

User avatar
texmex
Member
 
Posts: 1414
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Post your modding questions here

by texmex » Wed Jun 07, 2017 19:00

TumeniNodes wrote:the secret would be within texture assignment itself, not so much the screwdriver's code.
definitely a good question and interesting idea, and I know the reason, and it would be a big deal to figure this out.

if textures could be fixated, regardless of the position of the node.
now my brain is spinning, gonna try a couple ideas.

edit, I found something looks interesting tex
http://wiki.bk.tudelft.nl/toi-pedia/Tex ... on_mapping

This may be a better place to start researching (the above is related to Maya)
http://www.ozone3d.net/tutorials/glsl_texturing_p08.php

I think the first questions will be, will MT have limitations blocking this, and what cost to fps will it be
shaders are not an easy animal to tame : /

What I'm looking for is for the texture to stay non-rotated on a node, not all those custom shennanigans. :)

I simply want to resolve this problem:
Image
 

User avatar
TumeniNodes
Member
 
Posts: 2701
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 » Wed Jun 07, 2017 19:51

I understand that problem, it has driven me nuts as well.
But, I have a feeling projection mapping would be the only way to manage it.

this issue has been creating this problem with textures forever.
It even came up when I was working on the angled stairs mod. The best solution at the time was to make duplicate/mirrored nodes, (which still does not resolve it entirely)

Since textures are tied to the object, and assigned on a per-face instance, I don't see much option than to look at shaders for solutions.

It sucks but, there it is.

I hope someone can come along and make us both happy as pigs in sh...tuff with a simple solution : )
I couldn't fix your brakes, so I made your horn louder.
 

User avatar
texmex
Member
 
Posts: 1414
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Post your modding questions here

by texmex » Wed Jun 07, 2017 21:04

TumeniNodes wrote:I understand that problem, it has driven me nuts as well.
But, I have a feeling projection mapping would be the only way to manage it.

this issue has been creating this problem with textures forever.
It even came up when I was working on the angled stairs mod. The best solution at the time was to make duplicate/mirrored nodes, (which still does not resolve it entirely)

Since textures are tied to the object, and assigned on a per-face instance, I don't see much option than to look at shaders for solutions.

It sucks but, there it is.

I hope someone can come along and make us both happy as pigs in sh...tuff with a simple solution : )

Alright, I understand now. Thank you for feeling my pain. Let's hope for the best :)
 

Gerald
Member
 
Posts: 91
Joined: Sun Dec 28, 2014 10:35
Location: Germany
In-game: gerald7

Re: Post your modding questions here

by Gerald » Wed Jun 07, 2017 21:27

TumeniNodes wrote:I understand that problem, it has driven me nuts as well.
But, I have a feeling projection mapping would be the only way to manage it.

this issue has been creating this problem with textures forever.
It even came up when I was working on the angled stairs mod. The best solution at the time was to make duplicate/mirrored nodes, (which still does not resolve it entirely)

Since textures are tied to the object, and assigned on a per-face instance, I don't see much option than to look at shaders for solutions.

It sucks but, there it is.

I hope someone can come along and make us both happy as pigs in sh...tuff with a simple solution : )


I have a fundamental solution:
  • Throw away half slabs.
  • Increase the size of the player to ca. 4 nodes to half the relative length of the nodes. (difficult because of the collisonbox)
  • Add a method of rough node placement/digging filling/clearing 2x2x2 cubes to keep the old building experience.
  • Replace nodes and textures of unfitting size e.g. doors.

This will solve every problem half slabs have: combining them, smooth lighting, water interaction, cut textures, ...
 

User avatar
Linuxdirk
Member
 
Posts: 2010
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: Post your modding questions here

by Linuxdirk » Wed Jun 07, 2017 21:34

There's an issue over at GitHub for this.

But since none of the most influential devs care this issue would not be solved in the foreseeable future :(

This is why xFurniture provides pre-rotated stairs. If you want something in MT that the devs do not like or care about you need to do it by yourself.
 

User avatar
TumeniNodes
Member
 
Posts: 2701
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 » Wed Jun 07, 2017 21:53

whoah there...

this is an issue which can be resolved either by
A. implementing customized textures per type of node, to cover all possible angles, which means requiring "tumeninodes" :P

B. projection texture mapping. which requires a shader.
The one dev who had some experience with shaders, sadly passed.
and this can't truly be viewed as a "major issue". it is a cosmetic issue, common in a cubic environment.
I honestly don't feel it is fair to lash at devs for this.
I couldn't fix your brakes, so I made your horn louder.
 

User avatar
TumeniNodes
Member
 
Posts: 2701
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 » Wed Jun 07, 2017 23:09

I opened a thread where we can talk about this so we stop filling this, already overly congested thread with the topic :P
viewtopic.php?f=3&t=17832

if anyone is interested
I couldn't fix your brakes, so I made your horn louder.
 

User avatar
Lejo
Member
 
Posts: 579
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: Post your modding questions here

by Lejo » Sat Jun 10, 2017 09:50

How can I teleport players to positions out of the minetest.conf?
I tried:
minetest.conf:
Code: Select all
spawn_lobby = 0 80 0

Code:
Code: Select all
minetest.register_on_joinplayer(function(player)
  local name = player:get_player_name()
  local spawn = minetest.setting_get("spawn_lobby")
    name:setpos(spawn)
end)

PS: I know that I can also use here static_spawnpoint, but I later need it for something else.

I get this Error:
Code: Select all
2017-06-10 11:48:19: ERROR[Main]: ServerError: Lua: Runtime error from mod 'mesewars' in callback on_joinplayer(): ...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:6: attempt to call method 'setpos' (a nil value)
2017-06-10 11:48:19: ERROR[Main]: stack traceback:
2017-06-10 11:48:19: ERROR[Main]:    ...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:6: in function <...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:3>
 

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

Re: Post your modding questions here

by Nyarg » Sat Jun 10, 2017 10:03

Lejo wrote:
Code: Select all
    name:setpos(spawn)


...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:6: attempt to call method 'setpos' (a nil value)
seems like variable "name" have not something to call

so may be
player:setpos(spawn) at least

http://dev.minetest.net/player
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
Lejo
Member
 
Posts: 579
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: Post your modding questions here

by Lejo » Sat Jun 10, 2017 10:12

Now I do so:
Code: Select all
minetest.register_on_joinplayer(function(player)
  local spawn = minetest.setting_get("spawn_lobby")
    player:setpos(spawn)
end)



And get this Error:
Code: Select all
2017-06-10 12:08:15: ERROR[Main]: ServerError: Lua: Runtime error from mod 'mesewars' in callback on_joinplayer(): Invalid position (expected table got string).
2017-06-10 12:08:15: ERROR[Main]: stack traceback:
2017-06-10 12:08:15: ERROR[Main]:    [C]: in function 'setpos'
2017-06-10 12:08:15: ERROR[Main]:    ...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:5: in function <...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:3>
2017-06-10 12:08:15: ERROR[Main]:    /usr/local/share/minetest/builtin/game/register.lua:412: in function </usr/local/share/minetest/builtin/game/register.lua:392>


And if I then try:
Code: Select all
minetest.register_on_joinplayer(function(player)
  local spawn = minetest.setting_get("spawn_lobby")
  local pos = minetest.pos_to_string(spawn)
    player:setpos(pos)
end)

I get this Error:
Code: Select all
2017-06-10 12:11:41: ERROR[Main]: ServerError: Lua: Runtime error from mod 'mesewars' in callback on_joinplayer(): /usr/local/share/minetest/builtin/common/misc_helpers.lua:523: attempt to concatenate local 'z' (a nil value)
2017-06-10 12:11:41: ERROR[Main]: stack traceback:
2017-06-10 12:11:41: ERROR[Main]:    /usr/local/share/minetest/builtin/common/misc_helpers.lua:523: in function 'pos_to_string'
2017-06-10 12:11:41: ERROR[Main]:    ...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:5: in function <...e/user/.minetest/games/mesewars/mods/mesewars/join.lua:3>
2017-06-10 12:11:41: ERROR[Main]:    /usr/local/share/minetest/builtin/game/register.lua:412: in function </usr/local/share/minetest/builtin/game/register.lua:392>
 

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

Re: Post your modding questions here

by Nyarg » Sat Jun 10, 2017 10:42

Lejo wrote:minetest.conf:
Code: Select all
spawn_lobby = 0 80 0


Lejo wrote:
Code: Select all
2017-06-10 12:08:15: ERROR[Main]: ServerError: Lua: Runtime error from mod 'mesewars' in callback on_joinplayer(): Invalid position (expected table got string).


(expected table got string) - "pos" is a table formatted so
may be
Code: Select all
spawn_lobby = {x=0, y=80, z=0}
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
Lejo
Member
 
Posts: 579
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 

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

Re: Post your modding questions here

by Nyarg » Sat Jun 10, 2017 11:27

Wow I found instruction and read it ) http://dev.minetest.net/setting_get_pos
try * `minetest.setting_get_pos(name)`: returns position or nil
with
spawn_lobby = 0 80 0
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 )
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 1 guest