Post your mod requests/ideas here

Josh
Member
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Post

Chinchow wrote: if you want minecraft things go play minecraft
Exactly, This is mineTEST :)
Last edited by Josh on Fri Dec 28, 2012 02:16, edited 1 time in total.

Josh
Member
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Post

Pilzadam's quest
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Salutation's sir Pilzadam the noble king of minetest challeges you to make a Realistic-looking chest like you see in dungeons and other similar places. It's look can be 3D shaped, size is your choice and it has to open. Succeed in your quest and you will receive a mese cookie.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S: You don't have to make this, but it would be intresting :)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Josh wrote:Pilzadam's quest
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Salutation's sir Pilzadam the noble king of minetest challeges you to make a Realistic-looking chest like you see in dungeons and other similar places. It's look can be 3D shaped, size is your choice and it has to open. Succeed in your quest and you will receive a mese cookie.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S: You don't have to make this, but it would be intresting :)
The nodeboxes for the opened and the closed state are easy to do but there are two problems:
1.: The animation to open the chest isnt possible.
2.: There are no callbacks in the API to register when a chest is opened/closed.

User avatar
Chinchow
Member
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

How about a teslacoil one that would emit lightning around it and shock the player it touches and it could be harvested with lightning rods and crafted into useful things
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests

Josh
Member
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Post

PilzAdam wrote:
Josh wrote:Pilzadam's quest
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Salutation's sir Pilzadam the noble king of minetest challeges you to make a Realistic-looking chest like you see in dungeons and other similar places. It's look can be 3D shaped, size is your choice and it has to open. Succeed in your quest and you will receive a mese cookie.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S: You don't have to make this, but it would be intresting :)
The nodeboxes for the opened and the closed state are easy to do but there are two problems:
1.: The animation to open the chest isnt possible.
2.: There are no callbacks in the API to register when a chest is opened/closed.
Oh, well it's....impossible :(

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Josh wrote:
PilzAdam wrote:
Josh wrote:Pilzadam's quest
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Salutation's sir Pilzadam the noble king of minetest challeges you to make a Realistic-looking chest like you see in dungeons and other similar places. It's look can be 3D shaped, size is your choice and it has to open. Succeed in your quest and you will receive a mese cookie.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
P.S: You don't have to make this, but it would be intresting :)
The nodeboxes for the opened and the closed state are easy to do but there are two problems:
1.: The animation to open the chest isnt possible.
2.: There are no callbacks in the API to register when a chest is opened/closed.
Oh, well it's....impossible :(
It *may* be possible (theoretically, haven't tested it).
First you make two nodes: a closed chest, and an open chest. Then, you make it so punching the node switches the node (i.e: changes the open one to the closed one and viceversa), and you only define right-clicking for the "open" chest.
EDIT: I may do it if someone makes the nodebox for me.
EDIT2: BTW, yes, the animation may also be possible using some clever way, like how falling nodes and mesecons movestones are implemented.
Last edited by kaeza on Fri Dec 28, 2012 04:01, edited 1 time in total.
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

User avatar
Zeg9
Member
Posts: 608
Joined: Fri Sep 21, 2012 11:02
Location: France

by Zeg9 » Post

kaeza wrote:
Josh wrote:
PilzAdam wrote: The nodeboxes for the opened and the closed state are easy to do but there are two problems:
1.: The animation to open the chest isnt possible.
2.: There are no callbacks in the API to register when a chest is opened/closed.
Oh, well it's....impossible :(
It *may* be possible (theoretically, haven't tested it).
First you make two nodes: a closed chest, and an open chest. Then, you make it so punching the node switches the node (i.e: changes the open one to the closed one and viceversa), and you only define right-clicking for the "open" chest.
EDIT: I may do it if someone makes the nodebox for me.
EDIT2: BTW, yes, the animation may also be possible using some clever way, like how falling nodes and mesecons movestones are implemented.
Animation is possible with the new models code and an entity. I may do this part...
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).

User avatar
Chinchow
Member
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

OK I'm gonna suggest a mod that I was gonna make and just wanted more ideas to add to it but it got closed because someone mistook it for a request so now it is I want a mod that adds more liquids other than water and lava
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

liquid that floats
Coding;
1X coding
3X debugging
12X tweaking to be just right

Ragnar
Member
Posts: 849
Joined: Thu Oct 25, 2012 15:19
Location: Estonia
Contact:

by Ragnar » Post

@doggy i could make an expansion pack for my mod with new liquids, that you can tweak to make a new mod maybe =)
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?

User avatar
Chinchow
Member
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

Ragnar wrote:@doggy i could make an expansion pack for my mod with new liquids, that you can tweak to make a new mod maybe =)
1. Am I doggy or is everyone doggy cause if everyone is doggy @doggy would be hard to understand

2.go ahead looking forward to it
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests

Ragnar
Member
Posts: 849
Joined: Thu Oct 25, 2012 15:19
Location: Estonia
Contact:

by Ragnar » Post

i reconize you, but i never was good with remembering names... and youre doggy =)
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?

User avatar
cactuz_pl
Member
Posts: 876
Joined: Tue Jun 05, 2012 16:34
Location: Poland

by cactuz_pl » Post

Ban which works even when player is offline, and when he trying to connect server is adding his IP to banlist.

Edit:

Command will add name to "future ban list". Server could compare logged player's name with this list and ban if name match to the list.
Last edited by cactuz_pl on Sat Dec 29, 2012 11:55, edited 1 time in total.
Nope

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

cactuz_pl wrote:Ban which works even when player is offline, and when he trying to connect server is adding his IP to banlist.

Edit:

Command will add name to "future ban list". Server could compare logged player's name with this list and ban if name match to the list.
This is untested code:

Code: Select all

future_ban_list = {}

minetest.register_chatcommand("future_ban", {
    params = "<playername> | leave playername out to see the future ban list",
    description = "The player will be banned when trying to join",
    privs = {ban=true},
    func = function(name, param)
        if param == "" then
            minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
            return
        end
        if not minetest.env:get_player_by_name(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, desc .. " to future ban list added.")
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")
            return
        end
        if not minetest.ban_player(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, desc .. " to future ban list added.")
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")
        else
            local desc = minetest.get_ban_description(param)
            minetest.chat_send_player(name, "Banned " .. desc .. ".")
            minetest.log("action", name .. " bans " .. desc .. ".")
        end
    end
})

minetest.register_on_joinplayer(function(player)
    local name = player:get_player_name()
    for _,n in ipairs(future_ban_list) do
        if n == name then
            if not minetest.ban_player(name) then
                minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
            else
                local desc = minetest.get_ban_description(name)
                minetest.log("action", desc .. " banned (from future ban list).")
            end
        end
    end
end)


TheMan

by TheMan » Post

HOW ABOUT A [FORCEFIELD]

*Made of cery clear undestructible glass.
*It can reduce griefing.






COULD THIS BE DONE?

User avatar
Chinchow
Member
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

TheMan wrote:HOW ABOUT A [FORCEFIELD]

*Made of cery clear undestructible glass.
*It can reduce griefing.






COULD THIS BE DONE?
Isn't that just making a new glass with a 0 in the area that determines durability?
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

TheMan wrote:HOW ABOUT A [FORCEFIELD]

*Made of cery clear undestructible glass.
*It can reduce griefing.






COULD THIS BE DONE?
That has already been done. See this topic, in particular the "full clip".
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

User avatar
cactuz_pl
Member
Posts: 876
Joined: Tue Jun 05, 2012 16:34
Location: Poland

by cactuz_pl » Post

PilzAdam wrote: This is untested code:

Code: Select all

future_ban_list = {}

minetest.register_chatcommand("future_ban", {
    params = "<playername> | leave playername out to see the future ban list",
    description = "The player will be banned when trying to join",
    privs = {ban=true},
    func = function(name, param)
        if param == "" then
            minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
            return
        end
        if not minetest.env:get_player_by_name(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, desc .. " to future ban list added.")  <----LUA ERROR
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")  <---- LUAERROR

            return
        end
        if not minetest.ban_player(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, desc .. " to future ban list added.")
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")
        else
            local desc = minetest.get_ban_description(param)
            minetest.chat_send_player(name, "Banned " .. desc .. ".")
            minetest.log("action", name .. " bans " .. desc .. ".")
        end
    end
})

minetest.register_on_joinplayer(function(player)
    local name = player:get_player_name()
    for _,n in ipairs(future_ban_list) do
        if n == name then
            if not minetest.ban_player(name) then
                minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
            else
                local desc = minetest.get_ban_description(name)
                minetest.log("action", desc .. " banned (from future ban list).")
            end
        end
    end
end)

Thanks, this code almost works.

There are two errors in 14 and 15 line, I don't know how to fix them so I removed them.

Mod is working(adding to list and banning on join) but when turn off my local server, mod forgets "future_ban_list" (no new files are created).
Nope

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

cactuz_pl wrote:
PilzAdam wrote: This is untested code:

Code: Select all

future_ban_list = {}

minetest.register_chatcommand("future_ban", {
    params = "<playername> | leave playername out to see the future ban list",
    description = "The player will be banned when trying to join",
    privs = {ban=true},
    func = function(name, param)
        if param == "" then
            minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
            return
        end
        if not minetest.env:get_player_by_name(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, desc .. " to future ban list added.")  <----LUA ERROR
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")  <---- LUAERROR

            return
        end
        if not minetest.ban_player(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, desc .. " to future ban list added.")
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")
        else
            local desc = minetest.get_ban_description(param)
            minetest.chat_send_player(name, "Banned " .. desc .. ".")
            minetest.log("action", name .. " bans " .. desc .. ".")
        end
    end
})

minetest.register_on_joinplayer(function(player)
    local name = player:get_player_name()
    for _,n in ipairs(future_ban_list) do
        if n == name then
            if not minetest.ban_player(name) then
                minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
            else
                local desc = minetest.get_ban_description(name)
                minetest.log("action", desc .. " banned (from future ban list).")
            end
        end
    end
end)

Thanks, this code almost works.

There are two errors in 14 and 15 line, I don't know how to fix them so I removed them.

Mod is working(adding to list and banning on join) but when turn off my local server, mod forgets "future_ban_list" (no new files are created).
Fixed line 14 and 15 (change desc to param):

Code: Select all

        if not minetest.env:get_player_by_name(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, param .. " to future ban list added.") -- Fixed
            minetest.log("action", name .. " added " .. param .. " to future ban list.") -- Fixed

            return
        end
This version saves the future ban list and also removes players that are banned form the list (again untested):

Code: Select all

future_ban_list = {}

local file = io.open(minetest.get_worldpath().."/future_banlist.txt")
if file then
    future_ban_list = minetest.deserialize(file:read("*all"))
    file:close()
end

minetest.register_chatcommand("future_ban", {
    params = "<playername> | leave playername out to see the future ban list",
    description = "The player will be banned when trying to join",
    privs = {ban=true},
    func = function(name, param)
        if param == "" then
            minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
            return
        end
        if not minetest.env:get_player_by_name(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, param .. " to future ban list added.")
            minetest.log("action", name .. " added " .. param .. " to future ban list.")
            local file = io.open(minetest.get_worldpath().."/future_banlist.txt")
            if file then
                file:write(minetest.serialize(future_ban_list))
                file:close()
            end

            return
        end
        if not minetest.ban_player(param) then
            table.insert(future_ban_list, param)
            local file = io.open(minetest.get_worldpath().."/future_banlist.txt")
            if file then
                file:write(minetest.serialize(future_ban_list))
                file:close()
            end
            minetest.chat_send_player(name, desc .. " to future ban list added.")
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")
        else
            local desc = minetest.get_ban_description(param)
            minetest.chat_send_player(name, "Banned " .. desc .. ".")
            minetest.log("action", name .. " bans " .. desc .. ".")
        end
    end
})

minetest.register_on_joinplayer(function(player)
    local name = player:get_player_name()
    for i,n in ipairs(future_ban_list) do
        if n == name then
            if not minetest.ban_player(name) then
                minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
            else
                local desc = minetest.get_ban_description(name)
                minetest.log("action", desc .. " banned (from future ban list).")
                table.remove(future_ban_list, i)
            end
        end
    end
end)

User avatar
cactuz_pl
Member
Posts: 876
Joined: Tue Jun 05, 2012 16:34
Location: Poland

by cactuz_pl » Post

Still it doesn't remember list, future_banlist.txt doesn't exist (in world folder). But server starts.

When I created future_banlist.txt in world folder, I can see on server start:

Code: Select all

Server: error:
...(path to mod folder)/init.lua:49: bad argument #1 to

Code: Select all

minetest.register_on_joinplayer(function(player)
    local name = player:get_player_name()
    for i,n in ipairs(future_ban_list) do             <------------------------------ 49th line
        if n == name then
            if not minetest.ban_player(name) then
                minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
            else
                local desc = minetest.get_ban_description(name)
                minetest.log("action", desc .. " banned (from future ban list).")
                table.remove(future_ban_list, i)
            end
        end
    end
end)
Thanks
Last edited by cactuz_pl on Sun Dec 30, 2012 18:36, edited 1 time in total.
Nope

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

cactuz_pl wrote:Still it doesn't remember list, future_banlist.txt doesn't exist (in world folder). But server starts.

When I created future_banlist.txt in world folder, I can see on server start:

Code: Select all

Server: error:
...(path to mod folder)/init.lua:49: bad argument #1 to

Code: Select all

minetest.register_on_joinplayer(function(player)
    local name = player:get_player_name()
    for i,n in ipairs(future_ban_list) do             <------------------------------ 49th line
        if n == name then
            if not minetest.ban_player(name) then
                minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
            else
                local desc = minetest.get_ban_description(name)
                minetest.log("action", desc .. " banned (from future ban list).")
                table.remove(future_ban_list, i)
            end
        end
    end
end)
Thanks
The mod generates the file. You cant add names to this file. You have to add them all in-game with the command.

User avatar
cactuz_pl
Member
Posts: 876
Joined: Tue Jun 05, 2012 16:34
Location: Poland

by cactuz_pl » Post

So I did.

File is not created.

Yes I created it but after failure.
Last edited by cactuz_pl on Sun Dec 30, 2012 20:12, edited 1 time in total.
Nope

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

cactuz_pl wrote:So I did.

File is not created.

Yes I made it but after failure.
New version (should fix the save issue):

Code: Select all

future_ban_list = {}

local file = io.open(minetest.get_worldpath().."/future_banlist.txt", "r")
if file then
    future_ban_list = minetest.deserialize(file:read("*all"))
    file:close()
    if not future_ban_list then
        future_ban_list = {}
    end
end

local function save_file()
    local file = io.open(minetest.get_worldpath().."/future_banlist.txt", "w")
    if file then
        file:write(minetest.serialize(future_ban_list))
        file:close()
    end
end

minetest.register_chatcommand("future_ban", {
    params = "<playername> | leave playername out to see the future ban list",
    description = "The player will be banned when trying to join",
    privs = {ban=true},
    func = function(name, param)
        if param == "" then
            minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
            return
        end
        if not minetest.env:get_player_by_name(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, param .. " to future ban list added.")
            minetest.log("action", name .. " added " .. param .. " to future ban list.")
            save_file()
            return
        end
        if not minetest.ban_player(param) then
            table.insert(future_ban_list, param)
            minetest.chat_send_player(name, desc .. " to future ban list added.")
            minetest.log("action", name .. " added " .. desc .. " to future ban list.")
            save_file()
        else
            local desc = minetest.get_ban_description(param)
            minetest.chat_send_player(name, "Banned " .. desc .. ".")
            minetest.log("action", name .. " bans " .. desc .. ".")
        end
    end
})

minetest.register_on_joinplayer(function(player)
    local name = player:get_player_name()
    for i,n in ipairs(future_ban_list) do
        if n == name then
            if not minetest.ban_player(name) then
                minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
            else
                local desc = minetest.get_ban_description(name)
                minetest.log("action", desc .. " banned (from future ban list).")
                table.remove(future_ban_list, i)
                save_file()
            end
        end
    end
end)

User avatar
cactuz_pl
Member
Posts: 876
Joined: Tue Jun 05, 2012 16:34
Location: Poland

by cactuz_pl » Post

Now it works perfectly.

Thank you, and sorry for wasting your time. I hope you will create new topic with this mod.
Last edited by cactuz_pl on Sun Dec 30, 2012 20:21, edited 1 time in total.
Nope

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

cactuz_pl wrote:Now it works perfectly.

Thank you, and sorry for wasting your time. I hope you will create new topic with this mod.
I dont want to create a topic, you can do this if you want to. License: WTFPL.
Last edited by PilzAdam on Sun Dec 30, 2012 20:24, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests