Pyrdacor / Ambermoon.net

Ambermoon rewrite in C#
GNU General Public License v3.0
424 stars 22 forks source link

[Project] Ambermoon bugfix patches #52

Open Pyrdacor opened 4 years ago

Pyrdacor commented 4 years ago

The goal is to create a stable patched Ambermoon version in german and english. We focus on the english patch for now.

kermitfrog commented 3 years ago

I had another look, with new knowledge, at the first function I analyzed - the one that determines attack damage - to see if I missed something. Back then, I discovered that the defense buff (e.g. Magick barrier) increases armor strength for monsters too.

This was not completely correct: in fact the attack and defense buffs are applied only if the attacker is a player character. So in the normal case only monsters will get any benefit from to their armor strength from that buff. The only exception would be the case when a player character is attacked by a crazy commarade.

Pyrdacor commented 3 years ago

@a1exh The first release is coming closer. It would be awesome if we could create an updated version of the original data (most importantly the english one) so that most data-related bugs are fixed also for the rework.

I know your time is very limited but how are your plans on this? Maybe I can do some of the work as well.

a1exh commented 3 years ago

The English v1.07 bugs we know about are still in this spreadsheet

https://docs.google.com/spreadsheets/d/1as5W8gibm-MTb9VEqpkfgtwWviqjQx96A3NmcvzX98A/edit?usp=sharing

I can provide you with the patches in the first sheet that already exist. And I can have a go at the ones in the first sheet that are understood but no patch exists yet.

The ones on the second sheet, which are not fully understood, I think three of them I could probably have a go at, 1 (and 50 which are probably the same) , 44, 55b

Perhaps some of them on the 2nd sheet contain enough debug that you might be able to deduce what is wrong now you understand the inner workings of the code? 24, 32, 33, 41, 43, 46, 53

a1exh commented 3 years ago

Most of these bugs should be reproduced in Ambermoon.net just as they are in the Amiga version because they are due to incorrect data files as opposed to the game engine itself.

Pyrdacor commented 3 years ago

Yes we can test many of them in the remake with the teleport cheat quickly.

I also know a very well-documented and complete german walkthrough on YouTube that I can use as a reference to compare the english version behaviour.

About the hangar duplicate map stuff. I guess we can just choose one of the map text files and then copy and rename it.

Can you provide the already patched version? I will add it to the Ambermoon GitHub repo so it gets version controlled. Then I can add documented updates via commits and it automatically gets a history. This also allows an easy reversing of wrong fixes. I could do the same with the excel sheet. So that both files are in sync and reflect the current state.

Beta testers could then also use the current version and copy it into the remake so that testing isn't only our responsibility.

a1exh commented 3 years ago

Here is a link to the Meynaf patch http://meynaf.free.fr/pr/amberpatch.lzx. It is a collection of patches by many people. (The spreadsheet has an accurate list of who reported the bug and who made the patches). Because Meynaf didn't have a LOB packer any .amb file he modified is not re-compressed.

On the first sheet of the Ambermoon bugs spreadsheet there is a column with Meynaf Patch? and Y/N. That indicates whether this bug is patched or not in the Meynaf patch. There are quite a few that are not. The worst bugs are patched in the Meynaf patch.

There are also two columns (v1.07 ORIGINAL / PATCHED) which contain links to the original v1.07 datafile (decrypted, decompressed, split) and the patched version which you can HEX DIFF to see the changes. (Some links are missing, the files are not on the server or the links have typos in them, I'll clean that up tonight).

Pyrdacor commented 3 years ago

Ok I started to fix the things missing in first sheet. Already fixed 6, 8 and 13. Two were texts and 13 is the wrong key index on sansrie's door in the tunnel. Also fixed. I will progress through the list as I have time.

I couldn't find 11 though. There is no text event on map 001. So I don't quiet understand when and if that really happens.

Pyrdacor commented 3 years ago

Nephilim stumbled into a crash in gala's temple when he approached a specific golem. I checked and that golem is flagged as "party member". I remember reports about a golem NPC that occurs only for 5 minutes at exactly midnight. There he is.

Basically it is a bug in the data. NPC 14 (0-based) of map 277 (gala's temple) is marked as "PartyMember" (0) instead of "Monster" (2). The monster group index (24) is then interpreted as the party member index which is of course not present.

We should add this to the list and fix as this crashes also the remake. :D

Maybe there are 288 positions for this golem which we have to remove as well then. Will take care of it then.

Pyrdacor commented 3 years ago

Ok I fixed the golem locally.

Pyrdacor commented 3 years ago

There is also something that doesn't really affect the original but caused problems in the remake. Map 258 (grandfather's house) has a third NPC inside its character reference section. But it isn't really associated to an existing NPC and there is also no movement data (normally NPCs have 288 positions (1 per time slot) if they don't move randomly). This 3rd NPC would move randomly. Moreover the 3rd NPC isn't exactly at the 3rd position inside the data. There are 0-bytes in-between. I guess this is the reason why it works in original (it ends for checking when encountering 0-bytes).

I would like to remove the unused data anyway.

Pyrdacor commented 3 years ago

You can access the current version here: https://github.com/Pyrdacor/Ambermoon/tree/master/Disks/Bugfixing/English

In https://github.com/Pyrdacor/Ambermoon/blob/master/Disks/Bugfixing/English/AdditionalFixes.md I documented what I fixed on top of the meynaf patch.

The files are located in the subfolder Amberfiles.

I tested all the fixed bugs in the remake and it all works fine. For safety someone could check in original as well but I doubt there will be issues.

Pyrdacor commented 3 years ago

I replaced all occurences of HE and HIS where the active party member is meant by \~SEX1\~ and \~SEX2\~.

I have a question about english translation:

a1exh commented 3 years ago
  • There are some "issues" where the text "dwarves" should be changed to "dwarfs" but my understanding of the english language is, that "dwarves" is correct and not "dwarfs".

Dwarfs is the correct spelling in English. Dwarves is something that J.R.R. Tolkien adopted in his books.

https://jakubmarian.com/dwarves-or-dwarfs-which-spelling-is-correct/

I personally don't mind as long as the game only uses one of the two spellings.

The original v1.07 uses both Dwarfs (27 occurrences) and Dwarves (2 occurrences). So you can see why Dwarves was changed to Dwarfs and not the other way around :-)

a1exh commented 3 years ago
  • The occurences of PELANI were changed to PELANIS but iirc the real name of him is indeed "PELANI" and not "PELANIS". Am I right?

I don't think it matters as long as all references are the same. There are I believe 6 references in the v1.07 game. 3 are PELANIS and 3 are PELANI.

  1. NPC_char.amb : 01C : PELANI
  2. 2map_texts.amb : 1A0 : PALACE OF PELANIS
  3. 2map_texts.amb : 1A1 : PALACE OF PELANIS
  4. 2map_texts.amb : 1A1 : PLEASE ASK PELANIS
  5. 2map_texts.amb : 1A3 : PALACE OF PENANI
  6. AM2_CPU/BLT : PELANI'S KEY
a1exh commented 3 years ago

I replaced all occurrences of HE and HIS where the active party member is meant by ~SEX1~ and ~SEX2~.

Cool. That was a bug on Sheet 2 (unfixed) number 34.

a1exh commented 3 years ago

Map 258 (grandfather's house) has a third NPC inside its character reference section. I would like to remove the unused data anyway. Removed unused character data from map 258

Can you please give me some more details about this fix? Which file/sub-file was it in? Presumably one of the *Map_data.amb Thanks.

a1exh commented 3 years ago

sheet 2 : 24 added a new teleport event from map 362 to map 361 (9,11) facing north

Which file & sub-file was this (presumably another *Map_data.amb?) and what changed? Thanks

a1exh commented 3 years ago

I couldn't find 11 though. There is no text event on map 001. So I don't quiet understand when and if that really happens.

I believe you. Very strange.

Two different contributors (MetalliC and Meynaf) both reported it and both found different solutions

http://eab.abime.net/showpost.php?p=890976&postcount=493 http://eab.abime.net/showpost.php?p=533428&postcount=175

I did wonder about this "fix" as I always wondered where the text in the MetalliC fix came from?

Pyrdacor commented 3 years ago

Map 258 (grandfather's house) has a third NPC inside its character reference section. I would like to remove the unused data anyway. Removed unused character data from map 258

Can you please give me some more details about this fix? Which file/sub-file was it in? Presumably one of the *Map_data.amb Thanks.

This is also present in the german version. There is a doc file for german as well with a bit more information: https://github.com/Pyrdacor/Ambermoon/blob/master/Disks/Bugfixing/German/AdditionalFixes.md

For this specific bug it is: 2Map_data.amb (map 258 decimal, I set the following bytes to 0: 0x4A to 0x51).

Pyrdacor commented 3 years ago

I couldn't find 11 though. There is no text event on map 001. So I don't quiet understand when and if that really happens. I don't know. There were several reports that said something breaks v1.07 when you approach coordinates [1,1] (or [0,0]) by boat or flying. "(incomplete read on 1map_texts)"

I believe you. Very strange.

Two different contributors (MetalliC and Meynaf) both reported it and both found different solutions

http://eab.abime.net/showpost.php?p=890976&postcount=493 http://eab.abime.net/showpost.php?p=533428&postcount=175

I did wonder about this "fix" as I always wondered where the text in the MetalliC fix came from?

Both in german and english I sailed to 0,0 (or 1,1 ingame) without problems. Also moved around the spot a bit. But maybe I already used the meynaf patch and it was fixed already?

Pyrdacor commented 3 years ago

sheet 2 : 24 added a new teleport event from map 362 to map 361 (9,11) facing north

Which file & sub-file was this (presumably another *Map_data.amb?) and what changed? Thanks

3Map_data.amb.

I copied your excel file to my repo and added columns for new notes and fix state: https://github.com/Pyrdacor/Ambermoon/blob/master/Disks/Bugfixing/AmbermoonPatches.xlsx

I added detailed notes for my fixes there.

I only found a completely missing teleport event on map 362. The stair triggers event 15 (0-based) but there are only 15 events. I added a new teleport event to map 362 which teleports to map 361 at 9,11 facing up. This feels natural in game. Located in 3Map_data.amb

Pyrdacor commented 3 years ago

I also fixed two wind gates (wrong images) and the button in bandit's cellar.

a1exh commented 3 years ago

3Map_data.amb

Subfile 362 decimal? (16A hex?) which bytes? Nevermind I will diff against the original.

I copied your excel file to my repo and added columns for new notes and fix state

Yes I noticed. I saw you added lots of details for other bugs. Map_data changes are the hardest for me write up how to fix. The notes ideally need to include file : subfile : offset : data. Thanks

I also fixed two wind gates (wrong images) and the button in bandit's cellar.

Yes I enjoyed reading your fix notes. It seems you know this game better than anyone ever has. Perhaps even more than Jurie.

a1exh commented 3 years ago

Is it worth looking at the Fan-made Ambermoon French translation by Dennis Lechevalier? He has done most of the work.

https://app.box.com/s/7908yy26qi12axbwga7v

Pyrdacor commented 3 years ago

3Map_data.amb

Subfile 362 decimal? (16A hex?) which bytes? Nevermind I will diff against the original.

I copied your excel file to my repo and added columns for new notes and fix state

Yes I noticed. I saw you added lots of details for other bugs. Map_data changes are the hardest for me write up how to fix. The notes ideally need to include file : subfile : offset : data. Thanks

I also fixed two wind gates (wrong images) and the button in bandit's cellar.

Yes I enjoyed reading your fix notes. It seems you know this game better than anyone ever has. Perhaps even more than Jurie.

Sorry yes the decimal 362 map.

I just fixed the plants on Kire's moon. This was pretty hard as I had to fix a lot of events in a lot of maps. I tried to document it a bit in the excel and german doc file.

Here is the essence of it:

The event which disables the plant event chain uses the wrong index and therefore disables the plant on the wrong map. Mostly map 306, 314 and 322 are target maps. There are 1 to 4 incorrect events on many moon maps. To find the location go through map files 300 to 335 (3Map_data.amb) with a hex editor and search for hex 0E 01. This sequence starts an action event which disables a specific event afterwards. 6 bytes after the found offset there is a word (2 bytes) which gives the event bit index. Leave the last nibble (hex digit) as it is. Adjust the first 3 hex digits to the first 3 hex digits of ((MapIndex-1)*0x40) in hex. Example for map 308: (308-1)*0x40 = 4CC0. So if you find 4C42 you replace it by 4CC2.

I fixed it in these maps (decimal map ids again, sorry):

- Map 308: Event 012
- Map 309: Event 012
- Map 310: Event 012
- Map 312: Event 012
- Map 313: Event 012 and 017
- Map 315: Event 012 and 017
- Map 316: Event 012 and 017
- Map 317: Event 017
- Map 318: Event 012 and 017
- Map 319: Event 012 and 017
- Map 320: Event 012 and 017
- Map 321: Event 012 and 017
- Map 323: Event 012, 017, 022 and 027
- Map 324: Event 012, 017, 022 and 027
- Map 325: Event 014, 019, 024 and 029
- Map 326: Event 014, 019, 024 and 029
- Map 327: Event 014, 019, 024 and 029
- Map 328: Event 014, 019, 024 and 029
- Map 329: Event 014, 019, 024 and 029
- Map 330: Event 014, 019, 024 and 029
- Map 331: Event 014, 019, 024 and 029
- Map 332: Event 014, 019, 024 and 029
- Map 333: Event 014, 019, 024 and 029
- Map 334: Event 014, 019, 024 and 029
- Map 335: Event 014, 019, 024 and 029
Pyrdacor commented 3 years ago

Is it worth looking at the Fan-made Ambermoon French translation by Dennis Lechevalier? He has done most of the work.

https://app.box.com/s/7908yy26qi12axbwga7v

I would love to include a french version but do you know what he changed and what (possibly new) bugs there are in this version?

a1exh commented 3 years ago

He will have changed every string in every file. Mainly *_texts.amb but also Monster_char_data.amb, Chest_data.amb etc.

He will also have changed the strings in AM2_* executable (which I presume is now in Ambermoon.net code?)

Yes it is likely he may have inadvertently added more bugs.

Possibly if the editor had rudimentary error checking you (or I or Dennis) could check them?

Dennis would also contribute by checking his work directly in Ambermoon.net I am sure.

Pyrdacor commented 3 years ago

3Map_data.amb

Subfile 362 decimal? (16A hex?) which bytes? Nevermind I will diff against the original.

This is a bit more complex to document. I had to do some things:

This time all values in hex:

Pyrdacor commented 3 years ago

He will also have changed the strings in AM2_* executable (which I presume is now in Ambermoon.net code?)

No I use the strings from AM2_* as well.

Possibly if the editor had rudimentary error checking you (or I or Dennis) could check them?

You could just try it in the remake and look if something crashes.

Dennis would also contribute by checking his work directly in Ambermoon.net I am sure.

Would be nice.

a1exh commented 3 years ago

While checking over old emails I noticed two bug reports from 2000 which never made it into in my spreadsheet :

  1. The ANTI-MAGIC SPHERE spell scroll weighing 0 grams, while all the other 100+ spell scrolls weigh 150 grams (chest_data.amb?)
  2. MURDERBLADE or DAGGER SLING display "Hands: 0" in the status window, even though they actually require a hand to be used. (AM2_*?)

Because I missed this report I never validated if either were true.

Pyrdacor commented 3 years ago

A question related to unfixed 43 (thalion office). I checked and indeed there are 2 additional texts. But there is no event whatsoever to show them. I could theoretically add two text popup events to show them. What do you think?

a1exh commented 3 years ago

I think that would be a good idea. The strings (at least in English) don't include anything that important but I think they were intended to be triggered.

kermitfrog commented 3 years ago
  • The occurences of PELANI were changed to PELANIS but iirc the real name of him is indeed "PELANI" and not "PELANIS". Am I right?

I don't think it matters as long as all references are the same. There are I believe 6 references in the v1.07 game. 3 are PELANIS and 3 are PELANI.

  1. NPC_char.amb : 01C : PELANI
  2. 2map_texts.amb : 1A0 : PALACE OF PELANIS
  3. 2map_texts.amb : 1A1 : PALACE OF PELANIS
  4. 2map_texts.amb : 1A1 : PLEASE ASK PELANIS
  5. 2map_texts.amb : 1A3 : PALACE OF PENANI
  6. AM2_CPU/BLT : PELANI'S KEY

In Amberstar (german), the character is named PELANIS, his house is "PELANIS? HAUS", where ? is 0xFD in MAP_DATA (I assume it should be an apostophe - but it's not displayed in game - probably a bug). There is also a statue of him with the text " PELANIS - 5. HÜTER DES HORSTES", so I assume the S is part of his name.

Pyrdacor commented 3 years ago

Ok will fix Pelani to Pelanis and Dwarves to Dwarfs. And add the two text popups in the Thalion office. ;)

Pyrdacor commented 3 years ago

New bug found: In Nalven's magical school in burnville there are 3 doors (2 trainers and the library). If you approach the trainer doors there is a one-time text popup which informs you how much a train would cost. The third door on the far right (the library) has such text popup event as well but the text index is set to 255 instead of 3.

In the original the text is just ignored but the remake crashes. This is how we found the issue.

It should be fixed to text index 3 to show the popup. I will do so. Map index is 290 (hex 122). The flawed event has index 7 (0-based). Map is part of 2Map_data.amb.

To fix it replace the byte at offset 0x07f7 with 03 (before it is ff).

Pyrdacor commented 3 years ago

So I fixed the Nalven bug and also added the two text events to the Thalion office which works quiet nice.

I will create a temporary version of the game data now which I integrate into Ambermoon.net. This is important to allow further game testing.

a1exh commented 3 years ago

I've found another set of bugs(?) that I had reported but couldn't confirm them as real bugs and never added them to my spreadsheet (until now sheet 2 : 61). The reporter was asking how to trigger certain NPC texts, what events or words made the NPC say the text. I wasn't sure if these were bugs or if the reporter wasn't very good at playing the game. Now you understand the datafiles maybe you can answer them? Or prove them to be bugs?

NPC_texts.amb : 036.amb (Brog)

  1. "YOU KNOW ABOUT MY LOVE FOR MAGIC. WHAT A SHAME THAT SO FEW OF THE PEOPLE HERE FEEL THE SAME!"
  2. "HOW HAPPY I WOULD BE IF DORINA RETURNED TO US!"
  3. "MY FRIENDS, MY PLEASURE ABOUT DORINA RETURNING TO US IS AT LEAST AS GREAT AS KIRE'S! AND HOW SHE HAS DEVELOPED HER TALENTS! TREMENDOUSLY WELL! AS I HEARD, YOU HAD A FEW PROBLEMS BECAUSE OF THAT ..."

NPC_texts.amb : 03B.amb (Drongeb)

  1. "DOREB, THE LANDLORD OF DOR KIREDON, ACTUALLY SUCCEEDED IN BREWING AN ENJOYABLE TYPE OF ALE FROM THE PLANTS GROWING AROUND HERE. WHAT ELSE DO WE NEED?"

NPC_texts.amb 03A.amb (Ketnar)

  1. "LOOK AROUND HERE! REMEMBER THAT YOU WILL LIVE ON THIS WORLD FOR THE REST OF YOUR DAYS! NEW PEOPLE ARE ALWAYS WELCOME HERE IF THEY ARE PREPARED TO LEARN INSTEAD OF FIGHTING BLINDLY."

NPC_texts.amb 043.amb (Gorban)

  1. "I OWE HIM MY LIFE! I AND MY FAMILY ARE DEEP IN HIS DEBT."

NPC_texts.amb 005.amb (Sandra)

  1. "I CANNOT THANK YOU ENOUGH FOR RELEASING MY DAUGHTER FROM THE CLAWS OF LUMINOR. SO I HAVE ASKED FATHER ANTHONY TO SUPPLY YOU AT HALF THE NORMAL RATES."
a1exh commented 3 years ago

The same bug reporter asked what event was associated with the word "TEST" in dictionary.english

I was sure it was written on a plate somewhere and you asked it in Spannenburg through the cellar of the Limping Rogue Inn at the Thieves Guild. That it was related to asking questions about "The test of Thieves".

But the reporter was certain the only person in the Thieves Guild who could talk was "Aman" and he did not respond to the word TEST.

I had every intention of trying this and confirming but never did and never added the bug to the spreadsheet (until today)

a1exh commented 3 years ago

And another from the same reporter. He couldn't find how to trigger these texts in the House of the Healers (Burnville). The text seems to imply it is triggered after completing Luminor's Tower? But he was certain it didn't.

2Map_texts.amb : 11E.amb (HOUSE OF THE HEALERS, BURNVILLE)

  1. IN THE BED BEFORE YOU LIES A MAN WITH SEVERE BURNS. HE MURMURS:^ "HOW CAN I EVER THANK YOU FOR FREEING ME FROM LUMINOR'S PRISON? A FEW DAYS LONGER AND I WOULD HAVE JUST BEEN A PILE OF ASH."

  2. BEFORE YOU LIES AN OLD WOMAN IN BED. ALMOST ALL OF HER BODY IS WRAPPED IN BANDAGES. HER FOREHEAD IS WET WITH PERSPIRATION AND SHE JABBERS AND CRIES DELIRIOUSLY:^ "NO, PLEASE, NOT THE RED HOT HOOK, NO, NO, NO!" PLEASE, YOU CAN TELL LUMINOR THAT I WILL NEVER SPEAK AGAINST HIM EVER AGAIN AND WILL ALWAYS BE HIS SLAVE, IF YOU JUST STOP THIS TORTURE." PLEASE, PLEASE.....!!"^^ A YOUNG HEALER COMES RUNNING TO HER BED AND TAKES THE WOMAN'S HEAD LOVINGLY IN HER HANDS. SHORTLY AFTERWARDS THE OLD WOMAN QUIETENS DOWN AND APPARENTLY FALLS ASLEEP. THE HEALER SMILES AT YOU AND SAYS:^ "OLD MERIL SUFFERED BADLY IN LUMINOR'S PRISON. IT WILL TAKE A LITTLE LONGER FOR HER TO BE ABLE TO LEAD A NORMAL LIFE AGAIN. BUT THAT IS STILL BETTER THAN DYING AT THE HANDS OF LUMINOR.^ THANK YOU AGAIN FOR RELEASING US."

Pyrdacor commented 3 years ago

I found a strange difference between the german and english original data: Mando's sword has magic weapon and armor level 0 in german but level 10 in english version. I would expect such a unique sword to have a higher level than 0 as it is quiet useless otherwise. But 10 is very high.

And here is where it becomes interesting: The guard demon which is normally untouchable seems to be only guarded by the high magic protection level. But in the english version Mando's sword seems to break through it. I only tested this in the remake (this is how I stumbled onto this).

Can someone please test this in the original version? If this is true you can defeat the guard demon with Mando's sword in the english version. But it would be hard as the guard demon has 8000 hitpoints.

Another interesting fact is, that the developers seem to have considered defeating the guard demon. Because if you successfully kill him, there will be some events triggered that disable the guard demon and the demon sleep event. This would not be added if the guard demon could not be killed imo.

a1exh commented 3 years ago

Out of curiosity are game saves compatible? Can you teleport in the remake with the Mando sword. Save and then transfer to the save file to the Amiga version?

Pyrdacor commented 3 years ago

Yes you can. They are compatible.

Pyrdacor commented 3 years ago

@a1exh New bug found (german and english): The wind gate at x=271 y=564 can be used even when it is broken. Of course you need the wind chain. Maybe this is also true for other wind gates (needs testing) but I confirmed it for the one I mentioned.

You won't be able to use the other end though (on the isle of winds) before repairing.

Pyrdacor commented 3 years ago

To fix this you have to set byte 0xAAC from 00 to 01 in Party_data.sav. Best fix it in the initial savegame (Save.00 and/or Initial folder).

a1exh commented 3 years ago

That is interesting because there was a bug report about that wind gate having corrupted gfx after they had been repaired (but you discovered that it wasn't). Perhaps the bug report should have been this wind-gate works before you repair them?

I don't know the game well enough, but is there anything special about this gate? Is this the one gate that should not be broken and work before they are repaired? (Because the destination is the isle of winds)

Pyrdacor commented 3 years ago

There are wind gates with wrong gfx. I found 2 and fixed them. This bug is a data error. The wind gate is not special. But it should not be usable when it is broken of course. This is controlled by a bit inside the savegame which disables the teleport event. But it is enabled in the initial savegame so you can teleport even if it is broken.

Pyrdacor commented 3 years ago

@a1exh About the golem that appears at 00:00 in temple of gala. A little bit more background.

First of all the character has type 'party member' (value 0) and not the random movement bit set. Both is encoded in byte 0x9A in map file 277 (0x115) in 2Map_data.amb.

All other golems are monsters with random movement. This means the byte is 06 instead of 00. So first you have to change byte 0x9A from 00 to 06.

But there is something more to consider. Non-monster characters without the random movement flag use a fixed movement path that has a position for each time slot of a day (every 5 ingame minutes). There are 288 of those slots (24 hours = 24*60 minues, divided by 5 is 288).

So the 'party member' golem has 288 positions stored in the map as well. The first position is indeed the correct map position where the golem should be. And the rest (287 positions) are just 0 (x=0, y=0).

The first time slot is the time at 00:00. This is the reason why the golem appears exactly at midnight as at this timeslot the position value is valid. At every other time the golem will move to x=0, y=0 which is outside the visible map.

This is the background of the mysterious party member golem. It was never intended to add a golem party member. ;) It's only a bug inside the data.

But back to fixing the bug. Changing the character type is not enough. The movement data has to be removed as well. Otherwise all following golems will be bugged! So monsters with random movements only use 1 position (the spawn position) instead of 288. So 287 of those have to be removed. Each position is stored as 2 bytes (x and y). So 574 bytes must be removed. They start at 0x154A. The first slot position at 0x1548 should be kept as it is already correct and is the spawn position.

If you're curious about where the golem spawns at 00:00 in the original. At x=29, y=15. ;)

Pyrdacor commented 3 years ago

I added a floor texture to the town of S'Angrila. To do so you just have to replace byte 0x07 in labdata file 0x22 inside 2Lab_data.amb from 00 to 09.

Pyrdacor commented 3 years ago

I don't know if this was already mentioned but there is a bug in the cellar of Mera's house (the witch house). If you go through the riddlemouth and walk into the large room with the cauldron the wall comes down. The problem is that the player gets often stuck inside the wall.

I think the problem is that the "wall down" event is triggered too close to the wall. To fix this or make it more secure to avoid the bug I guess the position of the events should be moved a bit more further from the wall.

The bug is shown in this german walkthrough: https://youtu.be/9hOzLmXjGnk?t=1347

Pyrdacor commented 3 years ago

NPC_texts.amb : 036.amb (Brog)

  1. "YOU KNOW ABOUT MY LOVE FOR MAGIC. WHAT A SHAME THAT SO FEW OF THE PEOPLE HERE FEEL THE SAME!"
  2. "HOW HAPPY I WOULD BE IF DORINA RETURNED TO US!"
  3. "MY FRIENDS, MY PLEASURE ABOUT DORINA RETURNING TO US IS AT LEAST AS GREAT AS KIRE'S! AND HOW SHE HAS DEVELOPED HER TALENTS! TREMENDOUSLY WELL! AS I HEARD, YOU HAD A FEW PROBLEMS BECAUSE OF THAT ..."

These 3 cannot be triggered in the current state of the game data. So yes they are unused.

Here is the background:

The problem now is that there is no event in the entire game which sets either variable 48 or 49 to 1.

From the context of the texts that are used when those variables are not set I am sure that these variables should be set by the Brog events themselves.

So for the first time he would say:

"OH, THE MAGIC! THE FASCINATION OF SECRET KNOWLEDGE! AS YOU CAN SEE, I DO NOT SHARE THE OPINION HELD BY MY HONOURED ASSOCIATES: MOST OF THEM THINK ANY KIND OF MAGIC IS NOT A WORTHY ART-FORM AND AT BEST THEY TREAT IT WITH TOTAL DISDAIN.^ HOW I LONG FOR AN EXCHANGE OF INFORMATION WITH COMPETENT SPECIALISTS!"^ ~INK 30~ HE BEGINS AN EXCITED CONVERSATION WITH THE MAGICIANS IN THE GROUP.

And

"DORINA'S DEPARTURE DISTURBED ME DEEPLY, ESPECIALLY AS MY BROTHER, THE HEALER, WENT TO DOR KIREDON AT THE SAME TIME. YOU SHOULD KNOW THAT DORINA HAS AN UNUSUALLY WELL DEVELOPED GIFT FOR MAGIC SPELLS AMONGST OUR PEOPLE.^ HER TALENT EXTENDED SO FAR THAT SHE COULD CREATE CONTINUOUS ILLUSIONS AND IMAGES. AFTER SHE PRACTISED WITH ME IT BECAME CLEAR THAT IF SHE CONCENTRATED TOTALLY SHE COULD ACTUALLY PRODUCE REAL MATERIALS BY MAGIC. KIRE HATED ME FOR THAT BUT SINCE THEY THINK I AM WEIRD ANYWAY, IT WAS DIFFICULT FOR HIM TO PUT PRESSURE ON ME.^ WHAT HAS BECOME OF DORINA NOW? OUR UNHAPPINESS CONTINUES SINCE WE WERE STRANDED ON THIS DAMN PLANET."

And then the global vars are set so that the other texts are used the next time.

I can add those events to the NPC when I got some more time at hands.