Post your modding questions here

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Sun Jul 17, 2016 16:18

I'm making the assumption that you are trying to make Minetest register the node as a default: node. However, the ":" prefix is only for replacing existing nodes, not using other mods to register a non-present node as present in the mod. You can only use this prefix if you are already replacing an existing "default:stone_with_gold". So you'll just have to register it as a default_extra node.

Just my meagre knowledge and guesswork..
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Sun Jul 17, 2016 17:43

ABJ wrote:However, the ":" prefix is only for replacing existing nodes, not using other mods to register a non-present node as present in the mod. You can only use this prefix if you are already replacing an existing "default:stone_with_gold".


Not true. The : prefix disables the name check, so you can use it to add a node called default:stone in a mod called default_extra
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

Re: Post your modding questions here

by Casimir » Sun Jul 17, 2016 18:37

-.- Stupid me. I hade a dofile... pointing to mod "default". Fixed now. Works now.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Mon Jul 18, 2016 08:19

Wow nice.
I made another mistake.
I COULD HAVE LOOKED SO MATURE! :P XD
 

Nefario
New member
 
Posts: 2
Joined: Fri Jul 15, 2016 12:15
GitHub: rhobariii
IRC: rhobariii
In-game: rhobariii

Re: Post your modding questions here

by Nefario » Mon Jul 18, 2016 16:23

Hello, I've ran into a problem with my new mod. See this screenshot here: http://i.imgur.com/7g6rYtE.png
As you can see, some squares are weirdly "highlighted". Here is my code:

Note:I removed the code from here since my issue is fixed.

Can anyone help?
Last edited by Nefario on Tue Jul 19, 2016 10:53, edited 1 time in total.
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: Post your modding questions here

by everamzah » Tue Jul 19, 2016 09:38

Perhaps try commenting out default.get_hotbar_bg(0,4.85), or maybe changing it to default.get_hotbar_bg(9,0).
 

Nefario
New member
 
Posts: 2
Joined: Fri Jul 15, 2016 12:15
GitHub: rhobariii
IRC: rhobariii
In-game: rhobariii

Re: Post your modding questions here

by Nefario » Tue Jul 19, 2016 10:47

I commented out that line and it fixed it on one side, had to also comment out
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
"list[current_player;main;9,1.08;8,3;8]" ..

to remove it on the other side.

Thanks :)
 

User avatar
cx384
Member
 
Posts: 249
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: Post your modding questions here

by cx384 » Tue Jul 19, 2016 13:58

.
Last edited by cx384 on Sun Aug 07, 2016 06:42, edited 1 time in total.
Can your read this?
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your modding questions here

by BrunoMine » Wed Jul 20, 2016 15:52

Is there any software that helps assemble formspec? (Similar to NodeBoxEditor)
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

Re: Post your modding questions here

by addi » Wed Jul 20, 2016 17:41

BrunoMine wrote:Is there any software that helps assemble formspec? (Similar to NodeBoxEditor)

viewtopic.php?f=14&t=13720#p215419
 

drkwv
Member
 
Posts: 67
Joined: Thu Jun 28, 2012 13:48

Re: Post your modding questions here

by drkwv » Sat Jul 23, 2016 18:20

Is it possible to activate "continuous forward" walking within mod API? E.g. to make player move forward, not to change game settings.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your modding questions here

by BrunoMine » Sun Jul 24, 2016 03:37

Is there any way to find the path of debug.txt?
Similar to minetest.get_worldpath()
I have seen that in some situations this file can be bin or .mintest (personal Linux folder)
In other cases it appears in the same location where the command is used by the Linux terminal
I need a correct method to get the string that path
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Sun Jul 24, 2016 11:11

Now, I have this idea. The idea is to, in the TNT mod code, to move the particlespawner in add_effects function behind the timer on tnt_boom registering. The effect I desire to achieve is to have the TNT fireball only visible for the first half second and then delete it and generate the smoke cloud. With all the variables that are used in the main add_effects function, would this even be a good idea? If not, how can this be done?
Last edited by ABJ on Tue Jul 26, 2016 17:54, edited 2 times in total.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Mon Jul 25, 2016 08:49

BrunoMine, maybe this could give the path of debug.txt:
local path = io.popen"pwd":read"*all".."/debug.txt"

btw, try following command:
$ locate debug.txt
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re:

by BrunoMine » Mon Jul 25, 2016 21:07

Hybrid Dog wrote:BrunoMine, maybe this could give the path of debug.txt:
local path = io.popen"pwd":read"*all".."/debug.txt"


The first command worked perfectly.
I tested it running the same minetest via a link (on the desktop), by terminal and the actual executable. He always returned the path where the debugger is.
The problem is that the string follows a line jump at the end.

Hybrid Dog wrote:btw, try following command:
$ locate debug.txt

I tried
io.popen"locate debug.txt":read"*all"
returned many separate paths for line jump

I am using:
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 debug_path = io.popen"pwd":read"*all"
debug_path = string.split(debug_path, "\n")
debug_path = debug_path[1]
 

drkwv
Member
 
Posts: 67
Joined: Thu Jun 28, 2012 13:48

Re: Post your modding questions here

by drkwv » Tue Jul 26, 2016 15:14

What continous moveto does exactly http://dev.minetest.net/ObjectRef:moveto ?
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re:

by BrunoMine » Tue Jul 26, 2016 15:24

Hybrid Dog wrote:local path = io.popen"pwd":read"*all".."/debug.txt"

there is a way to find the binary that is being used to run the minetest server?
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Tue Jul 26, 2016 17:54

ABJ wrote:Now, I have this idea. The idea is to, in the TNT mod code, to move the particlespawner in add_effects function behind the timer on tnt_boom registering. The effect I desire to achieve is to have the TNT fireball only visible for the first half second and then delete it and generate the smoke cloud. With all the variables that are used in the main add_effects function, would this even be a good idea? If not, how can this be done?
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Tue Jul 26, 2016 18:44

ABJ, ask the question there: https://github.com/minetest/minetest_game/issues
but please don't be sad if conservatism is performed there again

BrunoMine, string.sub works better (a lot faster) than string.split:
local path = io.popen"pwd":read"*all":sub(1, -2).."/debug.txt"
l assume there is a way to find the binary, l don't know it.
 

User avatar
RHR
Member
 
Posts: 214
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: Post your modding questions here

by RHR » Thu Jul 28, 2016 09:57

Is there a way to change the default stack size from 99 to another value in general, or do I have to add stack_max to each item and block?
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: Post your modding questions here

by KCoombes » Thu Jul 28, 2016 13:59

RHR wrote:Is there a way to change the default stack size from 99 to another value in general, or do I have to add stack_max to each item and block?


Yep, it's a value in the definition of the craftitem (I searched the dev.wiki for "stack_max" and this was the only result)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Thu Jul 28, 2016 14:19

Using:

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.nodedef_default.stack_max      = 123
minetest.craftitemdef_default.stack_max = 123


will set the default stack_max for any items registered after those lines are run to the value you give.
To set the stack max of those before, you'll need to iterate through the registered_items

There was a PR to allow a minetest.conf setting to customise stack max, but it was closed due to implementation details and not wanting to update it: https://github.com/minetest/minetest/pull/1843
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your modding questions here

by BrunoMine » Thu Jul 28, 2016 17:19

I know it can be very complex, but is part of a mod I'm doing.
It is possible to destroy a socket to make sure it is free again when the server starts?
I do not know if there is some kind of method C in the minetest. Is there any way to accomplish this?

(Maybe using some command in the shell as well)
assume linux
Thank you
 

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

Re: Post your modding questions here

by Pyros » Thu Jul 28, 2016 17:51

How hard would it be to create an Internet mod?

I mean, would you use node metadata (like shared chests)
to create a sort of "wireless channel?" not unlike a digiline's wired version?
Also, could this be used to interface to Mesecons to create a switch that can
be controlled from afar?
00001-00010-00011-00100-00101-00110-00111-01000-01001- etc...
 

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

Re: Post your modding questions here

by Gerald » Thu Jul 28, 2016 18:02

Pyros wrote:How hard would it be to create an Internet mod?

I mean, would you use node metadata (like shared chests)
to create a sort of "wireless channel?" not unlike a digiline's wired version?
Also, could this be used to interface to Mesecons to create a switch that can
be controlled from afar?


I am currently working on something like that. I will create a forum post soon when the core features are all implemented. Repository: https://github.com/gejan/dcircuits
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: Post your modding questions here

by KCoombes » Fri Jul 29, 2016 14:51

Ok, I'm having a strange issue - I have created a mesh (16x32) and texture (16x32) for a node, with selection_box and collision_box set appropriately tall - the inventory and wield images are perfect, using the same texture file - but placed in the world, only the bottom 16x16 of the mesh is showing, and without the corresponding texture - is there a way to stretch the mesh to fill the top half (or show the top half of the existing mesh), with the full texture file being used?

screenshot attached
Attachments
screenshot_20160729_105008.png
screenshot_20160729_105008.png (297.65 KiB) Viewed 2806 times
 

User avatar
pithy
Member
 
Posts: 252
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: Post your modding questions here

by pithy » Fri Jul 29, 2016 15:26

@KCoombes:
Meshes can be made as large as you want and will extend past one node.
It could be an issue with the mesh file.
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: Post your modding questions here

by KCoombes » Fri Jul 29, 2016 16:43

pithy wrote:@KCoombes:
Meshes can be made as large as you want and will extend past one node.
It could be an issue with the mesh file.


Mesh file created with NodeBoxEditor (.obj format), but thanks - I'll check it out.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Fri Jul 29, 2016 16:55

After exporting an obj from NBE, you should take it to a UV wrapping program such as Blender. If you don't need to UV wrap it, just export it as a node box
 

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

Re: Post your modding questions here

by Gerald » Fri Jul 29, 2016 20:19

Node metadata behaves unexpected:
If i use meta:set_string("key", nil) the field is removed, but if i use meta:set_int("key", nil) key is mapped to zero. I feel uncomfortable using nil as argument and set_string() to remove a field which was set using set_int(). Is there a better/correct way to delete fields?
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron