Page 3 of 3
Re: DM mechanics - Azizi through the mirror of dawn
Posted: Sun Aug 02, 2020 2:08 am
by Paul Stevens
Here is what I plan to release if I hear no objections in the next few days.:
Code: Select all
SetCharToPartyFacing(pChar);
obj_4 = RemoveCharacterPossession(pParam->charIdx, 0);
QueueSound(16, d.partyX, d.partyY, 1);
w_42 = sw(DetermineMastery(pParam->charIdx, 11));
pParam->attdep.shoot.range = pWeapon_18->uByte3 + pWeapon_22->uByte3;
/* 20200801 prs
* This line suffered a translation error (assembly -> c++)
* Error caught by Automaton on Dungeon-Master forum */
//pParam->attdep.shoot.damage = 2 * (pWeapon_18->word4 + w_42);
pParam->attdep.shoot.damage = 2 * ((pWeapon_18->word4 & 0xff) + w_42);
/* 20200801 prs
* This line was put here when I attempted to make the code
* a bit more self-documenting. It does not belong here.
* Error caught by Automaton on Dungeon-Master forum */
// pParam->attdep.shoot.damage = D4W;
/* 20200801 prs
* We used to use attdep.shoot.damage as the decay rate in the call to LaunchObject().
* Error caught by Automaton on Dungeon-Master forum
*/
pParam->attdep.shoot.decayRate = D4W;
pParam->attdep.shoot.success = 1;
CallAttackFilter(&filter, pParam, 1);
LaunchObject(
pChar,
obj_4,
pParam->attdep.shoot.range,
pParam->attdep.shoot.damage,
pParam->attdep.shoot.decayRate);
Re: DM mechanics - Azizi through the mirror of dawn
Posted: Sun Aug 02, 2020 7:11 am
by Automaton
Sophia wrote: Sun Aug 02, 2020 12:09 am
Interesting. I noticed this in DSB as well, but at the time I thought it was a bug in DM, not CSBwin.
I'll also point out that this issue has less of an effect than you might think because the "damage" value was of lesser importance (compared to the "kinetic energy" or whatever you'd call the fly distance) to the actual impact damage calculation.
Hi Sophia.
I thought he same for the first para. For the second, I patched the code myself to see what kind of damage it did, but was getting a measly 30ish damage on screamers and 1-3 on rockpiles. I looked a little further at the code, couldn't make much sense of it and surmised that the damage must go through some kind of dissipation math.
Cheers
Nick K
Re: DM mechanics - Azizi through the mirror of dawn
Posted: Sun Aug 02, 2020 7:40 am
by Automaton
Paul Stevens wrote: Sat Aug 01, 2020 6:08 pm
This code has undergone several modifications. Here is the original translation:
Code: Select all
//01c3ac 206e ffee MOVE.L -18(A6),A0
//01c3b0 3028 0004 MOVE.W 4(A0),D0
//01c3b4 c07c 00ff AND.W #255,D0
//01c3b8 d06e ffd6 ADD.W -42(A6),D0
//01c3bc e340 ASL.W #1,D0
//01c3be 3f00 MOVE.W D0,-(A7)
//01c3c0 206e ffee MOVE.L -18(A6),A0
//01c3c4 1028 0003 MOVE.B 3(A0),D0
//01c3c8 206e ffea MOVE.L -22(A6),A0
//01c3cc c07c 00ff AND.W #255,D0
//01c3d0 4243 CLR.W D3
//01c3d2 1628 0003 MOVE.B 3(A0),D3
//01c3d6 d043 ADD.W D3,D0
//01c3d8 3f00 MOVE.W D0,-(A7)
//01c3da 3f2e fffc MOVE.W -4(A6),-(A7)
//01c3de 2f0b MOVE.L A3,-(A7)
//01c3e0 4ead 042c JSR 1068(A5) (=0x017498)
//01c3e4 defc 000c ADD.W #12,A7
LaunchObject(
pChar,
obj_4,
pWeapon_18->uByte3 + pWeapon_22->uByte3,
2 * (pWeapon_18->word4 + w_42),
D4W );
At (Atari) relative address 01c3b4 you will see the 'AND 0xff' that you wanted
to see. It was clearly overlooked in the process of translation. Sorry about that.
My situation is such that I will probably have to abandon CSBwin soon. Because of that,
I will fix this little problem and release a new version of the source and executable.
As I recall there are one or two other changes (less important than this particular change)
that have been incorporated but not yet released.
Paul, if there is anyone who does not have to apologise for anything in their work, it is you. And Christophe. And Sophia. What you have all achieved is breathtakingly spectacular. If I, with my logic and rather feeble c++ skill, can spot one error amongst how many thousands or hundreds of thousands of lines of translated code, it is only because you guys and girls have done all the hard work.
Like Sophia, when I spotted this, I thought it was a problem with the original code.
Have to abandon CSBwin soon? Even if you stop developing CSBwin you can't abandon it. You did it, it's your baby, even if you never touch the source again, it's still yours and does not accept the word "abandon"
I looked at the fix you intend and it indeed seems healthy.
However, the unfortunate side effect is that, even when working, missile weapons still seem a bit pants
Cheers!
Nick K.
Re: DM mechanics - Azizi through the mirror of dawn
Posted: Sun Aug 02, 2020 8:56 am
by Paul Stevens
If I, with my logic and rather feeble c++ skill, can spot one error
Do not sell yourself short. What you have done requires skill and hard work.
Re: DM mechanics - Azizi through the mirror of dawn
Posted: Sun Aug 02, 2020 4:50 pm
by jayrshaw
Just thought I'd also throw my thanks out there to all you coding types for all the hard work you have done to keep this neat, old game alive!!
--Jay
Re: DM mechanics - Azizi through the mirror of dawn
Posted: Wed Aug 05, 2020 2:26 am
by jayrshaw
Hi all,
Just thought I'd mention that I just discovered that Ya Bro shield potions apparently provide some mild resistance against fire attacks (at least in the SNES version of the game). I accidentally ran into a pair of materializers without a fireshield up and discovered that when my group was hit with a fireball that the two characters in the back row (i.e., the ones who did not have a shield potion active) suffered ~20 damage apiece while my two characters in the front row (i.e., the ones with an active shield potion effect) only suffered single-digit damage...
--Jay
Re: DM mechanics - Azizi through the mirror of dawn
Posted: Sun Aug 09, 2020 5:47 pm
by jayrshaw
Hi all,
I just thought I would report on my experience using Ya Bro shield potions and Ya Ir party shield spells while fighting Animated Armors and Stone Golems in the dungeon. Basically, I'm just confirming Nick's initial findings that stacking the shield potions and shield spells can be very effective at reducing damage dealt by monsters in the dungeon.
Each time I fought an Animated Armor or Stone Golem in the dungeon I had two Mon level (i.e., Level 6) Ya Bro shield potions active on both of my front row characters and four Mon level Ya Ir party shield spells active. I found that the vast majority of the attacks by the Animated Armors and Stone Golems inflicted less than 30 damage on the targeted character. However, the Stone Golems and Animated Armors would also score hits in the range of 30-50 damage frequently enough to be worth mentioning. Also, one of the five Stone Golems I fought somehow managed to score some kind of critical hit that dealt more than 100 damage to one of my characters.
I don't think I ever encountered a situation where one of my characters lost more than 200 health or so fighting a Stone Golem or Animated Armor so long as I kept the Ya Bro shield potions and Ya Ir shield spells active. I should mention, though, that despite having my characters' stats buffed to 150 or so that it would still typically take nearly the full duration of my shield spells/potions to actually kill a Stone Golem....
--Jay