Trihan's Dialogue From File 3.00 - now with choice override and evaluated control codes for database

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Sup guys! I wrote this little script in answer to a topic posted by Paladin-Cleric of Awesome asking about a script that lets you place your dialogue in a text file which is then read. I know Andar linked him to the one by SES but this is my take on it: right now it's pretty barebones totally awesome but I'm hoping people will start listing features they want from a script like this so I can build it up to something universally usable.

UPDATE: Script has been updated to version 3.00, which adds so much stuff you won't want to use anything else ever again!

http://pastebin.com/gu787b8q

"How do I set this amazing script up, Trihan?" I hear you ask. Well it couldn't be simpler. Behold, a sample text file!

[Eric explains]<face: Actor1 0>EricGuys, we have to come up with a demo textfile.Dreadshadow needs us![Ryoma says some stuff]<face: Actor1 4>RyomaHow right you are \n[2]!Can we use icons in this? \i[1]You bet your sweet ass we can!Now I put the following lines as a script into an event:

get_dialogue("Eric explains")

get_dialogue("Ryoma says some stuff")

And lo and behold:



 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Seems nice. I wonder how someone can use the coloring and other special commands texts come with. :)

Busts or faces (from faceset) appear, stuff like that.
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
It already supports text codes: just put them into the text file as you normally would. Or are you looking for codes that aren't already in the default engine? If you want more codes, just tell me what they are and I'll add them.

Busts and facesets I can do!

Edit: Upon further reflection it only does colours, icons and text size codes. I can make it compatible with the others.
 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Superb. This seems a neat add on and a huge help for visual novels and also nice for... text proofing convenience and language selection.

What I mean?

Well imagine you did not hardcoded the textfile name.

Imagine a method you can add a file name.

Then use another file name

That way you can use filese for each scene, making the game more modular and easier to maintain.

You can also have variations for different languages.

Just a few good ideas I suppose. :3
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Depending on the amount of text you might be better off reading all dialogue lines at game start, storing them in a hash and accessing them from there. This way you don't have to open a (potentially big) file every time you want to display text.

As an alternative, you could extend Cache so you only have to load every line once.
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
I thought it wasn't working with variables, actor names etc. but it was just because I forgot \n[0] isn't a built-in message code. XD

Edit: Good suggestion lavra, I'll look into doing that.
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
MAJOR UPDATE!

I've taken the suggestions on board and incorporated caching for the dialogue files, so they're only loaded once unless they're edited. Read the script header for more information.

OP updated to version 2.00
 

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
ooohh, that's something I thought about when I planned my game, to make it at least in english and german. but then it hits me directly to my face: nice if the dialogues are multilingual, but what with menus and all the other things in the databse??? well, now my game will be complete english. ^^"
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
It sucks that localising databases isn't as easy, but hey, at least with this script you'll have one less thing to worry about replacing. XD
 

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
haha, yeah. xD

I would be so happy if the database could be localized this easy...   I got ideas on how to do it, but it would be too time consuming for me right now! =/
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
This thing deserves a demo too, so it can show how to make the textfile correctly for a few NPCs :p
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Added screenshots and a sample file showing how to set it up/use it, just for you!

Edit: Updated to version 2.10, now with language support!
 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Wow... I am speechless. 
 
Last edited by a moderator:

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Database localization shouldn't be that hard. Just take a look at the module Vocab (the topmost script in the base ones).
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
I think they were referring to renaming items, monsters, skills etc.
 

Evgenij

Veteran
Veteran
Joined
Aug 28, 2013
Messages
349
Reaction score
100
First Language
German
Primarily Uses
N/A
Yeah you could just use tags like "vocab.potion.name" which for example will be placed into the first item name slot. Then there would be a file which could look like this:

vocab.potion.name="Potion 1"

vocab.potion.description="Example"

and so on.

The script would just gsub these tags with the values of the current localization file loaded.
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
I could make an addon that gives notetags to database entries which change their name depending on which localisation is being used. I'll look into this later.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Updated to 2.11, fixes a bug with faces.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
actually for the database item..it would be far more easier to input a separated data and then you just load data_ sepparately....I suddently feel to make this ~
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Updated to 2.22! Did someone say word wrap? I've got your word wrap RIGHT HERE.

UPDATE UPDATE: 2.24! Now it's got DYNAMIC wordwrap that doesn't care about font size! (and can get random lines)

wordwrap1.png

wordwrap2.png

wordwrap3.png

trihandemo.png

font1.png

font2.png

font3.png

font4.png

font5.png

font6.png
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top