Post your mod requests/ideas here

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 mod requests/ideas here

by kaeza » Thu Jun 04, 2015 23:33

Mathias wrote:I've searched the forums for awhile, but haven't found any relating to this one:

A mod request for a speedometer, or a HUD that shows the land speed of the player, preferably in meters per second. I believe this is very approachable, but I haven't got the skills (yet) to do this. It would be really useful for other developers to test how fast, a boat, car, train, plane, or their own character is moving. As a beginner in lua, I feel it is necessary if I need to see how how long it would take for my test car to achieve maximum velocity.


This is a quick implementation:
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

-- Speedometer update interval, in seconds.
local INTERVAL = 1

local player_speedos = { }

local timer = 0

local function update_speedo(player)
   local plname = player:get_player_name()
   local speedo = player_speedos[plname]
   local oldpos, hud
   if speedo then
      oldpos, hud = unpack(speedo)
   else
      oldpos = player:getpos()
      hud = player:hud_add({
         name = "speedo:"..plname,
         hud_elem_type = "text",
         text = "", -- This is updated below by `hud_change`.
         number = 0xFFFF00, -- Color as 0xRRGGBB
         position = { x=0, y=1 },
         offset = { x=16, y=-16 }, -- In pixels
         alignment = { x=1, y=-1 }, -- Bottom-left
      })
      speedo = { oldpos, hud }
      player_speedos[plname] = speedo
   end
   local curpos = player:getpos()
   local speed = vector.distance(curpos, oldpos) / timer
   player:hud_change(hud, "text", "Speed: "..tostring(speed).." m/s")
   speedo[1] = curpos
end

local function update_speedos()
   for _, p in ipairs(minetest.get_connected_players()) do
      update_speedo(p)
   end
end

minetest.register_globalstep(function(dtime)
   -- Update speedometer every INTERVAL seconds.
   timer = timer + dtime
   if timer >= INTERVAL then
      update_speedos()
      -- If you want more precise timing, use `timer = timer - INTERVAL`.
      timer = 0
   end
end)

minetest.register_on_leaveplayer(function(player)
   -- Discard objects on player leave.
   player_speedos[player:get_player_name()] = nil
end)


It's not precise in any way, but gives an approximation of the player's speed. Feel free to take it as a base and modify to your liking.

To use it, just create a directory in your `mods` directory (it can be named any way, e.g. `speedo`), and paste that code in a file named `init.lua` inside that directory (so you have `mods/speedo/init.lua`.
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
 

Mathias
New member
 
Posts: 5
Joined: Thu Jun 04, 2015 21:06

Re: Post your mod requests/ideas here

by Mathias » Fri Jun 05, 2015 00:26

kaeza wrote:
Mathias wrote:I've searched the forums for awhile, but haven't found any relating to this one:

A mod request for a speedometer, or a HUD that shows the land speed of the player, preferably in meters per second. I believe this is very approachable, but I haven't got the skills (yet) to do this. It would be really useful for other developers to test how fast, a boat, car, train, plane, or their own character is moving. As a beginner in lua, I feel it is necessary if I need to see how how long it would take for my test car to achieve maximum velocity.


This is a quick implementation:
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

-- Speedometer update interval, in seconds.
local INTERVAL = 1

local player_speedos = { }

local timer = 0

local function update_speedo(player)
   local plname = player:get_player_name()
   local speedo = player_speedos[plname]
   local oldpos, hud
   if speedo then
      oldpos, hud = unpack(speedo)
   else
      oldpos = player:getpos()
      hud = player:hud_add({
         name = "speedo:"..plname,
         hud_elem_type = "text",
         text = "", -- This is updated below by `hud_change`.
         number = 0xFFFF00, -- Color as 0xRRGGBB
         position = { x=0, y=1 },
         offset = { x=16, y=-16 }, -- In pixels
         alignment = { x=1, y=-1 }, -- Bottom-left
      })
      speedo = { oldpos, hud }
      player_speedos[plname] = speedo
   end
   local curpos = player:getpos()
   local speed = vector.distance(curpos, oldpos) / timer
   player:hud_change(hud, "text", "Speed: "..tostring(speed).." m/s")
   speedo[1] = curpos
end

local function update_speedos()
   for _, p in ipairs(minetest.get_connected_players()) do
      update_speedo(p)
   end
end

minetest.register_globalstep(function(dtime)
   -- Update speedometer every INTERVAL seconds.
   timer = timer + dtime
   if timer >= INTERVAL then
      update_speedos()
      -- If you want more precise timing, use `timer = timer - INTERVAL`.
      timer = 0
   end
end)

minetest.register_on_leaveplayer(function(player)
   -- Discard objects on player leave.
   player_speedos[player:get_player_name()] = nil
end)


It's not precise in any way, but gives an approximation of the player's speed. Feel free to take it as a base and modify to your liking.

To use it, just create a directory in your `mods` directory (it can be named any way, e.g. `speedo`), and paste that code in a file named `init.lua` inside that directory (so you have `mods/speedo/init.lua`.


Thanks, kaeza; if I plan to release a mod you would definitely be an influence for this one. I will implement this in my project.
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: Post your mod requests/ideas here

by stu » Fri Jun 05, 2015 18:48

Is there an easy (efficient) way to check if particular node (or block) is loaded or is that purely client-side?
I would like to avoid the server errors generated when attempting add an entity in unloaded space. My only idea atm is to check for active players within a given radius, however, I was hoping there may be a cleaner way to achieve this.
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: Post your mod requests/ideas here

by prestidigitator » Fri Jun 05, 2015 23:43

stu wrote:Is there an easy (efficient) way to check if particular node (or block) is loaded or is that purely client-side?
I would like to avoid the server errors generated when attempting add an entity in unloaded space. My only idea atm is to check for active players within a given radius, however, I was hoping there may be a cleaner way to achieve this.

Do minetest.get_node() or minetest.get_node_or_nil() first. If they return a node n with n.name=="ignore" (for the former) or nil (for the latter), the block containing the position given as an argument isn't currently loaded.
 

DDroid
Member
 
Posts: 12
Joined: Thu May 28, 2015 21:13
GitHub: DDroid
In-game: DDroid

Re: Post your mod requests/ideas here

by DDroid » Fri Jun 05, 2015 23:59

Hybrid Dog wrote:l tried it but lost interest.



It's okay. You could make it where the water level goes up/down 1 block at a time. If you've lost interest that's okay.
HP TouchSmart iQ505
CPU: Intel Core 2 Duo T5850 @ 2.16GHz
GPU: Intel GMA 960(?) @ 372MB
RAM: 4GB DDR2
OS : Windows Vista 64bit/Ubuntu Studio 16.04.1LTS 64bit
SSD: (VISTA PARTITION: 400GB; UBUNTU PARTITION: 64GB)
Res: 1650x1050x32 single touch
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: Post your mod requests/ideas here

by stu » Sat Jun 06, 2015 00:19

prestidigitator wrote:Do minetest.get_node() or minetest.get_node_or_nil() first. If they return a node n with n.name=="ignore" (for the former) or nil (for the latter), the block containing the position given as an argument isn't currently loaded.

That sounds like it might actually work (when you read it aloud) I will see how it goes, thanks for the reply.
 

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

Re: Post your mod requests/ideas here

by ABJ » Sat Jun 06, 2015 16:35

Good idea :D
Test car? WOW I STILL haven't managed to make a car of my own :D
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Post your mod requests/ideas here

by Sokomine » Sat Jun 13, 2015 16:11

SAMIAMNOT wrote:6) Automatically spawning villagers & villages (they may have this)

That's what my mg_villages mod aims at. I'm currently testing a modpack containing all relevant mods on a phone in order to see how far it's possible to use such features on low-end hardware. It seems to work to a degree, though it takes far more patience than on a desktop. When those tests are finished, I'm going to upload the modpack for easy download. The villages still contain errors, but it might be good enough for now.
A list of my mods can be found here.
 

User avatar
veikk0
New member
 
Posts: 7
Joined: Tue Feb 05, 2013 16:35

Re: Post your mod requests/ideas here

by veikk0 » Mon Jun 15, 2015 05:07

I have an idea for a mod. It's inspired by a simple but very entertaining feature found in Grand Theft Auto 5.

Flipping people off.

Image

The player selects an empty hotbar slot and holds down a button (the right mouse button would probably be good). While the button is held down, the player's hand is changed to a different model. For other players to be able to see it a new animation and an addition to the player model's hand would be required.

I have no knowledge of Minetest modding so I don't know if it's possible to do with a mod or if it would require changes to the engine.
 

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

Re: Post your mod requests/ideas here

by ABJ » Tue Jun 16, 2015 12:58

Factions.
 

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

Re: Post your mod requests/ideas here

by rubenwardy » Mon Jun 22, 2015 17:27

I'd be interested in a mod that added the range and variety of tools and weapons, like in Terraria. Terraria is incredibly well rich in items, and it all works well. I like how you can't craft all the weapons, and how valuable they are. Even when you can craft them, there are many levels of progression.

Unfortunately I don't have the artistic ability to draw them all.
 

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

Re: Post your mod requests/ideas here

by Hybrid Dog » Mon Jun 22, 2015 18:06

rubenwardy wrote:I'd be interested in a mod that added the range and variety of tools and weapons, like in Terraria. Terraria is incredibly well rich in items, and it all works well. I like how you can't craft all the weapons, and how valuable they are. Even when you can craft them, there are many levels of progression.

Unfortunately I don't have the artistic ability to draw them all.

minetest already has a few weapons, e.g.
Image
Attachments
Unbenannt.png
Unbenannt.png (126.91 KiB) Viewed 3981 times
 

User avatar
desvox
Member
 
Posts: 12
Joined: Sun May 03, 2015 13:34
GitHub: desvox
IRC: desvox
In-game: desvox

Re: Post your mod requests/ideas here

by desvox » Tue Jun 30, 2015 14:56

rubenwardy wrote:I'd be interested in a mod that added the range and variety of tools and weapons, like in Terraria. Terraria is incredibly well rich in items, and it all works well. I like how you can't craft all the weapons, and how valuable they are. Even when you can craft them, there are many levels of progression.

Unfortunately I don't have the artistic ability to draw them all.


I was honestly just thinking of that the other day. Terraria is many steps above Minetest/craft when it comes to it's items, weaponry, and combat.
I love your feedback and your suggestions!

Tox: E2602677725B4A2DA7B0395EFB9E03856CC5BBA948CFA9DB14ED6461EC39CC0F4859493BFD34
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: Post your mod requests/ideas here

by amadin » Thu Jul 16, 2015 06:35

deleted - wrong section
 

User avatar
Samson1
Member
 
Posts: 92
Joined: Wed Apr 01, 2015 19:41
IRC: Samson1
In-game: Samson1

Re: Post your mod requests/ideas here

by Samson1 » Thu Jul 16, 2015 11:55

I think a Tardis would be good:D
MT name: Samson1

MC name: MoJo4000
 

Anonymous_moose
Member
 
Posts: 38
Joined: Tue Aug 27, 2013 20:25

Re: Post your mod requests/ideas here

by Anonymous_moose » Fri Jul 17, 2015 01:38

Samson1 wrote:I think a Tardis would be good:D

The travelnet mod is sort of like a tardis... If you were to retexture it, then voila! Tardis!
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: Post your mod requests/ideas here

by amadin » Thu Jul 23, 2015 05:09

Auto-jump mod, which auto jump via 1 block if player walk. This wil remove the need to often press the space bar when walking.
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua

Re: Post your mod requests/ideas here

by Ivà » Thu Jul 23, 2015 13:42

amadin wrote:Auto-jump mod, which auto jump via 1 block if player walk. This wil remove the need to often press the space bar when walking.


It's called 'stepheight' but I think the value is hardcoded for players.
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

Re: Post your mod requests/ideas here

by cHyper » Thu Jul 23, 2015 18:53

Hi!

Are there any mods with achivements or Statistics elements.

Thanks
 

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

Re: Post your mod requests/ideas here

by rubenwardy » Thu Jul 23, 2015 21:35

amadin wrote:Auto-jump mod, which auto jump via 1 block if player walk. This wil remove the need to often press the space bar when walking.


I think there is a setting in minetest.conf for this. It was added when android support was added.
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: Post your mod requests/ideas here

by amadin » Sun Jul 26, 2015 15:49

Hi all. I need mod wich will push back the player if he dig protected blocks (wall fo examle). Now i use "Protector redo" mod. I'm think it need for all server owners who use protector mods. I hear about mod which deal damage to player if he try to dig protected block, so you may use code from this mod viewtopic.php?id=4799
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Post your mod requests/ideas here

by TenPlus1 » Sun Jul 26, 2015 16:56

amadin: if you really want players to be hurt when digging in a protected area then add these 2 lines to the init.lua file after line 161 in the latest Protector Redo mod:

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
player = minetest.get_player_by_name(digger)
player:set_hp(player:get_hp()-2)
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: Post your mod requests/ideas here

by amadin » Sun Jul 26, 2015 18:13

TenPlus1 wrote:amadin: if you really want players to be hurt when digging in a protected area then add these 2 lines to the init.lua file after line 161 in the latest Protector Redo mod:

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
player = minetest.get_player_by_name(digger)
player:set_hp(player:get_hp()-2)

Thank you, but it would be better then the player to be pushed back instead hurt.
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: Post your mod requests/ideas here

by Dragonop » Mon Jul 27, 2015 05:21

Hybrid Dog wrote:minetest already has a few weapons, e.g. download/file.php?mode=view&id=2968

You forgot the mighty Air Sword
 

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

Re: Post your mod requests/ideas here

by Hybrid Dog » Mon Jul 27, 2015 12:33

Dragonop wrote:
Hybrid Dog wrote:minetest already has a few weapons, e.g. download/file.php?mode=view&id=2968

You forgot the mighty Air Sword

l forgot many weapons, those were just a few examples
 

Remusqs1
New member
 
Posts: 6
Joined: Fri Jul 10, 2015 23:46
GitHub: Remusqs1
In-game: Remusqs1

Re: Post your mod requests/ideas here

by Remusqs1 » Thu Jul 30, 2015 05:39

Hi all, I have an idea for a mod but I have not the necessary knowledge of Lua programming to develop it. So I'm presenting my proposal here with the hope that maybe some of you can develop it:

Sometimes I need to get the tree sapling of a specific kind of tree. Of course the simplest way is to fell the tree and wait for the leaves fall, but this is not always practical. The time in which the leaves decay may vary by lag or others reasons, and when there are very large trees, trunks can be hidden somewhere and prevent the leaves fall. The other way to obtain the sapling is to put and destroy the leaves over and over and over again until you get a sapling. All these methods depend on the probability of each tree give a sapling, and you can spend a lot of time trying to get a little amount.

My idea is to create a machine in which you enter a number of leaves (may be 9 or more), and you can obtain immediately a sapling tree of the specie of the leaves that were used. For example, if jungle tree leaves are entered, it would get a jungle sapling, if apple tree leaves is entered, an apple tree sapling is obtained, and etc.

What do you think?

PD: Sorry for my english.
 

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

Re: Post your mod requests/ideas here

by ABJ » Thu Jul 30, 2015 08:43

That's a great idea, Remusqs! Though the electric saw in technic mod already can fell a tree and give you sapling. But it only gives one and that is not good so we need that kind of dedicated machine.
Though I'd suggest reducing the number of leaves to something like 3 to make it more worth it and also to prevent problems with less leafy trees that might come with mods.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Post your mod requests/ideas here

by Sokomine » Sat Aug 01, 2015 03:52

Krock had an autodigger on his server. That machine was frequently used to turn leaves into saplings, although it just digged them normally and required frequent refilling until all leaves where finally turned into saplings. Felling huge moretree trees and setting the right probability of saplings is a big problem with trees. The normal mapgen trees work fine (unless there's considerable lag). Larger ones tend to get complicated. RealTest has a nice approach there - felling a tree removes the entire tree and turns all leaves into sticks, saplings or air.
A list of my mods can be found here.
 

User avatar
Christian9
Member
 
Posts: 273
Joined: Fri Sep 19, 2014 20:29
In-game: Christian9

Re: Post your mod requests/ideas here

by Christian9 » Mon Aug 03, 2015 19:57

Dogs mod

Mobs:
Pug
Labrador
Great Dane
Border Collie
German Sheppard
Husky
Rat Terrier
Boxer
Great Pyrenes

Items
Dog Treat
Dog Bone
Chew Toy
Leash???
 

User avatar
Christian9
Member
 
Posts: 273
Joined: Fri Sep 19, 2014 20:29
In-game: Christian9

Re: Post your mod requests/ideas here

by Christian9 » Mon Aug 03, 2015 20:00

veikk0 wrote:I have an idea for a mod. It's inspired by a simple but very entertaining feature found in Grand Theft Auto 5.

Flipping people off.

Image

The player selects an empty hotbar slot and holds down a button (the right mouse button would probably be good). While the button is held down, the player's hand is changed to a different model. For other players to be able to see it a new animation and an addition to the player model's hand would be required.

I have no knowledge of Minetest modding so I don't know if it's possible to do with a mod or if it would require changes to the engine.


I tried making a mod that made "Middle Finger" That you could hold with the wield 3d giving the illusion that your fliping someone the bird
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 36 guests

cron