Post your modding questions here
Re: Post your modding questions here
Is it possible to override "minetest.register_ore" with a mod? I want to change the height_min and height_max of the minerals in minetest_game default without changing the original mod.
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Post your modding questions here
l guess yes. But you can hardly let your mod become loaded before default, and overriding minetest.register_ore after it was used for default doesn't change the ore definitions.RHR wrote:Is it possible to override "minetest.register_ore" with a mod? I want to change the height_min and height_max of the minerals in minetest_game default without changing the original mod.
But there's a table called minetest.registered_ores … which is just a table of copies l think.
Re: Post your modding questions here
Minetest 0.4.11 added 3 new commands to the mix which can clear previous biomes, decoration and ores from a world and let you set your own...
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
minetest.clear_registered_ores()
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
minetest.clear_registered_ores()
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: Post your modding questions here
+1000!TenPlus1 wrote:Minetest 0.4.11 added 3 new commands to the mix which can clear previous biomes, decoration and ores from a world and let you set your own...
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
minetest.clear_registered_ores()
Great feature, Ten!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Post your modding questions here
… but doesn't let you specifically change the default ores.TenPlus1 wrote:Minetest 0.4.11 added 3 new commands to the mix which can clear previous biomes, decoration and ores from a world and let you set your own...
minetest.clear_registered_biomes()
minetest.clear_registered_decorations()
minetest.clear_registered_ores()
Re: Post your modding questions here
But you could copy the list of registered ores, clear the ores and then reregister the modified ores. It is a little complicated, but it could work.Hybrid Dog wrote:… but doesn't let you specifically change the default ores.
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Post your modding questions here
Does it work for abms, too?TeTpaAka wrote:But you could copy the list of registered ores, clear the ores and then reregister the modified ores. It is a little complicated, but it could work.Hybrid Dog wrote:… but doesn't let you specifically change the default ores.
- Napiophelios
- Member
- Posts: 1035
- Joined: Mon Jul 07, 2014 01:14
- GitHub: Napiophelios
- IRC: Nappi
- In-game: Nappi
Re: Post your modding questions here
I am modifying my creative inventory's formspec and was curious if there was any way
to have the character.png preview image change when I select a different skin?
to have the character.png preview image change when I select a different skin?
Last edited by Napiophelios on Sun Mar 15, 2015 20:27, edited 1 time in total.
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Post your modding questions here
you could change the texture file name in the formspec before it appearsNapiophelios wrote:I am modifying my creative inventory's formspec and was curious if there was any way
to have the character.png preview image change when I select a different skin?
Re: Post your modding questions here
Hybrid Dog wrote:found it: viewtopic.php?p=46658#p46658Fox wrote:Hello Hybrd Dog,Hybrid Dog wrote:l tried to find "legacy_mineral" (with grep -rl) in other files but it's only in ./games/minimal/mods/default/init.lua and ./games/minetest_game/mods/default/nodes.lua. Maybe it's used for decoration.
Yes, I couldn't find it anywhere else either. Not a mention in lua_api.txt. I didn't know if it was maybe an outdated property, something like decoration as you said, or what. I don't seem to see it in the other mods I have either, so maybe it's something I can ignore like everyone else seems to be doing. xD That it doesn't do anything special I might want, maybe even just does nothing.
Just can't help but wonder though.
l need to remove it from my mod…
Heya Hybrid Dog,
I'm not sure if that's included there, but I guess I'll just ignore that legacy_mineral exists, haha. Everyone else seems to be. Just let that curiosity go.
Thanks for the help. :)
I'm going to repost my unanswered question from a month ago, for anyone who can help me out.
Thanks for the read.Fox wrote:Hello all,
Topic: Understanding some bits of tool capabilities?
Reason: I'd just like to understand some parts so I can know what's going on when I make my own tools.
More Info: Let's take the default stone pickaxe.I understand that groupcaps handles what blocks can actually be affected by the tool and how so. I get that uses is tied to the damage inflicted on the tool with use. It's the times and maxlevel part I'm not sure I grasp.Code: Select all
minetest.register_tool("default:pick_stone", { description = "Stone Pickaxe", inventory_image = "default_tool_stonepick.png", tool_capabilities = { full_punch_interval = 1.3, max_drop_level=0, groupcaps={ cracky = {times={[2]=2.0, [3]=1.20}, uses=20, maxlevel=1}, }, damage_groups = {fleshy=3}, }, })
I think the number with fleshy might work similarly?
If someone could help clear up these things, it'd be much appreciated. :)
- HeroOfTheWinds
- Member
- Posts: 470
- Joined: Wed Apr 23, 2014 23:16
- GitHub: HeroOfTheWinds
- IRC: WindHero
- Location: Hawaii
Re: Post your modding questions here
@Fox:
times refers to how long it takes to break a node of the given level for the given group, in seconds. A block with the group cracky=2 would take 2.0 seconds to dig with the tool posted above.
uses is the durability of the tool. It says how many nodes of the hardest strength can be dug with the tool. Lesser nodes detract less from uses. So, with that tool, you could break 20 level 1 nodes (although it somewhat can't, as 1 has no times value), since maxlevel = 1. You could also break 60 level 2 nodes, or 180 level 3 nodes. It's powers of three between values, if I remember correctly.
maxlevel is the "hardest" node you can break of the given group with the tool. This is an inverse relationship; 1 is highest, 3 is lowest. default:stone is level 3, but default:obsidian is level 1.
damage_groups are similar, but I think they actually are the reverse of above... 1 is weak, 10 is strong.
full_punch_interval is the time between swings at full power. This really only applies to weapons. If you just rapid click, your hits are weak and may not even do damage. But if you wait as long as full_punch_interval between clicks, you will do the most damage you can.
Hope this helps!
times refers to how long it takes to break a node of the given level for the given group, in seconds. A block with the group cracky=2 would take 2.0 seconds to dig with the tool posted above.
uses is the durability of the tool. It says how many nodes of the hardest strength can be dug with the tool. Lesser nodes detract less from uses. So, with that tool, you could break 20 level 1 nodes (although it somewhat can't, as 1 has no times value), since maxlevel = 1. You could also break 60 level 2 nodes, or 180 level 3 nodes. It's powers of three between values, if I remember correctly.
maxlevel is the "hardest" node you can break of the given group with the tool. This is an inverse relationship; 1 is highest, 3 is lowest. default:stone is level 3, but default:obsidian is level 1.
damage_groups are similar, but I think they actually are the reverse of above... 1 is weak, 10 is strong.
full_punch_interval is the time between swings at full power. This really only applies to weapons. If you just rapid click, your hits are weak and may not even do damage. But if you wait as long as full_punch_interval between clicks, you will do the most damage you can.
Hope this helps!
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
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
Re: Post your modding questions here
How would one go about removing a hud during gameplay?
EDIT: Never mind, it took me awhile, but I figured it out.
EDIT: Never mind, it took me awhile, but I figured it out.
Re: Post your modding questions here
Greetings and Salutations!
I'm working on a game where I would like to have pvp work in one part of the world, but be disabled in another.
I could simply instantly heal characters whenever they are hurt in the non-pvp area, BUT, I'm not certain how to detect if the damage came from another player or not. If I heal ANY damage, then mobs, falling, lava, drowning, etc. now become pointless.
I found this thread: viewtopic.php?id=8901
asking for something similar, but it did not get an answer to the problem.
So is it possible to disable pvp (but not ALL forms of damage) in one region of the world and not in another?
Thanks in advance for your help
I'm working on a game where I would like to have pvp work in one part of the world, but be disabled in another.
I could simply instantly heal characters whenever they are hurt in the non-pvp area, BUT, I'm not certain how to detect if the damage came from another player or not. If I heal ANY damage, then mobs, falling, lava, drowning, etc. now become pointless.
I found this thread: viewtopic.php?id=8901
asking for something similar, but it did not get an answer to the problem.
So is it possible to disable pvp (but not ALL forms of damage) in one region of the world and not in another?
Thanks in advance for your help
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your modding questions here
Yes that works.TeTpaAka wrote:But you could copy the list of registered ores, clear the ores and then reregister the modified ores. It is a little complicated, but it could work.
Write a mod that depends on (and therefore runs after) default.
First lines should be any combination of 'clear biomes / decorations / ores'.
Then define your own versions of the categories you just cleared.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Post your modding questions here
^ Correct, HOTWinds' first example was missing the vi = vi + 1.Krock wrote:It's supposed to be used as an array.Kilarin wrote:Now works!!! thank you Hero and TeTpaAka!Code: Select all
--local vi = area:index(x0, y, z) -- This accesses the node at a given position for x = x0, x1 do -- for each node do local vi = area:index(x, y, z) -- This accesses the node at a given position
Code: Select all
local vi = area:index(x0, y, z) -- This accesses the node at a given position for x = x0, x1 do -- for each node do -- Codes.. vi = vi + 1 end
Kilarin, this method works faster because you don't calculate the LVM index for every node, only for the first node in each x row, hence (x0, y, z). Then, the vi = vi + 1 increments the index along the x row of nodes.
This can be done only because a LVM index always increments by 1 in the positive x direction (the y and z directions are much more complex increments).
Calculating the index for every node works but is slower and unneccesary.
Re: Post your modding questions here
Is it possible to make block "fall" like sand but in another direction for some time?
- 12Me21
- Member
- Posts: 873
- Joined: Tue Mar 05, 2013 00:36
- GitHub: 12Me21
- Location: (Ignore all of my posts before 2018)
Re: Post your modding questions here
hmm, you could have it check if there is air in the direction that it would fall, and move the block to the side if there is, maybe look at the code for movestones. (in mesecons)
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Post your modding questions here
Use the group falling = 1drkwv wrote:Is it possible to make block "fall" like sand but in another direction for some time?
- 12Me21
- Member
- Posts: 873
- Joined: Tue Mar 05, 2013 00:36
- GitHub: 12Me21
- Location: (Ignore all of my posts before 2018)
Re: Post your modding questions here
will that work for falling in other directions though?rubenwardy wrote:Use the group falling = 1drkwv wrote:Is it possible to make block "fall" like sand but in another direction for some time?
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Post your modding questions here
Nope, only downwards.12Me21 wrote:will that work for falling in other directions though?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- HeroOfTheWinds
- Member
- Posts: 470
- Joined: Wed Apr 23, 2014 23:16
- GitHub: HeroOfTheWinds
- IRC: WindHero
- Location: Hawaii
Re: Post your modding questions here
Check the code in falling.lua. Or better yet, look at the related file in my Caverealms mod. Just adjust a few of the velocity parameters, and you can change the direction of movement.
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
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
Re: Post your modding questions here
Is it at all possible to change the max player hp?
Re: Post your modding questions here
Currently, sadly no. See this.Chinchow wrote:Is it at all possible to change the max player hp?
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Post your modding questions here
Don't be sad. It already has been added to the 0.5.0 roadmap.Chinchow wrote:Is it at all possible to change the max player hp?
https://github.com/minetest/minetest/issues/2370
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Post your modding questions here
but there's a mod that adds a heart staff with which you can increase the player hp
Who is online
Users browsing this forum: No registered users and 11 guests