Multiple Characters

Aug 2, 2006 at 10:10 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
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. :p 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.
 
Aug 3, 2006 at 5:05 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: May 8, 2006
Location:
Posts: 98
If you say it can be done with Sue's Workshop, then where do i edit it?
 
Aug 3, 2006 at 6:06 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
You can only do the first part with Sue's Workshop, as it isn't a hex editor nor an assembly compiler. This means you won't have access to two seperate inventories/stats/etc nor any additional abilities for the alternate character, and are limited to just 2.

Just follow through with the first part: use the mimiga mask as a means of switching between the two sets of graphics and edit the second one to contain your alternate character.
 
Aug 3, 2006 at 8:13 PM
Junior Member
"Wahoo! Upgrade!"
Join Date: Jul 14, 2006
Location:
Posts: 47
So by multiplying the area of the MyChar.pbm file by 1.5, you have enough room for a third set of sprites.
From there, you need to assembly hack the function of an item (a useless one, such as the clay figure model), to activate the third set of sprites, such as is featured by equipping the mimiga mask.

Correct? This is only if you want 3+ characters available for use.

I guess I'll start searching for item functions then...
 
Aug 3, 2006 at 8:40 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
Close enough, but it's even easier than that. You can just make use of an unused equipment flag (EQ+/EQ-) for your third character. The thing is, equipment flags and items are not linked - you don't need to give the player the mimiga mask to trigger it, you can just set it when you need to switch characters in the script. Or the other byte for your 3rd character.

The problem with more than 2 characters is that the game doesn't ever make use of 3 spritesets or more for Quote. Just 2. So you need to do a bit of rewriting to allow for a third character.

It's easier to do this if you view EQ flags as "abilities Quote has" than as items you've equipped. Ie, "Can breath underwater," or "Is character #2", etc ;)
 
Aug 7, 2006 at 12:39 AM
Been here way too long...
"The Ultimate Sword of Extraordinary Magnitude"
Join Date: Jun 14, 2006
Location:
Posts: 299
Age: 34
Thank you, Runelancer. Is it ok if I use this in my hack?
 
Aug 7, 2006 at 12:52 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
The information on hacking here, people post is free ;)
So don't ask, just use it ;)
 
Aug 7, 2006 at 3:45 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
What am I going to do? Sue you for using an idea? ;) The intar-web doesn't work that way, and it never fails to amuse me when people get upset over, say, seeing their faqs posted omg not just on gamefaqs o noez teh world comes to an end!!! ;)

But I appreciate you asking nevertheless - like SP said, if it's posted publicly, it's up for grabs. Have fun. :p
 
Top