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

Author Topic: Final Fantasy III Maeson Mix (Famicom)  (Read 13594 times)

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Final Fantasy III Maeson Mix (Famicom)
« on: April 15, 2015, 07:30:42 am »
Hi, I want to share a "little" thing that I made for personal use, but decided to see if other people could enjoy it... I'm a little nervous about sharing this, I don't know what reactions it will create.

Some days ago I asked in the "Hack Ideas" thread about how hard could be to edit the formulas for magic attacks on this game, and I didn't receive any answer, so I looked for a bit and found a page on Data Crystal with a little of information about it, so I started to tinker with the game to see If I could understand it.

I must say that I'm a total newcomer here, I did very small edits outside of graphical changes, (And even then I didn't release them because I doubt anyone wants to play a version of Super Mario Bros 2 with Youtube Poop characters from so many years ago that I did as a joke, or some palette changes in Pool of Radiance, lol).

Anyway, after some time seeing what each byte meant, I had made a patch that improves Black, White, and Geomancer Magic while nerfing the overpowered the High Summon spells. And then is when I thought:

What if I can make my "own version" of the game?

And that's what this "project" is: A series of patches that changes a lot of things in this game, from the Magic, to the classes stats, to equipment "overhaul", some convenience patches like one that rearranges commands to make them more comfortable, and such.

I even restored the dummied Dream Harp! Kind of funny to see a weapon with 0 in all it's stats, it throw me off guard at first.

My intention is to make more classes fun to play, and add variety to them in the equipment they can use so they can fill different roles.

For example, Geomancer has better stats, his Terrain is more powerful, he has more defensive gear to wear, some more weapons to equip, and his bells can be used to cause status effects, the Bard, which , besides better stats and equipment, he can use his harps to help the party or send enemies to sleep, or the Ranger now can attack from the back row with his bow and new boomerangs, or go close and use daggers and some spears if it's needed to, while having a small boost to his Spirit to cast better White Magic.

It took a bit (Well, maybe a bit more than that...) of patience, there was no info about this game besides of what Data Crystal had, so I needed to write everything I learned, and hex editing everything by hand. I don't know Assembly or that much about hacking, really. I only used Windhex for this.

Removed Link, it was too old and I'll upload it to RHDN soon.
.
« Last Edit: May 15, 2015, 08:49:25 am by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #1 on: April 15, 2015, 09:00:54 am »
It's a nice effort for someone who started from almost nothing. I assume you had enough info to locate some magic/item/character property tables and then experimented with the unknown/"unknown" bytes in them?

Editing tables like these is what modders typically do, either directly at offsets or with some tool. I'm not so interested in gameplay changes for this particular game though; I play it more for music and feeling than for pure gameplay. But sometimes opening a debugger is fun regardless of the purpose. So is there something you want to mod but don't know how?

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #2 on: April 15, 2015, 09:57:07 am »
Thank you for those words. Yeah, a good part of this was trial and error (like, to know how to find a certain shop, I needed to check every value for items until I got the list of items in that shop in the right order, and the look for it, for example), checking bytes to see what each one does. All there is to find on the web (Or at least, that I was able to find) is this:

http://datacrystal.romhacking.net/wiki/Final_Fantasy_III:ROM_map

Which is nice to start, much better than nothing, and while it has some little things wrong, it was so helpful, but of course this means you have to do your own list of each item with it's properties, and it's very interesting to see that they created a ton of bonuses for equipment that they never used, not even close.

I found that some weapons have secondary effects, that not even one guide knows about, or even spells that have weird elements when we thought they had others. It's kind of fascinating.

It's kind of funny to see so much work done here to not be used, or even known. There are no tools for FF3j, except maybe an enemy editor, that sadly seems to be glitched, it gives some enemies HP from what seems to be other enemies HP (For example, the boss Garuda gets more than 20.000 HP even if you don't touch anything), so I only had hex editors and offsets to help me.

I personally can't get enough of this game, that's why I started this. FF1 is great, but that game has a lot of atention already, and this one has a different feeling.

If there is something I would like to mod is, besides the Black Magic/Terrain damage formula , is the Steal data. The game has a Thief, but there's almost nothing worth of stealing.

The thing is that I can't understand how it works, I know each enemy has it's own byte for a group of items, and while I know which group has which items, I can't understand how those groups of items work, or even locate where they start exactly.

Curiously enough, there are groups like "Infite Elixirs" coded in. But then you give "Potion" to half of the enemies.
« Last Edit: April 15, 2015, 10:17:15 am by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

Vanya

  • Hero Member
  • *****
  • Posts: 1443
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #3 on: April 15, 2015, 04:26:12 pm »
Don't be afraid to share your work. Even if most people aren't interested in it, some will. Plus experimenting with the data in the games can lead to new discoveries that could increase interest in the game. As long as you had fun doing it that's really all that matters.

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #4 on: April 15, 2015, 04:59:30 pm »
Thank you. Honestly, sharing things I make is not my strong suit, i'm always afraid of it not being that great.

And I know there isn't going to be that much interest, if people where interested in FF3j, there should have been any kind of hack similar to this already (Although that's maybe because there was no much info to go with) like the tons of hacks for FF I or IV, but after all, this started as a personal thing made for my own use, if it ends up making someone else's day the better!

What I don't know if it's worthy of being uploaded to Romhacking.net. I guess I'll wait to see what happens.

I had fun looking into this, and i've learned a bit of how things work or what I could do to make the classes more fun to play with the limits I have, and I took a lot of notes in case someone tries to do something with this game.
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #5 on: April 17, 2015, 08:13:10 pm »
If there is something I would like to mod is, besides the Black Magic/Terrain damage formula , is the Steal data. The game has a Thief, but there's almost nothing worth of stealing.

The thing is that I can't understand how it works, I know each enemy has it's own byte for a group of items, and while I know which group has which items, I can't understand how those groups of items work, or even locate where they start exactly.

Curiously enough, there are groups like "Infite Elixirs" coded in. But then you give "Potion" to half of the enemies.

I tried to find the magic damage formula briefly, but I couldn't see INT being used for anything by the game, at least in the simplest way. I'll look at it more later. What is the offset for the spell power of "fire" spell?

Steal items I didn't look yet, but from the datacrystal page I wonder if drops and steals are the same. So changing one would change the other as well? That wouldn't affect the thief class only, but all drops then.

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #6 on: April 18, 2015, 04:26:22 am »
If you're talking about the first spell for Black Magic, it is this:

Offset: Fire Spell, Level 1 Magic
61A58  10 64 19 00 00 08 00 2F

Byte 0x0 - 10 is the element, in this case, Fire.

Byte 0x1 - 64 is the % of hit, 64 being 100% obviously.

Byte 0x2- 19 is the spell power, in decimal should be 25 if my brain works today. Offset is 61A5A.

Byte 0x3 - 00 Is the type of spell, in this case  is "normal damage" type.

Byte 0x4 - 00 It seems to point to the target status, but I didn't play with it enough.

Byte 0x5 - 08 This is used to know what kind of targeting does, like, for example, 08 means is single target, but you can multi target it (By dividing the damage between the number of enemies), or 4F which is "Attack all with full damage" for example.

Byte 0x6 - 00 Data Crystal didn't know what it is, but it actually changes the animation for spells! If you change it to 02 it will simulate a Quake animation using the original spell's sprites , and while it look garbled it won't screw up the game. Kind of fun to play with. 03 is the Meteo animation, and so on. 00 uses normal animation.

Byte 0x7 - 2F is the class usability Index, which I didn't touch at all, each level of spells has it's own value.


About the stealing/drop thing, I though the same, but when I looked into it, well...

http://shrines.rpgclassics.com/nes/ff3/enemiesp.shtml

Enemies seem to drop and carry different things, so no luck there. But now you gave me an idea: I'll try to see if those A6 values I see around 21B30 and 21B90 could be the Potion item, because there are too many A6 there, and there's too many potions as monster's steal items , maybe changing them for something easy to see like a piece of equipment will work in some way.

-SUPER EDIT- It ends up, I was right! I never thought it would actually work, what the heck...

Changing the byte in 21B91 (A6) to anything else (I used 37 -Masamune as an example) will give you that item while stealing Goblins! Although, you still steal potions, so they must have several slots with Potions to steal.

It's kind of weird, for example Goblins use 21B90, 21B91, and 21B92. The three have potions, and you'd think that you can change them into anything, but it seems that the game can ignore one of them if it doesn't find a Potion to steal depending on what item is in each slot.

If you put three different things in each slot, maybe the middle one is ignored in favor of Potion. But, if you put something in 21B90 and 91, you may steal them alongside the Potion on 92.

Which I guess it means that one, Maybe I modified Item Group 20, which only give Potions, or two, every Item Group reads several offsets and if I change one thing, every group that has that thing will change. I need to keep trying. Thank you so much.

-EDIT 2- You were right too, Drops and Steal items are the same, a Goblin just dropped a Masamune (How broken is that?) That's pretty interesting....

You can even get several items at once , I just got a Dream Harp and a Masamune in the same fight as drops, and the chance of dropping the items is okay. The thing is that very few enemies leave items when defeated, so it will be tricky to see which ones i give something, but that's another question entirely.

And thank you for taking your time for looking into it too. You don't have to, really, and if you don't see anything it's no problem, so don't feel obligated.

PS: The animation thing is something that surprised me. Even weapons have an animation bit and you can do crazy things with it, like changing axes' or spears' animation to boomerangs, and you see the actual sprite rolling around the screen doing circles.

The game seems very "resistant" to this things, even if you screw up the spells the game won't crash, it just do whatever the values say and continue, even if it's nothing at all or the effect doesn't exist (Like stealing, if you point to a value that it's not valid it will just say "Can't steal" and the game continues like nothing).
« Last Edit: April 18, 2015, 07:27:28 am by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #7 on: April 18, 2015, 03:20:47 pm »
Okay, seems like we can deduce a fair amount of things from that page & the monster table in the ROM.

The drop index byte is simply split, part of the bits mean one thing and others other things. As you can see, by default you can steal whatever the monster drops; if the monster drops nothing (00), you can still steal a potion by default. Special code 0A that bombs have allows you to steal certain things without drops. Special codes FF, FE, FD (guess it is hardcoded huh..) cause them to drop ..stuff.. with elixir stealing. Still haven't interpreted how the item list maps to an item, and what the probabilities are.

For drops, for selecting what "item list" a monster dropIndex maps to, only the 5 rightmost bits (byte AND 1F) seem to matter (by default..). A goblin's 20 will be ANDed with 1F, resulting in 00, and by default the code assigns the following group of "indexes":

A6 A6 A6 A6 A7 A7 A9 A8  (because 2^5=32, no more than that amount of different groups like this, as they don't seem to overlap)

By default it seems to pick 8 bytes like this. By default the group is selected at offset 21B90+n*8, where n is the number that the 5 rightmost bits from the monster dropIndex forms. (for goblin, 0*8=0)

But that's just what the code says  :P. And this code part was just about drops, not about stealing.

edit: to clarify, 6th bit from right maybe determines whether there are drops or not, 0x20 = 0010 0000 <- that bit, so that's why bombs wouldn't drop things

Yep, rock gargoyle has the same items as a bomb, but it can drop, and its dropIndex is 0A+20=2A
« Last Edit: April 18, 2015, 04:00:18 pm by STARWIN »

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #8 on: April 18, 2015, 04:37:15 pm »
Interesting! Although that stills goes somewhat over my head, lol.

So whatever is in 21A90 is the Drop index... No wonder I didn't understand a thing at first, I thought it as the stealing data. I'll take a look at it. Although if it is hardcoded, I don't know if I could manipulate the drops like the steal part can be.

A couple of stupid questions of mine:

You mention the Goblin 0x20, that should be the last part of his Monster Data:

60010 01 05 00 00 00 00 00 00 00 40 00 00 00 00 00 20

That 20 is the pointer to the Item group 20, in the offset: 21BD0

If you change it for another thing it will just point to another group

Does that mean that each pointer has it's own forced drop data just because of the value it has?

Could be a way to make any group to drop every item in itself, then?


Anyway, I've being looking at the Steal thing more than anything, and I know that:



This is where all the Stealing items (And therefore, drops) are stored.

Each group is formed by four values, A6 A6 A6 A6, is Potions, and 39 39 39 59 is Onion Swords x3 and Onion Shield; for example.

I've been writing what each of those groups have, which is the Monster value/pointer that each group has, I can recognize most of them comparing the guide's info to the table, there are some that are not used (there is FenixDowns steal data that never got used, what a slap in the face, lol), and all those 00 00 00 00 are usable too, I tried, so there is quite a bit of space for adding things!


I think I can make a decent list of items to steal or Drop (If I can understand it right, of course, i'm pretty damn noob still).

Thank you so much for this info!
« Last Edit: April 18, 2015, 04:55:28 pm by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #9 on: April 18, 2015, 05:59:17 pm »
Put windows calculator (or whatever you have) to hexadecimal mode, and write the last monster data byte there. Then change it to binary mode.

20 will show up as 0010 0000. Each sequence of bits inside this byte has its own meaning:

PPPp pppp

ppppp <- these you can use to select which 8 byte item group a monster is tied to. It shouldn't be a 4 byte/value group like you suspect. Not sure why this is so.
PPP <- probability and possibly quality of item drops. 0=cannot drop, 1=regular drops (cannot pick last 4 items?), more=higher probability of a drop, possibly allows 4 later items.. it's a pain to confirm from the code though if so

Haven't decoded the first 2 bits yet, but at least one does something special with the dragons who drop/steal different items. Edited my current guess in.

Also, the first group "Item group 20", which is actually just group 0, starts at 21B90 I think, not 21BD0. It's good that you can decode the actual items, I don't know them.

With calculator between hex/binary, you can check what the relations between monsters and items are supposed to be, though it's probably what you already figured out.

The 39 39 39 59 you mentioned are in the 2nd part of the 8 byte group for dragons, A7 A7 A9 A8 is the corresponding goblin one, which isn't necessarily used for anything at all (??).

There is a probability distribution like this in the code, after it has decided (per monster, I think) to drop something:

A = random?
if A < 30 item 0
if A < 60 item 1
if A < 90 item 2
if A < C0 item 3
if A < D8 item 4
if A < F0 item 5
if A < FC item 6
else item 7

So the first four items are equally common, but the 4 later slots get more and more rare. Though if my current guess is right, it's weighted random; it's forced to stay relatively low via some number madness, and you can adjust it with the P bits. Quick testing supports this.

So currently it looks like you can have a few different types of monsters:

Steal up to 4 different items, and drop nothing. (4 first bytes out of 8 matter, last 4 aren't used) (set P to 0 and p points to these 8 bytes)
Steal up to 4 different items, drop these same items. (4 first bytes matter, set P to 1)
untested: Steal up to 4 different items, but can drop a bit more? (when P is between 2 and 6, I think these weights are unused currently)
Steal up to 4 different items, drop these and more. (4 first bytes matter for steal, 4 last bytes drop-only)

p=0 points to 21B90, p=1 points to 21B98 and so on.. up to p=31, after which all 5 bits are used. in binary from 00000 to 11111
P ranges from 0 to 7. in binary from 000 to 111.

Of course if something doesn't work or is unclear, ask. I just wrote this while figuring it out, so it's not always most coherent yet. And everything about stealing is a guess.

By the way, with masamunes and potions, at least the drop code doesn't do anything special with the different item slots (like ignoring something), it just follows the skewed probability distribution earlier AFAIK.
« Last Edit: April 18, 2015, 08:10:03 pm by STARWIN »

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #10 on: April 19, 2015, 05:05:11 am »
WHOOPS! I meant 21B90, what a stupid typo, sorry!

Yeah, Item Group 20 is the first one, but for the sake of being less confusing, I name each group as it's byte value in the monster data.

I can copy the item list here if you need it, thankfully it uses the same values as the item shops or chest items, which is why It was easier to find what each group has, and they only have usable items making it is easier to figure than equipment.

About stealing and item slots... It seems that the groups really have limitations of some sort, or the Steal skill and it's level acts weird, because if I put more than 2 different items on them they won't show up... Or even if it is just 2 items and none of them is a potion/HiPotion.

Let's say that you want to make the Item Group "Whatever" have, I don't know, Loki Harp (49) and Meteo Magic (C8).

It doesn't matter in which order ( 49 49 C8 C8/ C8 C8 49 49 / 49 C8 49 C8, whatever) you put them, you'll get just one or the other. never both. If you change any of those four to a potion, A6, you then will be able to steal one of the items (depending on which slot it is) and potions too.

I can't understand it. Some groups supposedly had to be designed to have up to 4 items, yet when you try to change it, it locks itself into "just one, or one and potions". Maybe it creates some incompatibilty problem?

At the same time, if you put less "important" items, like Hi Potion, Magic Keys and Pillow in the same group, you can steal the three. So I don't know anymore.

Looking at the FF Wiki, it seems that the Steal command is going to be a little pain in the ass, because depending on the Skill Level of the Thief, the item you will stole changes. Yet I have 4 Thiefs, each one with a different level range and they seem to steal always the same.

I guess that I have to make enemies carry nothing more than one important item. Oh well, at least I still have enough space to give some weapons and armor to them, and make stealing at least useful here and there, because now that i'm thinking about it, I could force players into having always a thief, and would go against my first idea of giving more freedom to use whatever you want.

I'll see what I can do. This is by far the most confusing part since I started, and thank you for your help as always, it has been proven very useful !

PS: Now that you mention asking, Where should I start looking for the Magic Attack Multiplier?

These are the supposed formulas:

Spoiler:
Black Magic Attack Multiplier = (Intellect/16) + (Level/16) + (Skill/32) + 1

White Magic Attack Multiplier = (Spirit/16) + (Level/16) + (Skill/32) + 1

Call Magic Attack Multiplier = (Intellect/8) + (((Skill/8)*3)/2) + 1

It would be useful to know how to modify the Intellect/16 Spirit/16 and most importatnly Skill/32, maybe that way I can improve healing magic, which I find it's a little lacking in the last part of the game, and the grinding for mages in general, but I don't know where to start looking or if it's there at all.

-EDIT- I made a new patch which changes pretty much all of the enemies' stealable items (Andr drops) so 80% of them didn't have just potions, now there is some variety to them, and I also added stealable weapons and armor (And even a couple of spells) thanks to the free space that there is in the table.

Pretty much all of the equipment is late game stuff, so I gave them to enemies you can fight during the second half of the game. No bosses have equipment to steal because that would force the player into having a thief in the party and would not be fun for some.

Every piece of equipment can be adquired as a drop after a fight by the same monster that carries it to steal, too, so even if you don't want to have a thief, you can get them (Although slower, the Thief needs a Positive point in something, lol).

I can't thank you enough, STARWIN, for making that possible.

I think now I'll increase the HP of normal enemies, some of them are ridiculously low. But that can wait, I'll tired of seeing hex right now.
« Last Edit: April 19, 2015, 12:24:39 pm by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #11 on: April 19, 2015, 01:19:02 pm »
Yeah, Item Group 20 is the first one, but for the sake of being less confusing, I name each group as it's byte value in the monster data.

Okay, but values 00, 20, 40, 60, 80, A0, C0, E0 all point to the same item group. This should allow you to have goblins that only drop potions, and upgraded goblins that would drop better and better items from the same group.

I'll look at stealing at some random point in time.

If you want to look for magic damage formula, you would have to understand 6502 asm and be able to use FCEUX debugger. But otherwise I'll look at that later - changing a formula like that should be fairly easy, especially if it is enough to divide by some other 2^n number instead of the current ones.

If you want stealing to have some unique, but non-missable benefit, you could use P value 0 (group value <20) for some tough but ordinary opponent that can be found somewhere to make it non-droppable. Of course you might have a better idea after I have looked how stealing works, though by experimenting you can sometimes acquire about the same info that can be read from the code itself.

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Maeson's Final Fantasy III (Famicom)
« Reply #12 on: April 19, 2015, 03:15:41 pm »
Okay, but values 00, 20, 40, 60, 80, A0, C0, E0 all point to the same item group. This should allow you to have goblins that only drop potions, and upgraded goblins that would drop better and better items from the same group.

Yes, after rolling each value from 00 to FF to see what each one do I saw several pointing to the same place in the same sequence (Even part the unused ones, thankfully), and that's rather useful!

It will come in handy for giving equipment to monsters here and there while taking advantage of the space it gives to you AND not breaking the sense of progress. Now my problem on the prior post about this matter is pretty much inexistent.

The thing is that I need to see from where I start, because you don't start with the Thief job, so I have to think if I distribute equipment from the begnning so it can be dropped or not, because I seriously doubt someone is going to lower level places for obsolete items xD.

It will take some time, but I think I have all I needed for this.

If you want stealing to have some unique, but non-missable benefit, you could use P value 0 (group value <20) for some tough but ordinary opponent that can be found somewhere to make it non-droppable. Of course you might have a better idea after I have looked how stealing works, though by experimenting you can sometimes acquire about the same info that can be read from the code itself.

It's a very good idea. I'll have to see which type of item would go well with it.
There are some enemies that are tough like the King Behemoth that would fit pretty well with the idea. And if there aren't, I can change them.

Thank you for that. Well, for everything as always!

I also thought about mixing a little some classes, like changing the Mystic Knight to use Lvl 1/3 Black Magic and give the Knight the White Magic it originally has, while giving the Bard some kind of Red Mage suit with low level magic for being more of a support class (Something like old western RPG Bards). But that's just an Idea for now, I still have to do the steal and HP things before.

-EDIT- Updated the DropBox link, I touched previous patches, I improved the Stealing Patch, I added another one that increases the HP of most enemies and a text file that list the new Hp of each enemy, the Readme has been updated too.


-EDIT 2- Updated the Drop Box link again, I revised all the patches, made some changes for the better, solved a few problems, and added a new file that combines almost all of the changes into one single patch for easy use in case you want "everything".

For now I think it's all I'll do. Now I'll replay the game with all the patches to see how things go and if everything goes well, I think i'll try to add it to the ROM hacks.
« Last Edit: April 22, 2015, 08:33:46 am by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Final Fantasy III Maeson Mix (Famicom)
« Reply #13 on: April 22, 2015, 07:55:34 pm »
Seems like you are happy with stealing & drops. If the results work and raise no questions, I won't do any research on them. Otherwise, ask.

But what about magic multiplier formulas? Are you happy with the current moddability?

I found the formulas in the code, but they all use the same code and there seems to be only one formula: (x/16) + (LV/16) + (SKL/32) + 1

x = INT*2 or INT or SPI depending on the magic type. Changing these might be easy, for example to SPI*2 for white magic (but I don't yet know how).

Everyone seems to use skill and level ... which conflicts with the FAQ. Though the numbers I see it using also differ from the ingame skill and level numbers sometimes.. it's a bit unclear currently.

If you want to do experiments with the main formula, it is possible. But I'm not sure if it solves anything and what the actual skill and level values are, especially for call magic.

location of formula part:
630AD: INT / SPI / INT*2
630A6: LV
6309D: SKL

value to put in, and what it means:
3C -> *64
3D -> *32
3E -> *16
3F -> *8
40 -> *4
41 -> *2
42 -> *1
48 -> /2
47 -> /4
46 -> /8
45 -> /16
44 -> /32
43 -> /64

And finally, the calculations happen with small numbers (0-FF , 0-255), so it won't support very crazy tests very well (128*2=0).

The base damage formula can also be "changed" if it matters.. but once again, one formula for all magic/items is used: (x/2 + spell power)

631D6: 4A -> x/2, EA -> x, 0A -> x*2

For example, anyone using a WhiteScent item contributes user's SPI/2 to the base damage. (not that it matters.. just something I never noticed, and which is a small surprise for me)

edit: hmm, now that i think about it, there is a lot of code reuse: monsters use these things as well when casting magic, and if SPI is changed to SPI*2, it will also affect white magic hit% and possibly other similar things (all numbers that look the same are usually the same variables). Of course spell power changes may already affect some monster magic as-is.
« Last Edit: April 22, 2015, 08:12:47 pm by STARWIN »

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Final Fantasy III Maeson Mix (Famicom)
« Reply #14 on: April 23, 2015, 05:06:49 am »
Well, as I said I' replaying it to see where can I improve it a little more, what more can I add, or if things go well.

For now (I'm not that far from the beginning, I'm right at Nepto's cave in one playhtrough and after Hyne in another) the steal/drop thing is working pretty well compared to vanilla, I still need to see if I add weapons to normal enemies; but at least I can say that now you can get a good deal of items while fighting normally, Potions, Magic casting items, Fenix Downs, Magic keys, and things like that, which can be sold for extra cash and spend  less time "farming" money if you don't want them.

At least is more than nothing or just a potion from time to time. The added FenixDown are kinda nice because you don't need to stop, go back and revive each time someone dies, and while it's a trope of old school RPG's, it can get tedious.

The monsters with weapons and defensive gear were changed quite a bit since the comment where I said that I had problems with several items showing up in each group, I really don't understand what it was, but now I'm able to make each one drop/carry to steal between two and three pieces of equipment each, with recovery items to fill the other slots and make getting those items a little harder.

I'll see what more I can change, but the game doesn't have that much variety in usable items like the next games in the series, though:
http://guides.gamercorner.net/ffiii/items/

As you can see the majority of items are just "1 time spells", or items that are sold in stores...

Another small thing I've seen is that, now that early mages have a little boost to their initial Vitality (They start with as much as the Warrior) you can level up without fear of being screwed later or needing to change jobs just to level up and then go back to the prior one you were using (Although you can still do that as Monk as higher VIT as always).



About the Multiplier, no, i'm not that happy about that, but I didn't expect to be found so fast!

I seriously didn't expect that.

Yes, I also found that what the guide says and how the the game acts are not really the same.

It may be just enough to work with, seeing that the main problem is how long it takes to Magic/Terrain to improve, each 32 skill levels, which means just 3 upgrades, at 33, 65 and 97 and you will be wasting your time with Black/White Mage seeing how both have a direct upgrade in Warlock/Shaman, so it feels even more pointless to grind them.

If with this I can diminish the grinding feeling for skill job or give a better reward for leveling it up, it will be great.

I'll experiment later!

While playing with the hack I saw that buffing magic spells themselves affect monsters that use the same spells as you, so spell-casting enemies far more dangerous too (For example the Mummies at the beginning of the game use Venom spell, and it hits for around 80 points of health being a Level 2 Spell, so that's a big enough change right there, the same happens with the Firefry or Djinn and the Fire Spell), and if the multiplier thing stacks too, it may be a little broken, although I want them to be powerful to some extent.

Hyne was also an asshole spamming Ice2/Fire2/Bolt2. He hits hard now, and at the same time, he gets destroyed if you hit him with the weakness he has at that moment.

But thankfully I can always change the Int and skill values for balance issues if one of the baddies make things too difficult or unfair.

And most probably I will have to do it a couple of times, because I remember several enemies with both Skill and Int well over one hundred...


I'll stop the playtest to tinker and try things with this and later add it to my actual playthrough to see how it goes.

EDIT: By the way, could the Physical attack multiplier be around this part too?

EDIT 2: After looking how the damage changes on different settings on maxed (99 Int/Spirit 99 level 99 Job) and half way characters (around 50 level 50 job) I  think this won't need big changes.

Int Spirit /8 causes the damage to skyrocket and it's kind of ridiculous, I don't want to imagine how early could you achieve 9999 damage with something like *32 or *64...

I'll try testplaying with Skill/8, or Level/8 Skill/16. Let's see what happens.

And 63096 seems to be used for Call Magic, I changed it unintentionally and discoverd it, lol.

Thank you so much, STARWIN!
« Last Edit: April 23, 2015, 12:43:15 pm by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Final Fantasy III Maeson Mix (Famicom)
« Reply #15 on: April 23, 2015, 03:06:23 pm »
Physical multiplier doesn't, thankfully, seem to be using the same formula.

I did a quick test of what input the formula actually gets in different situations:

Code: [Select]
sage  stat holy fire bahamut shiva
SKL   12   11   11   22      22
LV    52   51   51   22      22
INT   64        64
INT*2 128            128     128
SPI   69   69

SKL   99   98        196
LV    99   98        196
INT    2
INT*2  4             128
SPI    3   69

In short, the FAQ is (kind of) correct but modding the formula requires a bit more insight. Here is how the single formula looks like in case of different magic types:

black: (INT/16) + ((LV-1)/16) + ((SKL-1)/32) + 1
white: (SPI/16) + ((LV-1)/16) + ((SKL-1)/32) + 1
call: (INT*2/16) + ((SKL-1)*2/16) + ((SKL-1)*2/32) + 1

So you'll be modding all of these simultaenously.

The game shows level and skill one higher than what it has stored internally. The shown INT and SPI aren't used, but the numbers it uses still happen to be the same (and if I brute-force them, it still knows the right ones, haha).

Touching something like 63096 just changes some of the code nearby, in a mostly unknown manner. You can't really deduce much with code like you can with data, at least without knowing asm. The debugger shows these numbers in asm mnemonics, and that's the way to go for reading code.

If you want to change something small in the game, just ask. In the worst case I just don't do anything  :P. Designing a mod is more difficult/time-consuming than figuring out (simple) things from the code like these in any case.

edit: IIRC call magic has different effects depending on the job, and I didn't explicitly test those. The FAQ seems to think they all use the same formula, which would then be the default guess.
« Last Edit: April 23, 2015, 06:37:12 pm by STARWIN »

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Final Fantasy III Maeson Mix (Famicom)
« Reply #16 on: April 23, 2015, 05:54:24 pm »
Oh, so 63096 doesn't do anything? My bad then. :-X

I got my ass kicked by the GiantRat/Big Rat at Nepto's Shrine. Two turns, two spells, and then game over.

I didn't see that one comming. Although it was funny to look at. I mean, the thing has 17 intelligence. It's level 2, so it doesn't get any bonus for that. It doesn't even have Skill level.  And I even reduced Fire2/Ice2/Bolt 2 power a little. Wow.

I don't even want to know what Ahriman or Echidna do.

I may need to take more time to look at it... I'm trying Int-Spirit/16 Level/16 and Skill/8 now and it goes better...

But who knows if I have to change it later... Or even reduce the power of most spells and make the Int/Level/Skill part have more weight... I'll see. It's a thing of patience i guess, because I don't want to make this game too frustrating or a cake walk...

About the Call Magic, it does indeed do different things depending on which job uses them, but all of the effects and variants are just different spells, like 61c60 being High Summon Megaflare and 61c58 is "Rend", the black effect of normal summon (Which I changed to a Full screen attack) and they seem to use the same formula, based on the changes I made to two of those spells.

I really don't know what more I want to know how to change. Maybe the Physical Attack Multiplier, but not much more.

Well, besides the idea I talked about the other day about giving some classes magic, but seeing the Level up table, the spell usability table, and that I don't understand how they work yet, or if the spell usability would even consider classes like Bard or Knight that never were designed to have magic; I'll let that one out of this for now, so no questions there.

And I'm abusing your kindness already...

EDIT Everything seems going pretty well from Hyne to Goldor, but God, elemental resistances are a double egded sword. It's not like you take less damage against one element, and that's it, it also makes you extremely weak against another (Which makes things like the Flame/Ice Armor kind of hilarious seeing how they are weak against what they are made of...).

The dangerous part is that enemies possess several elements (It's not like "ice enemies have Ice based attacks"), for example Kraken, which is supposed to be this ice/water foe for the Water Crystal, uses Bolt2 and Fire2, and because of the randomness you'll most probably take "super effective" damage with the best armor that you can get at that point either being mage or a physical character...

I don't know if I'm going to remove some resistances because it makes some pieces of armor really risky to have ( Taking 1300 of damage instead of the 300/400 you should take normally) and make Magic Def more important, or change the usability of some armor so every character has at least one option without element.

This is time consuming but it's more fun than I thought, actually.

EDIT 2- How in the hell the Draining health ability of some weapons is tied to the damn class usability byte?!? If you change it to make other classes able to use it it loses the draining effect...

EDIT 3- BUT IT'S EVEN MORE WEIRD! If you put the Draining ability to a weapon which is class usability it's just 1 class (Like Thief/Viking for Orichalcum or the axes)  It will work even if none of the weapons for that character would have draining abilities originally.

Seriously, what's up with that... I'm going to change some weapons around a bit... Although that gave me an idea...
« Last Edit: April 25, 2015, 12:37:26 pm by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Final Fantasy III Maeson Mix (Famicom)
« Reply #17 on: April 30, 2015, 10:39:49 am »
EDIT 2- How in the hell the Draining health ability of some weapons is tied to the damn class usability byte?!? If you change it to make other classes able to use it it loses the draining effect...

EDIT 3- BUT IT'S EVEN MORE WEIRD! If you put the Draining ability to a weapon which is class usability it's just 1 class (Like Thief/Viking for Orichalcum or the axes)  It will work even if none of the weapons for that character would have draining abilities originally.

If one byte seems to do two different things, the first thing to check is if it consists of two value fields, one indicating draining and the other class usability. Just like drop index has two parts. Just like with dropping, this would mean that there are multiple values giving the same class usability, one with draining and the other without.

Maeson

  • Sr. Member
  • ****
  • Posts: 278
    • View Profile
Re: Final Fantasy III Maeson Mix (Famicom)
« Reply #18 on: April 30, 2015, 11:59:15 am »
If one byte seems to do two different things, the first thing to check is if it consists of two value fields, one indicating draining and the other class usability. Just like drop index has two parts. Just like with dropping, this would mean that there are multiple values giving the same class usability, one with draining and the other without.

Indeed, that was my idea! Thankfully this time I wasn't horribly wrong.

For example the value 96 is used for the group of classes Onion kid, Red Mage, Knight, Thief, Viking and Dragoon, and doesn't give that ability, but if we change that 96 for the value 16, we have the same classes plus the drain HP thing. The same happens with 1B and 9B, both being a "All but M. Knight" group.

Funny enough, most of them are pretty easy to figure them out, for example 2A and AA, 1D and 9D, 11 and 91, share the same groups but the lower one gives the drain effect.

This must mean that lower values are "intended" for weapons and higher ones for armor, even when the original game uses the "wrong" ones from time to time (that threw me off guard a little, when a class like bard has two different values for himself yet others use the same).

I still find this kind of random, seeing how there is an "element" for that already, and without it it wont work even if it's using the special value for the drain effect.

At least this small problem had an easy fix, just needed to change the usability values for lower ones.
But it surely made me go "what the f***" for  a while.

Sadly it seems that you can't give "drain effect" to armor. It could have been nice to give this property to a bracalet or something.
« Last Edit: April 30, 2015, 12:35:41 pm by Maeson »
I'm off for some time. If for some weird, strange, and important reason, you need to talk to me, just send me a PM and probably I'll read it whenever I come back.

STARWIN

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
Re: Final Fantasy III Maeson Mix (Famicom)
« Reply #19 on: April 30, 2015, 01:09:33 pm »
For bytes with split meanings it would be most convenient to document them as bitfields, instead of hex values. 1 byte is 8 bits, and typically a bit in a certain position can be used as a variable of its own. You only need to turn some hex values into bit form to see the patterns:

9B = 1001 1011 "all but MKnight" "drains"
1B = 0001 1011 "all but MKnight"

my first guess for bit meanings would be something like:

d??c cccc , where d=1 drains, ? is unknown/unused, c form either the class group number, or even better, each c bit means a group of classes

so if the c bits are simple like this, 3rd bit from right would signify MKnight usability (0000 0100 = 04 in hex), and we could have a more accurate format d??c cMcc , and so on with the other c bits

the drain bit alone is 1000 0000 which is 80 in hex, which is the difference between 9B and 1B and other such pairs.

if the original game appears inconsistent in some part, like using two different values for bard usability, there may very well be a reason. For example if one of the ? bits means something and some bard item has it set while the other doesn't..