2017年2月5日星期日

How to Make A Visual Novel_2 game setting and UI Customization

the file init.xml is the Main Configuration File. It defines the game style, variables, layers and the first reading scenario file.



 interval of time (in milliseconds) 

<durtime/>
Set the speed of imagine or background fade out, and the speed of the menu bar hide and show.

<skiptime/>

Set the speed of jump to the next line when the “skip” is on.

<btntime/>

 the sensitivity of buttons. Set <btntime>5000</btntime> means a button can be click once in 5 seconds.

debug mode


add the node <debug >true</debug>

will open a debug panel, which shows she lines in scenario file







GUI Customization


NEVER delete nodes and attributes in the node <Sui></Sui>.
The images used in the node <Sui><.Sui> can be found in the “ui” directory as the path show.


the style of CG gallery


cgScreen: Define the look of the CG screen. Include the path of imagine files of button, the button  position and the color of text and background.

img="path of the exit button, path of the page down button, path of the page up button
pos="Position X of exit button, Position Y of exit button, Position X of page down button, Position Y of page down button, Position X of page up button, Position Y of page up button position of the title of CG imagine, Position Y of the title of CG imagine”

colortxt="color of the title of imagine"

txtbg="color of the background of the title"

colorbg="color of the background"
sizetxt="size of the font,will be the default value without this attribute"

example:
<cgScreen img="ui/cgx.png,ui/cgu.png,ui/cgd.png" pos="450,520,550,520,350,520,20,0" colortxt="ffffff" txtbg="242424" colorbg="333366" sizetxt="20" /> 

alert or message box:


msgbox: Define the look of the message box. Include the path of imagine files of button, the button position and the color of text. The text of message box is at the center. The message box will show with a translucent background.

img= "path of the message box background, path of the submit button, path of the cancel button

pos= "Position X of the message box background, Position Y of the message box background, Position X of the submit button, Position Y of the submit button, Position X of the cancel button, Position Y of the cancel button, Position Y of the text,the max width of the text field

colortxt="color of the text of message box"

colorbg="color of the background when showing the message box "
sizetxt="size of the font,will be the default value without this attribute"


example:
<msgbox img="ui/msgbg.png,ui/yes.png,ui/no.png" pos="280,220,290,330,480,330,280" colortxt="ffffff" colorbg="333366" />

dialog

msgtalk : Define the look of the dialog frame. Include the path and position of the background imagine file, the color of the character name and line, the default font size of text.
img=" path of the dialog frame background
x=" Position X of the dialog frame background
y="Position Y of the dialog frame background
colorname="text color of the character name"
colordialog=" text color of the dialog line
sizetxt="size of the font,will be the default value without this attribute"


example:
<msgtalk  img="ui/imgtalk.png" x="0" y="450" colorname="ccffff" colordialog="ffffff" sizetxt="20"/>

simple text

txtlayer: Define the look of the text. Include the default color and font size.
colortxt="default text color"
sizetxt="size of the font,will be the default value without this attribute"

example:
<txtlayer  colortxt="ccffff"  sizetxt="30"/> 

tips

txttrace : Define the look of the tips bar. Include the text and background color and the time the tip bar fade out.
colortxt=" text color "
colorbg=" background color "
durtime="the time tip bar stay"
sizetxt="size of the font,will be the default value without this attribute"

example:
<txttrace  colortxt="ffffff" colorbg="003333" durtime="1000" />


The next several nodes define the style of the main menu

<imgsystem t="" img="ui/bgmenu01.png" x1="860" x2="300" y="0"/>
<imgsave  img="ui/btsave.png" x="65" y="15" file="save.xml"/>
<imgload  img="ui/btload.png" x="165" y="15" file="autosave.xml" txt="Do you  want to go &#xA; to the last checkpoint"/>
<imgreserve1  img="ui/btback.png" x="265" y="15" goto="s1.txt" txt="something you want to ask the user"/>
<imgreserve2  img="ui/btreplay.png" x="365" y="15" goto="s2.txt" txt="something you want to ask the user"/>
<imgplayback  img="ui/btplayback.png" x="465" y="15"   colortxt="ccffcc" colorbg="191919" sizetxt="30"/>
<imgskip  img="ui/btskip.png" x="565" y="15" />
<clicksound  url="btnclick.mp3"/>



Main Menu Background 

imgsystem: Define the look of the menu. Include the path of background imagine and the position .
img=" path of the menu background "
x1="default Position X when the menu is hide"
x2="Position X when menu is shown"
y="position Y of the menu”

save button on main menu  

imgsave: the save button. Include the path of background imagine, position on menu and the name of the save file. this button will become half transparency when the script [disablesave] is on.
You cannot use this button when the scenario file is the first file you defined in the init.xml. 
img="path of the button background imagine"
x="position X in coordinates of menu"
y="position Y in coordinates of menu
file="filename, will use save.xml if unset"

load button on main menu

imgload: the quick load button. Include the path of background imagine, position on menu and the name of the save file. lead to the last autosave point.
img=" path of the button background imagine"
x="position X in coordinates of menu"
y="position Y in coordinates of menu "
file="filename of the autosave file, will use autosave.xml  if unset "
txt="some text on the message box to confirm the operation "

use  &#xA;  in the attribute txt to make a line break. (&#x000D;   &#x000A;  also work)

scenario jumping button 

imgreserve1 imgreserve2: the quick-call-scenario button, reserved for some special use. Can be hide if do not want to use it. Include the path of background imagine, position on menu and the filename of a scenario file. This button can lead to some special scenario file such as main interface.
img=" path of the button background imagine"
x="position X in coordinates of menu"
y="position Y in coordinates of menu "
file="filename of the scenario file"
txt="some text on the message box to confirm the operation "
  

playback button 

imgplayback: the playback button. Include the path of background imagine, position on menu and the text and background color. Click to see the last few lines.  
img=" path of the button background imagine"
x="position X in coordinates of menu"
y="position Y in coordinates of menu
colortxt=" text color
colorbg=" background color
sizetxt="size of the font,will be the default value without this attribute"
lines="number of lines in the play back,will be the default value without this attribute"


skip button

imgskip: the skip button. Include the path of background imagine, position on menu and the text and background color. Click to auto play,and stop at the script [ask].
img=" path of the button background imagine"
x="position X in coordinates of menu"
y="position Y in coordinates of menu

the sound fx when a button is clicked

clicksound: Define the sound of the buttons.the buttons on menu and [ask] button use the same sound file.
url=" path of a mp3 file"









标签:

0 条评论:

发表评论

订阅 博文评论 [Atom]

<< 主页