Sign in to follow this  
hmsong

Magic spell's stats

17 posts in this topic

Can anyone tell me which address (in the ROM) contains the stats for magic spells?  For example, the power of the spell, the element of the spell (ex: Unicorn Head, summon Great Demon, etc), the deciding stat of the spell (ex: does INT decide the power of Marduk or Demon Breath?), and the mp cost.

I'm trying to create a tweak patch through hex editor, but I don't know the address nor which values I should look at.

Any help would be appreciated.  Thanks in advance.

Edited by hmsong

Share this post


Link to post
Share on other sites

What exactly do you want to achieve?
Making damage spells useful? Sorry you'll have to get comfy with a debugger, there's a lot of mechanics that make them useless.

Share this post


Link to post
Share on other sites

No, what I want is to increase/reduce the MP cost of certain spells (ex: Magic Shield).  Second, I want to see the powers/elements of certain techs (not to change it) -- For example, Hawk's vanilla LD class has lots of throwing item skills.  But I can't tell what element they are (is Axe Bomber and Rocket Launcher fire element?  Is Carlie's summons different element?).  And I can't tell what stat is being used for certain spells (is Carlie's Demon Breath using PIE stat?).  Etc etc.  So, if I can just take a look at the addresses where these are, I may be able to find some answers to these questions (I'm assuming I can't find answer to everything).

For example, when you gave me the addresses of where the characters learn the spells, I was able to understand a lot of it (you made a very thorough explanation -- thank you so much for that).  Similar to that, I may be able to understand some things by looking at the values.

Share this post


Link to post
Share on other sites

None of the trap spells have an element, neither do summons, they are just progressively stronger non-elemental damage spells.

For extra fun most of the boss spells are STR based.
The relevant defense depends on the stat used; INT = m.def(INT), PIE = m.def(PIE, hidden stat), else p.def

No guarantee for your sanity here:

Spoiler

 

id1: Diamond Missile

119941 = icon related
119943 = 2bytes for icon color?
119944 = 2nd byte for icon color?
119946 = targetting related, 5C targets enemies
119947 = MP cost
119948 = addition to cast time
119949 = spell type flag, e.g. 08 on buff, 05 on debuff and 04 on saber spells, 18 for exorcism, 0 damage spell, 1 for heal, 27 death roulette, 25 anti-magic
11994A = element; 01 - earth, 02 - air, 04 - water, 08 - fire, 10 - dark, 20 - light, 40 - moon, 80 - leaf
11994B = STAT1
11994C = STAT2
11994D = STAT3
11994E = power multiplier (max 0F !!) and which stat is used (the x in the xy number pair here)
11994F = power addition (max FF !!)
119950 = status effects 1; 20 - mute
119951 = status effects 2;
                 01 - snowman
                 04 - transform
                 08 - poison
                 10 - moogled
                 20 - stone
                 40 - sleep
                 80 - death effect (999 damage NO level check!!! buggy vs targets that have more HP left than that)

17 bytes per spell
what exactly a spell does depends on the combination of spell type and 3 STAT modifiers. e.g. status effects may only be applied with damage spells or debuff types.
it'd be best to compare to other spells that do similar to what you want to achieve.

consumables are 100% the same as spells and are just ids 0x101 (paladin proof) through 0x160 (dreamsee herb)

 

Share this post


Link to post
Share on other sites

Oh my god.  Thank you!  That may be of great help.  I hope I can find the similar ones for the throw items and summons.  I actually tested some of the Carlie's summons, and using the same summon on different enemies, they seem to do less damage against certain enemies, which is why I suspected that her summons have elements.  But now that I think about it, it may be because they have higher stat.  It's very difficult to test, because there's random fluctuation of power.

Do you know the addresses for Throw Item skills? (starting with Silver Dart?)  That's one of most confusing attacks, in terms of power/element.  I heard that throw items's powers are based on AGI.

Edited by hmsong

Share this post


Link to post
Share on other sites

if you have a list of cheat codes to changes who knows what spells, the ids are listed there and all in order, just proceed by 17 (0x11) bytes per spell id.

Share this post


Link to post
Share on other sites

Ah, okay.  If they're in order, then it shouldn't be a problem to find the address.  Thanks for your help.  I need to play around with it.

Share this post


Link to post
Share on other sites

Okay, I took a look at the codes, and I learned a lot.  Thank you.  Few observations (and some questions based on those observations):

  • Does Holy Ball and Saint Beam uses PIE instead of INT for its damage output?  It seems to use something other than INT for damage output, but I can't tell what that is.  I'm simply guessing it's PIE.
  • Demon Breath is actually Fire elem [and is supposed to have Burn SE].  I thought it would be Dark elem.
  • As you said, none of the summons nor traps have elements.  You were right.
  • Hawk's ninjutsu uses INT for damage?  Aw man.  That sucks.
  • Apparently, Poison Breath and Flame Breath are non-element.  Since there's no Burn SE (not even in Sin of Mana), this makes Flame Breath absolutely inferior to Poison Breath.
  • Apparently, some of Duran's Lv2/3 special melee attacks have element properties.
  • Crescent is apparently Dark elem, and Axe Bomber is non-element.
  • Black Rain uses AGI for damage.

Seriously, thank you so much.  I learned so much.

Quote

The relevant defense depends on the stat used; INT = m.def(INT), PIE = m.def(PIE, hidden stat), else p.def

Oh, so the defense against spells that use INT (such as Diamond Missile) is also dependent on INT stat?  And the same for PIE spells (such as Holy Ball)?  Then spells such as Mind Up raises "magic attack and defense", whereas Magic Shield only raises Magic Defense.  How does that work?

Then what about AGI skills? (such as throw items)  Does the defense use AGI stat?

Edited by hmsong

Share this post


Link to post
Share on other sites
14 hours ago, hmsong said:

Okay, I took a look at the codes, and I learned a lot.  Thank you.  Few observations (and some questions based on those observations):

  • Does Holy Ball and Saint Beam uses PIE instead of INT for its damage output?  It seems to use something other than INT for damage output, but I can't tell what that is.  I'm simply guessing it's PIE.
  • Demon Breath is actually Fire elem [and is supposed to have Burn SE].  I thought it would be Dark elem.
  • As you said, none of the summons nor traps have elements.  You were right.
  • Hawk's ninjutsu uses INT for damage?  Aw man.  That sucks.
  • Apparently, Poison Breath and Flame Breath are non-element.  Since there's no Burn SE (not even in Sin of Mana), this makes Flame Breath absolutely inferior to Poison Breath.
  • Apparently, some of Duran's Lv2/3 special melee attacks have element properties.
  • Crescent is apparently Dark elem, and Axe Bomber is non-element.
  • Black Rain uses AGI for damage.

Seriously, thank you so much.  I learned so much.

Oh, so the defense against spells that use INT (such as Diamond Missile) is also dependent on INT stat?  And the same for PIE spells (such as Holy Ball)?  Then spells such as Mind Up raises "magic attack and defense", whereas Magic Shield only raises Magic Defense.  How does that work?

Then what about AGI skills? (such as throw items)  Does the defense use AGI stat?

-holy ball and saint beam use PIE
-vanilla jutsus are INT based, shuriken AGL; no idea why square thought that was a good idea, Hawk already needs every single stat except luck...
-Lv2/3 techs don't use the flags for elements or status
-flame breath is actually set to inflict "burn" status but the status does not exist, so flame breath actually removes any present status ailment
-AGL skills work against p.def
-mind up(atk) increases spell damage, doesn't matter which stat is involved
-mind up(def)/magic shield directly modifies both m.def stats

Share this post


Link to post
Share on other sites

Thank you for answering my previous questions.  I truly appreciate your help.

I noticed something while looking at the spell codes (and have questions).  Specifically, about the "power multiplier" and "power addition".

  1. It seems they all have at least have "6" for the multiplier (ex: Dia Missile is 06 0A and Unicorn is 16 00), so does that mean that "6" for damaging spell is the weakest (equivalent to 0 in power), and the numbers below that have different effect?  For example, Half Vanish has 02 00 in the same bytes, but we all know that it has "half the current HP" effect, and not power based.
  2. For the first number, I'm guessing 0 = INT, 1 = PIE, and 2 = AGI.  But looking at the Throw Item stats, even the weakest has "7" for the power multiplier.  So does that mean that in terms of pure power potential, even the weakest Throw Item (buyable Dart has 27 0A) has higher power than Diamond Missile? (06 0A)
  3. The difference in power between Hawk's Throw Weapon is very small, relatively.  I mean, Shuriken (1MP) has 27 14, while Axe Bomber (6MP) has 27 32.  That doesn't make sense, so am I missing something?  Or is this another of vanilla's many balance problems?
  4. For the "power addition", I don't see any value bigger than 3C (Ancient, which has the multiplier of F -- the highest).  So does that mean if it's 40 or above, it will have different effect?
  5. For power, is there ever a case where [the skill with higher power multiplier] is weaker than [the skill with lower multiplier but higher power addition]?  ex: Grenade Bomb has 27 3C (7*3C = 1A4), and Earthquake has 08 0F (8*0F = 78).
  6. For skills that do multi-target, how does the power distribution work? (for vanilla).  For example, I'm sure I saw Lise's Marduke (19 14) does less damage than Carlie's Great Demon (19 0A), even on single target.

As always, thank you so much for taking the time to answer my rather... novice questions.

Edited by hmsong

Share this post


Link to post
Share on other sites

spells work similarly to weapons; the base power is multiplied with the relevant stat, then add some base value based on spell/weapon used.
Damage is pretty much:
(multiplier x stat + base) x weakness x day effect x damage buff x class effect x special - (def x def buff)

Class effect is always 1 for weapons
for spells it is:
1.9 if the target is class 2 or a lv40+ monster
1.6 if the target is class 1 or a lv20+ monster
1.0 for base class or lv1-19 monster
that means class changing makes you take more spell damage

Special is 2.5 for lv3 techs, 2.0 for lv2 techs, 1.5 for lv1 techs, 1.25 for single target spells, 1.0 for everything else.

Weakness is 1.5, resistance 0.5, immunity 0, absorb -1.
Also hitting weakness makes 90% of bosses cast an extra spell outside of their regular AI loop asap.

Day effect 1.25.
Of course lv2/3 techs ignore weakness and day effect.

Damage buff is 1.33 for weapon, 1.25 for spells or 0.67 / 0.75 for the debuffs.

Def buff is 1.25 for physical defense, 1.2 for magic defenses.

In case it happens, cap the value before subtracting defense at 999.

I think weapons gained on the ghost ship have 6 multiplier, so they already match tier1 spells.
By the time you reasonably get tier2 spells with their 8 multiplier weapons should be at 9 or 10, cat weapons are 12, pedan's 14, seed weapons 15.

Just to make it clear, even Angela gains more damage per point of STR on her weapon attack with buffed endgame weapons using a Lv1 tech (15x1.33x1.5x1.5=45) than hitting a weakness on tier2 spells (8x1.25x1.5x1.9x1.25=35.625) and that is before we get to the fact that stick hits don't provoke a ton of extra spells.

I had no problem with setting spells to have 0x40-0xFF additional power, there were no new side effects just ever increasing damage output.

In total I highly doubt they had any idea what they did with spell scaling.
A lot of spells ("throw items", summons) are the same with basically a difference of 1-2 stat points of the caster.
After SoM they were probably so afraid of any form of magic damage that they overestimated the power of spell damage here (bosses always getting extra spell castings in) and grossly undervalued buffs (power up can turn 20 damage strikes into 100 damage).

Share this post


Link to post
Share on other sites

Oh wow, I did not know the damaging calculation was that complicated.  Thanks for the explanation.  I need to do some calculation to see what kind of damage that certain skills do.  But yeah, it seems that attack spells in this game (vanilla) is completely obsolete, esp before awesome spells like Power Up (Lise's Star Lancer was always my fav class).  And SoM's spells were too powerful.  Finding balance in a game is such a difficult and delicate process.

Share this post


Link to post
Share on other sites

One of the main issues with that formula is that it has a ton of multipliers, most of which clearly favor physical damage, and applies them before essentially dmg = (atk - def) so it gets out of hand super fast.

If it was the other way around, first dmg = (atk - def) and then the multiplier it'd be much saner.

Also because of the hyper allergic reaction to weakness spell hits the only spells that are really worth it are death spell, turn undead and maybe the ultimate non-elemental spells (only with a fast forward button). Because of the reaction weakness hitting spells are not effectively 150% damage but 75% as you need multi target heal light afterwards most of the time.

Share this post


Link to post
Share on other sites

Also, doesn't the level affect the strength of the attack?  I mean, I know that VIT works that way -- When you level up, you get HP boost (let's just say 5), and if you increase VIT, you get another HP boost (let's just say 6).  So if you level up and increase VIT with that level up, you'd get 11 HP boost.  Doesn't Str/Agi/Int/Pie work that way too?  Or does level not affect anything except HP?

Share this post


Link to post
Share on other sites

Level only gives HP and MP in vanilla, and technically helps with the death spell check, that is it.

VIT gives a massive 1.5 HP per point - worth it?

Share this post


Link to post
Share on other sites

Wait, VIT gives only extra 1.5 HP?  That's it?  Jesus, that sucks.  At least VIT increases natural durability.  Or does it?

Share this post


Link to post
Share on other sites

yes, that is all the HP you get from it.
at least it contributes to def in the formula:
VIT x armor factor + armor bonus
body armor gives mostly the factor from 2 to 14, bonus is from all other parts, i.e. gloves suck.
which is more than you can say for magic defense which only gets a factor of 8 at best; or rather there are only 2 types of armors:
factor 4 before diorr, factor 8 from there on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this