Part 3 is the movement aspect. This video does review message and give items.
I love PKSV because of it's easy to comprehend coding (and how everything is color-coded)! However, when I started PKSV (yes, you can skip this paragraph where I talk about my first experiences), the game I wanted to hack was Emerald. I initially used Pocket Script, but my old computer couldn't make that scripting tool work, so PKSV was the only tool I could get to work. However, I was a noob at this; the best I could do at the time was create my own message script (lesson 1). I couldn't even get yes/no scripts. Also, to start with Emerald with a tool oriented for FR/LG didn't help either. So I retired from PKSV for about a year (I was in 8th grade I think) before I came back. I took some computer coding camps, learning about programming from my dad, and found out that PKSV was much easier. Now, with nostalgia, I would like to tackle the games I could not in the past, with my favorite pokemon scripting language again.
To begin with, most of the classic Pokemon style GBA games are similar (excluding the pinball or mystery dungeon kind of games). In R/S/E, you guys probably already know that the format PKSV uses because most of the coding is the same in FR/LG. However, R/S/E is a much harder because
1. Many of the resources offered by PKSV are not compatible with R/S/E (Special Flags list and Movement Planner)
2. NinjaFlunkout did not make much tutorials for these games yet (^_^)
I've decided to start with movement, because message and giving items are nearly identical in FR/LG and in R/S/E. To be honest, movement isn't much different either; R/S/E uses different commands though. To make matters worse, the commands are as straightforward as in FR/LG.
To begin with, most of the classic Pokemon style GBA games are similar (excluding the pinball or mystery dungeon kind of games). In R/S/E, you guys probably already know that the format PKSV uses because most of the coding is the same in FR/LG. However, R/S/E is a much harder because
1. Many of the resources offered by PKSV are not compatible with R/S/E (Special Flags list and Movement Planner)
2. NinjaFlunkout did not make much tutorials for these games yet (^_^)
I've decided to start with movement, because message and giving items are nearly identical in FR/LG and in R/S/E. To be honest, movement isn't much different either; R/S/E uses different commands though. To make matters worse, the commands are as straightforward as in FR/LG.
ruby_movement_script.pks | |
File Size: | 0 kb |
File Type: | pks |
ruby_movement_script2.pks | |
File Size: | 0 kb |
File Type: | pks |
2 examples I found in Ruby that interested me. However, if you open my scripts, you may notice the movement data I used.
I hate raw commands because when I get a compilation error, the line that gives the error away is 'raw#data' or whatever. So, R/S/E movement data is really making me feel uncomfortable. Anyways, there are name substitutes for some of the raw movement data like 'look_left' and 'walk_down' thankfully, but since I could only see the compiled scripts used in the game, I don't know if 'raw_40' and 'raw_41' have alternate names. In the future, I may have a R/S/E movement reference list to help you guys remember which raw command does what.
raw_40 enables the NPC/Player to move in a direction while facing the same direction. However, there are 2 exceptions.
1. This command can only enable 1 type of movement. For example, if you use raw_40, and then you want the person to walk right, the NPC will only walk right while retaining the direction. All other movement (walk left, walk up, walk down, etc.) will be ignored (the game will not show the NPC moving in other directions other than right).
2. To shut off this feature, and continue using different movement commands, you need to use raw_41. Raw_41 just disables the ability to move while retaining the faced direction, but allows other movement commands to run.
That's why in my 1st movement script, I broke 'moonwalk' into 4 parts. After one type of movement, I ended the raw_40 with raw_41, then ended that part of the movement script. The next part allowed me to first look in the opposite direction I wanted the NPC to walk in, then enable the special walking with raw_40, and I used this process 4 times.
raw_46 to raw_49 are jumping in place. This is very straightforward.
raw_46 = jump in place while facing down
raw_47 = jump in place while facing up
raw_48 = jump in place while facing right
raw_49 = jump in place while facing left
I also tried some other raw commands I saw in the game. To my knowledge so far
raw_56 = alert = make '!' box appear over the NPC's head
I did try using another raw command the game used, which was raw_51. However, it didn't seem to do anything. I'm pretty sure it doesn't pause because pause is used as pause3 (I don't know if more pause commands work though).
In conclusion, I will just say that for R/S/E, you'll have to play around and find out what raw commands do what. I did not check if these commands can be used in FR/LG, but I'll do that another time. I will end this lesson here, since all of the movement script material is gone over already. I feel that you guys can write a movement script in R/S/E now, knowing some new commands.
Summary:
walk_(direction) - makes the person walk in the direction stated.
look_(direction) - makes the person look in the direction stated (does not move to another tile).
pause3 - pauses the event by 1.
raw_(40-41) - Enables/Disables movement while not turning (always faces same direction).
raw_(46-49) - Jump in place while looking at the direction stated.
raw_56 (alert) - Makes the '!' box appear over the person's head.
Reference List
I hate raw commands because when I get a compilation error, the line that gives the error away is 'raw#data' or whatever. So, R/S/E movement data is really making me feel uncomfortable. Anyways, there are name substitutes for some of the raw movement data like 'look_left' and 'walk_down' thankfully, but since I could only see the compiled scripts used in the game, I don't know if 'raw_40' and 'raw_41' have alternate names. In the future, I may have a R/S/E movement reference list to help you guys remember which raw command does what.
raw_40 enables the NPC/Player to move in a direction while facing the same direction. However, there are 2 exceptions.
1. This command can only enable 1 type of movement. For example, if you use raw_40, and then you want the person to walk right, the NPC will only walk right while retaining the direction. All other movement (walk left, walk up, walk down, etc.) will be ignored (the game will not show the NPC moving in other directions other than right).
2. To shut off this feature, and continue using different movement commands, you need to use raw_41. Raw_41 just disables the ability to move while retaining the faced direction, but allows other movement commands to run.
That's why in my 1st movement script, I broke 'moonwalk' into 4 parts. After one type of movement, I ended the raw_40 with raw_41, then ended that part of the movement script. The next part allowed me to first look in the opposite direction I wanted the NPC to walk in, then enable the special walking with raw_40, and I used this process 4 times.
raw_46 to raw_49 are jumping in place. This is very straightforward.
raw_46 = jump in place while facing down
raw_47 = jump in place while facing up
raw_48 = jump in place while facing right
raw_49 = jump in place while facing left
I also tried some other raw commands I saw in the game. To my knowledge so far
raw_56 = alert = make '!' box appear over the NPC's head
I did try using another raw command the game used, which was raw_51. However, it didn't seem to do anything. I'm pretty sure it doesn't pause because pause is used as pause3 (I don't know if more pause commands work though).
In conclusion, I will just say that for R/S/E, you'll have to play around and find out what raw commands do what. I did not check if these commands can be used in FR/LG, but I'll do that another time. I will end this lesson here, since all of the movement script material is gone over already. I feel that you guys can write a movement script in R/S/E now, knowing some new commands.
Summary:
walk_(direction) - makes the person walk in the direction stated.
look_(direction) - makes the person look in the direction stated (does not move to another tile).
pause3 - pauses the event by 1.
raw_(40-41) - Enables/Disables movement while not turning (always faces same direction).
raw_(46-49) - Jump in place while looking at the direction stated.
raw_56 (alert) - Makes the '!' box appear over the person's head.
Reference List