PDA

View Full Version : Research: XSE Movement Codes Define List


RaycrowX
May 26th, 2009, 10:08 PM
I haven't seen this anywhere, so I thought I'd post my own here. Basically, it is a #define list to make using movements easier. I started out using PKSV and then moved to XSE, which I like better, but I miss the easy movements that PKSV allowed me to do. But luckily, HackMew has made some XSE commands that make adding user-friendliness and readability very easy.

The list:

It is in this spoiler and and also attached.
#define look_up 0x01
#define look_left 0x02
#define look_right 0x03
#define look_down 0x04

#define step_down_very_slow 0x08
#define step_up_very_slow 0x09
#define step_left_very_slow 0x0a
#define step_right_very_slow 0x0b
#define step_down_slow 0x0c
#define step_up_slow 0x0d
#define step_left_slow 0x0e
#define step_right_slow 0x0f
#define step_down 0x10
#define step_up 0x11
#define step_left 0x12
#define step_right 0x13
#define jump_down2 0x14
#define jump_up2 0x15
#define jump_left2 0x16
#define jump_right2 0x17
#define step_down_fast 0x1d
#define step_up_fast 0x1e
#define step_left_fast 0x1f
#define step_right_fast 0x20
#define step_in_place_down 0x21
#define step_in_place_up 0x22
#define step_in_place_left 0x23
#define step_in_place_right 0x24
#define step_in_place_down_fast 0x25
#define step_in_place_up_fast 0x26
#define step_in_place_left_fast 0x27
#define step_in_place_right_fast 0x28
#define step_in_place_down_very_fast 0x29
#define step_in_place_up_very_fast 0x2a
#define step_in_place_left_very_fast 0x2b
#define step_in_place_right_very_fast 0x2c
#define look_down_delayed 0x2d
#define look_up_delayed 0x2e
#define look_left_delayed 0x2f
#define look_right_delayed 0x30
#define slide_down 0x31
#define slide_up 0x32
#define slide_left 0x33
#define slide_right 0x34

#define slide_down_on_right_foot 0x3d
#define slide_up_on_right_foot 0x3e
#define slide_left_on_right_foot 0x3f
#define slide_right_on_right_foot 0x40
#define slide_down_on_left_foot 0x41
#define slide_up_on_left_foot 0x42
#define slide_left_on_left_foot 0x43
#define slide_right_on_left_foot 0x44

#define face_player 0x4a
#define face_away_from_player 0x4b
#define jump_down 0x4e
#define jump_up 0x4f
#define jump_left 0x50
#define jump_right 0x51
#define jump_in_place_face_down 0x52
#define jump_in_place_face_up 0x53
#define jump_in_place_face_left 0x54
#define jump_in_place_face_right 0x55
#define jump_in_place_face_down_to_up 0x56
#define jump_in_place_face_up_to_down 0x57
#define jump_in_place_face_left_to_right 0x58
#define jump_in_place_face_right_to_left 0x59
#define hide_sprite 0x60
#define show_sprite 0x61
#define say_! 0x62
#define say_? 0x63
#define say_x 0x64
#define say_!! 0x65
#define say_:) 0x66

#define stop 0xfe
This list was originally found in the applymovement section of diegoisawesome's XSE tutorial (http://www.pokecommunity.com/showpost.php?p=4227330&postcount=2) and edited manually and with regular expressions (http://www.regular-expressions.info/).

Use:
1. Do one of the following:


Save the contents of the spoiler to a file called stdmove.rbh in your XSE directory.
Download the attached stdmove.txt (http://www.pokecommunity.com/attachment.php?attachmentid=46894&stc=1&d=1243404104) and rename it to stdmove.rbh, saving it in your XSE directory.
Download the file located here (http://cis.gvsu.edu/%7Efiskse/files/PokeCommunityFiles/stdmove.rbh) to your XSE directory.

It should look like this:
http://www.pokecommunity.com/attachment.php?attachmentid=46892&stc=1&d=1243402805http://www.pokecommunity.com/attachment.php?attachmentid=46895&stc=1&d=1243404104
2. Use this code in your script:
#include stdmove.rbh

#dynamic 0x800000

#org @walkandjump
applymovement 0x1 @move
waitmovement 0x1
end

'You must use #raw before the defined word
#org @move
#raw jump_down
#raw step_down
#raw step_right
#raw jump_up2
#raw face_player
#raw step_up
#raw hide_sprite
#raw stop
I hope this helps out somebody. I found it a lot easier to write my movement scripts using this list.

HackMew
May 26th, 2009, 11:54 PM
It's nice to see somehow that's using custom headers, but you did a little mistake:

#define stop 0xfe

#defines must be unique. What do you think it would happen when you write something like:

#org @hey
= Hey! Stop! Where are you going?

In this case "Stop" would be replaced with 0xFE. Which is not what you wanted, obviously. So you better call it stop_movement or something similar. Tip: #defines should be all in caps. After all, they're not case sensitive.

liuyanghejerry
May 27th, 2009, 04:47 AM
Thanks RaycrowX for this header file~
By the way, does header support Chinese characters?( Just let me know if XSE does...)

●•ΛΣЯӨЩ•●
May 29th, 2009, 07:32 AM
So HackMew this has caught your eye!!

And impresive work!!!!

cooley
May 30th, 2009, 05:20 PM
I see I wasn't the only one that did this...But this one I made seems a bit more reasonable than Step_in_place_left Lol


'----------------
'Movements
'----------------
#define Face_Down 0x0
#define Face_Up 0x1
#define Face_Left 0x2
#define Face_Right 0x3
#define Face_Down2 0x4
#define Face_Up2 0x5
#define Face_Left2 0x6
#define Face_Right2 0x7
#define Step_Down-2 0x8
#define Step_Up-2 0x9
#define Step_Left-2 0xA
#define Step_Right-2 0xB
#define Step_Down-1 0xC
#define Step_Up-1 0xD
#define Step_Left-1 0xE
#define Step_Right-1 0xF
#define Step_Down 0x10
#define Step_Up 0x11
#define Step_Left 0x12
#define Step_Right 0x13
#define Jump_Down2 0x14
#define Jump_Up2 0x15
#define Jump_Left2 0x16
#define Jump_Right2 0x17
#define Delay1 0x18
#define Delay2 0x19
#define Delay3 0x1A
#define Delay4 0x1B
#define Delay5 0x1C
#define Step_Down2 0x1D
#define Step_Up2 0x1E
#define Step_Left2 0x1F
#define Step_Right2 0x20
#define OnSpot_Down 0x21
#define OnSpot_Up 0x22
#define OnSpot_Left 0x23
#define OnSpot_Right 0x24
#define OnSpot_Down2 0x25
#define OnSpot_Up2 0x26
#define OnSpot_Left2 0x27
#define OnSpot_Right2 0x28
#define OnSpot_Down3 0x29
#define OnSpot_Up3 0x2A
#define OnSpot_Left3 0x2B
#define OnSpot_Right3 0x2C
#define Face_Down1 0x2D
#define Face_Up1 0x2E
#define Face_Left1 0x2F
#define Face_Right1 0x30
#define Slide_Down 0x31
#define Slide_Up 0x32
#define Slide_Left 0x33
#define Slide_Right 0x34
Slide Down On Right Foot 0x3D
Slide Up On Right Foot 0x3E
Slide Left On Right Foot 0x3F
Slide Right On Right Foot 0x40
Slide Down On Left Foot 0x41
Slide Up On Left Foot 0x42
Slide Left On Left Foot 0x43
#define SlideRight_Left 0x44
#define Face_Player 0x4A
#define Face_Player(Away) 0x4B
#define Jump_Down 0x4E
#define Jump_Up 0x4F
#define Jump_Left 0x50
#define Jump_Right 0x51
#define JumpPlace_Down 0x52
#define JumpPlace_Up 0x53
#define JumpPlace_Left 0x54
#define JumpPlace_Right 0x55
Jump in Place (Facing Down->Up) 0x56
Jump in Place (Facing Up->Down) 0x57
Jump in Place (Facing Left->Right) 0x58
Jump in Place (Facing Right->Left) 0x59
#define Hide_Tmp 0x60
#define Show_Tmp 0x61
#define !_box 0x62
#define ?_box 0x63
#define X_box 0x64
#define !2_box 0x65
#define ^^_box 0x66
#define End_Move 0xFE
It isn't complete, but hey...maybe you can take some from this list ^_^

Example:
Step_up-2 = Very slow
Step_up-1 = Slow
Step_up = normal
Step_up2 = fast

And last thing...You can write them like this:

#org @move
#raw Step_down Step_right Step_right !_box End_move

I tested it out, so everything works, don't worry

slasher2661996
June 3rd, 2009, 01:32 AM
I can move other players using this but i need to move my character. How exactly do i do this?

timeshero2
June 3rd, 2009, 04:04 PM
Thanks man. This should come in handy

fizzmaister
December 22nd, 2009, 12:09 PM
I can move other players using this but i need to move my character. How exactly do i do this?

I'd really like to get the answer to this question. like this person I can move the npcs, but I can't move the player. Help please.

Edit: Rereading diego's guide helped solve it. Nevermind.

amoliski
December 24th, 2009, 07:02 AM
I am pretty sure you use 0xFF for the ID, but I haven't scripted movement in about a month, so I a bit fuzzy. I think you can just use PLAYER as well.

NintendoBoyDX
January 3rd, 2011, 01:19 PM
http://codepad.org/4xsAz4t7
I quickly went through the list of defines posted by OP and changed it all to caps, and changed stop to STOP_MOVEMENT as was recommended a while ago by hackmew. Copy the list into a .rbh file to use with XSE.