[Mod] RandomMessages [random_messages]
-
- Member
- Posts: 31
- Joined: Wed May 01, 2013 07:55
[Mod] RandomMessages [random_messages]
RandomMessages mod by arsdragonfly.
This mod adds random messages to the server.
Put your messages in (world directory)/random_messages, 1 message per line.
Messages can be all kinds of hints, mod usage, etc.Install this mod if you're a server admin who wants to notify players these stuff.
In minetest.conf, random_messages_interval decides how often a message is sent.
License: CC0
Download: https://github.com/arsdragonfly/random_ ... master.zip
GitHub: https://github.com/arsdragonfly/random_messages
Dependencies: default
Enjoy it! ^_^
| | |
vvv fooooooo and baaaaar are messages. I lowered the interval, of course.
6/19/2013
This mod adds random messages to the server.
Put your messages in (world directory)/random_messages, 1 message per line.
Messages can be all kinds of hints, mod usage, etc.Install this mod if you're a server admin who wants to notify players these stuff.
In minetest.conf, random_messages_interval decides how often a message is sent.
License: CC0
Download: https://github.com/arsdragonfly/random_ ... master.zip
GitHub: https://github.com/arsdragonfly/random_messages
Dependencies: default
Enjoy it! ^_^
| | |
vvv fooooooo and baaaaar are messages. I lowered the interval, of course.
6/19/2013
Last edited by sfan5 on Thu Jun 20, 2013 20:08, edited 1 time in total.
So this is in your world folder, not modTedypig wrote:"Put your messages in (world directory)/random_messages, 1 message per line."
Do I make a new .txt file in the mod folder, or what do I do?
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
See also the MT-Faithful texture pack (work in progress).
-
- Member
- Posts: 31
- Joined: Wed May 01, 2013 07:55
-
- Member
- Posts: 31
- Joined: Wed May 01, 2013 07:55
Re: [Mod] RandomMessages [random_messages]
I added this code to the init.lua file. It adds a /rm command in order to show all of the messages in-game. I think it helps to highlight some of the more useful commands and/or game-play aspects players may be interested in, as opposed to /help or /help all which lists everything.
Wanted to share it with you here in case it's helpful to anyone. Thanks for the mod, by the way, it's working great!
Code: Select all
minetest.register_chatcommand("rm", {
params = "",
description = "Show all random help messages in chat.",
func = function(name)
for key,value in pairs(random_messages.messages) do
local message = key .. ': ' .. value
minetest.chat_send_player(name, message)
end
end
})
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] RandomMessages [random_messages]
Hi, I posted a fork of this mod on github.
As the original, you can write and edit messages located in the world folder ( in a text file file )
+ You can now use a default messages file located in mod directory (When a new world is created, its content is copied to the file created in the world folder)
+ You can use a localized suffix for this default file (e.g : messages.fr.txt, messages.es.txt, ...)
+ Messages are written on signs placed around the world. (if signs mod or signs_lib mods are not used, a new sign_yard node is added)
+ Configuration file (config.lua) to turn on/off the chat messages or the signs and other options
Chat messages are disabled by default : edit config.lua to use them
A file messages.fr.txt with hints I use on my servers is included, you might want to remove it (or at least edit its content since it may not correspond to your subgame or mods)
Download : https://github.com/xisd/random_messages ... _signs.zip
Code : https://github.com/xisd/random_messages
As the original, you can write and edit messages located in the world folder ( in a text file file )
+ You can now use a default messages file located in mod directory (When a new world is created, its content is copied to the file created in the world folder)
+ You can use a localized suffix for this default file (e.g : messages.fr.txt, messages.es.txt, ...)
+ Messages are written on signs placed around the world. (if signs mod or signs_lib mods are not used, a new sign_yard node is added)
+ Configuration file (config.lua) to turn on/off the chat messages or the signs and other options
Chat messages are disabled by default : edit config.lua to use them
A file messages.fr.txt with hints I use on my servers is included, you might want to remove it (or at least edit its content since it may not correspond to your subgame or mods)
Download : https://github.com/xisd/random_messages ... _signs.zip
Code : https://github.com/xisd/random_messages
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] RandomMessages [random_messages]
This is a great idea! Server admins may add storytelling pieces to the world. Some issues still linger for me before putting it to use on a server. I'm not using signs_lib, just regular signs mod.xisd wrote:+ Messages are written on signs placed around the world. (if signs mod or signs_lib mods are not used, a new sign_yard node is added)
• Can you have it not spawn i water and other such strange places?
• Can I spawn even lesser amount of signs so that they're more rare?
• It would be nice to have the yardsigns as items too, so that when players break them they are reusable. Or at least dropping as empty regular signs.
Re: [Mod] RandomMessages [random_messages]
Do you means the signs included in 'default' mod, or the 'signs' modtexmex wrote:I'm not using signs_lib, just regular signs mod.
I am using signs_lib but since it registers signs with signs: prefix, I assumed it should use the same node as the signs mod, but that doesn't sound so obvious now... maybe it need to be checked
I had actually fixed that before reading your post ! they should not spawn on water anymore.texmex wrote:• Can you have it not spawn i water and other such strange places?
What other strange places did you have in mind ?
Not yet, but that's not difficult to implement, this should be done by the end of the weekendtexmex wrote:• Can I spawn even lesser amount of signs so that they're more rare?
Edit : There is now a 'chance_of_signs_in_chunk' options, along with signs_per_chunk, this should allow fine tuning. (e.g : setting 'chance_of_signs_in_chunk' to a low value and 'signs_per_chunk' to a high value would result in rare areas but filled with signs )
They should already drop as empty regular signs .. that's very strange if they are not.texmex wrote:• It would be nice to have the yardsigns as items too, so that when players break them they are reusable. Or at least dropping as empty regular signs.
Do you use a recent version of default mod ? i think there has been some recent changes in signs name that could be the cause of that.
Anyway I've thought about making the yard signs craftable/collectable and I wasn't totally sure it should be done, but I can't remember why,... so yeah I'll do that.
edit : I will have to take a look at the sign api from default (meta handling and formspec) to see if I can call it as is, not just duplicate it but calling functions from default.
Otherwise it would result in two similar items (sign and yard sign) handled by two different mods (so potentially differently) and I'm not very fond of that. In this case, it would be neater to add compatibility for most signs mod out there rather than turning this into another sign mod.
edit : Forget what I said, its done !
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] RandomMessages [random_messages]
That's so good xisd, thank you for your effort. It works as intended with the sign density. The two bugs I found was that the inventory item has no tooltip title and that signs spawn on treetops. Perhaps it's good to check for underlying node before spawning?
Ideally it would also spawn in already generated areas… :)
Ideally it would also spawn in already generated areas… :)
Re: [Mod] RandomMessages [random_messages]
Thanks. I updated it :texmex wrote:That's so good xisd, thank you for your effort. It works as intended with the sign density. The two bugs I found was that the inventory item has no tooltip title and that signs spawn on treetops. Perhaps it's good to check for underlying node before spawning?
Ideally it would also spawn in already generated areas… :)
- Yard sign node description with intllib support
- abm for spawning in generated areas with config option for frequency and limit number of signs in a certain radius
- a few more options in the config file including list of nodes allowed for spawning signs
Re: [Mod] RandomMessages [random_messages]
为什么依赖default?
I speak en_CN/zh_CN/wzh_ACN.
My mods: ZNM's Not Minecraft Minecraft-like Commands Crafting+/gamemode
My mods: ZNM's Not Minecraft Minecraft-like Commands Crafting+/gamemode
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] RandomMessages [random_messages]
Thank you xisd, that is awesome. I'll check it out.
Re: [Mod] RandomMessages [random_messages]
I speak en_CN/zh_CN/wzh_ACN.
My mods: ZNM's Not Minecraft Minecraft-like Commands Crafting+/gamemode
My mods: ZNM's Not Minecraft Minecraft-like Commands Crafting+/gamemode
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] RandomMessages [random_messages]
I was wondering. Could it be made possible to update the text of already placed signs? To correct a spelling error in the random_messages file for instance.
Re: [Mod] RandomMessages [random_messages]
I added a new ABM that acts on already placed signs :texmex wrote:I was wondering. Could it be made possible to update the text of already placed signs? To correct a spelling error in the random_messages file for instance.
It does not instantaneously take corrections, but every signs placed by the mod will eventually get a new message picked from the (corrected) random_messages file.
They also have a (configurable) chance to be removed
I wasn't sure about that at first but it's turning out to be something quite nice : dynamically placed evolving signs
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] RandomMessages [random_messages]
This is very useful for having a developing storytelling of a multiplayer world, thank you. One thing I noticed with the ABM switched on is that it slowed down chunk generation drastically. I have noticed some mod developers using some performance tool on their mods. Perhaps it'd be useful.xisd wrote:I added a new ABM that acts on already placed signs :texmex wrote:I was wondering. Could it be made possible to update the text of already placed signs? To correct a spelling error in the random_messages file for instance.
It does not instantaneously take corrections, but every signs placed by the mod will eventually get a new message picked from the (corrected) random_messages file.
They also have a (configurable) chance to be removed
I wasn't sure about that at first but it's turning out to be something quite nice : dynamically placed evolving signs
Re: [Mod] RandomMessages [random_messages]
I feared that it would be an issue, do you have some examples of these performance tools ?texmex wrote:This is very useful for having a developing storytelling of a multiplayer world, thank you. One thing I noticed with the ABM switched on is that it slowed down chunk generation drastically. I have noticed some mod developers using some performance tool on their mods. Perhaps it'd be useful.
I also though about using LBMs instead of ABMs, changes would only happen each time server (not later in-game) restart my understanding is that is would slow down the server when it starts but would be less demanding later (but I might be wrong about that).
Re: [Mod] RandomMessages [random_messages]
included ingame mod profiler, to enable look minetest.conf
Who is online
Users browsing this forum: No registered users and 37 guests