added d_dynamic (dynamic dialogs) to readme.md

This commit is contained in:
Sokomine 2024-02-29 11:46:33 +01:00
parent b076e6a2f5
commit c2107d0bf3

View File

@ -77,6 +77,7 @@ To get started, best install `yl_speak_up`, `npc_talk`, `mobs_redo` and `mobs_np
1. [3.11 Additional custom replacements (in addition to NPC name, player name etc)](#add-simple-variables)
1. [3.12 Custom Preconditions, Actions and Effects](#precon_action_effect)
1. [3.13 Integration into your own NPC/mob mods](#integration)
1. [3.14 Dynamic dialog](#dynamic-dialog)
4. [Future](#future)
@ -325,6 +326,7 @@ special meaning:
| `d_end` | End the conversation (i.e. after teleporting the player). |
| `d_got_item` | The NPC [got something](#npc_wants) and is trying to decide what to do with it. |
| `d_trade` | [Trade](#trading-simple)-specific options. I.e. crafting new items when stock is low.|
| `d_dynamic` | [Dynamic dialog](#dynamic-dialog) that is changed on the fly. Each NPC has exactly one. |
### 1.14 Trading (simple)
@ -802,7 +804,16 @@ You also need to make sure that the textures of your mob can be edited. In order
* call `table.insert(yl_speak_up.emulate_orders_on_rightclick, <entity_name>)` if your mob is a `mobs_redo` one and can stand, follow (its owner) and walk around randomly. As you override `on_rightclick`, this setting will make sure to add buttons to emulate previous behaviour shown when clicking on the NPC.
### 3.14 Dynamic dialogs
<a name="dynamic-dialog"></a>
Sometimes you may have to generate a dialog on the fly and/or wish for more dynamic texts and answers.
Each NPC has a `d_dynamic` dialog that will never be saved with the NPC data and that can be changed each time the player selected an option.
This is particulary useful for using external functions for generating dialog texts and options/answers plus their reactions.
Warning: This feature is not finished yet and undergoing heavy changes. Do not rely on its functionality yet!
## 4. Future