Pyrdacor / Ambermoon

Resources for the incredible Amiga game Ambermoon
92 stars 10 forks source link

Unused "Remove Partymember" event in code #73

Open Pyrdacor opened 2 years ago

Pyrdacor commented 2 years ago

As I explore the code more and more I will write down some findings here:

Beside the 23 used events, documented here, there is an unused 24th. It can theoretically be used by maps even in the original and there is actually code for the event. After some research it has the following form:

Offset Size Description
00 1 0x18 (event type)
01 1 Character index
02 1 Chest index for equipment
03 1 Chest index for inventory items
04 8 Unused

This event checks party members 2 to 6 (so it skips the hero for soon obvious reasons) to match the given character index. The character index is the sub-file index inside Party_char.amb. So 1 would be Netsrak, 5 would be Monika and so on.

Then it tries to move all equipped items to a chest and all inventory items to another chest (both chests could be the same of course).

At the end the character is removed from the party.

There is a bug in the code where the amount of slots is stored in D1 instead of D7 (which is the loop counter). Therefore the event would not work.

Pyrdacor commented 2 years ago

I added it to the docs with hints that it is bugged in the original.

a1exh commented 2 years ago

It is possible to let a character leave the party no? That uses a different method? What might have been the original intent of this event?

Pyrdacor commented 2 years ago

That event exactly lets a character leave the party but stores its items in chests beforehand. I would think about something like in Albion when Rainer leaves the party for some reason.

Pyrdacor commented 2 years ago

Maybe they planned that Valdyn could actually leave through the teleporter forever and he drops his items in a nearby wall storage in the Antique Area beforehand.