It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
dtgreene: Someone decompiled Wizardry 1 into Pascal.
avatar
Sarisio: Pascal sounds nice, i worked with it a bit before. I am pretty sure Luck mechanics were greatly altered in Elminage, as Elminage has much more elaborated resistance system. I think Luck has effect on everything which is shown by Dice of Fate outside magic resistances as flat dice throws when I checked), on avoiding triggered traps and on nothing else.
Here are a couple nice gems from the Wizardry decompiled source:

First example, from the code for (MA)HAMAN:
CASE RANDOM MOD 3 * MAHAMFLG OF (* MAHAMFLG IS 6 OR 7 *)

Can you figure out what's going on here? Can you see the bug?

Second example, from the Identify routine (and famous enough to appear on Wikipedia):
UNTIL (ITEMX > 0) OR (ITEMX <= CHARACTR[ CHARX].POSS.POSSCNT);

Do you see what's going on here? (Note that bounds checking was disabled in the final build in order to save disk space.)
avatar
dtgreene: First example, from the code for (MA)HAMAN:
CASE RANDOM MOD 3 * MAHAMFLG OF (* MAHAMFLG IS 6 OR 7 *)

Can you figure out what's going on here? Can you see the bug?
With it being followed by:
0, 1, 2, 3, 4, 5: HAMCURE; (* 1? 2? 3? 4? 5? *)
7 , 8, 9, 10, 11: HAMSILEN; (* 8? 9? 10? 11? *)
12, 13, 22, 23: HAMMAGIC; (* 13?, 22?, 23? *)
14, 20, 21: HAMTELEP; (* 14?, 20? *)
6, 15, 19: HAMHEAL; (* 15?, 19? *)
17: HAMPROT; (* 17? DEAD CODE *)
16, 18: HAMALIVE; (* 16?, 18? DEAD CODE *)

Well, from what I see, as mod 3 from 6 and 7 never returns 16-18, PROT and ALIVE effects can't trigger.
avatar
dtgreene: Second example, from the Identify routine (and famous enough to appear on Wikipedia):
UNTIL (ITEMX > 0) OR (ITEMX <= CHARACTR[ CHARX].POSS.POSSCNT);
I assume there should be "AND" instead of "OR", otherwise 2nd part hardly makes any sense.
avatar
dtgreene: First example, from the code for (MA)HAMAN:
CASE RANDOM MOD 3 * MAHAMFLG OF (* MAHAMFLG IS 6 OR 7 *)

Can you figure out what's going on here? Can you see the bug?
avatar
Sarisio: With it being followed by:
0, 1, 2, 3, 4, 5: HAMCURE; (* 1? 2? 3? 4? 5? *)
7 , 8, 9, 10, 11: HAMSILEN; (* 8? 9? 10? 11? *)
12, 13, 22, 23: HAMMAGIC; (* 13?, 22?, 23? *)
14, 20, 21: HAMTELEP; (* 14?, 20? *)
6, 15, 19: HAMHEAL; (* 15?, 19? *)
17: HAMPROT; (* 17? DEAD CODE *)
16, 18: HAMALIVE; (* 16?, 18? DEAD CODE *)

Well, from what I see, as mod 3 from 6 and 7 never returns 16-18, PROT and ALIVE effects can't trigger.
Actually, that statement is missing parenthesis. It is being parsed as
(RANDOM MOD 3) * MAHAMFLG
and can therefore only be 0, 6, 12 for HAMAN, or 0, 7, 14.
avatar
dtgreene: Second example, from the Identify routine (and famous enough to appear on Wikipedia):
UNTIL (ITEMX > 0) OR (ITEMX <= CHARACTR[ CHARX].POSS.POSSCNT);
avatar
Sarisio: I assume there should be "AND" instead of "OR", otherwise 2nd part hardly makes any sense.
Well, guess what happens if you press 9 when asked which item you want to identify.
avatar
dtgreene: Well, guess what happens if you press 9 when asked which item you want to identify.
According to gamefaqs, it will trigger experience rain, and some other key presses trigger gold rains. Good Bad Bug :)

It slightly reminds me of bug I encountered in World of Xeen, if you switch between enemies in combat, you get additional EXP/Gold/Gem rewards. I didn't even see anyone mentioning this bug, guess I am too much into numbers, game mechanics and all that stuff.

What I found most hilarious about identify in Elminage/Wizardry (was it in Wiz5?) is "You touched it!" part. First time I saw that, I had all kinds of wrong thoughts.
avatar
dtgreene: Here is how the to hit algorithm worked in the origianal Wizardry:
So here go Vovalketer's Chance to Hit and other stats:

Vovalketer's Attacks:
1. Mork Cricketer:
Chance to Hit: +22.
Damage: (9 - 19) x 9. (81 - 171)
2. Vorpal Sickle:
Chance to Hit: +15.
Damage: (9-19) x 8. (72 - 152)

Base Chance to Hit: +10. (+4 from Strength, + 6 from Level.)
Base Attack Rate: 6.

Thus, -21 AC is required to minimize damage from this Floor Master.

So Base Attack Rate for monsters should follow formula: [Lv / 5] + 1. Rounded down.

Monster's Base Chance to Hit is either [Lv / 4] or [Lv / 5] + 1. This requires more testing...

HP variance looks different from first Elminage. E. g., Locust has 33 HP, and can die from 10 damage hit, so variance is more than 20%.
Post edited June 05, 2015 by Sarisio
From testing, that seems to be about right, except that there seems to be a minimum chance to hit.

(For testing, I used a Valkyrie equipped with an alchemized Pinpoint Shield to prevent beheading and used the (easy to overlook) Bifei spell. (Do you ever use that particular spell?)

Anyway, let's look at another enemy, the Archer Polete. (This is that one enemy that I was talking about in the first post of the thread. The Japanese Wiki mentions AC -45 to "prevent the attack".

Here are the relevant stats:
Level: 85
Strength: 32 (probably +10 to hit)
Weapon: Polyte's Holy Bow (+10 to hit)

[Lv / 4] would be 22, giving a total to hit of +42
[Lv / 5 + 1] would be 18, giving a total hit of +38
[Lv / 3] would be 28, giving a total hit of +48
From this, and considering the minimum hit rate (which feels like it's higher than it is in Wizardry), it seems likely that it would be [Lv / 4]. More testing, especially on higher level enemies, is stilll a good idea.

As for enemy hp, here are some tests using Song of Destruction against Avi (separate battles):
7, 5, 5, 5, 6, 3, 5, 6, 5

Immolarati testing against Avi (using a Cleric for casting and a Servant for restoring MP):
64, 38, 39, 71, 34, 71, 38, 75, 59, 38, 63

Another way to check an enemy's maximum HP (that does not suffer from precision issues) is to damage the enemy, than fail to draw the Sun tarot. The enemy will then be healed by an anount equal to its maximum HP.
Post edited June 05, 2015 by dtgreene
avatar
dtgreene: From testing, that seems to be about right, except that there seems to be a minimum chance to hit.
If it follows formula [Lv / 4] + 1, then there is + 1 base chance to hit at Lv1, which means 55% Chance to Hit 10 AC (0 Hit Chance is 50% accordingly).
avatar
dtgreene: From this, and considering the minimum hit rate (which feels like it's higher than it is in Wizardry), it seems likely that it would be [Lv / 4]. More testing, especially on higher level enemies, is stilll a good idea.
That one notorious hole has locusts and gremlins in masses, accessible non-random encounter. Locusts have 7 AC, Gremlins have 6 AC. In this game it is very easy to see when you reach Hit Cap, as even if you lack 1 Hit, you get very high % chance to miss at least 1 of your hits per attack. When moment of reaching Hit Cap for Locusts and Gremlins is registered, it will be very-very easy to derive base Hit Chance and how character level contributes to it (might differ per class).
avatar
dtgreene: As for enemy hp, here are some tests using Song of Destruction against Avi (separate battles):
7, 5, 5, 5, 6, 3, 5, 6, 5
I just had Locust die on me from attack for 9 damage. Looks like bottom value might be [MaxHP/4], but it seems like huge variance. Some monsters don't have HP variance at all according to database.

Hmm Archer Polete is yet another enemy, whose weapon isn't shown in database directly (it shows generic "Strike" weapon instead).

Also i now see why developers noted that AC is much more important in this game than in first Elminage, enemies in first Elminage go way beyond lv100, thus rendering AC useless (even though, game looks more generous with armor and weapon stats - all starter weapons have at very least +1 Hit, and some even have 2 Attack rate).

By the way, i discovered that Enterook Mista doesn't benefit from Spirit Contract. Being the player I am, I will have to live with Spirit Contract choice and not with Magic Essence (Enterook Mista is missing a lot)...
avatar
dtgreene: Strength: 32 (probably +10 to hit)
Give me time, today I will make stat table for Strength for 20+ with exact damage benefits (I hope hit benefits = damage benefits). Though last time i hex-edited char with 63 stats, he went out of control and was acting on his own (no negative status). Hex-editing stats looks slightly convoluted.
Post edited June 05, 2015 by Sarisio
So here are the results for Strength:
0: -5 Damage.
1: -4 Damage.
2: -3 Damage.
3: -2 Damage.
4, 5: -1 Damage.
6-15: No Effect.
16: +1 Damage.
17: +2 Damage.
18, 19: +3 Damage.
20, 21: +4 Damage.
22-25: +5 Damage.
26-30: +6 Damage.
31-35: +7 Damage.
36-40: +8 Damage.
41-45: +9 Damage.
46-50: +10 Damage.
51-55: +11 Damage.
56-60: +12 Damage.
61-63: +13 Damage.
avatar
Sarisio: So here are the results for Strength:
0: -5 Damage.
1: -4 Damage.
2: -3 Damage.
3: -2 Damage.
4, 5: -1 Damage.
6-15: No Effect.
16: +1 Damage.
17: +2 Damage.
18, 19: +3 Damage.
20, 21: +4 Damage.
22-25: +5 Damage.
26-30: +6 Damage.
31-35: +7 Damage.
36-40: +8 Damage.
41-45: +9 Damage.
46-50: +10 Damage.
51-55: +11 Damage.
56-60: +12 Damage.
61-63: +13 Damage.
If this is the case, then there isn't much reason to use an Ogre over a Dragonewt.

I believe this table applies to Vitality (hp bonus per level), Intelligence and Piety. It remains to be tested whether it applies to Agility. (Seeing whether 15 agility provides any initiative over 6 agility would be a good test.)
avatar
dtgreene: If this is the case, then there isn't much reason to use an Ogre over a Dragonewt.

I believe this table applies to Vitality (hp bonus per level), Intelligence and Piety. It remains to be tested whether it applies to Agility. (Seeing whether 15 agility provides any initiative over 6 agility would be a good test.)
Dice of Fate should show some relevant checks on attempt to run away from monsters manually (I think Agility check should be involved here), otherwise it is hard to check impact on order of turns. E.g, during Vovalketer testing I occasionally had first move on my chars with 18 Agility (Vovalketer has 26). Same for monsters with low agility, they still have chance to go first.