View Single Post
Old July 24th, 2013 (12:52 AM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
Join Date: Dec 2008
Location: Hong Kong
Age: 20
Gender: Male
Posts: 720
Originally Posted by Jambo51 View Post
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.
Hrm that's very interesting I must say. Yeah I figured it wasn't something found normally in the rom.
That's a creative solution, because I was wondering how you'd be able to create extended IDs as FF to me was the biggest an ID could go. I was hoping initially that there'd be some sort of table to extend but that makes sense.

Thanks for your response!
Reply With Quote