Ryonancing Saga Creators' Guide - Commands - System

Commands
System

General Comments

The following commands can be used to control the program flow within a skill or some such.

General Programming Comments

Unless stated otherwise, you can use mathematical expressions whenever numerical parameters p1, p2, ... are required.
In the expressions you can use '+','-','*','/', and'\' ('*': multiplication; '/': division, the result rounded down; '\': the rest of a division (I am a bit unsure about that) ).
'*','/','\' have a higher priority than '+' or '-'. Therefore, data from older versions may yield different results.
You can use negative numbers like '-1' directly in mathematical expressions.
However, there may be no SPACEs in mathematical expressions.

Good examples

  1+2           ; 3
  1+-2          ; -1
  1+2*5         ; 11
  (1+2)*5       ; 15
  (1+2)*(3+4)   ; 21
  10/3          ; 3
  10\3          ; 1
  (((((2)))))   ; 2

Incorrect examples

  -(1+2)*5
  5(1+2)*5
  -5(1+2)*5
  (1+2)(3+4)

Individual Commands

[SkillStart]

This command begins a skill definition (for usage during combat).

[SkillEnd]

This command ends a skill definition and the game returns to the combat screen.

[MenuSkillStart]

This command begins a skill definition (for usage from the menu screen).

[MenuSkillEnd]

This command ends a skill definition and the gam returns to the menu screen.

[Start]

This command is used when beginning an event. All normal commands are used exclusively between [Start] and [End].

[End]

This command is used when ending an event. In addition, if an 'if' command fails, program execution also jumps to [End].

goto_p1
into_p1

p1: Number used for identification (0 - 9999, may NOT be a variable or mathematical expression)

When a 'goto' command is executed, program execution jumps to the line with the 'into' command with the same number.
Please make sure that there are not two or more 'into' commands with identical numbers in a text.

wait = p1

This command can not be used in the following texts: Battle\Condition_Graphic_P,Condition(events where the triggering condition is 'time_btlgraph')

p1: Number of frames that should be spent waiting (1 - )

This command causes the program to wait without doing any operations. However, this is not a complete stop in as far as animations are still functioning normally.

wait_BG
wait_chr
waitS
waitE

These commands can not be used in the following texts: Battle\Condition_Graphic_P,Condition(events where the triggering condition is 'time_btlgraph')

The low until 1 frame passes is as follows:

(1) The pasted background image information is updated
(2) The pasted character image information is updated
(3) The screen is updated (the images are actually pasted onto the screen).

During a normal 'wait' command, (1), (2), and (3) are all executed in one go. However, in skills and the like you should use commands like 'texcopy' or 'texturn' between (1) and (2) or (2) and (3) in order to paste in images.
'wait_BG' executes (1), 'wait_chr' executes (2), 'waitS' executes (1) and (2), and 'waitE' executes (3)

input <p1> = p2

p1: Variable ID number (0 - 9999, may NOT be a variable or mathematical expression)
p2: Value to be inserted into the variable.

This command is used when you want to store a value for later usage. p1 can be a number from 0 to 9999.

!!Except for when dealing with the text Battle\Condition_Graphic_P, all variables are reset to 0 just before a new text is loaded.!!

input_{p1} = p2

p1: Variable ID number (0 - 9999, may NOT be a variable or mathematical expression)
p2: Value to be inserted into the variable.

This command is used when you want to store a value for later usage. p1 can be a number from 0 to 9999.
(TN: I still have a bit of difficulty understanding the following; please confirm) p1 contains an array, and its second dimension is set to the party number of the character who is currently selected by chr_target is stored.
This command is usually used when you want to do some evaluation with an entire group or some such.

!!Except for when dealing with the text Battle\Condition_Graphic_P, all variables are reset to 0 just before a new text is loaded.!!

random_<p1> = p2,p3

p1: Variable ID number (0 - 9999, may NOT be a variable or mathematical expression)
p2,p3: Lower and upper limit of the number to be stored.

This command stores a random number in a variable. In the variable designated by p1, a value ranging from p2 to p3 is stored.
For instance, if p2 was 5 and p3 was 9, <p1> would be set to either 5,6,7,8, or 9.

if p1 s1 p2

p1,p2: content that should be compared.
s1: comparison symbol ('=','!','<','>',<=','>=')

This is the conditional command. S1 can be one of '=','!','<','>',<=', or'>=' ('!': not equal).
If the condition is met, programm execution continues in the next line. If the condition is not met, program execution jumps to the next [End] command.

if_or p1 s1 p2
if_orE p1 s1 p2

p1,p2: content that should be compared.
s1: comparison symbol ('=','!','<','>',<=','>=')

This is command is used to create a conditional command with several conditions related with 'or'. Please use one or more 'if_or' commands, ending the sequence with a single 'if_orE' command.
If one or more of the conditions is met, programm execution continues in the line directly after the 'if_orE' command.
If all of the conditions fail, programm execution jumps to the next [End] command.
If you wish to emulate multiple conditions related via 'and', please just use several normal 'if' commands.

sys_SE1 = s1

s1: name of a sound effect file

This command plays the sound effect in the file s1 exactly once. Should this command be issued while a sound effect is already being played, the new one is simply added (overlay).

sys_SE2 = s1

s1: name of a sound effect file

This command plays the sound effect in the file s1 exactly once. Should this command be issued while a sound effect is already being played however, the new sound is NOT played.

sys_setscrcolor = p1,p2,p3

p1,p2,p3: values for R,G,B (0 - 255)

Use this command you to set the color when you wish to change the color of the screen.

sys_cpyscrcolor = p1

p1: opaqueness (0-255)

This command fills the screen with the color defined by sys_setscrcolor and the opaqueness given in p1.

sys_settargetparty = p1

p1: group that should become target of the attack (1 - 2)

During skill execution, this command changes the side which is targetted to p1.

sys_settargetchara = p1

p1: party number of the character who should become target of the attack. (1 - )

During skill execution, this command changes the target character to the one with the party number p1.

status_set = s1,p1
status_pls = s1,p1
status_mul = s1,p1

s1: ability score that should be altered (pow_tmp - chm_tmp)
p1: value of the change ('status_mul' does NOT allow mathematical expressions here and fractions until the first decimal point are needed (TN: unsure about the meaning of the latter part))

These command can only be used in ability calculating texts ('calculate_status_P' and 'calculate_status_E' in the 'Battle' folder).

s1 is changed in the following way by these commands:
status_set : s1 is set to p1.
status_pls : p1 is added to s1.
status_mul : p1 and s1 are multiplied.

int_attribute_s1 = p1

s1: name of a type
p1: damage amount.

This command defines damage of the amount p1 and the type s1. s1 must be a name defined in 'attribute.txt'.
The value is cleared when 'chr_getDamage', 'chr_reduceDamage', 'repeat' or the like is executed.

int_DamageHP = p1
int_DamageMP = p1

p1: damage amount

Use this command when you wish to deal out damage ignoring types.
The value is cleared when 'getDamage', 'reduceDamage', 'repeat' or the like is executed.

int_calcang = p1,p2,p3,p4

p1,p2: x and y coordinate of the starting point
p3,p4: x and y coordinate of the end point

This command looks for the angle from the starting point to end point. The result (0 - 256) is stored in statang.
If x-axis is right and y-axis is up, then values for statang would be as follows: up is 0, right is 64, down is 128, and left is 192.

int_calccos = p1,p2

p1: angle (0 - 256)
p2: radius of the denomination circle (TN slightly unsure)

This command looks for the cos of the angle p1. The result ( -p2 - p2) is stored in statcos.
If x-axis is right and y-axis is up, then values for p1 would be as follows: right is 0, up is 64, left is 128, and down is 192.

int_calcsin = p1,p2

p1: angle (0 - 256)
p2: radius of the denomination circle (TN slightly unsure)

This command looks for the sin of the angle p1. The result ( -p2 - p2) is stored in statsin.
If x-axis is right and y-axis is up, then values for p1 would be as follows: right is 0, up is 64, left is 128, and down is 192.

int_anglepos = p1,p2,p3,p4

p1,p2: ID numbers of the variables (0 - 9999) where the results should be stored.
p3: radius (1 - )
p4: angle (0 - 360)

This command computes the x and y coordinate for the point you get with a circle with the center (0,0) and the radius p3 at the angle p4, and stores them in <p1> and <p2>.
Examples:

int_anglepos = 1,2,100,90       ; <1> is set to 0 and <2> is set to 100.
int_anglepos = 1,2,100,45       ; <1> is set to 70 and <2> is set to 70.

int_sqrt = p1,p2

p1: ID number of the variable (0 - 9999) where the result should be stored.
p2: value whose square root is to be determined.

This command computes the square root of p2 and stores it in <p1>. If p2 is a negative number, a warning is displayed.
Example:

int_sqrt = 1,64                 ; <1> is set to 8.


Return to the command index page
Return to the main index