Difference between revisions of "LoveDeath 2 Text Scripting"

From Hgames Wiki
Jump to: navigation, search
m (2 revisions)
m (change to hgame template)
 
Line 1: Line 1:
{{Template:LD2}}
+
{{hgame|game=LoveDeath 2 - Realtime Lovers|company=Teatime|category=Teatime Games}}
 
==FAQ==
 
==FAQ==
 
* Q: The script breaks at any point that English is used. Why?
 
* Q: The script breaks at any point that English is used. Why?
Line 188: Line 188:
 
* The girls are loaded on line of sight. Try keeping more then 2 girls out of a room for those people with slow PC's.
 
* The girls are loaded on line of sight. Try keeping more then 2 girls out of a room for those people with slow PC's.
 
* You can break scripts by having no loop. (The main narration script ends with no other file to access.) This won't break the game but will cause the narrator to be rather mute.
 
* You can break scripts by having no loop. (The main narration script ends with no other file to access.) This won't break the game but will cause the narrator to be rather mute.
[[Category:TeatimeGames]]
 

Latest revision as of 23:53, 12 March 2014

Teatime

all characters are at least 18


LoveDeath 2 - Realtime Lovers [edit]

Template loop detected: Template:Hgame


FAQ

  • Q: The script breaks at any point that English is used. Why?
    • A: The LoveDeath2 Script engine appears to have an issue with spaces. For now its better to simply use an alternate character to keep your scripts running.
    • A: SJIS space characters work fine - use an editor like JWPCE than can handle SJIS-encoded text properly. (shaja)
  • Q: The script stops after the @(fadeend) or @(whiteout) commands.
    • A: I do not have the full Japanese language pack installed. There are 4 characters in the original files that represent the start of a conversation after a scene changing event. I copied them from an original script file and pasted them into my own script. Without these characters the script will crash.

Commands

LoveDeath 2 - Command Listing

NOTE: These are found commands. Any help in with finding out their use and examples of their usage would be great.

Adventure Control Orders

  • @ (noescape)
    • Move mode and Touch mode are not permitted.
  • @ (escapeok)
    • Move mode and Touch mode permitted.
  • @ (talkescape=0)
    • Disables talk escape. (For continuing the plot.)

Sequence Control

  • @ (timechange=x)
    • x = time of day
    • 1 = morning, 2 = midday, 3 = night

Character Parameter Controls

  • @ (paramnum=x,y,z)
    • x = Character Number to be effected. (0-5 are the girls, number 6 is the boy.)
      • 0 = Itumi, 1 = Ayumi, 2 = Minamo, 3 = Koto, 4 = Nanami, 5 = Yotuba
    • y = love (Thats happiness/love) or hit (Thats the amount of health.)
    • z = The amount of loss or gain for said stat.
    • Example: @(paramadd=0,love,100) Gives first girl +100 love.
    • Example: @(paramadd=0,hit, 100) Gives first girl +100 health.

Character Movement

On screen Movement

  • @ (charamove=p1, p2, cfront, p3 and p4)
    • p1 = Character Number to be effected.
    • p2 = The type of movement.
      • Movement types:
      • 50 (Talking while walking)
      • 52 (Slow movement while talking)
      • 54 (Moving like you have an itch)
      • 55 (Shuffling)
      • 56 (Skipping)
      • 58 (Comfortable)
    • p3 = Viewing position
      • Still working on this.
    • p4 = Time in MS for the action to take place
    • Example: @ (charamove=0,56 and cfront, 10,0)

Teleport/Character Placement Movement

  • @ (charamove=x, 56, escape and y, 0)
    • x = The character number
    • Y = Movement Location (numbers go from 0-400)
      • Looking for more information. The descriptions of the rooms are vague at best.
      • 2-3: Apartment where boy lives.
      • 9: Shrine
      • 10: Sidewalk bridge
      • 22: Park
      • 33: Field
      • 48: Before the school gate.
      • 60: School corridor.
      • 70: Bathroom
      • 80: School corridor (Next to library and chem lab)
      • 100: 3nd floor stair well. (Going to roof)
      • 110: School Roof
      • 120: Cooking Lab room.
      • 130: Classroom
      • 140: Library
      • 150: Classroom
      • 154: Meeting Room.
      • 160: Hygienic Room?
      • 165: Science lab.
      • 170-172: Music room.
      • 175-179: Archery Range
      • 181-185: Courtyard.
      • 189-196: Grounds inside.
      • 198: Janitors room. (Glass's)
      • 199-200: Archery Office
      • 201: Baseball club
      • 205-206: Calligraphy room
      • 207-208: Club Room
      • 209-210: Boiler room
      • 211-220: Gymnasium
      • 223: Sports store room
      • 225: Corridor of apartment
      • 227: The protagonists bedroom.
      • 246: Protagonists room.
      • 260: Apartment room
      • 270: Apartment 1st floor.
      • 280: Girls room
      • 290: Girls bathroom.
      • 300: Girls Bedroom.
      • 310: Girls Bathroom.
      • 320: Apartment 2nd floor.
      • 330: Study house
      • 341: Coffee house.
      • 350: Living house.
      • 370: ??
      • 375: Fancy Shops
      • 380: Game center
      • 390: Clothing shop
      • 395: Shrines
      • 400: Out of map.

Character Modification

  • @ (changechara=x)
    • Change the main narrator of the story. x = The character number
    • Character 10 and 11 seem to be alternate guy NPC's.
  • @ (charareset=x and y)
    • x = The character number
    • y = 0-3 0 is Uniform, 1 is Plain, 2 is for rare cloths.
  • @ (delclothall)
    • Removes all items of clothing on a target.
  • @(showclothall)
    • Adds all items of clothing on a target.
  • @ (delcloth=x)
  • @ (showcloth=x)
    • Adds or takes away 1 article of clothing.
    • 0: Tie 1: Hat and coat 2: Blouse 3: Skirt

Camera Commands

  • @(camreset)
  • @(focusreset)
  • @(charareset=[Var1],[Var2])
    • Var1=Character Number
    • Var2=Clothing Set
  • @(charareset=[Var1],[Var2])
    • Var1= Character Number
    • Var2= Unknown
  • @(whiteout)
  • @(blackout)
  • @(fadeend)

Logic Commands

  • @(escapeok)
  • @(noescape)
  • @(timechange=[Var1])
    • Var1=(Unknown) Set to 1 by default.
  • @(changeobj=[Var1],[Var2],[Var3])
  • @(if([Condition]))
    • Example: @(if(choice=0))
    • When TRUE the IF condition will process every line under itself until it comes to another IF condition OR and ENDIF statement.
  • @(endif)
    • Used to close an IF statement.

Other Commands

  • @(BGM=[Var1])
    • Example: @(BGM=BGM_01.wav)
    • Var1= Wave file in Music directory.
  • @(BSPEED=20)
  • @(parse=0)
  • @(charamove=[Var1],[Var2],[Var3],[Var4],[Var5])
    • Example: @(charamove=6,56,escape,236,0)
    • Var1= Which caracter to move (character 6 = player)
    • Var3= The way the object moves there.
  • @(delclothall)
    • Removes all the cloths from current target.
  • @(showclothall)
    • Show all the cloths on the current target.
  • @(ENDNEXT=[Var1])
    • This command signifies the end of a script and to load another script.
    • Var1=The next file to load.

File Types

Their are 3 types of text files for LoveDeath2.

  • Initial boot files. (MainStart.txt, Start.txt)
    • Boot files are pointers. They simply tell the game where to start loading your scripts.
  • The character files. (aa_sub_000.txt,a_sub_000.txt, memorial000.txt, etc.)
    • Character files are local. The commands only affect the character spoken too. These files are used mostly for flavor as they are loaded when a none-narrator is spoken to.
    • Character files as they relate to the characters:
      • Itumi - aa_sub_001.txt (any with the AA prefix)
      • Ayumi - a_sub_001.txt (any with the A prefix)
      • Minamo - b_sub_001.txt (any with the B prefix)
      • Koto - c_sub_001.txt (any with the C prefix)
      • Namami - d_sub_001.txt (any with the D prefix)
      • Yotuba - e_sub_001.txt (any with the E prefix)
  • The Event files. (000010.txt,260010.txt,etc.)
    • Event files are trigged by Boot files or by speaking to the main narrator of the story. These files are important as they control global variables.

Running the game

Some tips for programming.

  • The scripts are loaded one by one. They only load when they are called on. This means its possible to edit scripts in game.
  • When you edit a script. The changes to the script will not be loaded until the script is called on. If you are working on an Event script. Keep in mind that your changes will not be loaded until the main character reloads your script or you reset the game.
  • Character scripts are the easiest to modify as they are reloaded every time you talk to a character that is not the narrator.
  • I do believe its possible to have embedded IF statements. I have not however been able to accomplish it. Any work in that area would be great.

Performance tips

  • The girls are loaded on line of sight. Try keeping more then 2 girls out of a room for those people with slow PC's.
  • You can break scripts by having no loop. (The main narration script ends with no other file to access.) This won't break the game but will cause the narrator to be rather mute.