Features:
Show text, image and animation.
Play audio and video.
Simple menu and input box.
Fade, move in right left top bottom and zoom.
https://anonfiles.com/TaO2y4seb9/Visual_Novel_20190202_7z
======== ======== ======== ======== edit 2019-02-05 ======== ======== ======== ========
Hello!It's my visual novel script's quickstart. Regrettably, my project no name yet.
My project have several files:
hare_guu.gd and hare_guu.tscn:
It's my test new functions files. I want to add save and load function.
image.gd and image.tscn:
use that show picture. It can be play add, remove, change and loop build-in animation.
What you can use animation include "fade", "dissolve", "moveright", "moveleft", "movetop", "movebottom", "zoominout", "zoomin", "zoomout", "left", "right", "bottom", "top", "turnright", "turnleft", "turntop", "turnbottom", "walk", "leftloop", "rightloop".
viewer.gd and viewer.tscn:
It's used show all items about Visual Novel, such as: background, VideoPlayer, music, sound, dialog_name and dialog_text.
font/cn_font.tres and font/wqy-microhei.ttc:
I used this show chisese's text.
font/dialog_text.tscn:
It's Label, but it have beautiful shadow.
font/gradient.png:
I used it decorative text.
backgrounds/black.png and backgrounds/transparent.png:
Used to some build-in animation.
GUI/*.png:
Some decorations.
main.gd and main.tscn:
Include viewer.tscn and others. You can write your own main.tscn if you are willing.
A simple main.gd like this:
func _ready():
$viewer.dia = [
"\"Hi!",
"\"I recently made a Visual Novel Script.",
"\"I'm not sure it works well",
"jump res://thank.tscn"]
$viewer.cha = [
#id, name, color,
["default","", Color(0.2,0.2,0.2)], #default must at first.
["r", "Red", Color(0.2,0.0,0.0)],
["g", "Green", Color(0.0,0.2,0.0)]]
$viewer.pos = [["default", Vector2(640,600)], #default must at first.
["right", Vector2(980,600)],
["left", Vector2(300,600)],
["center", Vector2(640,600)]]
$viewer.start()
func _input(event):
if event.is_action_pressed("ui_accept"):
$viewer.read_pressed()
$viewer.dia stored all dialog script.
$viewer.cha stored character's name and text's color.
$viewer.pos stored some position and their id.
I recommend call $wiewer.start(), otherwise I'm ont sure that will work. It's W.I.P.
$wiewer.read_pressed() can display the remaining text or go to next line.
Characters
You can define some characters to show name and change color in the dialog.
example:
$viewer.dia = [
"r My color is red, my name is ren too.",
"g I'm greeeeeen.",
"\"My color is default color. I nave no name.",
"jump res://thank.tscn"]
$viewer.cha = [
#id, name, color,
["default","", Color(0.2,0.2,0.2)], #default must at first.
["r", "Red", Color(0.2,0.0,0.0)],
["g", "Green", Color(0.0,0.2,0.0)]]
Images:
You can show image use:
image pic res://characters/phee.png
Or use this:
image pic res://characters/phee.png at floating scale 2 walk loop
'pic' is image's name. You can change, remove it by name.
Script:
image pic1 res://characters/phee.png
image pic2 res://characters/hare_run.png
You can give two images. But this:
image pic res://characters/phee.png
image pic res://characters/hare_run.png
You give only one image. Because first line add a image, but second line change the image.
You can remove it:
image pic res://characters/phee.png
remove pic
Note that use same name 'pic'.
image pic res://characters/phee.png at floating
You must define position, like this:
$viewer.pos = [["default", Vector2(640,600)], #default must at first.
["right", Vector2(980,600)],
["left", Vector2(300,600)],
["center", Vector2(640,600)],
["floating", Vector2(500,200)]]
So image at coordinate 500,200.
image pic res://characters/phee.png scale 2
You can use 'scale' to scaling the image. It can be negative number, it'll flip horizontally but not vertically.
image pic res://characters/phee.png walk
Play animation once.
image pic res://characters/phee.png walk loop
Play loop animation.
Pause:
pause
Pause until called $viewer.read_pressed().
pause 3.0
Pause until called $viewer.read_pressed() or waiting 3 seconds.
Jump:
You can change scene, like this:
jump res://thank.tscn
Or jump other label, like this:
"You can reading this
"You can reading this
jump otherline
"You can't reading this
"You can't reading this
label otherline
"You can reading this
"You can reading this
Menus:
label jump_begin
"You can reading this
"You can reading this
menu begin
item If you click me,
"I'll show some text for you.
jump jump_label
item If you click me, you will jump to begin
jump jump_begin
item If you click me,
"I'll say a lot of words.
"A long long time ago.
"A long long time.
"Let me talk about it next time.
menu end
label jump_label
The "menu begin" and "menu end" are necessary.
Download link: https://drive.google.com/file/d/1iujo9-R3PGZOUGLYsB0iwhk4wx-4Nbzo/view?usp=sharing