diff --git a/config.lua b/config.lua index 64b1316..11dc87b 100644 --- a/config.lua +++ b/config.lua @@ -9,13 +9,58 @@ -- -- So please use a seperate config mod! --- Do the NPCs talk right after they spawned? +-- Do the NPCs talk right after they spawned? Change this only if you +-- want to globally prevent NPC from talking. yl_speak_up.talk_after_spawn = true +------------------------------------------------------------------------------ +-- Config values you can adjust +------------------------------------------------------------------------------ + +-- how many buttons will be shown simultaneously without having to scroll? +-- Changing this value might not be a too good idea as it might break +-- formspecs. +yl_speak_up.max_number_of_buttons = 7 +-- how many buttons can be added to one dialog? +yl_speak_up.max_number_of_options_per_dialog = 15 + +-- how many rows and cols shall be used for the trade overview list? +yl_speak_up.trade_max_rows = 10 +-- change the rows above as needed, but do not increase the cols +-- above 12 (there is no room for more) +yl_speak_up.trade_max_cols = 12 + +-- how many prerequirements can the player define per dialog option? +yl_speak_up.max_prerequirements = 12 +-- how many actions can there be per dialog option? +-- for now, more than one doesn't make sense +yl_speak_up.max_actions = 1 +-- how many effects can the player define per dialog option? +yl_speak_up.max_result_effects = 6 + +-- An option may be choosen automaticly without the player having to click if all of its +-- preconditions are true and the mode is set to automatic. Now, if the choosen target +-- dialog has an option that also uses this automatic mode, infinite loops might be +-- created. This option exists to avoid them. Any small value will do. +yl_speak_up.max_allowed_recursion_depth = 5 + +-- nametag colors based on the NPC's health are a bit too colorful +-- (and besides, NPC should not get hurt anyway) - so use fixed colors yl_speak_up.nametag_color_when_not_muted = "#00DDDD" yl_speak_up.nametag_color_when_muted = "#FF00FF" +-- NPC can send a message to all players as an effect; +-- this text will be put in front of this message so that you and your players +-- know that it originated from an NPC (just make sure this returns a string) +yl_speak_up.chat_all_prefix = minetest.colorize("#0000FF", "[NPC] ") +-- the NPC will use this color when sending a chat message +yl_speak_up.chat_all_color = "#AAAAFF" + +------------------------------------------------------------------------------ +-- Skin and mesh definition - will be extended in i.e. npc_talk +-- Don't edit here. +------------------------------------------------------------------------------ -- diffrent NPC may use diffrent models -- IMPORTANT: If you want to support an NPC with a diffrent model, provide -- an entry in this array! Else setting its skin will fail horribly. @@ -39,6 +84,9 @@ yl_speak_up.mob_capes = {} yl_speak_up.emulate_orders_on_rightclick = {} +------------------------------------------------------------------------------ +-- Extend this in your own mod or i.e. in npc_talk +------------------------------------------------------------------------------ -- some properties from external NPC can be edited and changed (they have the self. prefix), -- and it is possible to react to property changes with handlers; -- key: name of the property (i.e. self.order); @@ -47,8 +95,10 @@ yl_speak_up.emulate_orders_on_rightclick = {} yl_speak_up.custom_property_handler = {} +------------------------------------------------------------------------------ +-- Path definitions (usually there is no need to change this) +------------------------------------------------------------------------------ -- What shall we call the folder all the dialogs will reside in? - yl_speak_up.path = "yl_speak_up_dialogs" -- What shall we call the folder all the inventories of the NPC will reside in? @@ -67,12 +117,10 @@ yl_speak_up.quest_path = "yl_speak_up_quests" -- (more time can pass if no variable is changed) yl_speak_up.player_vars_min_save_time = 60 --- An option may be choosen automaticly without the player having to click if all of its --- preconditions are true and the mode is set to automatic. Now, if the choosen target --- dialog has an option that also uses this automatic mode, infinite loops might be --- created. This option exists to avoid them. Any small value will do. -yl_speak_up.max_allowed_recursion_depth = 5 +------------------------------------------------------------------------------ +-- Privs - usually no need to change +------------------------------------------------------------------------------ -- * set the name of the priv that allows to add, edit and change preconditions, actions and -- effects listed in yl_speak_up.npc_priv_names in npc_privs.lua -- * this also allows the player to use the "/npc_talk privs" command to assign these privs @@ -82,36 +130,9 @@ yl_speak_up.max_allowed_recursion_depth = 5 -- * default: "npc_talk_admin" (but can also be set to "npc_master" or "privs" if you want) yl_speak_up.npc_privs_priv = "npc_talk_admin" - --- Texts - -yl_speak_up.message_button_option_exit = "Farewell!" -yl_speak_up.message_button_option_prerequisites_not_met_default = "Locked answer" -yl_speak_up.message_tool_taken_because_of_lacking_priv = "We took the tool from you and logged this event. You used an admin item while lacking the neccessary priv npc_master" -yl_speak_up.text_new_dialog_id = "New dialog" -yl_speak_up.text_new_option_id = "New option" -yl_speak_up.text_new_prerequisite_id = "New prerequisite" -yl_speak_up.text_new_result_id = "New result" -yl_speak_up.text_version_warning = "You are using an outdated Minetest version!\nI will have a hard time talking to you properly, but I will try my best.\nYou can help me by upgrading to at least 5.3.0!\nGet it at https://minetest.net/downloads" -yl_speak_up.infotext = "Rightclick to talk" - --- how many buttons will be shown simultaneously without having to scroll? -yl_speak_up.max_number_of_buttons = 7 --- how many buttons can be added to one dialog? -yl_speak_up.max_number_of_options_per_dialog = 15 - --- how many rows and cols shall be used for the trade overview list? -yl_speak_up.trade_max_rows = 10 -yl_speak_up.trade_max_cols = 12 - --- how many prerequirements can the player define per dialog option? -yl_speak_up.max_prerequirements = 12 --- how many actions can there be per dialog option? --- for now, more than one doesn't make sense -yl_speak_up.max_actions = 1 --- how many effects can the player define per dialog option? -yl_speak_up.max_result_effects = 6 - +------------------------------------------------------------------------------ +-- Blacklists - not all blocks may be suitable for all effects NPC can do +------------------------------------------------------------------------------ -- these blacklists forbid NPC to use effects on blocks; format: -- yl_speak_up.blacklist_effect_on_block_interact[ node_name ] = true -- forbids all interactions; @@ -119,9 +140,13 @@ yl_speak_up.max_result_effects = 6 -- an NPC and cannot be changed easily; -- Example: yl_speak_up.blacklist_effect_on_block_right_click["default:chest"] = true yl_speak_up.blacklist_effect_on_block_interact = {} +-- blocks the NPC shall not be able to place: yl_speak_up.blacklist_effect_on_block_place = {} +-- blocks the NPC shall not be able to dig: yl_speak_up.blacklist_effect_on_block_dig = {} +-- blocks the NPC shall not be able to punch: yl_speak_up.blacklist_effect_on_block_punch = {} +-- blocks the NPC shall not be able to right-click: yl_speak_up.blacklist_effect_on_block_right_click = {} -- taking something out of the inventory of a block or putting something in yl_speak_up.blacklist_effect_on_block_put = {} @@ -131,14 +156,19 @@ yl_speak_up.blacklist_effect_on_block_take = {} -- blacklist them here. The data structure is the same as for the tables above. yl_speak_up.blacklist_action_quest_item = {} --- NPC can send a message to all players as an effect; --- this text will be put in front of this message so that you and your players --- know that it originated from an NPC (just make sure this returns a string) -yl_speak_up.chat_all_prefix = minetest.colorize("#0000FF", "[NPC] ") --- the NPC will use this color when sending a chat message -yl_speak_up.chat_all_color = "#AAAAFF" - +------------------------------------------------------------------------------ +-- Texts +------------------------------------------------------------------------------ +yl_speak_up.message_button_option_exit = "Farewell!" +yl_speak_up.message_button_option_prerequisites_not_met_default = "Locked answer" +yl_speak_up.message_tool_taken_because_of_lacking_priv = "We took the tool from you and logged this event. You used an admin item while lacking the neccessary priv npc_master" +yl_speak_up.text_new_dialog_id = "New dialog" +yl_speak_up.text_new_option_id = "New option" +yl_speak_up.text_new_prerequisite_id = "New prerequisite" +yl_speak_up.text_new_result_id = "New result" +yl_speak_up.text_version_warning = "You are using an outdated Minetest version!\nI will have a hard time talking to you properly, but I will try my best.\nYou can help me by upgrading to at least 5.3.0!\nGet it at https://minetest.net/downloads" +yl_speak_up.infotext = "Rightclick to talk" -- it's possible to prevent players from trying actions (i.e. npc_gives, text_input, ..) too often; -- if no special text is set, this one will be shown (tab "Limit guessing:" in edit options menu) yl_speak_up.standard_text_if_action_failed_too_often = "You have tried so many times. I'm tired! ".. @@ -148,3 +178,7 @@ yl_speak_up.standard_text_if_action_failed_too_often = "You have tried so many t -- shown by default (tab "Limit repeating:" in edit options menu) yl_speak_up.standard_text_if_action_repeated_too_soon = "I don't have infinite ressources. If you lost ".. "something I gave you - come back later and we may talk again.\n$TEXT$" + +------------------------------------------------------------------------------ +-- End of config.lua +------------------------------------------------------------------------------