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

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

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #120 on: March 19, 2019, 10:54:25 pm »
I want to make the sleep ailment more dangerous. I've made it harder to wake up from than stun, and I made it use the death pose, have 'em all zonked out. I don't think I've EVER been put to sleep in the original game, so I'd like to see more enemies use it.

That doesn't really make sense to me.

Sleep is supposed to be less serious than stun.
I've always viewed the sleep ailment as just being put into a state of rest, that is why in most of the rest of the series you can wake up after taking a physical hit.

Stun, on the other hand, is actually paralysis in the original Japanese.
It is used for both the Hold and Stop spells and is most definitely seems intended to be the more serious condition.
Even the formulas that determine if you wake up each round support this with sleep being progressively easier to wake up from as your HP increases

Changing it to use the death pose sounds like a good idea. That does make more sense.

Not being put to sleep often was definitely not my experience, though I will admit that I remember clearly getting stunned a hell of a lot more often.

I think that changing sleep to not be dependent on max HP would be a good idea.
Maybe having a few more enemies cause it is fine too, as long as you don't go overboard.
However, I'd also suggest that you have physical damage remove sleep like in the later games.
But elevating it above stun seems too drastic, and potentially balance breaking.
And, honestly, stun is already annoying enough without piling sleep into that category.

Jiggers

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #121 on: March 20, 2019, 06:01:15 pm »
Currently, enemies have a 25% chance to recover from stuns, and a 10% chance to recover from sleep. Maybe that's what I was thinking of. Players have a 50% chance to wake, and 25% chance to get over a stun. I did do away with max HP helping with waking up.

Hm. You give a good argument. My thought was that sleeping is a deeper unconscious state, and that a stun was like a whack on the head that should be shaken off easier. But waking from sleep on getting hit is something I can and should do, so maybe the Bell could be like... Something to recover from a stun. Should it still be party-wide? Because its an ailment that you can randomly recover from, and turn order is randomized instead of more active-time, I was thinking it would just be double frustration to try and cure something when it gets shaken off the same turn--thus wasting two characters' turns. Whereas if it affects the whole party, you're using one turn to regain three. If it WAS an alarm clock type item, also, it could be set to occur on turn-end, so its more a pre-emptive use situation! Which would be more fun and clever than just being reactive to something after the fact.

(And that's my complaint about ailments in just about any game; its not just something that debilitates my stats, but its something that basically cancels not just one turn, but the turn needed to undo it as well, dragging out battles without giving a whole lot of strategy. Which is another point to Bravely Default, in that there were abilities that depended on enemies having those ailments, and ailments actually hit most enemies, making it a strategy that was sometimes BETTER than mashing the fight command..

I assume that's supposed to be Phoenix Down, but since you used the icon for down it ends up reading like "Down down"   :laugh:

Whups... yeah. I changed it to PhoenixF where F is the feather icon, and looks better now!

I got GitHub desktop installed (Windows 7), I just wasn't sure how to manage things with it. I'm going to work on getting the master thingy stable, since I'm making big, sweeping changes to the organization of the banks and everything, and then start working on updating all the little changes from there on out.

Thanks for the advice. :D
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #122 on: March 21, 2019, 02:20:26 am »
Currently, enemies have a 25% chance to recover from stuns, and a 10% chance to recover from sleep. Maybe that's what I was thinking of. Players have a 50% chance to wake, and 25% chance to get over a stun. I did do away with max HP helping with waking up.

Yeah, there is some wierdness with the recovery chances for these.
I think the most reasonable thing to have that is not far off from what the original code intended is for players to wake up from sleep with a base 20% chance + a bonus = Intellect/4.
The chance for an enemy would be the same except it would be a bonus from Magic Defense instead of Intellect because they lack the Intellect stat.
Stun should, IMO, be a fixed number of rounds instead of a percent chance to recover automatically.
That would require the use of few bytes of RAM to use as status counters.


Quote
Hm. You give a good argument. My thought was that sleeping is a deeper unconscious state, and that a stun was like a whack on the head that should be shaken off easier.

Thanks. I had a similar thought initially, but then I remembered a bunch of translation research I did for the game and verified that Stun is actually called Paralysis in the original Japanese text and that it is used as a stun, paralysis, and stop ailment depending on which element it is paired with.


Quote
But waking from sleep on getting hit is something I can and should do,

I support that 1000%.


Quote
so maybe the Bell could be like... Something to recover from a stun.

It would need a different name because of the variety of effects that the stun ailment represents.
What sort of thing could recover you from being knocked out cold, held in place, and negate time being stopped around you?


Quote
Should it still be party-wide? Because its an ailment that you can randomly recover from, and turn order is randomized instead of more active-time, I was thinking it would just be double frustration to try and cure something when it gets shaken off the same turn--thus wasting two characters' turns. Whereas if it affects the whole party, you're using one turn to regain three. If it WAS an alarm clock type item, also, it could be set to occur on turn-end, so its more a pre-emptive use situation! Which would be more fun and clever than just being reactive to something after the fact.

Affecting the whole party seems reasonable to me.


Quote
(And that's my complaint about ailments in just about any game; its not just something that debilitates my stats, but its something that basically cancels not just one turn, but the turn needed to undo it as well, dragging out battles without giving a whole lot of strategy. Which is another point to Bravely Default, in that there were abilities that depended on enemies having those ailments, and ailments actually hit most enemies, making it a strategy that was sometimes BETTER than mashing the fight command..

I agree.

Jiggers

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #123 on: March 21, 2019, 04:20:00 am »
It would need a different name because of the variety of effects that the stun ailment represents.
What sort of thing could recover you from being knocked out cold, held in place, and negate time being stopped around you?

Now that's something I never realized, different stun elements supposed to be different things entirely. Who knows, maybe I'll eventually get around to making a bunch of different ailments based on timers. I already have plans to make a healing spell that heals a bit per round, like regenerating enemies--would use the high bits of the Hidden byte, and subtract $10 every turn, then stop when it hits 0. There's definitely RAM space for some multi-purpose in-battle spell variables of that sort.

I completely broke the options menu. I think I just need to re-write it from scratch. Try to stick it in the Menu bank once I'm done with this.



Forgetting a spell works 100% now. There's 64 bytes after the key items for spells to be stored in their own inventory. I'll make it so buying a spell just puts it in the inventory (caps out at 4; why would you need more?) The Learn option doesn't do anything yet. I need to think of how the screen should look. Spells are 6 letters long, there's 30 tiles inside the box borders, and the cursor needs 2 tiles to not cover letters. I guess there's no helping it, though. The smartest thing to do would be to split it into White and Black magic screens, 4 spells per line, with 1 tile of space between, and have the cursor blocking some letters. Still need the space at the bottom to display things like "That spell level is full" and "you can't learn that"...

Meanwhile, items in the battle menus. 10 consumable items, but the limit is 8 per menu. My thoughts:
Screw the way FF1 does battle boxes for this. Put the names of items that exist into RAM and draw from an offset. 10 items x 8 letters, 1 space, 2 numbers, then line break control code that can be swapped with a terminator. $78 space in RAM, so the printing start point doesn't have to be stupidly far like it did with the main menu item screen. Then scrolling through items just uses the usual drawing routine. I think I should be able to handle that...
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #124 on: March 21, 2019, 01:14:45 pm »
A regen spell sounds like a great addition!
As for ailments, The game could really uses at least one more full set of 8 to flesh them out properly and eliminate the need for double duty status. I suppose the easiest way to do that would be to add a new spell effect that has a different set of status ailments.

What is the Hidden Byte? That isn't the Magic Defense byte, is it?

Love the WIP magic menu!
If you mean you can't buy more than 4 iterations of the same spell, then yeah, there's never going to be a need for more than 4 of any spell in any given play-through.

A few thoughts on the text layout of the magic menu...

I don't think you should worry about the cursor overlapping any text as long as it doesn't overlap the spell name it's pointing at.

Do you really need the spell charges to be displayed on the menu directly? The game already shows you your current MP on the main menu and it tells you if a spell has run out of MP when you try to use it as well.

(Come to think of it, this could be one of the reasons the series switched over to a single MP pool; so that it would be less hassle to display current and max MP on the main menu.)

Anyway, it might be better to move the current/max MP over to the status menu in order to save space here.

Also, you have that message box at the bottom to work with. Why not have it there permanently (maybe even expand it to go all the way across the screen) and use it to display the current/max MP as well as a a short description? Plus it might speed things up if it isn't rewriting the whole message box every time it needs to tell you something.

As for the actual spell inventory, splitting it up into White and Black magic is a good idea.

Another option is to do away with individual spell purchases.
You'd increase the cost of buying a spell (2x cost is probably a good median value) and then have it so any character can learn the spell by copying it from the inventory.
Now spells in FF would be more like how spell books are in D&D.
You buy a spell scroll and then any character, that can learn the spell, can copy it to their spell book.
The Learn command would add the spell, but not remove it from inventory.
The Forget command would remove the spell, but not add it to the inventory.
That way you don't have to worry about having multiple copies of a spell in the inventory.
Plus, it would help simplify the magic shops too.

On a side note: It might be a good idea to then also grey out spells on the shop lists that are already in your inventory. That way the player doesn't need to keep track of which spells have been purchased. And then when all the spells have been purchased you could have a message saying, "There is nothing more I can teach you."

You can also maintain the 3 column set up by manipulating the font palette in the inventory.
Display spells your job can learn for the selected level as normal, but the rest are grayed out.
That way you don't have to worry about fitting all the spells of a given level on one line nor restrict them to 6 characters.

Alternatively, you could try only displaying the spells that correspond to the level you selected to learn.

I agree with screwing the way FF does battle boxes! They are definitely too restrictive. Any improvement on that front is welcome.

EDIT:
Here's a list of all of the status ailments and element combinations:
Code: [Select]
Sleep    = sleep   + stun = sleep
Mute     = mute    + stun = mute
Dark     = dark    + stun = blind
Hold     = stun    + stun = paralysis
Confuse  = confuse + stun = confuse
Stun     = stun*   + stun = paralysis
Blind    = dark*   + stun = blind
Gaze     = stun    + stun = paralysis
Flash    = dark    + stun = blind
Snorting = dark    + stun = blind
Ink      = dark    + stun = blind
Dazzle   = stun    + stun = paralysis

[*these two use 'negative effect 2']
[-stun (the element) is basically the weak status element.]

Bane       = death  + bane = deadly poison
Break      = stone  + bane = petrification
Glance     = stone  + bane = petrification
Poison (1) = stone  + bane = petrification
Stinger    = poison + bane = poison

[-bane is basically the strong status element.]

Rub    = death + confuse = death
XXXX   = death + confuse = death
Squint = death + confuse = death
Toxic  = death + confuse = deadly poison (should have been bane element?)

[-confuse (the element) is basically the exclusive death element, kinda redundant really.]

Quake = death + earth = bottomless pit
Crack = death + earth = bottomless pit

[-earth is basically used to make flying enemies immune to ground based effects.]

Stop  = stun  + dark = stop
Zap!  = death + dark = banish
Glare = death + dark = death (should have been confuse element?)

[-dark (the element) is basically the time element.]

Sleep2 = sleep + none = sleep
Trance = stun  + none = paralysis

[-these two are the strongest status spells in the game because there is no way to prevent them.]

Here's a list of all of the double duty status ailments:
Code: [Select]
Hold   = stun  + stun = paralysis
Stun   = stun* + stun = paralysis
Gaze   = stun  + stun = paralysis
Dazzle = stun  + stun = paralysis
Trance = stun  + none = paralysis
Stop   = stun  + dark = stop

Bane   = death + bane    = deadly poison
Toxic  = death + confuse = deadly poison (should have been bane element?)
Rub    = death + confuse = death
XXXX   = death + confuse = death
Squint = death + confuse = death
Glare  = death + dark    = death (should have been confuse element?)
Quake  = death + earth   = bottomless pit
Crack  = death + earth   = bottomless pit
Zap!   = death + dark    = banish

As you can see, the usage of status ailments and elements in the game is a pretty big mess.
Much of it is artifacts left over from what amounts to copying the spells from old school D&D.
« Last Edit: March 21, 2019, 02:39:53 pm by Vanya »

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6784
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #125 on: March 21, 2019, 05:52:54 pm »
(Come to think of it, this could be one of the reasons the series switched over to a single MP pool; so that it would be less hassle to display current and max MP on the main menu.)
Switched to single MP pool for FF2, switched back to a per-level MP pool (with 2 digits) for FF3, and then single pool after that.
"My watch says 30 chickens" Google, 2018

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #126 on: March 22, 2019, 12:07:35 am »
Lessons often need to be taught twice before we learn.

Jiggers

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #127 on: March 22, 2019, 04:07:53 pm »
Hah! Like I'll ever learn!

It turns out spells are 7 letters long, not 6, so fitting 4 in a row was impossible. Fitting 8 in a column IS possible, though, so...

https://www.youtube.com/watch?v=dHZGsJkMJZo&feature=youtu.be

I made a movie showing the swapping. Its hard to tell, but pressing right and left is what changes the screens!



And I've since added arrows to show when you can swap.

The black and white orbs are only shown on this screen. There's really no room for them in the normal magic screen (at the moment; the idea of putting the MP in the description box is a nice one!), and they're unnecessary in shops (though there is room for one more tile in the shop listing.)

"What is the Hidden Byte? That isn't the Magic Defense byte, is it?"

Its not! Its just a random byte in character stats that is 0 or 1 to indicate they're hiding in battle.

I went for having spells vanish from the inventory on learning them to keep the game balance (whatever there is in FF1) intact. The price of the spells remains the same, one spell per character. I was going to call them scrolls, and imagined the mages whipping them out in battle to read off of, which is why they need to be in their personal inventory and not in whatever wagon of gear that's offscreen all the time...  :D So "Learn" and "Forget" were going to be "Scrolls" and "Remove" or something...
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #128 on: March 22, 2019, 05:23:19 pm »
Oh Haha! I took it to be a 'hidden byte', not THE Hidden byte. lol

That magic menu looks pretty slick. My only suggestion is to space out the columns more so the screen looks a bit more filled out.
Or maybe even split the large text box down the middle into two smaller vertical ones?

Something like this:


So each character has a personal inventory of spells?
You are still planning to implement job changing, right?
If so, you might want to consider reducing the spell prices.
If every character can potentially learn every spell in the game, it might take a hell of a lot of grinding to earn enough money to buy 32 spells at each town that has a full compliment of spells to learn.
« Last Edit: March 22, 2019, 05:40:16 pm by Vanya »

Jiggers

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #129 on: March 22, 2019, 06:40:35 pm »
I can see about doing the two boxes.

"So each character has a personal inventory of spells?"
Well, same as it was before--the spells they know. Otherwise, all the spells are in generic inventory, directly after key items in RAM.

"You are still planning to implement job changing, right?"
Muuuuch later, there's still a bunch of other things I want to do before I get bogged down with that! But, eventually. The menus and things would be easy, its the stat stuff I wouldn't know where to begin with. Take a dumb fighter and turn them into a black mage--do they keep the massive HP and lack of intelligence, and only gain the appropriate stats on leveling up as that job? Or would there be a need to make some kind of conversion code... ugh... I don't wanna think about all that!

"If so, you might want to consider reducing the spell prices."
Yeah, might do that for the later levels.

Run into a snag on this learning menu.



So each page is laid out like this. (I may have X and Y laid out wrong, I can never keep them straight. Should have called them Row and Column cursors.)



Spell inventory is like this in RAM. (Not those exact numbers, but each byte is a spell, and the number is just quantity)

Column cursor can be 0, 1, 2, 3, 4, 5, 6, or 7, but only 2 per page

Row cursor can be 0, 1, 2, 3, 4, 5, 6, or 7

I have an extra variable to use as well--pagenumber--which is 0, 1, 2, or 3. Multiplying that by $10 gives the row of RAM.

How would you use these three variables to get the right spell index?

Code: [Select]
LDA cursor                ; convert row to 1-based
    STA tmp
    INC tmp
    LDX tmp                   ; and put in X
    LDA cursor_max
    CLC
    ADC #1                    ; convert column to 1-based
    JSR MultiplyXA            ; then multiply row by column
    STA tmp+5                 ; stow result as inventory position
    DEC tmp+5                 ; then substract 1 to make it 0-based again
    LDX tmp+5                 ; put in X
    LDA inv_magic, X          ; check if the spell exists
    BEQ @NoSpell

My latest attempt, except I guess I don't really want to DEC tmp+5 all the time. Was doing the initial concept going off the fact that I'd need $8*$8 to get $40... and power's flickering so I'm gonna stop rambling and hope I explained my mistakes well enough!

Edit: Gonna try to AND $01 the column cursor so its only 0 or 1, then multiply by 8, add the row cursor, and add pagenumber*$10 and see if that does it.

Edit 2: Woo, that worked!

Code: [Select]
LDA cursor                ; load column cursor
    AND #$01                  ; AND to get either 0 or 1
    LDX #8
    JSR MultiplyXA            ; multiply by 8
    STA tmp                   ; and save for later
    LDA item_pageswap         ; get page number
    LDX #$10                  ; multiply it by $10
    JSR MultiplyXA
    STA tmp+1                 ; and save for later
    LDA cursor_max            ; get row cursor
    CLC                       
    ADC tmp                   ; add column (0 or 1 * 8)
    ADC tmp+1                 ; add page number ($00, $10, $20, or $30)
    STA tmp+5                 ; stow result as inventory position
    TAX
    LDA inv_magic, X          ; check if the spell exists
    BEQ @NoSpell
« Last Edit: March 22, 2019, 07:31:42 pm by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

abw

  • Full Member
  • ***
  • Posts: 232
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #130 on: March 22, 2019, 07:29:26 pm »
I can see about doing the two boxes.
+1 for splitting the columns; that makes it much more obvious that the level 3 spells are the left half of the list as opposed to e.g. the top half of the list.

How would you use these three variables to get the right spell index?
If you're willing to rely on having exactly 8 rows and at most 32 columns, how about this?
Code: [Select]
LDA column_index ; column_index values are in the range [0, 7]
ASL
ASL
ASL
; A = column_index * 8, C = 0
ADC row_index ; row_index values are in the range [0, 7]
; A = column_index * 8 + row_index, a.k.a. spell_index
TAX
LDA inv_magic, X ; check if spell exists
BEQ @NoSpell

Disch

  • Hero Member
  • *****
  • Posts: 2676
  • NES Junkie
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #131 on: March 22, 2019, 07:34:24 pm »
I've never had a problem keeping X/Y straight, but without a math or programming background I can see how you might mix them up.

One way to remember could be "horiXontal" and "Yertical"

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #132 on: March 22, 2019, 08:32:03 pm »
You don't really need more than 2 variables to get the spell index really.

Column is the spell level right?
So, row is basically the spell index within a given level.
The page index is only relevant to the menu.

I'll use the RAM index in the image you posted as the offset value; 0x50.

0x50 + (Column value x 0x8) gives you the index of the first spell in each level.

0x50 + ((Column value x 0x8) + row value) gives you the exact spell index the cursor is on.

So lets say you are on column 4, row 5.
That is the 2nd, L5 black magic spell. (in the vanilla game that is BANE)
That works out to $0x75 if my calculator are correct.


EDIT:
About what to do with the stats in reference to job changing.
I think you should keep it as simple as possible and just let the current job a character is using dictate stat growth only. That alone would make for a unique job system unlike any other Final fantasy game.
« Last Edit: March 24, 2019, 05:39:56 am by Vanya »

Jiggers

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #133 on: March 27, 2019, 08:17:22 pm »
I've never had a problem keeping X/Y straight, but without a math or programming background I can see how you might mix them up.

One way to remember could be "horiXontal" and "Yertical"

I think if I remember X is a cross and Y is pointing down, I can keep it straight, too. XD

+1 for splitting the columns; that makes it much more obvious that the level 3 spells are the left half of the list as opposed to e.g. the top half of the list.
If you're willing to rely on having exactly 8 rows and at most 32 columns, how about this?
Code: [Select]
LDA column_index ; column_index values are in the range [0, 7]
ASL
ASL
ASL
; A = column_index * 8, C = 0
ADC row_index ; row_index values are in the range [0, 7]
; A = column_index * 8 + row_index, a.k.a. spell_index
TAX
LDA inv_magic, X ; check if spell exists
BEQ @NoSpell

...this works perfectly, thank you! So much more elegant...

I think I finished up the magic menus and the shops. And then I forgot what I was doing and re-did all the equipment menus.



There's only 40 weapons done, so the next two on the list here default to the next item name. Armor and weapons do not share the same bags. Just like the magic spells, there's 4 screens of 16 items each. There's a 99 item limit. If you try to unequip a 100th item, you can't; but I also removed the Discard option entirely because... why would you need it. How could you possibly get 100 of the same thing and be in a situation where you can't just sell one?

So weapons and armor use up 128 bytes of RAM, and aren't sortable. So I deleted all my cool cursor-colour changing code. But now its easier to see when you miss an item, its like an item dictionary!

The equip screen changed functions a bit. Pressing A on an item unequips it, then pressing A on an empty slot opens the inventory. I'm not gonna make it so that trying to equip to the head slot only shows head items. Since it uses the magic menu layout I can add in a text box popup that explains why the error sound is happening on some items, either "[Classname] can't equip that!" or "Can't wear that in this slot!" or something.

I'll may upload another zip file soon so people can play around with the broken stuff.
I know exactly what I'm doing. I just don't know what effect it's going to have.

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #134 on: March 27, 2019, 08:38:53 pm »
Cool stuff. I think this more uniform way of using the bags is much better.
Did the spell index thing work out?

Jiggers

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #135 on: March 31, 2019, 02:19:21 am »
Cool stuff. I think this more uniform way of using the bags is much better.
Did the spell index thing work out?

Yep!

I'm 90% done with the items being used in battle. That is 9/10 items work as intended as far as I can tell! Now 100%??

https://drive.google.com/open?id=1I8ZKZfyf4ksomw1OHbf-zAFXbyNh9BGd (Updated March 31st, 8:15 EST)

Try it out!

Ethers don't work yet cause I need to make a new box for them. They'll behave like pures for now, if they work at all once selected (I haven't bothered trying.)

Ethers have their own extra menu to select the spell level. If you try to use an ether on a spell level that has no max MP, it will print "Nothing" and go back. Otherwise, it will try to work. There's some stack pushing/pulling shenanigans to make this all work, so if the game freezes... I gotta fix that immediately.

Messages for some items are wonky because I need to write some new messages for them. Smoke bombs say "Lev. up!" for instance; that's a placeholder.

If an item is ineffective, it will not play a sound, and will not use up an item, but it WILL still flash the target character's sprite.

Smoke bombs will put a living character into hiding, but not stoned or dead characters. They can also only be used in dungeons or towns (anywhere not the overworld), and turn off random battles for 50 steps. Its set in Constants somewhere--SMOKEBOMB_EFFECT--so it can be tweaked as preferred.

The Wakeup Bell will always use itself up, and will wake all party members.

Sleeping actually works to change their poses! It was... really not working before because I didn't understand what I was doing when I tried to make it, but now I do.

I don't know what bugs there might be anymore! Magic shops, weapon shops...? Menu stuff?

Oh yeah, don't touch the options menu! I re-wrote how the options menu works, in the back end. In the end the only thing I really needed to do was set the scroll after updating the battle text speed number... oh well. It uses less variables now, so I should go and clean those up a bit... Otherwise, for the player, it works just the same as it did before! Left/right change options, A acts the same as pressing right, all that.

As for how items are used on dead players... You can target any dead or stoned player with any target-able item, not just Softs and Phoenix Downs. With the ability to now revive in battle (magic needs to be updated for that still though!), I think its a risky but acceptable strategy to have a character try to use a healing item on someone who is dead, and hope that someone using the Soft or Phoenix Down gets their turn first. So, you can TARGET them, but they need to be alive for the item to work.

Also, Phoenix Downs give them 25 HP instead of 1. I think 25 is the lowest base HP to start with... Soft only grants 25 HP if they have 0 to start with. I couldn't remember how being stoned by enemies works--if it freezes them or changes their HP or what.

If you're using Mesen, I figured out you can change RAM by clicking on a byte and just typing in new numbers. So to test items out, you can give yourself different ailments or play around with how much MP each character has...



Green: HP (current and max)
Red: Ailments (01, 02, 04, 08, 10, 20, 40 -- death, stone, poison, darkness, stun, sleep, mute)
Blue: MP (left half of each byet is current, right half is max)
« Last Edit: March 31, 2019, 08:34:05 pm by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6784
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #136 on: March 31, 2019, 09:09:24 pm »
By "Work RAM" is that the console RAM (CPU $0000-07FF) or the cartridge RAM (CPU $6000-7FFF).
Be careful of writing data on CPU page $0100.
That is used for the stack and writing data too close to the bottom ($01FF) can corrupt things as the CPU uses that area for PUSH/PULL instructions as well as interrupts, etc.
"My watch says 30 chickens" Google, 2018

Jiggers

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #137 on: March 31, 2019, 10:50:57 pm »
I'm not sure how Mesen decides what Work RAM is, but its the MMC5's own little block, $5C00-$5FFF. It just says $0100 because the display starts at 0, I guess?

Another little update for tonight:
All the items should have their own messages now!
Heal and X-Heal: HP up!
Pure and Soft: Cured!
Ether: MP restored!
Elixir: HP and MP restored!
Eyedrops: Sight restored!
Phoenix Down: Revived from the brink!
Smoke bomb: Slipped into hiding...
Wakeup bell: The bell rings loudly...

I expanded the message box to be as wide as the battle screen, so that fixes the old bug Vanya pointed out ages ago, where the character names are too long after leveling up past 9 (I hope!)

Fixed a few other minor bugs I overlooked while saying everything was fine. (Options menu was treating every right press like a left press, actually.) Smoke bombs and Wakeup bells were broken after my last post, that's fixed now.

https://drive.google.com/open?id=1I8ZKZfyf4ksomw1OHbf-zAFXbyNh9BGd

I ran into way less issues with all this than I thought I would. Maybe these last 2 years of staring at the game's code is paying off...? I basically put the Ether function together without running any tests, and only one non-UI bug happened!
I know exactly what I'm doing. I just don't know what effect it's going to have.

Mari42

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #138 on: March 31, 2019, 11:56:16 pm »
There is a bug where as if I entered to town to go weapon shop to shop more weapons. So, I paused, went to equip the character, then suddenly I got stuck with equipment bag 2 where I can't get back to equipment bag 1. That's only AFTER I exit from the weapon shop.

Vanya

  • Hero Member
  • *****
  • Posts: 1379
    • View Profile
Re: FF1 MMC5 Disassembly Updates
« Reply #139 on: April 01, 2019, 03:43:35 am »
I can confirm that bug. After leaving either equipment shop, if you open the main menu and go to the equipment menu it takes you directly to bag 2. If you then exit the menu and reenter it, it returns to working as it should.

But...

There are quite a bit more bugs to squash. I can't seem to sell any weapons at all. it always tells me that I have nothing in my inventory.

Somehow I ended up with a Hand Axe in my inventory for no reason.

Buying armor doesn't add it to my bag. Equipping it directly seems to work fine.

I'll do more thorough testing tomorrow.

PS - Love the new menus!!