Aug 2, 2006 at 10:10 PM
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
Since I won't be able to post my hack anytime soon (no intarweb) I figured I'd share my technique for creating multiple playable characters. Some assembly knowhow required, but it'd be possible to manage with just Sue's Workshop and an image editor... I'll add offsets when I get my internet back.
Abstract
Playing multiple characters is possible through the use of equipment flags. The original game uses the mimiga mask as a means of telling the game to change Quote's sprite into another one. A bit of additional work is all that would be needed to make this into a full-blown second character, and it could even be used to create more than 2 characters.
The Basics - 2 Characters
First, edit the "mimiga mask" version of Quote to look like your second character. At any point in the game where you want to switch characters, EQ+ the mimiga mask flag.
Switching States - 2 Characters
To swap stats, it's necessary to add a command to the script parser. You can hijack the extra <FAC command, or replace one you won't use (UNI and UNJ come to mind.) Jump to some free space (scrap an entity and pick through its code for free space...)
What we're going to do is use the flags to store data. Make your function write the data you want to switch between characters in the flags (make sure you know where it's going to avoid screwing up events!) Your function needs to swap the data in memory with the data in the flags, not simply overwrite one with the other - this is a swap operation after all. This will be saved, since flags get saved in profile.dat. You should swap at least the hp, items, weapons, and weapon levels - the rest is up to you.
Additional Abilities - 2 Characters
Test the EQ bit in any function you wish to modify and simple JE or JNE to some additional bit of code. Simple as pie.
3+ Characters
This is impossible without some assembly. You'll have to add more sprites to the image file (it can safely be resized so knock yourself out) and you'll have to branch in Quote's rendering code to a function that'll load the third+ sprite(s) if the flag is set.
Since we only have one mimiga mask, we can use some of the higher unused bits in the EQ flag to indicate which character we're using.
Any other test behaves the same as with 2 characters, only with tests made for additional characters when needed.
Abstract
Playing multiple characters is possible through the use of equipment flags. The original game uses the mimiga mask as a means of telling the game to change Quote's sprite into another one. A bit of additional work is all that would be needed to make this into a full-blown second character, and it could even be used to create more than 2 characters.
The Basics - 2 Characters
First, edit the "mimiga mask" version of Quote to look like your second character. At any point in the game where you want to switch characters, EQ+ the mimiga mask flag.
Switching States - 2 Characters
To swap stats, it's necessary to add a command to the script parser. You can hijack the extra <FAC command, or replace one you won't use (UNI and UNJ come to mind.) Jump to some free space (scrap an entity and pick through its code for free space...)
What we're going to do is use the flags to store data. Make your function write the data you want to switch between characters in the flags (make sure you know where it's going to avoid screwing up events!) Your function needs to swap the data in memory with the data in the flags, not simply overwrite one with the other - this is a swap operation after all. This will be saved, since flags get saved in profile.dat. You should swap at least the hp, items, weapons, and weapon levels - the rest is up to you.
Additional Abilities - 2 Characters
Test the EQ bit in any function you wish to modify and simple JE or JNE to some additional bit of code. Simple as pie.
3+ Characters
This is impossible without some assembly. You'll have to add more sprites to the image file (it can safely be resized so knock yourself out) and you'll have to branch in Quote's rendering code to a function that'll load the third+ sprite(s) if the flag is set.
Since we only have one mimiga mask, we can use some of the higher unused bits in the EQ flag to indicate which character we're using.
Any other test behaves the same as with 2 characters, only with tests made for additional characters when needed.