View Single Post
Old July 22nd, 2013 (5:03 AM).
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
    Join Date: Jun 2009
    Gender: Male
    Nature: Quiet
    Posts: 732
    Originally Posted by 11bayerf1 View Post
    I can't help but notice that there are commands above FF, that seem to be for Gen 4 moves.
    I take it these only work in the 649 patch? How would one go about getting them to work in
    other roms.
    I'm sure you won't be surprised to hear that it requires custom ASM. The way the script runner is built, you physically cannot use commands with an index greater than 0xFF, because a script command's ID can only be a byte in size.

    What I did was turn command 0xFF into a command which takes 1 parameter, that parameter being the "extended script ID".

    The code reads the ID, and then jumps (in ASM) to the code associated with the ID based on a table built into command 0xFF. It then executes as normal. If the extended ID command has parameters, these parameters follow on directly from the extended script ID, as they would in any normal circumstances.

    Basically, command 0xFF in my ROM is a bit like Callstd in overworld scripting.
    Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
    Reply With Quote