Post your modding questions here

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

Re: Post your modding questions here

by RHR » Sat Jun 14, 2014 18:46

Some questions:
1) Is it possible to create colored light? (e.g. red, blue, green)
2) Is it possible to force a fencelike block to connect to other not fencelike blocks?
3) How can I find out how much performance a mod needs? f5 and f6 show lots of information. Where can I look up what it means?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Post your modding questions here

by Krock » Sat Jun 14, 2014 18:52

RHR wrote:Some questions:
1) Is it possible to create colored light? (e.g. red, blue, green)
2) Is it possible to force a fencelike block to connect to other not fencelike blocks?
3) How can I find out how much performance a mod needs? f5 and f6 show lots of information. Where can I look up what it means?


1) Discussed a lot be4, answer stayed at No.
2) Maybe - extend the collision block to a regular node and look if it works
3) Idk. add os.time()-things like in serval mapgens to see how much miliseconds it takes
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

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

Re: Post your modding questions here

by Casimir » Sat Jun 14, 2014 19:28

I want to spawn particles when eating something (the way it looks in minecraft). But it uses the whole texture of the item. How can I only use parts of it like when digging something?

RHR wrote:2) Is it possible to force a fencelike block to connect to other not fencelike blocks?

There is a fence mod somewhere that does that, but it is somewhat hacky.
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

Re: Post your modding questions here

by LionsDen » Sat Jun 14, 2014 20:47

RHR wrote:2) Is it possible to force a fencelike block to connect to other not fencelike blocks?


Yes, look at XDGAMERZzZ skyblock map. One of the mods in the mod zip file is called fences and I have seen these do this.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

Re: Post your modding questions here

by Topywo » Sat Jun 14, 2014 22:31

RHR wrote:1) Is it possible to create colored light? (e.g. red, blue, green)


- You can make colored air nodes with drawtype airlike and give them a post_effect_color
- Then you change the air around a lightsource that has been placed into a colored air node. While placing the item or through an ABM

Problems:
- When you want to be able to put lights on and off and when removing the lightsource, you'll need to change the air around it (back).
- How to handle the colored air around two different colored lightsources next or near each other (and three and when removing one...)



Edit: At least one typo
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: Post your modding questions here

by philipbenr » Sun Jun 15, 2014 08:48

@RHR. There are two fence mods.
One is xfences, made by xyz (google "minetest xfences")
The second is fences by Blockmen (google "minetest fences")
xyz's is much more reliable than Blockmens, mainly because with Blockmens, some do not connect fully. So, if xfences is still around and downloadable, take a look. I believe that both are hacky, and neither will be of much use if you wish to have it simple. PM me if there is no copy of xfences avail. I might still have a copy
 

User avatar
TG-MyinaWD
Member
 
Posts: 355
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .

Re: Post your modding questions here

by TG-MyinaWD » Wed Jun 18, 2014 00:06

Do anyone like make a Game mode with me?
And I have no idea where else to ask this.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero

Re: Post your modding questions here

by HeroOfTheWinds » Wed Jun 18, 2014 02:39

Alt. Tester wrote:Do anyone like make a Game mode with me?
And I have no idea where else to ask this.

It will usually depend on what the game you want to make is, and how much work is done, and what you are willing to do. A great place to actively discuss these things is IRC.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Wed Jun 18, 2014 15:05

Lua syntax question.
I want to register a new type of door in a mod. So, I figured I'd just need to make my mod depend on doors and then call doors:register_door
But when I do I get:
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
09:43:49: ERROR[main]: /usr/share/minetest/builtin/game/register.lua:60: Name doors:door_secret does not follow naming conventions: "modname:" or ":" prefix required

Which means I'm doing something STUPID. Any help here?
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Wed Jun 18, 2014 15:10

Never mind, it's always immediately obvious right after you post the question. wasn't complaining about calling doors:register_door, it was complaining about me naming the door doors:door_secret. duh!
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Post your modding questions here

by Krock » Wed Jun 18, 2014 15:22

Kilarin wrote:Lua syntax question.
I want to register a new type of door in a mod. So, I figured I'd just need to make my mod depend on doors and then call doors:register_door
But when I do I get:
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
09:43:49: ERROR[main]: /usr/share/minetest/builtin/game/register.lua:60: Name doors:door_secret does not follow naming conventions: "modname:" or ":" prefix required

Which means I'm doing something STUPID. Any help here?

If you want to add a node to a diffrent mod, you need to use:
minetest.register_node(":testmod:testnode",def)


EDIT: Whoops. Saw your 2nd post too late.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Wed Jun 18, 2014 17:12

Krock wrote:If you want to add a node to a diffrent mod, you need to use:
minetest.register_node(":testmod:testnode",def)

Useful info anyway!

Ok, next question, hopefully not so stupid.

I'm playing with making secret doors that look like background material. I'm sure someone has already done it, but the only mod I could find made panels you could walk through instead of actual doors that look like stone or wood etc.

As proof of concept, I can make a wooden door that looks like default_wood, or a cobble door that looks like default_cobble. Works.

BUT, what I'd like to do is enable a recipe in the form of:
group:wood,group:wood,
group:wood,group:wood,
group:wood,group:wood,special_item

where the item would use the default texture for whatever kind of wood you used in the recipe. Is that even possible?

If not, then how could I loop through whatever group:wood or group:stone (or any other groups) are available for a particular world, and build a recipe (and corresponding node) for each using the correct texture for the item?
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Wed Jun 18, 2014 17:19

Something like this should 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
for name, def in pairs(minetest.registered_nodes) do
  if def.groups and ((def.groups.stone or 0) > 0) and def.tiles and def.tiles[1] then
    local basename = name:match("[^:]+:(.*)") -- Base name of item without `modname:' prefix.
    register_my_door(basename, def.tiles[1])
  end
end
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Wed Jun 18, 2014 17:50

That looks perfect kaeza, thanks!
 

video28
New member
 
Posts: 2
Joined: Wed Jun 18, 2014 17:59
In-game: video28

Re: Post your modding questions here

by video28 » Wed Jun 18, 2014 18:02

I have the android version, will mods work for me
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Wed Jun 18, 2014 21:52

So, I've got a two sample "secret doors", one plain wood and one cobble. defined like this:
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
doors:register_door("secretdoor:door_secret_wood", {
   description = "Secret Door Wood",
   inventory_image = "door_wood.png",
   groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
   tiles_bottom = {"default_wood.png", "default_wood.png"},
   tiles_top = {"default_wood.png", "default_wood.png"},
})


My problem is shading/lighting:

Image

As you can see, the doors appear slightly darker than their surroundings. Is this because Doors:register_door sets drawtype = "nodebox" ???
 

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

Re: Post your modding questions here

by Casimir » Wed Jun 18, 2014 21:59

Yes this is because of the drawtype. Smooth lighting is not working for nodeboxes.
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Wed Jun 18, 2014 22:16

Casimir wrote:Yes this is because of the drawtype. Smooth lighting is not working for nodeboxes.

So, I am assuming then that there is NOT a solution right now? Changing the drawtype would not let it be thin as a door. Correct?

I mean, I can live with this, but it's not quite what I had been trying for. :)
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38

Re: Post your modding questions here

by spootonium » Fri Jun 20, 2014 06:21

The Project: Attempting to implement a "co-operative hardcore mode", in which the death of all players triggers the deletion and re-generation of the map.
The Problem: In order to delete the map files (without causing errors and additional problems) the server will need to cease reading and writing actions and "close" those files, preferably without needing to shut down itself.
The Question: Is there a way, within the Lua API, to force-close the map, without shutting down the server?

EDIT - Bonus Question: Alternatively, is there a simple way to purge the map data?
I write code. Sometimes, it even works.
 

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

Re: Post your modding questions here

by Casimir » Fri Jun 20, 2014 09:08

I don't know about deleting, but there are some alternatives:
* Random respawn anywhere on the map. When you respawn 30000 nodes away from your first spawn, you probably won't find your old world again.
* ABM to replace air with some other node, containing an check if the player died. That way the player would be stuck where he respawns.
* Use a protector mod to protect the whole world. You can still look at what you have build and save it with worldedit, but the game is over. I like this way the best. Together with some details it would also feel very smooth. Like, respawn exactly where you died, changing the skin to ghost (like BlockMens creature mod), grant fly and fast, and so on.
 

video28
New member
 
Posts: 2
Joined: Wed Jun 18, 2014 17:59
In-game: video28

Re: Post your modding questions here

by video28 » Fri Jun 20, 2014 17:07

I have the android version: how do I use mods
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38

Re: Post your modding questions here

by spootonium » Sat Jun 21, 2014 13:48

Casimir wrote:I don't know about deleting, but there are some alternatives:
* Random respawn anywhere on the map. When you respawn 30000 nodes away from your first spawn, you probably won't find your old world again.
* ABM to replace air with some other node, containing an check if the player died. That way the player would be stuck where he respawns.
* Use a protector mod to protect the whole world. You can still look at what you have build and save it with worldedit, but the game is over. I like this way the best. Together with some details it would also feel very smooth. Like, respawn exactly where you died, changing the skin to ghost (like BlockMens creature mod), grant fly and fast, and so on.


Hmm. None of those options really satisfy the purpose of what I want to accomplish. If actually deleting the map isn't possible without killing the server altogether, I suspect the best thing to do would be to purge map.db, and force a new mapgen with a new seed. Sadly, I don't know nearly enough about MySQL to do that safely.
I write code. Sometimes, it even works.
 

User avatar
DeepGaze
Member
 
Posts: 332
Joined: Fri May 10, 2013 00:49
GitHub: DeepGaze
IRC: DeepGaze
In-game: DeepGaze

Re: Post your modding questions here

by DeepGaze » Mon Jun 23, 2014 18:33

is there a tutorial on map gen- wanting to populate a world with a single node (air above the nodes though)
there's no place like 127.0.0.1
The deep life Minetest text page
minetest cards
 

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

Re: Post your modding questions here

by Casimir » Mon Jun 23, 2014 18:35

Only one node and everything flat? Than this might be what you want: https://github.com/CasimirKaPazi/untern ... r/init.lua
Last edited by Casimir on Mon Jun 23, 2014 18:53, edited 2 times in total.
 

User avatar
DeepGaze
Member
 
Posts: 332
Joined: Fri May 10, 2013 00:49
GitHub: DeepGaze
IRC: DeepGaze
In-game: DeepGaze

Re: Post your modding questions here

by DeepGaze » Mon Jun 23, 2014 18:41

Thank you Casmir one more question: How can you fix the sky to night but keep the map lit, I have seen it on a server but can't remember witch?
there's no place like 127.0.0.1
The deep life Minetest text page
minetest cards
 

User avatar
pandaro
Member
 
Posts: 266
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro

Re: Post your modding questions here

by pandaro » Tue Jun 24, 2014 11:29

someone here has already used minetest.find_path ()?
are not able to make it work.
I post something, tell me if I'm wrong thanks!
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
ant.find_food=function(pos)
   local food=minetest.find_node_near(pos, 10, "default:apple")
   if food==nil then
      print(tostring("no"))
      
   else
      print(tostring("yes"))
      if dist>1 then
         local path=minetest.find_path(pos,food,2,1,1,"A*_noprefetch")
         print(tostring("path ")..dump(path))
      else
         minetest.remove_node(food)
      end
   end
   return food
end
 

Daven
Member
 
Posts: 26
Joined: Mon Jan 20, 2014 21:51

Re: Post your modding questions here

by Daven » Wed Jun 25, 2014 01:57

Can someone post a link to the inventory_plus mod?
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Wed Jun 25, 2014 02:28

Daven wrote:Can someone post a link to the inventory_plus mod?

Have you tried using a web search engine?
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

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

Re: Post your modding questions here

by drkwv » Wed Jun 25, 2014 02:50

RHR wrote:You do not need an own group for that:

1. is diggable by bare hands
oddly_breakable_by_hand = 3

2. but sounds like a stone upon digging (like a stone that is being digged by axe)
has nothing to do with tool, just use the stone sound:
sounds = default.node_sound_stone_defaults()

3. and has some custom crack pattern (if that possible)
change the crack_anylength.png texture to your custom crack pattern.

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.register_node("YourModName:YourBlockName", {
   tiles = {"YourTexture.png"},
   groups = {oddly_breakable_by_hand = 3}, -- or: groups = {oddly_breakable_by_hand = 3, choppy = 3},
   sounds = default.node_sound_stone_defaults(),
})


Please post your future modding questions here:
viewtopic.php?f=9&t=4668&p=146064#p146064


Thank you for the answer.
1. I set groups = {oddly_breakable_by_hand = 3} for node and now it's breaking with more situable sound, but I must admit that digging sound is not still the same as for groups = { cracky = 1, stone = 1 }. Any other thing I could do to fix the sound?
2. I changed crack_anylength.png, put it in my mods/mod/textures folder and cracking texture has changed for all blocks, not only from my mod. Is there a way to define custom cracking pattern only for a particular node?
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

Re: Post your modding questions here

by Topywo » Wed Jun 25, 2014 12:35

Daven wrote:Can someone post a link to the inventory_plus mod?


viewtopic.php?f=11&t=3100
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests