squattingmonk / sm-dialogs Goto Github PK
View Code? Open in Web Editor NEWA dynamic dialogs system for Neverwinter Nights
A dynamic dialogs system for Neverwinter Nights
The standard tokens (e.g., <sir/madam>
, <Day/Night>
, or <StartCheck>[Persuade]</Start>
) could be interpreted before the dialog text is displayed. The token should be added as normal rather than using token functions as in ZZ-Dialog, because:
The example dialog references a number of action and condition library scripts that do not yet exist. The idea is that the system will come with many common action and condition scripts already in library form and that the builder will not have to make his own.
I have implemented DLG_CONDITION_PC_HAS_GP
, but many more need to be added.
We need to add automated Next, Previous, and Back (and possibly Refresh) nodes that appear when the list of possible responses is larger than the number that can be shown. They should have configurable labels.
Currently, the system is set up so that all the information about the dialog is cached at initialization. After this, other scripts are only run if there are conditions or actions on the nodes or pages. I can envision instances where this could be too constricting, especially if you want to add or delete node lists on the fly.
A callback to the dialog script could be sent for several events:
Users should have the option of not using this and just using the cached data to run the dialog.
Currently, the cache is deleted and recreated every time the conversation is begun. While this helps with cleanup, conversations that do not have state-specific variables being set on previous runs don't benefit in any way from this. Making it so the cache can persist after the first run can reduce the work that needs to be done on subsequent runs.
I think we can avoid data duplication by not sending the dialog init callback (#1) when the cache is found and avoid cleanup issues by having the user remove state-specific variables with an end or abort callback.
Currently, the End and Abort events simply delete the dialog cache. I want to allow the user to specify actions that happen on these events. This should be able to happen in two ways:
Are you planning to integrate this system with nwnx_dialog at all?
We should be able to swap NPC speakers. This should be able to be specified on a per-page basis at init and during a callback (#1).
ZZ-Dialog does this by creating a ghost object placeable that changes name and portrait to match the different speakers, but this is ugly and has several downsides. Instead, we can simply restart the conversation with the next NPC and use the dialog's state to pick up where we left off. This may require #5 to work.
This comes with potential issues of its own, though. For example, what if the NPC we want to switch to is not available for conversation (e.g., another PC is talking to them, they're in battle, etc.)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.