Wow! Does it work regardless of font used?
Trihan's Dialogue From File 3.00 - now with choice override and evaluated control codes for database
RGSS3 Scripts (RMVX Ace)It should do, but I haven't tested it with other fonts so I'm not 100% sure. However, I did just add get_random_dialogue to pull a random line from a section instead of reading out the whole thing!
Trihan, is it possible to set conditional branches on this for example
If <variable is x>
do
else
do
end
For multiple choices? I didn't see any or I'm just blind -w-)b
If <variable is x>
do
else
do
end
For multiple choices? I didn't see any or I'm just blind -w-)b
They're still handled by the event, Archeia. The file will let you override what the choices are -called- but the branches themselves are still done via show choice in the event. As long as the choice follows the get_dialogue call, it will all work as normal.
Edit: Oh, I think I misunderstood you. At the moment, the way you'd do that would be to have separate identifiers for each possible set of , then just do a conditional branch in the event as normal and have those branches call the appropriate dialogue identifier.
Edit: Oh, I think I misunderstood you. At the moment, the way you'd do that would be to have separate identifiers for each possible set of , then just do a conditional branch in the event as normal and have those branches call the appropriate dialogue identifier.
Ah, I see. That's what I was worried about because what if you only have one message box for each choice scenario. But alright thanks 😀
Well identifiers in the text file can have just one message box's worth of text, so that isn't an issue. Would branching dialogue in the file itself be a feature you'd find useful?
Verily, especially if I want to have multilanguage or have branching choices based on variables/switches activated at that time. It would be very messy fast (IMHO) for having text file for every choice exchange and harder to find the txt files you only needed. Especially since I can't compile them into separate folders to indicate their point in the chapters. Like Porcupine Princess's chapter 1 and 2 already has over 500 text files because of the choices I have in the entire game that follows this format. (I have a personal script that does what you do but not the conditional thing too...)
You don't need a separate text file:
[This is choice 1]
Hey, this is the text that will appear if the variable is 5!
[This is choice 2]
This will appear if the variable is 6!
[This is choice 3]
This will appear if the variable is 12!
---
Then in your event, you do a conditional branch for the variable being 5, call get_dialogue("This is choice 1"), another branch for 6, call get_dialogue("This is choice 2"), another for the variable being 12, call get_dialogue("This is choice 3").
You can also arrange your text files into folders in the Data folder, and then just include their directory in your string for the text file in languages:
:english => {
:dialogue_files => ["dialogue.txt", "chapter1/dialogue2.txt"] ,
:suffix => "EN",
},
[This is choice 1]
Hey, this is the text that will appear if the variable is 5!
[This is choice 2]
This will appear if the variable is 6!
[This is choice 3]
This will appear if the variable is 12!
---
Then in your event, you do a conditional branch for the variable being 5, call get_dialogue("This is choice 1"), another branch for 6, call get_dialogue("This is choice 2"), another for the variable being 12, call get_dialogue("This is choice 3").
You can also arrange your text files into folders in the Data folder, and then just include their directory in your string for the text file in languages:
:english => {
:dialogue_files => ["dialogue.txt", "chapter1/dialogue2.txt"] ,
:suffix => "EN",
},
Interesting, I'll get to testing that :'D
Let me know if you still want a conditional tag for the text file itself, I can easily add one.
Hi Trihan, just a random thought while I was testing. What if you press a hotkey that will display which text file and what choice is running on a scene right now for debugging? 😀
That won't really work since once everything is cached it's just a hash of identifiers. I could do a debug option that shows you which identifier is currently being displayed, though.
Close enough 😀 !
Original thread: https://forums.rpgmakerweb.com/threads/trihans-dialogue-from-file-3-00-now-with-choice-override-and-evaluated-control-codes-for-database.39811/

