From f3be11f647247352d319d9600393a1ad6c7777f7 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 17 Jul 2022 19:19:12 +0200 Subject: [PATCH] explained properties in README.md --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 604fab0..56bc4c1 100644 --- a/README.md +++ b/README.md @@ -334,6 +334,30 @@ yl_speak_up.player_vars_save_file JSON file containing information about quest progress and quest data for individual players. +Properties +========== +NPC may have properties. A property is a value a particular NPC has. It +does not depend on any player and will remain the same until you change +it for this NPC. You can view and change properties via the "Edit" button +and then clicking on "Edit properties". There are preconditions for +checking properties and effects for changing them. + +Properties prefixed by the text "self." originate from the NPC itself, +i.e. self.order (as used by many mobs_redo NPC for either following their +owner, standing around or wandering randomly). They usually cannot be +changed - unless you write a function for them. See + yl_speak_up.custom_property_handler +and + custom_functions_you_can_override.lua +You can also react to or limit normal property changes this way. + +Example for a property: mood of the NPC (raises when treated well, gets +lowered when treated badly). + +Properties are also extremyl important for generic behaviour. Depending +on the properties of the NPC, a particular generic behaviour might fit +or not fit to the NPC. + Generic behaviour ================= Sometimes you may have a group of NPC that ought to show a common behaviour @@ -362,7 +386,7 @@ The creator of a generic dialog can't know all situations where NPC may want to use his dialogs and where those NPC will be standing and by whom they are owned. Therefore only a limited amount of types of preconditions are allowed for the preconditions of this first automatic option: state, -player_inv and custom. +property, player_inv and custom. The other dialogs that follow after this first automatic dialog may contain a few more types of preconditions: player_offered_item, function and other