Author Topic: What stops characters from learning magic early?  (Read 2459 times)

Fauntleroy

  • Architect of Kajar
  • Guardian (+100)
  • *
  • Posts: 184
  • Inclinata resurgit
    • View Profile
What stops characters from learning magic early?
« on: October 22, 2018, 07:47:08 pm »
So, after many adventures, I'm about ready to release my Schala hack to a small group for play-testing.

But during my current playthrough, something weird happened. Crono learned Wind Slash, but then also immediately learned *Lightning.

This did not happen when Marle learned Provoke, Lucca learned Hypno Wave, or Frog learned Slurp Cut.

Any idea what might have broken?

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: What stops characters from learning magic early?
« Reply #1 on: October 23, 2018, 02:27:10 am »
Techs are locked based on bitflags on 7F01E0. If that got set to 1, Crono would be able to learn *Lightning and higher.

Fauntleroy

  • Architect of Kajar
  • Guardian (+100)
  • *
  • Posts: 184
  • Inclinata resurgit
    • View Profile
Re: What stops characters from learning magic early?
« Reply #2 on: October 23, 2018, 07:55:56 pm »
This bug is in effect at the very beginning of the game, before any scenes or events happen whatsoever.

Any suggestions on where to look for the problem?
« Last Edit: October 23, 2018, 07:58:04 pm by Fauntleroy »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: What stops characters from learning magic early?
« Reply #3 on: October 23, 2018, 08:30:50 pm »
Possibly the events for the load screen or special purpose area.

You can go to an event page, select Loc Event > Decode All... to dump the events to text files, then do a find in files for 7F01E0.

Fauntleroy

  • Architect of Kajar
  • Guardian (+100)
  • *
  • Posts: 184
  • Inclinata resurgit
    • View Profile
Re: What stops characters from learning magic early?
« Reply #4 on: October 23, 2018, 09:05:27 pm »
Awesome.  I will try this tonight.  Thanks!

EDITED TO ADD: Well, the only place in all that code that this bit is set is during the Spekkio event, as it should be. So unfortunately I'm still stuck.

FURTHER EDIT: Did some experimenting. Here's what happens.

At start, you can get Cyclone and Wind Slash to appear on the Tech menu, when learning or learned, like normal. After you learn Wind Slash, the next Tech does NOT appear grayed-out.

Chrono can then go on to learn *Lightning and Spincut. However, neither of these Techs shows up as grayed out on the menu while you're learning them. So you don't know you're learning them until they're learned. And he won't learn any more after that until Spekkio.

So somehow, the game is letting Chrono learn four Techs before Spekkio instead of two. That's the problem.
« Last Edit: October 23, 2018, 09:34:42 pm by Fauntleroy »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: What stops characters from learning magic early?
« Reply #5 on: October 23, 2018, 10:02:32 pm »
Check 0x3FF951 in your ROM. It should be 02.

This appears to be the number of techs that can be learned without getting magic from Spekkio, one byte per PC.

Fauntleroy

  • Architect of Kajar
  • Guardian (+100)
  • *
  • Posts: 184
  • Inclinata resurgit
    • View Profile
Re: What stops characters from learning magic early?
« Reply #6 on: October 24, 2018, 07:00:38 pm »
I was so sure that was gonna be it, but... nope. It's already set at 02. And changing it to 00 or 01 had no effect.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: What stops characters from learning magic early?
« Reply #7 on: October 24, 2018, 10:44:52 pm »
Hmm...

Send me a patch of your current ROM.

Fauntleroy

  • Architect of Kajar
  • Guardian (+100)
  • *
  • Posts: 184
  • Inclinata resurgit
    • View Profile
Re: What stops characters from learning magic early?
« Reply #8 on: October 24, 2018, 11:00:40 pm »
Happy to oblige!

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: What stops characters from learning magic early?
« Reply #9 on: October 27, 2018, 05:41:16 pm »
This is more complex than I though. I'll keep looking into it.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: What stops characters from learning magic early?
« Reply #10 on: October 27, 2018, 11:38:24 pm »
Found it. 0xC1C0C should be set to 0x80. Hi-Tech was erasing this bit if the Control Header was changed.

I'll fix that shortly.

Fauntleroy

  • Architect of Kajar
  • Guardian (+100)
  • *
  • Posts: 184
  • Inclinata resurgit
    • View Profile
Re: What stops characters from learning magic early?
« Reply #11 on: October 28, 2018, 01:02:50 am »
Awesome Thank you so much!