[Mod] Death Messages [0.1.2] [death_messages]
- SaKeL
- Member
- Posts: 743
- Joined: Tue Apr 14, 2015 18:39
- GitHub: JurajVajda
- IRC: SaKeL
- In-game: SaKeL
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
would be nice to check if is player already dead.... now when player dies from hunger and afk, death messages will loop and spam the chat :)
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
I love this mod! Adds a lot of fun to dying.
Deathmessages spamming the chat when player is taking damage would be nice to see fixed, as SaKeL mentions. The spam loop also occurs when dying in lava.
Also, I wrote some more death messages (most of the original ones are included in this list) that can be implemented in the mod if you like
Deathmessages spamming the chat when player is taking damage would be nice to see fixed, as SaKeL mentions. The spam loop also occurs when dying in lava.
Also, I wrote some more death messages (most of the original ones are included in this list) that can be implemented in the mod if you like
Code: Select all
-- Other death messages
messages.other = {
" died.",
" died trying.",
" didn't survive that final blow.",
" did not survive.",
" failed at staying alive.",
" had a meeting with destiny.",
" died and resurrected.",
" made a deadly decision.",
" is no more.",
" was being reckless.",
" did something fatal.",
" gave up on life.",
" is somewhat dead now.",
" flatlined.",
" took a fatal beating.",
" is a pile of bones.",
" is in need of a funeral service.",
" passed out permanently.",
" is knocking at the gates.",
" tried to survive, but didn't.",
" had an appointment with fate."
}
-- Lava death messages
messages.lava = {
" melted into a ball of fire.",
" thought lava was cool.",
" melted into a ball of fire.",
" dug straight down and landed in lava.",
" didn't know lava was hot.",
" tried swimming in lava and failed at it.",
" got stuck in lava and stayed there.",
" can't swim in lava."
}
-- Drowning death messages
messages.water = {
" drowned.",
" ran out of air.",
" failed at swimming lessons.",
" tried to impersonate an anchor.",
" forgot he wasn't a fish.",
" blew one too many bubbles.",
" couldn't reach the surface in time.",
" was lost at sea."
}
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
[player] became a pancake (Fall)
[player] is now medium to well-roasted. (Lava/fire)
A [mob] finds [player] delicious. (Mob)
[killer] won't be bothered by [player] for some time... (PvP)
[killer] sent [player] as a tribute to Hades (PvP)
[player] popped in to visit Hades. (Anything really)
<[player]> THE FALL WAS OVER 9000!!! (i.e. looks like a chat message xD) (Fall)
[player] was walking and texting (Lava/fire/fall)
[killer]'s [weapon] wasn't very polite to [player] (PvP)
[player] breathed his last.
More coming in another post ;)
[player] is now medium to well-roasted. (Lava/fire)
A [mob] finds [player] delicious. (Mob)
[killer] won't be bothered by [player] for some time... (PvP)
[killer] sent [player] as a tribute to Hades (PvP)
[player] popped in to visit Hades. (Anything really)
<[player]> THE FALL WAS OVER 9000!!! (i.e. looks like a chat message xD) (Fall)
[player] was walking and texting (Lava/fire/fall)
[killer]'s [weapon] wasn't very polite to [player] (PvP)
[player] breathed his last.
More coming in another post ;)
N/A
- bigfoot
- Member
- Posts: 203
- Joined: Fri Sep 02, 2016 23:31
- GitHub: bigfoot547
- IRC: bigfoot547 or bigfoot
- In-game: bigfoot547 or bigfoot
- Location: Somewhere between polar bears and penguins.
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
So, I whipped up some code that you can use for detecting if a player was killed by another player or a mob. I which case, it will say the mobname (e.g. "mobs:dungeon_master").
Death messages:
[player] was killed by [player].
[player] was killed by [mobname]
Rev. 2
Oh! By the way, you can use this freely. You have my permission.
Death messages:
[player] was killed by [player].
[player] was killed by [mobname]
Spoiler
Code: Select all
-- bigfoot547's death messages
minetest.register_on_punchplayer(function(player, hitter)
if not (player or hitter) then
return false
end
if not hitter:get_player_name() == "" then
return false
end
minetest.after(0, function()
if player:get_hp() == 0 and hitter:get_player_name() ~= "" then
minetest.chat_send_all(player:get_player_name().." was killed by "..hitter:get_player_name()..".")
return true
elseif hitter:get_player_name() == "" and player:get_hp() == 0 then
minetest.chat_send_all(player:get_player_name().." was killed by "..hitter:get_luaentity().name..".")
else
return false
end
end)
end)
Code: Select all
-- bigfoot547's death messages
minetest.register_on_punchplayer(function(player, hitter)
if not (player or hitter) then
return false
end
if not hitter:get_player_name() == "" then
return false
end
minetest.after(0, function()
if player:get_hp() == 0 and hitter:get_player_name() ~= "" and hitter:get_wielded_item() and hitter:get_wielded_item():get_name() and minetest.registered_tools[hitter:get_wielded_item():get_name()] then
minetest.chat_send_all(player:get_player_name().." was killed by "..hitter:get_player_name().." with "..minetest.registered_tools[hitter:get_wielded_item():get_name()].description..".")
return true
elseif player:get_hp() == 0 and hitter:get_player_name() ~= "" and hitter:get_wielded_item() then
minetest.chat_send_all(player:get_player_name().." was killed by "..hitter:get_player_name().." with fists of fury.")
elseif hitter:get_player_name() == "" and player:get_hp() == 0 then
minetest.chat_send_all(player:get_player_name().." was killed by "..hitter:get_luaentity().name..".")
else
return false
end
end)
end)
Last edited by bigfoot on Wed Nov 22, 2017 23:02, edited 2 times in total.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
+1
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
Some messages have poor grammar:
You forgot he wasn't a fish.
You is somewhat dead now.
- Beerholder
- Member
- Posts: 199
- Joined: Wed Aug 03, 2016 20:23
- GitHub: evrooije
- In-game: Beerholder
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
Somebody set us up the bomb ;)Wuzzy wrote:Some messages have poor grammar:
You forgot he wasn't a fish.You is somewhat dead now.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
it should be "player"
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
Re:
hum... city_block mod has thisCraigyDavi wrote:Cool mod. I now use this mod on my server rather than my terrible death messages mod :)
Also does anyone know if this would be possible?
When someone kills someone else it would show as a message:Code: Select all
player1 killed player2
Code: Select all
minetest.chat_send_all("Player "..name.." sent to jail for killing " .. pname .." without reason in town")
https://github.com/minetest-mods/city_b ... r/init.lua
My Public Mods! Discord: Rottweiler Games#3368
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
Re:
hereCraigyDavi wrote:Cool mod. I now use this mod on my server rather than my terrible death messages mod :)
Also does anyone know if this would be possible?
When someone kills someone else it would show as a message:Code: Select all
player1 killed player2
Code: Select all
minetest.register_on_punchplayer(function(player, hitter, _, _, _, damage)
if not (hitter and hitter:is_player()) then
return
end
local hp = player:get_hp()
if hp - damage > 0 or hp <= 0 then
return
end
local hitter_name = hitter:get_player_name()
local player_name = player:get_player_name()
minetest.chat_send_player(hitter_name, ""..hitter_name.." killed " .. player_name .."")
end)
My Public Mods! Discord: Rottweiler Games#3368
- bigfoot
- Member
- Posts: 203
- Joined: Fri Sep 02, 2016 23:31
- GitHub: bigfoot547
- IRC: bigfoot547 or bigfoot
- In-game: bigfoot547 or bigfoot
- Location: Somewhere between polar bears and penguins.
Re:
Been there, done that ;)CraigyDavi wrote:Cool mod. I now use this mod on my server rather than my terrible death messages mod :)
Also does anyone know if this would be possible?
When someone kills someone else it would show as a message:Code: Select all
player1 killed player2
Here's the link to the post...
EDIT: Fixed link, also my code is more elaborate and informative than ManElevation's code
Last edited by bigfoot on Sat Nov 25, 2017 16:29, edited 1 time in total.
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
Re: Re:
ah dint see that :P nice!bigfoot547 wrote:EDIT: Fixed link, also my code is more elaborate and informative than ManElivation's code
My Public Mods! Discord: Rottweiler Games#3368
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Re:
What? Who is this guy? :Pbigfoot547 wrote:ManElivation
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
Re: Re:
Thanks for the contribution! If you want to be credited in the commit log than you can create a pull request, though it's fine with me if you want me to commit your changes and credit you in a code comment.bigfoot547 wrote:Been there, done that ;)CraigyDavi wrote:Cool mod. I now use this mod on my server rather than my terrible death messages mod :)
Also does anyone know if this would be possible?
When someone kills someone else it would show as a message:Code: Select all
player1 killed player2
Here's the link to the post...
EDIT: Fixed link, also my code is more elaborate and informative than ManElivation's code
Back from the dead!
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
Re: [Mod]Death Messages[0.1.2 beta][death_messages]
I think I will make it so the random messages are customizable in the settings.txt file (keeping the current set of defaults). That way if people want to use their own set of messages they can change it for themselves instead of having to create a pull request.
Back from the dead!
- bigfoot
- Member
- Posts: 203
- Joined: Fri Sep 02, 2016 23:31
- GitHub: bigfoot547
- IRC: bigfoot547 or bigfoot
- In-game: bigfoot547 or bigfoot
- Location: Somewhere between polar bears and penguins.
Re: [Mod] Death Messages [0.1.2] [death_messages]
Ok, I'll create a pull request later today :)
- bigfoot
- Member
- Posts: 203
- Joined: Fri Sep 02, 2016 23:31
- GitHub: bigfoot547
- IRC: bigfoot547 or bigfoot
- In-game: bigfoot547 or bigfoot
- Location: Somewhere between polar bears and penguins.
Re: Re:
lol where'd u git that from ;)azekill_DIABLO wrote:What? Who is this guy? :Pbigfoot547 wrote:ManElivation
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Death Messages [0.2.0] [death_messages]
EDIT
my fork no longer exists
my fork no longer exists
Last edited by Hamlet on Sun Sep 09, 2018 11:34, edited 1 time in total.
My repositories: Codeberg.org | My ContentDB's page
- scottwolff
- Member
- Posts: 129
- Joined: Sat Apr 30, 2016 06:15
- In-game: scottwolff or some variant of iasiney
- Location: Central Illinois
Re: [Mod] Death Messages [0.1.2] [death_messages]
Oh the shame. Now everyone knows your pain or can laugh at you.
Seriously though, good mod.
Seriously though, good mod.
-
- New member
- Posts: 4
- Joined: Sun Sep 09, 2018 07:11
- GitHub: ademant
- In-game: ademant
- Location: Euskirchen, Duitsland
Re: [Mod] Death Messages [0.1.2] [death_messages]
As a beginner for modding minetest I forked this mod and tried to add german.
The language is checked and then a random message of the language is printed.
Also it tries to identify death by starving, sunburn and thirst if mod is installed.
The code can be found at: https://notabug.org/ademant/death_messages.git
The language is checked and then a random message of the language is printed.
Also it tries to identify death by starving, sunburn and thirst if mod is installed.
The code can be found at: https://notabug.org/ademant/death_messages.git
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Death Messages [0.1.2] [death_messages]
Hello and welcome!ademant wrote:As a beginner for modding minetest I forked this mod and tried to add german.
The language is checked and then a random message of the language is printed. [...]
If you wish to add multilanguage support to a mod then I suggest you to use the Internationalization Library ("Intllib") mod: it allows to use external localization files instead of hardcoding the translation strings in the source code.
My repositories: Codeberg.org | My ContentDB's page
-
- New member
- Posts: 4
- Joined: Sun Sep 09, 2018 07:11
- GitHub: ademant
- In-game: ademant
- Location: Euskirchen, Duitsland
Re: [Mod] Death Messages [0.1.2] [death_messages]
Sure; I read the code, but it is not really for use with death messages. Most of them can't be translated to another language.Hamlet wrote: Hello and welcome!
If you wish to add multilanguage support to a mod then I suggest you to use the Internationalization Library ("Intllib") mod: it allows to use external localization files instead of hardcoding the translation strings in the source code.
- SuperStarSonic
- Member
- Posts: 160
- Joined: Fri Oct 14, 2022 20:30
- GitHub: Python-Sargent
- In-game: SuperStarSonic
- Location: Earth (may be out of date)
Re:
Don't you think it should be both? I know of a few mods that do 'suffocating' using breath, which will throw you off.Evergreen wrote: ↑Thu Mar 20, 2014 14:54I agree. Also, minor change in detecting drowning. Instead of looking for the node the player is in, it now uses player:get_breath.Sokomine wrote:Based on that limited amount of information, a ban does not seem justified, that's right. And even if it is certain that that particular player was the culprit, it might still be an accident. Yet if the player repeats the killing, a ban might be necessary in order to allow the rest of the players on the server to play undisturbed. We really need a better API for that.4aiman wrote: I don't think that in a situation like this the killer should be banned.
Who is online
Users browsing this forum: No registered users and 21 guests