News:

SMF - Just Installed!

Main Menu

Recent posts

#11
Knights Discussion / Re: [Mod] Wand of teleportatio...
Last post by ImpassIve - May 23, 2024, 06:25:36 PM
An unofficial patch for Knights 27 release compatibility
#12
Knights Discussion / Re: [Mod] Living Armours
Last post by ImpassIve - May 23, 2024, 06:23:59 PM
An unofficial patch for Knights 27 release compatibility
#13
Knights Discussion / Re: [Mod] Rat rider v1.0
Last post by ImpassIve - May 23, 2024, 06:11:02 PM
An unofficial patch for Knights 27 release compatibility
#14
Knights Discussion / Re: [Mod] Heroes
Last post by ImpassIve - May 23, 2024, 06:05:05 PM
Heroes v1.2 is out

Just a maintenance update for Knights 27 release compatibility
#15
Announcements / Knights 27 Released
Last post by Stephen - May 23, 2024, 12:38:19 PM
A new version of Knights has been released!

This release makes the changes to potions and the staff that were discussed in the potion variances thread.

I have also updated the ENet and Lua versions and made some other minor changes.

This release will require an upgrade as the network protocol is incompatible with the previous version (unfortunately). Also the Lua change may require mods to be updated - see release notes.

Full details on the download page as usual.
#16
Knights Discussion / Re: Potion Variances (like on ...
Last post by Stephen - May 22, 2024, 03:53:26 PM
Today I have been working on the potion durations.

The way potions work, in my version of Knights, is that, at the point when a potion is drunk, the Lua code generates a random number, and that is the number of seconds that the potion is going to last for.

So the question becomes, how can we generate a random number that mimics the distribution of potion times that was present in the original Amiga Knights. In other words, how can we get a graph that looks like the red curve shown above.

After some messing about with spreadsheets, I figured out that the following rule gives a fairly close approximation to what the original Knights did:

  • With 34% probability: Set the duration to a random number between 1 and 90 seconds.
  • With 40% probability: Set the duration to a random number between 1 and 180 seconds.
  • The rest of the time (i.e. with 23% probability): Set the duration to a random number between 1 and 360 seconds.

This gives a graph that looks like the following:

graph3.png

As you can see, the green curve tracks the red curve quite closely, so the potion durations should feel much more similar to how they were in the original game.

Statistically: The mean potion duration is now about 95 seconds with a median of about 72 seconds. The probability of a potion lasting less than 5 seconds is approximately 3%, and less than 10 seconds is about 6 to 7%.

I did a similar exercise with invulnerability potions, making them much closer to the original game (invulnerability potions have a lot lower durations than the other potion types, of course).

I did not make any changes to the duration of poison immunity, or the duration of the other effects (like showing locations of enemy knights on the map), as I feel these are less critical to gameplay so it didn't seem to be worth spending any time on these.

Tl;dr: potion durations have now been changed to be more like the original Amiga Knights. Most potions will last about the same time as they did before, but the occasional potion will be a "dud" and last only a few seconds, and also there will be a small number of potions that last a lot longer than they did before (up to 6 minutes).

This was the last change I wanted to make for the time being, so I will probably do a release tomorrow.
#17
Knights Discussion / Re: Potion Variances (like on ...
Last post by Stephen - May 21, 2024, 04:45:20 PM
Update for today:

The staff change (point 3 on my list above) is done. The staff now behaves like the original Amiga Knights, i.e. it is dropped by default, but selecting the "fist" icon allows you to attack with it. The staff does zero damage without Strength, or 1-2 damage with Strength (but it cannot destroy furniture, even with Strength). It also stuns for a short time (more than a Sword but less than a Hammer).

The regeneration change (point 1 on the above list) is also done. There are now two different regeneration potions (with slightly different Potion Bottle colours). I also adjusted the Super potion to regenerate at the same rate as in the original game (i.e. slightly slower than it does currently).

Links to the GitHub commits (for those interested): staff change; regeneration change.

That just leaves number 2 on the above list (potion durations). I have some ideas about how to fix this (without having to reprogram everything!) and I'll post about that tomorrow.
#18
Knights Discussion / Re: Potion Variances (like on ...
Last post by Stephen - May 21, 2024, 09:14:54 AM
Hey there :)

Yes I finally decided to devote some time to Knights once again. I'm not sure how long I will be able to keep this up, but I at least want to keep the game "maintained" so that it still builds properly, uses up to date libraries, etc.

Glad to see that people are still watching the forums.
#19
Knights Discussion / Re: Potion Variances (like on ...
Last post by ImpassIve - May 21, 2024, 12:45:44 AM
Woah, hello there everyone!
I didn't realize that my RSS subscription to the forum went off a year ago, thus I definitely did not expect to see any recent activity here - especially the one with the new update and GitHub migration...

Stephen, just wanted to say thank you for all the great work you *were* and *are* doing here :)
#20
Knights Discussion / Re: Potion Variances (like on ...
Last post by Stephen - May 20, 2024, 06:29:05 PM
Hello Knight_Rider,

I have an update for you.

I've been doing some research on the original Amiga Knights (both looking at the source code, and experimenting in the actual game to confirm the results). I found the following:

1) Potion types:

There are indeed two types of regeneration potions. The "fast" regen heals you once every 5 "game turns", or 0.7 seconds (a game turn is 0.14 seconds on PAL Amigas - slightly different on NTSC). The "slow" regeneration heals you once every 15 "game turns" (or 2.1 seconds). (The "fast" version also shows as a slightly brighter shade of orange in the knight's Potion Bottle.)

However, I can only see one type of super, which corresponds to the slow regen potion (together with strength and quickness).

One thing that is interesting though is that the healing occurs on a regular, fixed interval - it is not relative to when you get hit. So, for example, for the "slow" regen, healing occurs on game turn number 15 (i.e. 2.1 seconds after the game started), then on game turn 30 (4.1 seconds after start of game), then game turn 45 etc. So if you got damaged on game turn 44, say, then it would appear as though your healing was very fast, because you would regenerate one point of damage almost immediately. Conversely, if you got hit on game turn 46, then you would have to wait quite a long time (almost the full 2.1 seconds) before the first point of regeneration kicked in. So I guess that might have caused the appearance of different "qualities" of supers, even though (from what I can see) there was only ever one type of super in the game.

I hope that explanation made sense :)

(In my version of Knights, there is only one Regeneration which heals every 0.75 seconds, whereas Super heals every 1.5 seconds. So neither is quite the same as the original game.)

2) Potion durations:

In Amiga Knights it appears that there is a 1 in 1000 chance of a potion expiring every "game turn". This slowly increases to a 1 in 600 chance as time goes on.

If we plot this on a graph, it looks like the following (horizontal axis = time, and vertical axis = probability that the potion is still active after that time):

graph1.png

(This applies to "normal" potions like strength, super, quickness and so on. I think invulnerability and poison immunity had different rules, but I have not looked into those.)

In the remake, the potion duration is just a random number between 11 and 110 seconds, which looks like the following:

graph2.png

So you can see, in the original Knights, there is indeed the chance for a potion to be a "dud" and not last very long, and this is not present in the remake. There was also a chance for a potion to last quite a lot longer, in the original Knights, than is possible in the remake.

3) The thing with the stick/staff:

Yes, you are completely right, in the original Knights, the staff could do damage when a super or strength is used.

This could relatively easily be fixed, although I would have to implement a time delay for people using the new control system (similar to what we did for dagger throwing) to prevent people using the new control system from having an advantage.

..

I'll post again later this week with some more info about how I plan to fix these issues :)