• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

The secret of the Move Camera Script (and extras)

Status
Not open for further replies.

cooley

///Keepin' it simple
  • 1,148
    Posts
    17
    Years
    Before I begin, I'd like to give you some advice. DON'T USE POKESCRIPT!!!!
    This tutorial uses XSE, the better way of scripting


    For those of you who don't know what a "Move Camera Script" is, then look Here. That's an example.

    MOVE CAMERA SCRIPT

    START
    Move Camera Scripts are scripts that move the screen, instead of people.


    REQUIREMENTS
    *Advance map 1.90 or higher
    *Visual Boy Advacne
    *Pokemon (FR/LG/R/S) ROM(s) *emerald not tested
    *XSE(eXtreme Script Editor)
    *Common Sense and Patience

    EXAMPLE
    They are made like this:

    Code:
    #org @start
    lockall
    special 0x113
    applymovement 0x7F @move
    waitmovement 0x0
    special 0x114
    releaseall
    end
    
    #org @move
    #raw (these can be any movements as long as it comes back to the user)*
    * = If the camera moves 3 up, then 2 left, then the camera MUST return to it's orignal postion.

    EXPLANATION

    The special 0x113 and special 0x114 are the most important part of the script. The script is relying on it, so, no special 0x113 or 0x114's, no Move Camera Scripts.

    Lockall
    This is almost like the command "lock" except it locks every person on the map.

    Special 0x113
    This makes the player be frozen. And any other people should be as well.

    Applymovement 0x7F @move
    Applymovement = Applymovement, but the 7F tells the game we are moving the Camera instead of people. The movements are the same as if you were moving people.

    Special 0x114
    This releases the 'Special 0x113' if this is not present, then you can't move at all

    Releaseall
    Kinda like 'release' except it releases all people on the map

    EXAMPLE OF SCRIPT(decompiled)
    Code:
    '-----------------------
    #org 0x17070B
    special 0x113
    applymovement MOVE_CAMERA 0x81707BE
    waitmovement 0x0
    pause 0x23
    sound 0x15
    checksound
    setvar 0x8004 0x0
    special 0x1B5
    pause 0xA
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    setvar 0x8004 0x1
    special 0x1B5
    sound 0x27
    special 0x1B7
    checksound
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    call 0x81707B6
    setdooropened 0x3 0x3
    doorchange
    fadein 0x0
    showsprite 0x1
    clearflag 0x33
    pause 0x32
    fanfare 0x101
    applymovement 0x1 0x8170888
    waitmovement 0x0
    waitfanfare
    applymovement MOVE_CAMERA 0x81707C3
    waitmovement 0x0
    sound 0x5B
    setdoorclosed 0x3 0x3
    doorchange
    applymovement 0x1 0x8170881
    waitmovement 0x0
    special 0x114
    releaseall
    end
    
    '-----------------------
    #org 0x1707B6
    sound 0x17
    checksound
    pause 0x14
    return
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x1707BE
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw FE 'End of Movements
    
    #org 0x170888
    #raw 10 'Step Down (Normal)
    #raw FE 'End of Movements
    
    #org 0x1707C3
    #raw 1C 'Delay5
    #raw 1C 'Delay5
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw FE 'End of Movements
    
    #org 0x170881
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 10 'Step Down (Normal)
    #raw 10 'Step Down (Normal)
    #raw FE 'End of Movements
    CREDITS
    -HackMew - (Andrea) - For correcting my mistake, and helping me with this Script.
    makunouchi - For showing me the script, through video
    GameFreak - For using the script in-game for me to catch on.

    REFERENCES
    Code:
    Offset(s) of different examples of "Move Camera Scripts":
    RUBY(U)...........................................0x160BBC, 0x160BB0
    FIRERED(U)....................................0x17070B, 0x16726E, 0x165012
    HELP?

    PM me
    Visitor Message
    Email me/MSN
    Post here, xD

    Any further help or if this needs to be explained better, then Post here. Good day!


    *********************************
    EXTRAS
    *********************************

    Level Scripts

    Requirements
    Advance Map 1.90 or higher
    A Pokémon Rom of your choice(works on all ROMs, but offset may differ)
    eXtreme Script Editor(XSE)
    An Emulator

    Example
    The script I used for this example:

    Code:
    #dynamic 0x800000
    
    #org @start
    msgbox @complete
    callstd 0x6
    setvar 0x4033 0x1
    release
    end
    
    #org @complete
    = You see?\nThe level script worked!
    Explanation - How to make one

    First off, make your script. But don't compile it yet, make sure it has a "setvar" in the script, like mine. You can use 0x4033, but you will eventually need to use different ones. And you can also use 0x1 but your free to use 0x2, 0x3, as long as you subtract one from it. So if I use 0x1, I would put 0000 into the Value box. You might not know what it means, so I'll tell you how to make one.

    Now, open your ROM in Advance map, and goto the map of choice, where you want the level scirpt to appear². Once the map is loaded, you should go to the header tab, ans scroll down to "Map script" area. It should look like this, once you removed all of Nintedo's Level scripts(If any, then click "remove" until it is greyed out)
    It should look like this:

    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    Click on add, and then click on "script type". It should look like this:

    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    Click on the "02 Validates values, loads handler to 0x03000EB0".
    Having done this, the "script offset 2" box should be "$000000" meaning, no script at all. So should the "flag" and "value" boxes. Now, compile your script, and insert the "setvar" you used, in the "flag box" and the value you should leave blank(unless you used a value other than 0x1) Altogether you should have this:

    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    You're almost done! Now click "save map scripts" and save the ROM(Ctrl+S)
    If you've done what I've done, your settings should look like this:

    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    Now test it In-game. And bam, you should look like this, if you used my example:
    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    What to do? I got a wierd message box!

    This is common, in most level scripts. It's all because of Advance map too. It overwrites some of the bytes with FFFF or other things, when it's supposed to be 0.
    This is what it'd look like:
    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    To fix this, you go to the header tab, and press Ctrl+H to get professional header view. You should see an area called "Map Options". And within you should see "Map script offset"

    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    Copy the map script offset, and open your ROM in XSE.
    Once done, paste the offset in the "decompile box" and click on "level script"

    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    Next, click on decompile

    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    That is your/my script.
    Now to fix it.

    Code:
    '-----------------------
    #org 0x71A23C
    #raw 02
    #raw pointer 0x871A242
    #raw 00
    
    '-----------------------
    #org 0x71A242
    #raw word 0x4033
    #raw word 0x0
    #raw pointer 0x880007D
    #raw word 0x[B]FFFF[/B]               [B] 'that is the Jacked up level script byte, that A-map overwrited[/B]
    
    '-----------------------
    #org 0x80007D
    msgbox 0x880008D '"You see?\nThe level script worked!"
    callstd 0x6
    setvar 0x4033 0x1
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x80008D
    = You see?\nThe level script worked!

    Replace the Bolded '0xFFFF' or whatever it is, with the value in the "value box" in advance map.


    Code:
    '-----------------------
    #org 0x71A23C
    #raw 02
    #raw pointer 0x871A242
    #raw 00
    
    '-----------------------
    #org 0x71A242
    #raw word 0x4033
    #raw word 0x0
    #raw pointer 0x880007D
    #raw word [B]0x0[/B]                       '[B]Replaced[/B]
    
    '-----------------------
    #org 0x80007D
    msgbox 0x880008D '"You see?\nThe level script worked!"
    callstd 0x6
    setvar 0x4033 0x1
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x80008D
    = You see?\nThe level script worked!
    Now, Press Shift+Ctrl+C to compile the script back to the ROM.
    [PokeCommunity.com] The secret of the Move Camera Script (and extras)


    Test it, and it should work in-game now!, That was easy wasn't it?

    Done!

    Making a Level script, through XSE or HEX

    XSE way

    Open up XSE and Type:

    Code:
    #dynamic 0x700000
    
    #org @start
    #raw 02(type of level script
    #raw pointer @nextpart
    #raw 00 (filler?)
    
    #org @nextpart
    #raw 0x4033(the flag of your level script)
    #raw 0x0(Unknown, reserach later)
    #raw pointer @script (pointer to the actual script)
    #raw 00 (filler?)
    
    #org @script
    msgbox @message
    callstd 0x6
    setvar 0x4033 0x1
    release
    end
    
    #org @message
    = You see?\nThe level script worked!
    That should explain it.
    All you have to do now, is go into Advance map, and goto the header tab, press Ctrl + H, and paste the offset of the script over the "Map script offset box". It should work now.

    If you want to do it in hex, then do it that way, except in hex type...everything in HEX, duh?

    Example:
    Code:
    0x700000 =
    02 06 00 70 08 00
    
    0x700006 =
    33 04 00 0E 00 07 08 00
    
    0x70000E =
    The script in hex. Got it?
    Done.

    The different types of level scripts

    There are 15 types of level scripts total. Most of them are unknown, only 7 are known. And here's the list;
    Code:
    00 - No script at all
    01 - setmaptile script
    02 - Regular level script, most used
    03 - On entering map, not on menu close
    04 - No name for it, but it's useful
    05 - On entering map, on menu close
    07 - Same as 05


    I just realized that, the "Level scripts" don't really need explanations. :P
     
    Last edited:
    For the #raw part, would u put the movement offsets from pokescript, the ones that move the player or other people?
    (1st post! ^^)
     
    Last edited:
    does special 0x113 prevent applymovement commands if the script continues? or does it prevent the player moving with the camera? I don't really understand the difference between lockall and special 0x113..

    also, is it possible for the camera to stay put and away from the center, then the player moves back into the center of the camera?
     
    Its a great and easy tutorial, but its in XSE, where as i use pokescript(but will change soon).
    I have one question though,is the main difference in this script from a pokescript version the @'s in the script or are some other stuff like the commands different?
    And do i only use the stop camera if I want the camera to stop or do i have to to make it work successfully?
     
    Oh, it sounds like a great tutorial..very useful for some vital events in hacks...
    I'll have a go at this....8D
     
    Its a great and easy tutorial, but its in XSE, where as i use pokescript(but will change soon).
    I have one question though,is the main difference in this script from a pokescript version the @'s in the script or are some other stuff like the commands different?
    And do i only use the stop camera if I want the camera to stop or do i have to to make it work successfully?
    Well DON'T USE POKESCRIPT!!!!
    It has too many bugs and errors in coding. Irish Witch made pokescript, when she didn't even understand the whole scripting thing.

    Please, use XSE. It's a new scripting experience!

    And in pokescript, you have to use a bunch of #Raw's because not all the commands are there. XSE corrects scripting mistakes, doesn't waste space, and has extras!
    Pokescript is horrible. The main difference isn't the "@" either. You should take a look for yourself.

    does special 0x113 prevent applymovement commands if the script continues? or does it prevent the player moving with the camera? I don't really understand the difference between lockall and special 0x113..
    also, is it possible for the camera to stay put and away from the center, then the player moves back into the center of the camera?
    No, it plays it's part in the applymovement, but without it, it won't work.
    Lockall = locks ALL movement on the map. But you can still use Applymovement to move the people.
    Special 0x113 = Locks the players movement, but you can still move the player using applymovement 0xFF. Someone correct me if I'm wrong on this.

    Last question. Yes that is possible.
    Code:
    #org @start
    special 0x113
    applymovement 0x7F @move
    waitmovement 0x0                 'This waits till the movement of the camera is finished
    applymovement 0xFF @playermove         'This moves the player to the desired location
    waitmovement 0x0
    special 0x114
    release
    end

    is this pokescript or XSE? because it wont work in XSE
    This WILL work in XSE, You just need you're own pointers if you are trying to compile the decompiled script
    Oh, it sounds like a great tutorial..very useful for some vital events in hacks...
    I'll have a go at this....8D
    Thanks!
     
    what's wrong
    specials: 116 and 117 for emerald

    #dynamic 0xECFD50

    #org @start
    lockall
    special 0x116
    applymovement 0x7f @walkingto
    waitmovement 0x0
    special 0x117
    releaseall
    end

    #org @walkingto
    #raw 0x09
    #raw 0x09
    #raw 0x09
    #raw 0x0B
    #raw 0x0B
    #raw 0x0A
    #raw 0x0A
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x03
    #raw 0xFE
     
    what's wrong
    specials: 116 and 117 for emerald

    #dynamic 0xECFD50

    #org @start
    lockall
    special 0x116
    applymovement 0x7f @walkingto
    waitmovement 0x0
    special 0x117
    releaseall
    end

    #org @walkingto
    #raw 0x09
    #raw 0x09
    #raw 0x09
    #raw 0x0B
    #raw 0x0B
    #raw 0x0A
    #raw 0x0A
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x03
    #raw 0xFE

    its special 0x113, special 0x114, isn't it?
     
    Okay, I made a level script and the message shows up, but then it freezes. Forgive me for using pokescript.

    #org $begin
    message $level
    boxset 6
    setvar 0x4000 0x1
    release
    end

    #org $level
    $level 1 = This is a level script.
     
    Okay, I made a level script and the message shows up, but then it freezes. Forgive me for using pokescript.

    #org $begin
    message $level
    boxset 6
    setvar 0x4000 0x1
    release
    end

    #org $level
    $level 1 = This is a level script.

    1.Did you put the 4000 into the flag box?
    2.Did you leave the Value Box Blank?
    3.You should try a different value, try 0x2 instead of 0x1. (then put 1 into the Value box)
     
    1. Yes
    2. Yes
    3. Okay, I will try that. I hope it works.

    Edit: Worse result. 0x2 value 0001 made garble come up along with a box saying coins.
     
    Last edited:
    Lol.
    Try decompiling the script using XSE and click on the "level script" button, then post here.
    Oh, wait. You don't use XSE, sorry can't help you then.
     
    I tried making an xse version script,decompiling it, and clicking level script, but it still didn't work. Do you think it might have to do with the fact I put in a pokemon center?
     
    Status
    Not open for further replies.
    Back
    Top