If you're writing the engine, then you can get to be the one who determines the format, can't you?
In practice, everyone's scripts will be a slightly different format, and so they'll have to convert it to whatever format you use. But that's not really a problem.
The features required will be different for different games / visual novels. You can deduce what features are required by seeing what the games do! The more features you provide, the happier your users will be
Some things I'd think would be necessary for almost anything, though:
* Line of dialogue. Needs a simple way to indicate which character is saying it. For example:
RANMA: Come here and say that again, Akane!
RANMA: Or I'll tell everyone *your* secret!
AKANE: You wouldn't dare!
(or)
SPOKEN RANMA
Come here and say that again, Akane!
Or I'll tell everyone *your* secret!
SPOKEN AKANE
You wouldn't dare!
* Hide/show character. Specify costume and expression for character. Obviously these will need defining in a separate file somewhere. Eg:
SHOW RANMA UNIFORM SURPRISED
RANMA: Who's there? Oh...
SHOW RANMA UNIFORM HAPPY
RANMA: It's you, Akane!
SHOW AKANE UNIFORM HAPPY
* Hide/show background, or specify different location.
* Thoughts / narration: basically dialogue with no speaker. While it is possible to manage without this (see Casual Romance Club), pretty much every game uses it somewhere or other.
* Chaining on to another script, or another part of the same script. Labels and Gotos would seem a reasonable way to do this; other ways would be fine also.
GOTO FIRST-EVENING
LABEL FIRST-EVENING
BACKGROUND DINING-ROOM
SHOW NABUKI CASUAL SMILING
NABIKI: Dinner's ready, Ranma...
(or)
LOAD FIRSTEVENING.TXT
(where FIRSTEVENING.TXT contains the next chunk of script)
* Some way of allowing choices for the player, and varying things based on the results. Lots of possibilities here. One simple way would allow work like this:
AKANE: What do you think of me, Ranma?
CHOICES
I wish you'd leave me alone@AKANE-SLAPS-YOU
You're OK, I guess@AKANE-SLAPS-YOU
I love you, Akane!@AKANE-BLUSHES-AND-SLAPS-YOU
ENDCHOICES
LABEL AKANE-SLAPS-YOU
SHOW AKANE JUDOCOSTUME ANGRY
AKANE: How dare you! *slap*
RANMA: Owww...
* Set values of variables, and test them. Not
strictly necessary - you could do everything based on jumping to different pathways based on choices. But it makes the possibilities
much nicer for the end user. The kind of syntax I'd think should be understood is something like this:
ADD AKANE-JEALOUS-OF-SHAMPOO +2
SET GOING-OUT-TONIGHT 1
IF AKANE-JEALOUS-OF-SHAMPOO > 4
SHOW AKANE JUDOCOSTUME ANGRY
AKANE: Don't you dare touch him!
ADD SHAMPOO-TEMPER -5
ENDIF
Ideally there'd be a way of only showing some of a set of player choices based on the values of certain variables. Something like <choice>#<condition>@<label>:
CHOICES
I wish you'd leave me alone@AKANE-SLAPS-YOU
You're OK, I guess@AKANE-SLAPS-YOU
Just leave me alone#DEPRESSION > 4@AKANE-COMFORTS-YOU
I prefer Shampoo#LOVE-FOR-SHAMPOO > 6@AKANE-SLAPS-YOU
ENDCHOICES
This is just some ideas off the top of my head. With a language like that (plus a couple of extensions for music/sounds), you could pretty much write Three Sisters' Story, Tokimeki Check-In, Season of the Sakura, Mizuiro, and a few other popular bishoujo games. Which would certainly do for starters!
(Note: that was a scripting language I made up as I went along, and not the one my game uses
. My game's choices are coded in Java using some objects I created for the purpose. My scripts look something like this:
Keiko.show('happysmile');
Keiko.say('Oh, it's great to see you, Takuya!');
Keiko.friendship += 2;
But there's no reason to use Java-like syntax if you're writing a general engine! )