News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: FF1 MMC5 Disassembly Updates  (Read 70310 times)

Vanya

  • Hero Member
  • *****
  • Posts: 1489
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #400 on: July 26, 2019, 08:34:40 am »
Hey. My pc died again.
Mostly my own fault this time.
I think it might be time to get a new machine.

Good luck with the drain effect.

If you want to do any other spell effects, may I request a modern Barrier/Shell/Wall effect where it cuts physical and/or magical damage in half? Effectivity bytes could be 0 for physical, 1 for magical, and 2 for both.

Percentage damage spell effects like the Gravity spells would als be a great addition.

But I should ask, how much space is there for new spell effects?

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #401 on: July 26, 2019, 05:12:36 pm »
Drain effect works great, space wasn't an issue after all. Now just to remember to put the option into this project...!

I can look into doing those effects too, yeah!

I'll need to do a few things to my poison code as well, like having the character flash, and showing "Slain" when they die from it...

Bank C still has almost 900 free bytes!
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1489
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #402 on: July 31, 2019, 11:56:16 am »
Groovy!
I'm dying to get back into this project.
Grrrr... Stupid computer death crap.

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #403 on: August 19, 2019, 09:27:18 pm »
Here's something I'll add to this project once its working right:
Weapons having the ability to inflict ailments on enemies!

https://drive.google.com/open?id=1r8_sDoWdHwGeFNV0tbhVsvpICnxJdaAb

Here's the bank_C.asm file with all the code I've edited. There's a lot of other changes, not all of them documented well--I didn't expect this to need to be read by anyone else.

But there seems to be some difficulties in figuring out the proc rates? I can't find issues when I go through a debugger with it, but I don't have time to play through and test different combinations of weapon ailments, enemy resistances, weapon elements, and enemy elemental weakness/resistances... Apparently certain combinations of these make the proc rate super low, even if the player's base chance is set at #200 in the code.

Edit: It turns out due to the debugger not counting the header, and probably my own blindness, the wrong byte was being tested... and it turns out this all works!

To find the bits most important to the issue, look for "BNE @DoEnemyAilmentChance" and "STA btl_attacker_attackailment" (the one under "@SaveAilment:")

In this, the high 4 bits of the enemy's category are their resistance to weapon-inflicted ailments, while the low 4 bits are more what the original game uses categories for. So:

$8x = Enemy is resistant to Stone
$4x = Enemy is resistant to Confuse
$2x = Enemy is resistant to Stun
$1x = Enemy is resistant to Poison

Likewise, the weapon's category works the same, $8x being that it has a chance to inflict Stone on an enemy.

The original enemy vs. player chance calculations are there: Enemy starts with 100, it subtracts the player's magic defense, then rolls 0-200 and compares against that.

For players, they should have a base chance of #20 per hit, no chance if fighting Fiends or Chaos, and #1 if the enemy resists the weapon's ailment with their category high bits. Then it goes on to do the 0-200 roll and compare against that again.
« Last Edit: August 27, 2019, 11:58:57 pm by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1489
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #404 on: September 04, 2019, 10:55:24 am »
Cool beans!!

I'm still in the same boat for now.
But I wanted to pop in and say you're doing amazing work between this and the dynamic patch.

Hopefully I'll be able to get back into this soon.
Still want to try to get those ice tiles working. :3