Better death message for singleplayer

master
Solebull 2019-02-26 03:42:00 +01:00
parent 955ab165ca
commit aeedeb92ef
4 changed files with 135 additions and 75 deletions

View File

@ -1,5 +1,7 @@
2019-02-26 Solebull <solebull42@gmail.com>
* mods/death_messages/init.lua (register_on_dieplayer): add y*
tables for better singleplayer 'Vous'-based death messages.
* mods/villagers/trading.lua (villagers.getTradingFormspec): fix a
heavy bug with some villagers where item_stock is nil. Set it
to 1 by default.

116
ROADMAP
View File

@ -144,61 +144,9 @@ It's really fast. May be used on a website, to show the actual map.
- [ ] see https://forum.minetest.net/viewtopic.php?id=4212
**** pvp shoudld be a privillege
- So we can revoke it to some players
**** TODO Continue to test factions and NPC mod
CLOCK: [2018-12-29 sam. 05:31]--[2018-12-29 sam. 06:24] => 0:53
CLOCK: [2018-12-29 sam. 01:34]--[2018-12-29 sam. 01:57] => 0:23
CLOCK: [2018-12-24 lun. 01:04]--[2018-12-24 lun. 01:12] => 0:08
CLOCK: [2018-12-24 lun. 00:51]--[2018-12-24 lun. 00:52] => 0:01
CLOCK: [2018-12-23 dim. 18:16]--[2018-12-23 dim. 18:40] => 0:24
CLOCK: [2018-12-23 dim. 13:29]--[2018-12-23 dim. 14:37] => 1:08
CLOCK: [2018-12-21 ven. 00:50]--[2018-12-21 ven. 01:15] => 0:25
CLOCK: [2018-12-17 lun. 13:57]--[2018-12-17 lun. 14:56] => 0:59
CLOCK: [2018-12-17 lun. 04:02]--[2018-12-17 lun. 04:10] => 0:08
- [X] Can set luacmd public (need he lua privillege)
- [X] Trying a new factions mod with rank etc...
https://github.com/agrecascino/factions
- former one moved to OLD
- [X] Must list available command (from chatcommands.lua)
- Add these commands to README.md
- [X] Then, try to understand this power thing
It seems we earn a little amount per tick/death and attack
But the max power is set to 0
Tryin to set it to 10
- [X] Always this *cannot claim any (more) parcel(s)* message
basically at 0.5 power
- [X] Which is a parcel size : 16x15
- [X] Also find the craft for faction chest to test it
chest_locked : wood everywhere but steel lingot at center
"default:chest_locked", "default:steel_ingot"
- [X] Should be tested "degats entre alliés" : activés par default
And can't be deactivated with new factions mod
- [X] Try to add villagers mod for NPC
NPC are inside map :( and is buggy
- [X] Remove mg_villages debug infos
- [X] It seems we can have areas mod: added
- [X] PVP areas seems to be broken : can't PVP everywhere
- [X] Maybe install https://github.com/Sokomine/mob_world_interaction
To fix our NPC absence issue : Installed but no NPC
- [X] The game is now deadly slow maybe due to playerefects
Deactivated autosave every 10 seconds in playereffects/settings.lua
- [X] No PVP at -150 of depth
- [X] Try to add nether mod
Create a obsidianportal
Activate it with mese crystal fragment
- [X] modified mg_villages.ENABLE_PROTECTION from true to false
Doen't work anymore. We don't want anymore to protect villages
disable it
- [X] Too much stuff in NPC villages
- [X] Maybe try to use replacement to replace chest with something else
How to change that
Try to edit mts files in mods/mg_villages/schems/
These are schematics files sued with worldedit : not really usable
Changing it from code could be easier
- maybe see handle_schematics/build_chest
- [X] Even with protection, we can take what's in villagers' chests
Try to add them as protected chest
- [ ] Test singleplayer in death mesage
to avoid "You a fait quelque chose de fatal"
**** TODO More bugfixes
CLOCK: [2019-02-26 mar. 03:24]--[2019-02-26 mar. 03:40] => 0:16
- [X] Test singleplayer in death mesage
- [ ] Faction chest must be for faction only (no parcel needed)
- [ ] Try to find a protector mod, test it
- [ ] Make the protector/faction_protector available to all members of
@ -259,13 +207,67 @@ It's really fast. May be used on a website, to show the actual map.
**** Try mumble-link
- see https://github.com/chipgw/minetest-mumble-wrapper
**** DONE Continue to test factions and NPC mod
CLOCK: [2018-12-29 sam. 05:31]--[2018-12-29 sam. 06:24] => 0:53
CLOCK: [2018-12-29 sam. 01:34]--[2018-12-29 sam. 01:57] => 0:23
CLOCK: [2018-12-24 lun. 01:04]--[2018-12-24 lun. 01:12] => 0:08
CLOCK: [2018-12-24 lun. 00:51]--[2018-12-24 lun. 00:52] => 0:01
CLOCK: [2018-12-23 dim. 18:16]--[2018-12-23 dim. 18:40] => 0:24
CLOCK: [2018-12-23 dim. 13:29]--[2018-12-23 dim. 14:37] => 1:08
CLOCK: [2018-12-21 ven. 00:50]--[2018-12-21 ven. 01:15] => 0:25
CLOCK: [2018-12-17 lun. 13:57]--[2018-12-17 lun. 14:56] => 0:59
CLOCK: [2018-12-17 lun. 04:02]--[2018-12-17 lun. 04:10] => 0:08
- [X] Can set luacmd public (need he lua privillege)
- [X] Trying a new factions mod with rank etc...
https://github.com/agrecascino/factions
- former one moved to OLD
- [X] Must list available command (from chatcommands.lua)
- Add these commands to README.md
- [X] Then, try to understand this power thing
It seems we earn a little amount per tick/death and attack
But the max power is set to 0
Tryin to set it to 10
- [X] Always this *cannot claim any (more) parcel(s)* message
basically at 0.5 power
- [X] Which is a parcel size : 16x15
- [X] Also find the craft for faction chest to test it
chest_locked : wood everywhere but steel lingot at center
"default:chest_locked", "default:steel_ingot"
- [X] Should be tested "degats entre alliés" : activés par default
And can't be deactivated with new factions mod
- [X] Try to add villagers mod for NPC
NPC are inside map :( and is buggy
- [X] Remove mg_villages debug infos
- [X] It seems we can have areas mod: added
- [X] PVP areas seems to be broken : can't PVP everywhere
- [X] Maybe install https://github.com/Sokomine/mob_world_interaction
To fix our NPC absence issue : Installed but no NPC
- [X] The game is now deadly slow maybe due to playerefects
Deactivated autosave every 10 seconds in playereffects/settings.lua
- [X] No PVP at -150 of depth
- [X] Try to add nether mod
Create a obsidianportal
Activate it with mese crystal fragment
- [X] modified mg_villages.ENABLE_PROTECTION from true to false
Doen't work anymore. We don't want anymore to protect villages
disable it
- [X] Too much stuff in NPC villages
- [X] Maybe try to use replacement to replace chest with something else
How to change that
Try to edit mts files in mods/mg_villages/schems/
These are schematics files sued with worldedit : not really usable
Changing it from code could be easier
- maybe see handle_schematics/build_chest
- [X] Even with protection, we can take what's in villagers' chests
Try to add them as protected chest
**** Some crashes
**** DONE Some crashes
CLOCK: [2019-02-26 mar. 02:42]--[2019-02-26 mar. 03:02] => 0:20
CLOCK: [2019-02-24 dim. 22:03]--[2019-02-24 dim. 22:37] => 0:34
- [X] Try connected_chest mod Doesn't work
- [X] Trade error (set to 1)
- [ ] 2019-01-15 17:35:29: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): ...netest/games/minetest-pvp/mods/xpro/metodos/dig_node.lua:21: attempt to index local 'digger' (a nil value)
- [X] Seems to be fixed (digger was nil)
2019-01-15 17:35:29: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): ...netest/games/minetest-pvp/mods/xpro/metodos/dig_node.lua:21: attempt to index local 'digger' (a nil value)
stack traceback:
netest/games/minetest-pvp/mods/xpro/metodos/dig_node.lua:21: in function 'callback'
usr/local/share/minetest/builtin/game/falling.lua:103: in function </usr/local/share/minetest/builtin/game/falling.lua:53>

1
TODO
View File

@ -11,6 +11,7 @@ minetest-solebull - LGPL-2.1 - A PVP/faction game for minetest based on Cobalt.
* v0.0.2-5 (02 Jan. 2019 - ???) CLOC ???,???
- (5) Better death message for singleplayer
- Fixed a heavy trade issue when item_stock is nil
- Add connected chest mod
- Fix a bug in Xpro making the game crash when xp_atual is nil

View File

@ -26,6 +26,10 @@ dofile(minetest.get_modpath("death_messages").."/settings.txt")
-- A table of quips for death messages. The first item in each sub table is the
-- default message used when RANDOM_MESSAGES is disabled.
-- Each group of message if for multiplayer when y* message are for singleplayer
-- it is a "Vous "... version of the message.
local messages = {}
-- Lava death messages
@ -36,6 +40,13 @@ messages.lava = {
" a creusé tout droit.",
" ne savait pas que la lave est chaude."
}
messages.ylava = {
" avez rencontré une boule de feu.",
" pensez que la lave est cool ?",
" ne pouviez pas résister à la lave.",
" avez creusé tout droit.",
" ne saviez pas que la lave est chaude."
}
-- Drowning death messages
messages.water = {
@ -48,6 +59,16 @@ messages.water = {
" a passé trop de temps dans un lavabo."
}
messages.ywater = {
" vous êtes noyé.",
" manquez d'air.",
" avez échoué aux cours de natation.",
" avez essayé de vous faire passer pour une ancre.",
" avez oublié qu'il vous n'étiez pas un poisson.",
" avez fait trop de bulles.",
" avez passé trop de temps dans un lavabo."
}
-- Burning death messages
messages.fire = {
" a brûlé à souhait.",
@ -56,6 +77,13 @@ messages.fire = {
" vient d'être rôti, style hot-dog.",
" s'est brûlé."
}
messages.yfire = {
" avez brûlé à souhait.",
" avez eu un peu trop chaud.",
" vous êtes approché trop près du feu de camp.",
" venez d'être rôti, style hot-dog.",
" vous êtes brûlé."
}
-- Other death messages
messages.other = {
@ -67,6 +95,15 @@ messages.other = {
" est mort d'impatience.",
" a peut-être rencontré Séréna."
}
messages.yother = {
" êtes mort.",
" avez fait quelque chose de fatal.",
" avez abandonné la vie.",
" êtes un peu mort maintenant.",
" vous êtes évanoui de façon permanente.",
" êtes mort d'impatience.",
" avez peut-être rencontré Séréna."
}
function get_message(mtype)
if RANDOM_MESSAGES then
@ -77,24 +114,42 @@ function get_message(mtype)
end
minetest.register_on_dieplayer(function(player)
local player_name = player:get_player_name()
local node = minetest.registered_nodes[minetest.get_node(player:getpos()).name]
if minetest.is_singleplayer() then
player_name = "You"
end
-- Death by lava
if node.groups.lava ~= nil then
minetest.chat_send_all(player_name .. get_message("lava"))
-- Death by drowning
elseif player:get_breath() == 0 then
minetest.chat_send_all(player_name .. get_message("water"))
-- Death by fire
elseif node.name == "fire:basic_flame" then
minetest.chat_send_all(player_name .. get_message("fire"))
-- Death by something else
else
minetest.chat_send_all(player_name .. get_message("other"))
end
local player_name = player:get_player_name()
local node = minetest.registered_nodes[minetest.get_node(player:getpos()).name]
local msg;
if minetest.is_singleplayer() then
player_name = "Vous"
-- Death by lava
if node.groups.lava ~= nil then
msg = get_message("ylava")
-- Death by drowning
elseif player:get_breath() == 0 then
msg = get_message("ywater")
-- Death by fire
elseif node.name == "fire:basic_flame" then
msg = get_message("yfire")
-- Death by something else
else
msg = get_message("yother")
end
else
-- Death by lava
if node.groups.lava ~= nil then
msg = get_message("lava")
-- Death by drowning
elseif player:get_breath() == 0 then
msg = get_message("water")
-- Death by fire
elseif node.name == "fire:basic_flame" then
msg = get_message("fire")
-- Death by something else
else
msg = get_message("other")
end
end
minetest.chat_send_all(player_name .. msg)
end)