Comments (6)
So, since the looks and portraits are different, I think there would be a better way to do this. We already have support for changing expressions during dialog, like:
- deuzi says happy: Asdf qwer
What this currently does is simply show the character with the new look. Now, what I'm thinking is using this same syntax for the portraits (and trying to keep the original behaviour too, since it's still quite useful):
Now you can define a list of looks for a character, that's just a list with look key and the path to the file. We can do something similar to define portraits, so, like this:
characters:
deuzi:
displayName: Deuzilene
looks:
normal: assets/characters/Char3NormalSchool.png
happy: assets/characters/Char3HappySchool.png
angry: assets/characters/Char3AngrySchool.png
portraits:
normal: assets/characters/DeuziPortrait.png
happy: etc
So now when we do a 'say' action with a named look, if the character has portraits defined, then it will show them as portraits. And if you want to show the characters as usual, you can use the show action.
To give a bit more flexibility, we could have a property in character that will define if you want to use the portraits or not. Let's imagine you want to use portraits only for the "protagonist" and want to change protagonist during game, and also encounter them as normal. You'd have to setup both looks and portraits for all characters and then go around changing this property to set who you want to use portraits and who you don't want to. (probably with a plugin)
Finally, to setup where the portrait is going to be shown, and since this is related very closely with the message box, I guess the best would be to define a portrait position directly in the message box, in the GUI file. Since you can now have different message boxes, you'll be able to set where the portrait is in each one.
What do you think about this way of handling the portraits?
from renjs-v2.
I think this is more or less the same as this feature (#11) that I've been meaning to implement. The more I think about this feature the more complex and convoluted it gets:
My main questions now are:
- Are these portaits/side images associated to the message box and they show and disappear along with it?
- What syntax can be used to show this side images without contaminating to much the say action
- Are the side images something different from a look? Let's say, can a character appear on screen and on side image as well?
from renjs-v2.
I think this is more or less the same as this feature (#11) that I've been meaning to implement. The more I think about this feature the more complex and convoluted it gets:
Yes, you can probably merge theese 2 issues.
My main questions now are:
* Are these portaits/side images associated to the message box and they show and disappear along with it?
Yes,, I think so.
* What syntax can be used to show this side images without contaminating to much the say action
It's not pretty, but one way without refactoring to much of the code be something like this:
- portrait deuzi: frowning # from this point deuzi's portrait is frowning
- deuzi says: I'm very mad at you!
- portrait RESET: # resets all portraits for all character to the default one
* Are the side images something different from a look? Let's say, can a character appear on screen and on side image as well?
Yes.
from renjs-v2.
Sounds really good!
So now when we do a 'say' action with a named look, if the character has portraits defined, then it will show them as portraits. And if you want to show the characters as usual, you can use the show action.
What should we do with - deuzi says angry:
if the angry portrait does not exist? I think we should show normal.
To give a bit more flexibility, we could have a property in character that will define if you want to use the portraits or not. Let's imagine you want to use portraits only for the "protagonist" and want to change protagonist during game, and also encounter them as normal. You'd have to setup both looks and portraits for all characters and then go around changing this property to set who you want to use portraits and who you don't want to. (probably with a plugin)
We could also do this by only showing portraits for characters that has a portraits:
property. That would also make it completely no breaking for old stories.
Finally, to setup where the portrait is going to be shown, and since this is related very closely with the message box, I guess the best would be to define a portrait position directly in the message box, in the GUI file.
I think it would be better if we just did like ctc:
portrait:
x: 2800
y: 118
asset: asset14 # optional background that is showing behind the portrait when it's visible
Since you can now have different message boxes, you'll be able to set where the portrait is in each one.
Nice, didn't know that. I really need to learn the new UI.
from renjs-v2.
Hey, just to let you know this feature is pretty much implemented already (I need to test a few things but it works like a charm) and will be probably included in the next version (that will come out soon, maybe next week)
from renjs-v2.
The features is now implemented and release as of version 2.3.0!
from renjs-v2.
Related Issues (20)
- Be able to add background behind visualchoice HOT 1
- Test with Cypress
- wait: click does not not work. HOT 1
- Calling `hide` on a background which isn't already shown freezes game HOT 2
- Words jumping to next line due to text-wrapping HOT 1
- Markup on the first line of a rolling credits effect renders the markup itself
- Occasional single-frame flickers of gui/text in the wrong position HOT 3
- Choices without body text will cause errors
- Choices hidden by dialogue box
- Can't move cg between layers HOT 2
- Docs: couple typos/confusing language HOT 1
- Text and buttons are not keyboard-accessible HOT 1
- Link for the Download Button on Documentation page is wrong. HOT 1
- Automated Github actions fail. HOT 2
- Create a good A11y example for the gallery with as many features as possible
- Add instructions for index.html to Plugins section in documentation
- Font assets do not respect the `assetsPath` setting HOT 2
- the i18n example is broken
- using external resources possible?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renjs-v2.