News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

Ailment and Debuff Formulas

Started by Rolina, 06, October, 2012, 09:00:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rolina

We've got ideas about what formulas to use for everything but ailment and debuff success rates.  All we know is that luck is involved.

For those of you who've been looking around in the code, have you found anything related to this at all?  If not... care to start looking for it?  Understanding how ailments work is preeeety important if we ever want to add new ones or try to balance them by tweaking success rates.

Misery

It's also known that relative power of user vs target in the element of the debuff/ailment used is involved, and that classes/enemies have weaknesses to certain effects. That won't do much good without any actual values, though.

Sala might have known something about it, iirc he was the one to bring up the weakness thing, and possibly the involvement of elemental power/resistance as well. Again, that won't do us much good.

This is probably the first thing I'm going to look into once I figure out how, ailments and debuffs are almost completely useless as it stands.

Rolina

Well, if Sala did know something, then hopefully Jamie or Teawater could see if could share what he knows - or anyone else at the lighthouse, I imagine.

leaf

[spoiler=quotes]
[9:00:50 PM] Randel Peltier: Ok...what did I do last night?
[9:01:19 PM] Kain: Something boring, repetitive, and lasted for about sixty seconds.
---
[10:45:08 AM] Salanewt: But yeah, the elemental phalluses are being... Stroked up by Saturos and co., and the energy will go towards... Mt. Muffin, where the Golden Climax will arise.
[7:28:42 PM] Salanewt: An added bonus is that Isaac and co. were trying to stop Saturos and co. because their beliefs state that Mt. Muffin should remain a virgin.
---
[9:54:21 PM] Randel Peltier: Guess the number in my head an you get to pick what I say. Number between 1-10
[9:54:28 PM] leaf: 11
[9:54:36 PM] Randel Peltier: @#$%!
---
[8:38:13 PM] Randel Peltier: Shes like this queen up on a pedastal that I have yet to court.
[8:38:29 PM] Kain: You've tried courting her.
[8:38:43 PM] leaf: and failed spectacularly
[8:38:44 PM] Randel Peltier: Ive tried...shes the best dating game ever.
---
[12:24:35 AM] Salanewt: I need to find a picture of a naked person to put on the Christmas tree next year.
---
[2:19:06 PM] Zeadra: wait... Rief's a guy???
---
[1:09:57 PM] Zeadra: well if you want to know if its a new effect or something weird, just check GS1, if side step is there maby it is the nimble dodge thing
[1:10:35 PM] Kioll: For once, you've contributed something useful.  o.O[/spoiler]

Rolina

#4
Well, that at least points us in the right general area to look at least.  Still, if I'm to put up a pseudocode guestimate of what the formula looks like, it'd be this:

Base Chance - (luck + individual resistance)

Hopefully, we can find out a more accurate representation.  Specifically, the base chances for each ailment, plus the specific influence luck holds.  Is it that each point in luck is a 1% drop in chance, or perhaps is it weighted, or... well, who knows?

Daddy Poi's Oily Gorillas

#5
That topic doesn't say anything about the Ailment/Debuff formulas.

This seems to include the vulnerabilities in the class and enemy banks.

The potential code for this is around 080B0A1C = I think this is where luck is grabbed. And a glance down to 080B0A36 being x19 (a.k.a 25 in decimal) shows me how all this is bundled together. I think I shall look into exactly what this formula is soon...

Edit after Rolina's post:  Research should probably be placed on the entire function:  080B075C - 080B0A8E.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Rolina

Quote from: Teawater on 09, October, 2012, 07:47:12 AM
This seems to include the vulnerabilities in the class and enemy banks.
Which, if my guess is right, is part of the formula.  Plus, it helps us when it comes to figuring out where to look.  Still, the more we can figure out the better, so anything you can find should help.

Right now, my guess is that each effect has a different base success rate - not just ailments, but all of them.  If we could locate where those are stored, I'm sure that'd help quite a lot as well.

Daddy Poi's Oily Gorillas

From when I remember studying vulnerabilities last time, I believe the base percentages were hard coded in this function: 080B0514 ; So editing them is not exactly straight-forward, especially since some of those numbers can be used for multiple effects as seen by the branching pattern.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Rolina

#8
Regardless, knowing and writing down how it works is important.  Plus, I'd also like to get this done for GSU so that they have a comprehensive list in the wiki.

Daddy Poi's Oily Gorillas

#9
It looks like there's a part of the code where if defender's luck is 40+, about 8 of the effects are given a chance of 0%. (For example, x18 and x19 (May Inflict Poison/Venom)

Effect's can also have a base chance without a formula (When their numbers are negative ), but when the formula is used (x0-x64), I think it looks like this: Not sure if I made any mistakes.

success =
(((((((Attacker's elemental level - Defender's elemental level) - Floor(Defender's luck / 2)) * 3) + effect's base chance + (vulnerabity's 25)) * diminishing%) / 100)  >= rnd())

diminishing% = The direct target is 100, with this lowering for enemies further away.

Notes:
x52 = "82 - May force target out of battle" is always 0% when class is not NPC. (0% for player characters?)

These generate three random numbers... This would make, for example, a chance of 50% (one) to be 87.5% (three), I think.
x43 = "67 - Inflicts Seal"
x50 = "80 - Inflicts Death Curse"
x55 = "85 - May inflict Stun"

Hopefully I didn't get anything backwards or messed up. I've only looked at the stuff from 080B08C2 and down, but there may be some stuff above this address that may have conditions for when this formula is skipped.

Where attacker and defender labels are placed are just assumed, I didn't double check them, but it wouldn't make much sense otherwise.

« Last Edit: October 10, 2012, 01:32:55 PM by Teawater »
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Rolina

Wait, element level has influence?  Wow, that was unexpected.  Keep up the good work.

Daddy Poi's Oily Gorillas

#11
Yes, it appears it is just elemental level, though.  I didn't see anything on elemental power or resistance. (I'm assuming power/resistance just means how much damage is taken/given.)

P.S. =  I forgot to congratulate you on you 5000th post.  Congratulations!
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Rolina

Well, that's certainly interesting.  Completely unexpected, too.  I actually like that, to be honest.

Daddy Poi's Oily Gorillas

#13
I guess the chance that one may recover randomly from an ailment/debuff applies to this topic as well...

Formula located at: 08124810

Note: 5 or less turns must remain for this chance to be used.

(((Luck * 3) - (Turns * 5) + base_chance) * 655) >= rand()

Random number is 16-bit (Up to xFFFF)
If chance was 100% and you multiplied by 655, you'd get xFFDC.  Evidently, 656 would make x10040.



Base chances of recovering from an ailment, etc:

Attack = 30%
Defense = 20%
Resistance = 20%
Delusion = 30%
Confuse = 60%
Charm = 70%
Stun = 20%
Sleep = 50%
Psy-seal = 30%

I think that's all of them.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Rolina

Oh, so it's not a flat turn rate?  Intersting...  Thanks for the find.  So luck isn't just ailment resist, it's ailment recovery as well...

Kide

What about other battle effects that aren't exactly ailments or debuffs, such as 'may inflict double or triple damage' or 'may reduce HP to 1'? I believe those are unaffected by Luck. If so, would you know what are the chances of those happening? That's something I always wanted to know...

Aile~♥

All damage multiplying effects are indeed affected by Luck, as is the "HP to 1" effect.
[sprite=16, 6, 0]:P[/sprite]

Lloyd: Easy as pie.
Genis: Sweet!
Presea: ...Sweetie pie...
Zelos: Let's not start on this again...

[spoiler=epic mindscrew][/spoiler]

Rolina

Wait, so all effects, period?  So you can resist the "may do double damage"?

Knight of Purgatory

I have no idea how the added effects may work, but I think all the "ignores defense", and " may deal triple damage" are affected by your luck only? Or it might be affected less by the enemies luck. No idea tho
MOAR DARKNESS, MOAR COOKIES

Kide

That's odd. So, Legend and Vengeance against bosses aren't as effective as I recall...

And since Teawater didn't list those, is it possible there's a whole new formula for them?