Script Help Thread (DO NOT REQUEST SCRIPTS)
View Single Post
August 4th, 2011 (11:52 AM).
My advanced eval trick allows one to pass the value of a variable into a script that accepts only raw values and not variables. The "dynamic script compilation at run-time" link in my signature links to an explanation of how it works.
Basically, with some complex RAM edits, you can literally write a script at run-time. You'd take your script -- "setmaptile 0xWWXX 0xYYZZ 0x1 0x0 ; return" -- and convert it to hex. You'd write those hex values into variables, and then use some tricky RAM manipulation to call those variables and get the game to treat them as script code. Since you're building the script at run-time, any part of it can be changed -- in this case, the WWXX and YYZZ that get passed to setmaptile.
The effect is that functions that only take values can have those values "injected" from variables.
I should note that it is a very complex technique, but it solves problems like this quite effectively.
Joined Jul 2010
View Public Profile
Send a private message to Missingyep
Find all posts by Missingyep
Find threads started by Missingyep
Ignore Posts by Missingyep