Pyrdacor / Ambermoon.net

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

Open issues #54

Closed Pyrdacor closed 3 years ago

Pyrdacor commented 3 years ago

I guess the bugs here are either fixed or not important or even the same in the original. For other bugs I will now use indepedent issues. This will be closed now.

kermitfrog commented 3 years ago

I finally tried 0.9b and soon after 0.9.1.

There are still a few bugs (if not specified otherwise, the same happens in both versions). This seems to be the best place to put them (creating an issue for each seems overkill)

Battles in the cellar were fine, but it got a little weird when encountering the first bandit:

Pyrdacor commented 3 years ago

Thanks for reporting. I will have a look.

But for the last point: It is also possible to attack in original with only a buckler equipped. The game only checks for "Attack > 0" as long as you can reach anyone.

Pyrdacor commented 3 years ago

I added the eye icon to chests and the the shortcuts for Yes and No buttons. The first one with the missing scroll is not reproducable on my end. It scrolls just fine. At the end you have to click twice to close like in the original.

Pyrdacor commented 3 years ago

I also can't reproduce the music stuff. On my end the right song plays and no crash occurs as the buffers are cleaned up everytime. Are you running on Windows?

Pyrdacor commented 3 years ago

@kermitfrog The critting bandit has the following reason. You detected that on battle start the monster values are set to a random value (0.95 to 1.04) of the max values. The bandit has a current crit value of 0 but a max value of 5 so he will have his crit set to something around 5.

Either this is not used for abilities but only for HP/SP and attributes or the data is wrong. I guess it's the former so I will remove the ability randomness.

Pyrdacor commented 3 years ago

I looked at the research thread and noticed a small detail I overlooked:

For all Attributes, Abilities, LP and SP: set max value = current value Then:

For all Attributes and Abilities:

But if this is the case I wonder why there are max values in the data. As I mentioned earlier the max values often have values that are multiples of 99. Maybe you can have a look at the code and find out how the max values are used before they are overwritten by the current value?

kermitfrog commented 3 years ago

But for the last point: It is also possible to attack in original with only a buckler equipped. The game only checks for "Attack > 0" as long as you can reach anyone.

Hm.. you are right. I thought the code checked for weapon type but was wrong.

I also can't reproduce the music stuff. On my end the right song plays and no crash occurs as the buffers are cleaned up everytime. Are you running on Windows?

Nope, I'm using Linux. I listened to it for a longer time and noticed that the tracks change. After cliciking "continue" in the main menu, the song just keeps playing. After a while, the song switches to the correct song and later restarts with the opening. If I change level, it restarts with the opening song, but the correct song will come eventually, so it seems the correct song is added to the buffer on each level change.

@kermitfrog The critting bandit has the following reason. You detected that on battle start the monster values are set to a random value (0.95 to 1.04) of the max values. The bandit has a current crit value of 0 but a max value of 5 so he will have his crit set to something around 5. & [..] But if this is the case I wonder why there are max values in the data. As I mentioned earlier the max values often have values that are multiples of 99. Maybe you can have a look at the code and find out how the max values are used before they are overwritten by the current value?

The value should only be modified if the random value is < 1.0. So if a monster has 50/80 in its data, the values are set to the following depending on the random value:

0.95 --> 48 / 50
1.0   --> 50 / 50
1.04 --> 50 / 50

I think the value is rounded down for LP/SP and up for anything else, but I don't remember that exactly.

I looked at the code again but could not find any use of the max values. At the start of the monster preperation function, memory is reserved, the base monster is loaded and copied to the new memory. Next all the "max" values are set to the "current" values. If the former max values are used, it must happen in a different function - but I did not find anything.

I suspect the max values may have been originally set as an orientation template for the desinging process. All the mosters resembling sentient races have max values matching a race & class (limits to match playable characters), while the others have 99 everywhere. Maybe they had some plans here that just weren't implemented.

Pyrdacor commented 3 years ago

@kermitfrog Can you please retest the issues with the test release of 0.9.3: https://github.com/Pyrdacor/Ambermoon.net/releases/tag/v0.9.3beta (or just the current commit as you want).

kermitfrog commented 3 years ago

Tested it and most bugs are fixed :) I checked the appropriate boxes (the one for crits, too - at least it did not happen).

The long text scrolling problem is still there. To be more precise: when the text is at it's end, I click. Now the mouse cursor is still showing the "click" icon and moving the mouse should scroll the text. What happens is that moving the mouse at that point only moves the cursor and not the text.

In 3 battles against a total of 5 bandits, 2 daggers and 1 robe broke. Not sure if this is within norm - have to look at the break chance and test more.

Yes/No shortcut works. Visual feedback would be nice.

Pyrdacor commented 3 years ago

Ah now I get the problem about the text scroll. Will fix this. I'll also check the button feedback. I'll add these two to the initial list.

Pyrdacor commented 3 years ago

About the item breaking. I guess those start items are very fragile. I remember that they broke quiet often but I am not sure if it is too much. The chance should be value / 1000 now.

Pyrdacor commented 3 years ago

I had a look. A dagger has a break chance of 2.5% and a robe 1.5%.

The question is now how many hits were dealt in those 3 battles.

A dagger should break on average within 40 hits, a robe within 67 hits. Considering 3 battles this would be around 13 hits per battle for the dagger and 22 hits per battle for the robe.

If the formula was wrong I would expect the dagger to break within 4 hits and the robe within 6-7 hits.

kermitfrog commented 3 years ago

I'm not 100% sure, but I think a robe just broke after a miss. Break checks should only be performed if the attack check succeeds. This would explain why it feels like items break too much.

Pyrdacor commented 3 years ago

0.9.3 should add the long text scrolling for items. And missed attacks will no longer check for breaking items.

A lot of other stuff was fixed as well. Hopefully not too many new bugs were added.

kermitfrog commented 3 years ago

Tested 0.9.3 and the bugs seem fixed :). But I think scrolling the text with the mouse is too fast - maybe slow by x2 or x3?.

A while ago we got a MS Surface, which is still running windows (but only until the pen works properly on linux -.-). So I tried the windows version to see if there are any issues with touchscreen / pen support. I didn't get to that part though because even the standalone version exits, telling me about missing openAL32.dll (after version/language selection).

On the first start of 0.9.3 on windows, I also had a weird bug where the window was smaller than usual - but the mouse cursor seemed to expect a bigger window size. This made clicking OK difficult, as placing the real mouse cursor in the lower right corner was barely enough to get the game mouse cursor on the left edge of the OK button. This seems to happen when there is no config file in the directory.

Pyrdacor commented 3 years ago

Yeah for now you have to install OpenAL manually on Windows.

I also stumbled onto the first time window size issue. Will have a look at it.

kermitfrog commented 3 years ago

Follow these steps to crash 0.9.3b:

Pyrdacor commented 3 years ago

Is hopefully fixed in 0.9.4.

kermitfrog commented 3 years ago

Yay! 1.0(test) :) The crash from 0.9.3b is fixed now, but I noticed a few new input issues with the numpad. I'll post them in #62

Pa9an commented 3 years ago

Hello, first of all, great work getting this marvelous game ported to Linux (and others) - loved that on Amiga and was the only RPG I actually finished back then :) (Now followed by Albion on Linux ;))

Now, after finishing Albion I gave the game a new start on UAE half a year ago - only to find out later that games saved there appear to work with your port!

So I tried one of them today with your latest v1.0 Test build and it worked - well, at least to a point where Nelvin, equipped with a stone slingshot shooting from 2nd row ran out of ammo. The game then crashed saying something like "exception: character used long ranged weapon without needed ammo". The window disappeared too quick to exactly take note.

Not sure if this has to do with the loaded save game or is a "true" bug. (Maybe you can answer if loading UAE saves is actually supported or not?) ...and sorry for the long introduction...

Pyrdacor commented 3 years ago

Hi . Thanks for the nice words.

Yes the savegames are 100% compatible. The crash you describe sounds like a bug inside the battle logic of the remake. I will have a look at it tomorrow.

Thanks for reporting.

Pa9an commented 3 years ago

You're welcome. Here's few more...sorry:

NPCs sometimes appear as the player sprite; here's few examples: Amb Amb2

Broken items (weapons etc) seem to be sellable as if they were not broken. (I kept a "collection" of broken items in a chest in order to have them fixed later in the game and sell them then for a higher price than the repair would cost). The merchant should refuse to take them when they are broken. Out of curiosity I still gave it a try - and he took them regardless.

Actually, when selling items to a merchant, the shop's items count of what you sold to him doesn't increase. If e.g. he owned one axe in his shop and you sell him 3 more, the count remains at 1. (I didn't try, though, if he may actually have the 4 axes then, but only the number shown at the item won't change)

Music is "droning" (hoffe das ist das richtige Wort für "leiern") sometimes. Especially in the Orc cave or in Freiherr Georgs house the music just doen't play/sound right.

In the crypt, when banning the undead with the (holy?) horn, they still leave behind their belongings. Should not only the ones that you actually fight/defeat leave that behind? Banned = gone? Or is it only the gold that you miss when they got banned?

Uukrull commented 3 years ago

NPCs sometimes appear as the player sprite; here's few examples: Amb

This also happens with the original Amiga version so I don't think it's a bug:

016

Pyrdacor commented 3 years ago

@Pa9an

All your reported bugs should be fixed in the most recent TestRelease.

About the NPCs looking like the player: As @Uukrull already mentioned, this is no bug. To be more precisely there are no sit or sleep sprites for NPCs at all.

NPCs only have sprites for standing/moving. The sprites for sitting and sleeping are always taken from the player sprites. I guess this was done to reduce space as you would need many additional sprites otherwise.

Fun fact: The only exception is the grandfather. As he is no real NPC that can move around he was implemented as a static map object. So he basically is part of the map. His sprite (upper part of the bed with the head) is therefore a map tile sprite. This sprite is different from the player's sleeping sprite, hence the different face. This is also the reason why cuddling with grandpa looks a bit weird as the head sprites overlap.

Uukrull commented 3 years ago

Thanks for all the fixes @Pyrdacor I tested all of them and seem fixed. Too bad I sold a lot of broken stuff (I didn't remember they couldn't be sold) and I feel like I cheated, so I'll have to start over :(

a1exh commented 3 years ago

Too bad I sold a lot of broken stuff (I didn't remember they couldn't be sold) and I feel like I cheated, so I'll have to start over :(

Throw away the same amount of gold that you would have spent repairing them?

Uukrull commented 3 years ago

Throw away the same amount of gold that you would have spent repairing them?

Where can I repair them? Anyway, I'm not too far from the start and the only time consuming moment was killing tons of zombies at the cemetery just to get money and experience.

Pa9an commented 3 years ago

Thanks for the fixes. Still need to test them out, was hindered by a crash now, though. After fighting Ghuls in the crypt the game crashed with "object reference not set to an instance of an object". Actually, one of the ghuls flails got broke, maybe there is the issue (as you just fixed broken items handling)? I tried twice, both times the flail broke, both times the games crashed. Quick fix?

Pyrdacor commented 3 years ago

Sorry won't have time today anymore. Fixed bugs like a berserk already. Tomorrow I'll have a look.

Pa9an commented 3 years ago

No worries :) Is there anywhere to download the previous 1.0 Test build, I think it was from last Thursday? Don't find it here on Github...or am too dumb to find it :)

Uukrull commented 3 years ago

I started over and encountered the bug in the first combat, after killing the lizard in the well:

Object reference not set to an instance of an object. at Ambermoon.Game.Update(Double deltaTime) at Ambermoon.GameWindow.Window_Update(Double delta) at Silk.NET.Windowing.Internals.ViewImplementationBase.DoUpdate() at Silk.NET.Windowing.WindowExtensions.<>c__DisplayClass2_0.b__0() at Silk.NET.Windowing.Internals.ViewImplementationBase.Run(Action onFrame) at Silk.NET.Windowing.WindowExtensions.Run(IView view) at Ambermoon.GameWindow.Run(Configuration configuration) at Ambermoon.Program.Main()

Saves.zip

Uukrull commented 3 years ago

After reverting this commit https://github.com/Pyrdacor/Ambermoon.net/commit/b4629ad42c16b2651bd84edf86ee278599370448 no more crashes here.

Pyrdacor commented 3 years ago

The crash after battle should now be gone.

Pyrdacor commented 3 years ago

No worries :) Is there anywhere to download the previous 1.0 Test build, I think it was from last Thursday? Don't find it here on Github...or am too dumb to find it :)

At the moment I replace the same release so there are no previous versions. I would create too many versions otherwise. But maybe I should release another 0.9.x pre-release with a relatively stable state.

Wickez commented 3 years ago

By the way, is the wind devil, wind howler, earthquake, and dissolve errors code or graphic related? If the second, maybe I could adjust/edit/manipulate the sprite sheet for these spells (I could even draw a new one or something)? Also, I can't remember does this happen in the original too (launched in WinUAE)?

Pyrdacor commented 3 years ago

No they are code related. The sprites are fine. I improved most of them already but thanks. Some just look a bit wrong or different from the original as I did not reverse engineer the spell animation code but implemented it on my own and made it as close as possible to the original.