Author Topic: FF1:DoS Projects  (Read 708 times)

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
FF1:DoS Projects
« on: May 26, 2017, 07:38:38 PM »
Lately I've been doing work on FF 1&2: Dawn of Souls (mainly on the FF1 side), inspired by Jeff Ludwig's Mod of Balance and hacking notes. I'm in the process of transferring my own rough notes to RHDN's Data Crystal, but there's still a lot left to do, especially for data structures and offsets. One thing I discovered today is that FF1 and FF2 data is not as strictly divided as I thought - after FF1's spell usability table comes text data shared by both games, then various text for FF2, and then the text indices for FF2's overworld that dictate what area name to use for each 4x4 quadrant.

In addition to documenting Dawn of Souls, I've made a few patches for FF1:

Vancian MP System

This patch replaces the MP system with a Vancian spell charge scheme like that used by the NES and PSX versions. Simple idea, but a lot of routines and data structures had to be modified to make this work. If you're looking for an alternate way to handle spellcasting in FF1, this mod gives a good start, though it deliberately avoids any rebalancing changes.

Monster AI Enhancement
This patch allows monsters to skip over spells and abilities, which can allow for some extra unpredictability. It comes in two variants - one only lets one spell/ability be skipped per turn, while the other allows for a monster to skip over multiple at once, though the chances of consecutive skips fall in half each time. In addition to the above this patch also expands the maximum ability list size to six from four. I figured if I was going to expand and relocate the AI table I might as well.

Equipment Viewing Screen Improvement

This patch lets you examine any piece of equipment in the field to see its attributes, elemental properties and what spell it casts if any. Beats looking at a FAQ, I'd say.

Unrunnable Battle Notification

This patch displays a message whenever you enter a battle flagged as inescapable. This way you can be certain from the get-go of whether you should bother trying to run from an encounter.
« Last Edit: May 31, 2017, 08:34:47 AM by Kea »

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,680
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF1:DoS Projects
« Reply #1 on: May 27, 2017, 12:23:12 PM »
Words cannot express what I feel right now :omg:

119 bugs fixed and counting.

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
Re: FF1:DoS Projects
« Reply #2 on: May 27, 2017, 04:15:34 PM »
Only good things, I hope!

In other news, managed to get the equipment stat viewing working with vanilla, so that goes in the OP now. I'm not quite certain what to work on next, aside from my full project.

Chronosplit

  • Karlabos
  • *
  • Posts: 38
    • View Profile
Re: FF1:DoS Projects
« Reply #3 on: May 27, 2017, 05:03:51 PM »
Equipment viewing fixes probably the most aggregating problem I had with FF1 in general.  Nice!

assassin

  • Bane of Retards
  • *
  • Posts: 1,019
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: FF1:DoS Projects
« Reply #4 on: May 27, 2017, 05:16:54 PM »
^ was the equipment built out of other problems? ;)  do you have a screenshot with the elusive "Jay Z Suit" in inventory?!

Chronosplit

  • Karlabos
  • *
  • Posts: 38
    • View Profile
Re: FF1:DoS Projects
« Reply #5 on: May 27, 2017, 07:06:41 PM »
^ was the equipment built out of other problems? ;)  do you have a screenshot with the elusive "Jay Z Suit" in inventory?!
Nope, but once I equipped a "Helm of Spell Checking" and used it in battle. :tongue:

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
Re: FF1:DoS Projects
« Reply #6 on: May 29, 2017, 12:07:47 AM »
Turns out one little bug snuck into the release...I had the usability check for Ethers loop to the wrong address when reading spell charges, with the result that it looped forever if you dared use an Ether in the field! A fixed version is sitting in the queue now.

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
Re: FF1:DoS Projects
« Reply #7 on: June 05, 2017, 08:59:45 AM »
Doing more work on my main project, I've coded a new type of spell that attempts sets a status effect and deals damage at the same time. Could be handy for spells and status effects that might not otherwise be worth the risk. Right now I'm using it for Kill - which deals damage if the instant death fails - and Scourge, which attempts to poison and damage all foes. Doing that led me to discover that Dawn of Souls doesn't handle Poison damage for monsters anywhere, so I had to edit the end-of-turn calculations to add that in.
For the moment, Poison ticks will override Regeneration; they're also nonlethal and won't bring monsters below 1HP, but if I can figure out how to call the death bookkeeping routines correctly that could be changed.

I've also split up river encounters into north and south regions, and sea encounters into three regions: the Aldi Sea, other oceans in the south, and the north oceans. There's more variety in ocean encounters now, and parties sailing to the Citadel of Trials will find the going tougher than they're used to!

Oh, and I added another patch to the OP: the Unrunnable Battle notification. Credit goes to the Final Fantasy Zz hack for the idea.

Squall

  • Cagnazzo
  • *
  • Posts: 377
    • View Profile
Re: FF1:DoS Projects
« Reply #8 on: June 06, 2017, 03:41:16 AM »
Kea if you are looking for an idea - FF2 needs magic mitigation damage :)

I'm currently playing FF2 for psp. I'm used to spirit used as magic defense. It took me sometimes to realize things dont work the way I expected. After reading about FF2 mechanics I realized that FF2 has no magic mitigation!

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
Re: FF1:DoS Projects
« Reply #9 on: June 06, 2017, 12:58:08 PM »
I'm not well versed in FF2's formulas - doesn't it have separate stats for Magic Evade Multipliers and Magic Evade% from equipment? It is a little strange that it has no outright Magic Defense I suppose.

Squall

  • Cagnazzo
  • *
  • Posts: 377
    • View Profile
Re: FF1:DoS Projects
« Reply #10 on: June 07, 2017, 02:09:03 AM »
yes it does .. but only Magic Evade%, no Defense (defense is the mitigation factor). So its pretty much for each hit - hit hard or not hit at all. Its very strange, because Physical hits have evade and defense.

It is interesting to me that while playing at first I didn't sense the difference. But when you Magic Evade becomes high its quite obvious - you get low magical damage and from time to time big numbers (when evade cracks or crit).

Anyway its just an idea for a serious change in the battle mechanic in FF2 (inspired by your Magic Charge changes). I don't recall was it the same in FF1 though ...

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
Re: FF1:DoS Projects
« Reply #11 on: June 07, 2017, 07:45:15 AM »
I see what you mean. It may be a deliberate omission though, given how all spells must start from Level 1 and work their way up. Perhaps if Magic Evade was depressed all around it might work out, but that would still make higher level magic even better compared to its lower levels since it would now be guaranteed to do additional damage per hit on top of getting additional hits.

I don't recall was it the same in FF1 though ...

That depends on which version you're talking about. In the NES/PSX versions it works like this for damage spells:

Code: [Select]
E = Spell base Power
If target resists spell element, E = E/2
If target is weak to spell element, E = E*1.5
The above two modifiers stack.

Next, roll for spell hit. If spell misses:
Damage = [E...2E]
If spell hits:
Damage = 2*[E...2E]

A spell's chance to hit is dependent on its base accuracy, the target's Magic Defense, and whether the target resists or is weak to the spell's element(s).
Check the link above for more details.

As you can see, the caster's Intellect has no effect; it may have been intended to add to spell accuracy, but there's no way to know for sure.

For Dawn of Souls, the formula is almost completely different:
Code: [Select]
A = (Int+Luck)/2 + (Int/10)*SpellPow
B = Luck/2
D = [A...(A+B)]
If target resists spell element(s), D = D/2
If target is weak to spell element(s), D = D*1.5

Then the same spell accuracy vs Magic Defense calculations are followed, but if
the spell hits it only adds Int/5 to damage - no, I don't know why.

If and only if target is a player character:
   If MDF > 200: D = D/2
   If 200 => MDF > 100: D = D*3/4
   If 100 => MDF: D = D*7/8
It's a weird, weird formula, and one I've made a point of changing.

Squall

  • Cagnazzo
  • *
  • Posts: 377
    • View Profile
Re: FF1:DoS Projects
« Reply #12 on: June 07, 2017, 10:19:41 AM »
Thank you Kea, for taking time and explain how FF1 works!

So if I understood well, FF1 is similar. Maybe the exact forumula are different but it seems to me that:
Code: [Select]
MD  = Magic Defense. Chance to avoid magic attacks. This stat is hidden.Pretty much it actually not a defense (mitigation factor), rather a defense rate ... Magic Evade. So FF1 works on the same principle as FF2 (there is no real MD).

TBH to me thats quite alien. Magic Damage should be calculated on the same principle as Physical Attacks (not necessary same formula):
 Damage = Attack - Defence, with some modification factors ofc (like crit, weaknesses, class perks, ...)

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
Re: FF1:DoS Projects
« Reply #13 on: June 09, 2017, 11:01:41 AM »
I have to disagree with you there - to me it makes sense that magic attacks play by different rules. You've got to spend MP or a spell charge to use one, so for damaging spells at least you should see some impact even against a guy with 200 MD. If anything, the weird part about FF1's system is that spells deal damage within fixed ranges, though I like that part too.

Kea

  • Vargas
  • *
  • Posts: 92
    • View Profile
Re: FF1:DoS Projects
« Reply #14 on: June 21, 2017, 01:58:09 PM »
Been working on a few more things for the FF1 hack. First off, I've been going over all of the random and fixed encounters in the Citadel of Trials and rejiggering the map connections to make use of a few unused segments. The biggest thing missing for me to be able to completely redesign dungeons is the map data format itself; I haven't made any headway on that, for now.

Second, a minor enhancement for the Bestiary. It now loads and displays a monster's number of hits and Critical Rate (out of 200). It can help to make sense of the attacks of monsters like this little guy:

I had to shift all of the text and number positions around to get the extra line to fit, but I think it looks alright now.

Recently, most of my time has been spent working on spell animations. Some monsters cast NulShock or NulFrost in my hack, and it always bothered me that the animations for those spells didn't account for a monster using them - it appears as if your party is getting the benefits, which can be confusing. So, one dive into FF1's animation scripting bytecode later, that has been remedied:

Specifically, I switched the barrier animation to use that of NulBlaze - which does have a left-side animation - and horizontally flipping/repositioning all of the little thunderbolt animations There are several more spells that don't account for monster or player casting, but having done it once fixing other animations will be relatively easy. It's a good opportunity to document the scripting language too.

Related to the above, I've also fixed the Protera animation crash that arises when a monster attempts to cast Protera on more than six targets. The first part of the Protera animation generates eight animated objects per target that all remain active until the second part begins, which is more than the game can handle. My fix involved halving the number of animated objects used when a monster is casting Protera, which works nicely:


Next up...I dunno. Probably going to keep on with editing the dungeons/encounters/monsters etc. I'd like to have all of the main game see at least one pass before making an initial hack release, which could be a some time in the future yet.