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

Elemental Weapons

Started by jjppof, 21, May, 2014, 04:08:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jjppof

That weapons like elven rapier, fire brand, gaia blade, sylph rapier... these elemental weapons... how it works?

leaf

#1
They treat your basic attack as being an EPA of their given element (uses same formula as say... ragnarok or an unleash), but with a 1.0 multiplier and +0 added damage.

edit: Here's a good source for battle mechanics: http://www.gamefaqs.com/gba/561356-golden-sun-the-lost-age/faqs/22880
[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]

jjppof

#2
Quote from: leaf on 21, May, 2014, 04:30:31 PM
They treat your basic attack as being an EPA of their given element (uses same formula as say... ragnarok or an unleash), but with a 1.0 multiplier and +0 added damage.

edit: Here's a good source for battle mechanics: http://www.gamefaqs.com/gba/561356-golden-sun-the-lost-age/faqs/22880

Thank you... I'm gonna read this to implement elemental weapons.

-------------EDIT------------------------

Just to see whether It's right:

A gaia blade normal attack formula:

((Attack - Defense) / 2 + bonus damage) * (1 + (Caster Venus Power - Taker Venus Resistance) / 400)
bonus damage = 0

leaf

#3
Yep. More accurately, it's

([([(Attack - Defense) / 2] * multiplier bonus) + add bonus] * [1 + (Attacker Venus Power - Defender Venus Resistance) / 400]) + rand(0,3)
multiplier bonus = 1
add bonus = 0

You just forgot the multiplier bonus (which is still just 1, granted, but it's important if you plan on reusing the formula for all EPAs) and the rand(0,3).

Gaia blade normal attack: mult = 1, add = 0
Gaia blade crit (not unleash): mult = 1.25, add = some voodoo based on enemy level; you can check the document I linked for details
Gaia blade unleash: mult = 1, add = 70
Flint unleash: mult = 1.6, add = 0
Raganarok psynergy: mult = 1, add = 35
etc.

I'm not sure if the way crits truly work is actually documented anywhere (as in, how it calculates when an attack hits "critically" instead of doing an unleash). Sala or teawater might be able to give you some insight into that.
[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]

Daddy Poi's Oily Gorillas

#4
From what I'm seeing in the code, critical damage looks like this:

if 0
No critical hit.

if 1
Critical Hits:
    Damage = [Base Damage * 1.25] + [Target's Level / 5] + 6

if 2
Critical Hits:
    Damage = [Base Damage * 1.5] + [Target's Level / 5] + 6


I'm still looking at the chance that a critical attack would occur, but I believe I have the general area to research, and it does make use of the random number generator.

081244DC = When "1" is used.
08124624 = When "2" is used.

It's quite much to study.

Looks like ability effects 36-40 might be used for one part. The *1.5 crit (Labeled as "?" in the editor.) So time to dive in!
36 = x1.5 dmg (1/64 chance)
37 = x1.5 dmg (1/32 chance)
38 = x1.5 dmg (1/16 chance)
39 = x1.5 dmg (1/8 chance)
40 = x1.5 dmg (1/4 chance)
41 = x2 dmg (32/256 chance)
42 = x2 dmg (64/256 chance)
43 = x3 dmg (32/256 chance)
44 = x3 dmg (64/256 chance)

65 = x2 dmg (153/256 chance)

68 = x3 dmg (153/256 chance)


89 = x3 dmg (128/256 chance), x2 dmg (51/256 chance), x1 dmg (77/256 chance)

Some numbers may or may not be off by 1/256... Since one may need to check the branching to know for sure. (Ex: Difference between > and >=)

(I'll have to see the rest of the formula to know if these are used by themselves or not.)
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! :)

jjppof

An EPA weapon, like gaia blade, has a elemental critical (if this really exist), not unleash, or it uses the normal critical formula?

Look this snippet from goldensunwiki.net/Critical:
"Criticals are not aligned with an element, and have no additional effects besides the extra damage."

And...
From this formula:

final damage = ((base damage * 1.25) + (target's level / 5) + 6)
base damage = (atk - def)/2, right?

Teawater, are you saying that criticals aren't always with this 1.25, could be 1.5 but you don't know when it happens? I didnt understand the if 0, if 1 and if 2.

Aile~♥

#6
Criticals with an elemental weapon uses whatever element the weapon has assigned. For example, the Sylph Rapier's normal attacks are Wind-aligned, so its critical hits are also Wind-aligned. You can observe this effect in-game by wielding the Sylph Rapier and scoring a critical on something like, for example, a Seabird. The text will display "Seabird1 takes XX damage!!!" with triple exclamation marks, just as if using an elemental ability the foe is weak to.

And yes, what Teawater is saying is that sometimes criticals use 1.25x damage, and other times they use 1.5x damage, and he has no idea what triggers this difference. It might be weapon-dependent, or there might be two different kinds of critical hits.

It's also rather interesting that criticals appear to have set effect rates like that, instead of being calculated in a manner similar to unleash rate. Does this mean that "increases criticals" doesn't actually increase critical rate, it ONLY increases unleash rate? Or am I missing something here?
[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]

jjppof

Quote from: JamietheFlameUser on 23, May, 2014, 04:18:50 PM
Criticals with an elemental weapon uses whatever element the weapon has assigned. For example, the Sylph Rapier's normal attacks are Wind-aligned, so its critical hits are also Wind-aligned. You can observe this effect in-game by wielding the Sylph Rapier and scoring a critical on something like, for example, a Seabird. The text will display "Seabird1 takes XX damage!!!" with triple exclamation marks, just as if using an elemental ability the foe is weak to.

How the final formula stays?

Then GS wiki is wrong about saying that criticals are not aligned to an element?

leaf

#8
It's not wrong but it's not fully accurate, either. Most weapon's basic attacks are null element, even if they have an elemental unleash. So, most weapon's crits are also null element. Gaia blade is an exception to the rule, since its basic attack is of a non-null element. Perhaps a more accurate way to phrase the rule then is "The critical of a weapon has the same element as that weapon's basic attack (usually no element)."
[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]

Daddy Poi's Oily Gorillas

#9
Small update!

x1.25 applies to ability 1.

x1.5 applies only to the 5 ability effects. (Interesting enough.)
36 = x1.5 dmg (1/64 chance)
37 = x1.5 dmg (1/32 chance)
38 = x1.5 dmg (1/16 chance)
39 = x1.5 dmg (1/8 chance)
40 = x1.5 dmg (1/4 chance)

So yeah, seeing as those are labeled"?", these may be unused, which may explain one reason why x1.5 may not have ever been documented?


@Attack:
If you have delusion, this check is made: If rand(0,255) <= 152, you'll miss. (aka: Multiplier thingy set to 0)
There is another check made regardless: 1/32 chance of missing.


As for Criticals...
-First check: 1/32 chance of a critical hit.
-Second check: ((Adds up Increases Criticals values from equipped items) << 16) / 200 > rand(0x0, 0xFFFF)

So what I recommend you do for Crits, is the 1/32 check, and then Increases Criticals values for equipped items. (Without the <<16 and /200 part, since you can probably base you numbers from 0x0 to 0xFFFF directly.)
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! :)

leaf

So would it be accurate to say that the first check is for the typical "critical," while the second check is for an unleash (which then becomes a standard crit if the weapon doesn't have one)? And if that's the case, does the second check override the first? E.g. first check runs and is a success, second check runs and is also a success. Or does the second check not run at all if the first is a success?
[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]

Aile~♥

I dunno if it's that simple. I've seen weapons with an unleash appear to land more criticals if you have "Increases Criticals" effects active. If, for example, the weapon has by default a 5% unleash rate, and you have 30% worth of "Increases Criticals" effects, you're still going to land criticals fairly often in addition to unleashes.

I wouldn't be surprised if x1.5 criticals are used for regular attacks made by certain foes. It's also possible that some weapons may have a hardcoded override to use those ability effects instead. (Nobody would be likely to notice, especially if the weapons in question are early-game weapons or also have an unleash rate.)
[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]

Daddy Poi's Oily Gorillas

#12
@leaf:Whoops. I forgot to explain that bit.

If first check is a success, the Critical Hit is applied.
If first check is not a success, the second check is done.

Both checks will do the same thing by setting the same RAM value to 1.

I didn't see the Unleash Rate used in the above Critical Hits study... however, I did just do a quick look-up on some  Unleash stuff...

When looking up unleashes... at least the part near the "lets out a howl" stuff... I find there's another part where Increased Criticals is calculated... unlike what I studied with Critical Hits, this one divides by 100 instead of 200.

((Unleash Rate + Adds up Increases Criticals values from equipped items) << 16) / 100 > rand(0x0, 0xFFFF)


@Jamie: From what I have seen in the code, this is as much as I know of, so far... I could be missing other things... but it just takes so long to study and verify every code trail. (And with so much to study, there may even be room for error. I try to be careful, though.)

And your hard-code idea sounds plausible...  but not sure yet, until I see an example in the code where they are done explicitly with ability effects.
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! :)

leaf

Oh, interesting. So then, does that mean a "+12% increased criticals" effect is actually only +6% in terms of getting a true crit?

There's also still the matter of which properties win out over other ones. For instance:
- Unleash
- Crit
- Miss

Which of these takes priority over the others? Intuitively, it seems unleashes should take priority over crits, but where do misses fit in to all this?
[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]

Aile~♥

Another thing I'm curious about is an unused Ability Effect that was mentioned a long time ago.

I don't remember what number it was, but when the ability targets a combatant the following text appears:

"[target] rises to the challenge!"

I'm wondering if perhaps this ability effect changes the target's 1/32 critical (the first check) to use one of the ability effects from 36 to 40. As I recall, whoever brought that effect up mentioned that there was some code that they didn't understand what it did.
[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]

jjppof

So, to crit, first I have to do 1/32 check. If It's applied, the crit is released without any equipment boost. If it isn't applied, a second check is done with 1/32 chance again, but now, the crit is boosted if there is equipments that can do it.

If first check is applied: ((base damage * 1.25) + (target's level / 5) + 6)
If second check is applied: ((base damage * 1.25) + (target's level / 5) + 6) * (equipBoost(%) + 100%)


And all this has nothing to do with weapon unleash whose chance is almost always 35% and formula is EPA, right?

Another doubt is whether the equip crit booster increases only crits or crits and weapon unleashes?

Confusing...

Rolina

I think it applies to both, but crit chance is only checked when unleash doesn't go off.  If you have all crit gear and you equip a mundane weapon such as a greatsword, it'll still have a super high critical hit chance.

Daddy Poi's Oily Gorillas

-Don't think I mentioned anything on equipment boosts. (Except for Increases Criticals and Unleash Rates.)
-On the second check, I don't think you do the 1/32 check again. That's what the first check was for.
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! :)

jjppof

Quote from: Teawater on 25, May, 2014, 09:10:26 AM
-Don't think I mentioned anything on equipment boosts. (Except for Increases Criticals and Unleash Rates.)

Sorry, then. That was what I understood from this:

Adds up Increases Criticals values from equipped items

English isn't my native language. Sometimes I have some difficults to understand stuff. I confused crit chance boost with damage boost.

Well... I'm completely lost.

Let me explain how the system currently is:

For each regular attack a test to crit is done. The chance of this test be positive is 1/32 + equips chance increases. If the test is positive I apply this formula:
((base damage * 1.25) + (target's level / 5) + 6)

leaf

I'm not actually sure why GS uses such a convoluted way to determine crits, but if you're aiming for accuracy you need two checks:

Check 1: [1/32] chance to crit.
Check 2 (if check 1 failed): [(Increased Criticals)/2] chance to crit.

If either check succeeds, apply the formula: [(base damage * 1.25) + (target's level / 5) + 6]

Intuitively, unleashes should have priority over normal crits. The check for an unleash is: [(Base unleash rate) + (Increased Criticals)] chance for unleash.
[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]