Well you have to be carefull with adding new lines, since that increases the size of the script.
And since there is usually another script that comes after it you would overwrite that one. The same goes for any "#org" lines within your script.
It could be possible to avoid this, by outsourcing your script (or however that is called).
Basically you replace a line in the script by a call command (hope that is the right one, haven't used it yet) and this call then opens a different script that has enough free space. In this new script you first write the line you replaced, then write whatever you want and finally return to the place you left off. I haven't done this so far, so it might work a little different, but that is the basic idea behind it.
example:
Imagine this is your original script (or a part of it) and you want to add new orders after the red line:
Code:
#org 0xE3EA68
msgbox 0x8E3EABB MSG_NORMAL //"Now don't get startled"
applymovement MOVE_PLAYER 0x8E3EBCE
waitmovement 0x0
msgbox 0x8E3EAD4 MSG_NORMAL //"Why do humans always react like\nt..."
setflag 0xAAAC
release
end
so you replace the red line with
or whereever your replacement script is found.
the replacement might then look like this:
Code:
#org 0x800000
msgbox 0x8E3EAD4 MSG_NORMAL //"Why do humans always react like\nt..."
fanfare 0x13E
msgbox @3 0x4
waitfanfare
return
You can also insert your new script in front of the replaced lines, this is determined by where you place them in your new script.
Be carefull, the call command needs 5 Bytes, the msgbox needs 8, so there is no problem here. But the setflag would only need 3 Bytes, so if you want to replace it with a call you need to replace at least one additional line, until the deleted lines give you enough space for the call.
In this case you would need to replace "release" and "end" as well (both 1 byte).
You might want add some nop lines (1 byte, no function) after the call to have it exactly the same size as the deleted lines.
Hope this was understable and correct, as I haven't made my way to the call command yet.