CONDITIONALS
Now is time to meet the conditionals (also known as "if" statements), conditionals in cv scd are specified by the opcode 01+the total hex lenght of the conditional code you will write to reach the "if" end wich is marked by a 0300 opcode, this is a example:
010E 040301000000 050301000001 0300
The previous line reads: if the enemy in line 2 of the enemy table is dead set its value to be show as alive, end the if statement, and the length of the line of code to reach the "if end" is 0E starting to count from the "if start" (01)
"If" statements can work as stand alone as the example above, but the most usual way you will find them and use it is working together whit a 02 "else" opcode + the length of the else line of code, this works exactly as the "if" statement but aims to tell the game to do a second action while the first one stated by the "if" is not met.
0110 040301000000 050301000001 0000 020A 050301000001 0300
This line reads: if enemy of line 2 of the enemy table is dead, set it as to be alive, else set it as alive.
If you examine the previous line you will find there is now a line of 0000 where previously used to be the 0300 if end opcode, then starts the 02 opcode, this is because you are telling the game to stop readind opcodes there, thats what the 0000 opcode means, stop reading opcodes here, also the "if" lenght now aims to the 02 opcode after the 0000 line, and the "else" lenght aims to the next opcode after the "if end" opcode 0300
Once you learn this base you have 80% of the scripthing earned and we can start to create custom scripts for the rooms
Note 1: i write "the enemy of line 2 of the enemy table" because thats the enemy which is linked trough the 0D010100 line, in the R0_5530 script, the 01 after 0503 is the id for that set enemy status line itself, something you already know if you followed the previous examples
Note 2: altough the if end seems to be comprensive is not actualy an if end but a loop line, i already checked this because there exist if statements whit no if ends, but use a diferent terminator wich are 0000, 0100, 0200 and 0300, the 03 is more like a looping operand but i leave its name as "if end" to be the most similar to previous RE games and for easier understanding, you can directly loop a line of code adding the 0300 to the end but this out of the scope for now.