Golden Sun Hacking Community
December 13, 2019, 03:44:49 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: 1 [2] 3 4   Go Down
  Print  
Author Topic: Master Formula List  (Read 45031 times)
0 Members and 1 Guest are viewing this topic.
Salanewt
His Sexiness
Global Moderator

Oh yeah, baby!

Prodigy
*

Coins: 0
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4593

« Reply #20 on: June 01, 2014, 07:52:35 PM »

Well, the second one isn't a check at all; merely an observation I made when I was researching this. If you cap your characters at those values, then you can guarantee your desired turn order 100% of the time. When you factor in gear, classes, buffs and so forth, then you can change around your turn order fairly easily. Granted, since reaching those agility values isn't very likely, you would almost be further ahead to try figuring out what agility values you would expect your characters to have by the end of the game and work with that.

In other words, exactly what leaf said! I think he once mentioned that dividing those values by two would give you your "practical use caps" for a normal save file.

Other than that, you've got it.


Edit: Healing and Regenerate formulas are up; they are pretty simple as far as calculations go. I probably won't do the HP% ability effects because those don't use a consistent formula, and I likewise won't add any custom formulas until there is a decent collection of vanilla ones in the first post.
« Last Edit: June 02, 2014, 12:13:09 AM by Salanewt » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #21 on: June 02, 2014, 10:22:38 PM »

The value returned by the Ailment Success formula is X.
   if X >= rand(0, 65535): the ailment was successful

Is it right?

--------------------------------------------

floor() always rounds down and to a integer?

-------------------------------------------

I didnt understand these 3 terms:

  • effect's base chance - are these values given?
  • vulnerabity's 25
  • unk_arg
Logged

View Profile WWW
Salanewt
His Sexiness
Global Moderator

Oh yeah, baby!

Prodigy
*

Coins: 0
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4593

« Reply #22 on: June 02, 2014, 11:44:16 PM »

I think in this case, it's actually a random number from 0-99 (x00-x63) and it will always succeed if you get 100% or higher. I should probably add this to the first post...

Floor(luck) rounds down because it doesn't use decimals; for example, a luck value of 60 is pretty much the same as a value of 61 in this case. Both will be 30 when you divide them by 2.


As for the other three terms:

  • Base chance/rate: Yep! There's a spoiler tag in the first post that lists the rates along with most (if not all) of the effects that use those rates. A flat rate means that it doesn't use the formula, while the rest of them will.
  • Vulnerability 25: Each class has three values which correspond to ability effects; if there is a value above 0 in a class, then it will add +25% to the success rate of that effect. Enemies also have these three values that correspond to ability effects. If looking at them in the editor, they will be the numbers at the bottom of the class section and the ones above the elemental tables for enemies.
  • Unk_arg: We're not actually too sure on what it does. Teawater thinks it has something to do with multi-target effects, but I currently have a theory that it might have something to do with whether the "effect only" formula is being used or not. I'm sure one of us will test it in the relatively near future.

I hope this helps!


Oh yeah, I forgot to mention that the poison (battle) formula is up! Well, more like a calculation than a formula, but still. It's pretty powerful!
« Last Edit: June 03, 2014, 12:58:39 AM by Salanewt » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
leaf
Potions class is starting
Venus Clan

Death Eater+Grass Snake = Snake Eater? SNAAAAAAAKE

Veteran Member
*

Coins: 0
Offline Offline

Posts: 1322

« Reply #23 on: June 03, 2014, 03:29:45 AM »

Quote
floor() always rounds down and to a integer?
Correct. Floor(25.6) = 25. Floor(25.1) = 25. Floor(25.9999) = 25. etc. It's identical to a truncation for positive numbers, e.g. Floor(25.55) = 25 and Trunc(25.55) = 25, but differs in the case of negative numbers, where Floor(-25.55) = -26, and Trunc(-25.55) = -25. Since we pretty much never deal with negative numbers in games, the difference is mostly academic.
« Last Edit: June 03, 2014, 03:43:10 AM by leaf » Logged

Spoiler for 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
View Profile
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #24 on: June 03, 2014, 09:56:03 PM »

Which 3 values are you saying?
I see 2 values for party members in class section and 4 values for enemies in enemy section.
If one of these values is higher than 0, the Vulnerability  is 0.25? If not, 0?

just few enemies have all 4 fields 0 and they are strange enemies.
Can I let it 0.25 fixed?

And for a while, I will let the unk_arg = 1.

And I didnt undertand the spoiler table with the rates:
 35% (24 - Sleep), for example. The base value is 0.35 or 24?


* enem class.PNG (78.18 KB, 528x421 - viewed 582 times.)

* class actor.PNG (85.91 KB, 527x423 - viewed 536 times.)
Logged

View Profile WWW
Salanewt
His Sexiness
Global Moderator

Oh yeah, baby!

Prodigy
*

Coins: 0
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4593

« Reply #25 on: June 04, 2014, 01:46:37 AM »

Oh yeah, I have a slightly different version of the editor that displays those correctly. Um...

The two values in the party editor are actually supposed to be four 8-bit values (with only three of them being used) rather than two 16-bit values. If you convert the number you see in that picture to hex format and separate the numbers, you should have effects x1F and x3C. Converting these to decimal again would give you ability effects 31 (may drain HP) and 60 (recover 50% damage to HP). As far as I can tell, most of the classes only use up to two vulnerability slots each despite three being available. As for the enemy editor, the box on the right does nothing at all; you can pretty much ignore it. Both classes and enemies can have them all at 0, or they can use all three.

I don't really understand what you mean by the ".25 fixed" part, would you mind clarifying that question a bit?

And lastly, the base values are whatever ends with a % symbol. The brackets merely list a bunch of the effects that use those percentages.
« Last Edit: June 04, 2014, 02:00:24 AM by Salanewt » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #26 on: June 04, 2014, 02:19:09 AM »

Nooooooow I got this "class ability"... nice nice nice....

If a certain class havent a certain ability, I let the base 0, right? Its summing...

------ wai-wait..... hahahaha editing.......

If a char has a class that has these abilities:
Sleep and Haunt (2426)

This char will put someone to sleep, so the formula is:

(((((levelRate - floorThing) * 3.0) + 0.35 + 0.25) * unk_arg) / 100.0)

noow... this same char will poison someone else, so the formula is:

(((((levelRate - floorThing) * 3.0) + 0.55 + 0) * unk_arg) / 100.0)

right?
« Last Edit: June 04, 2014, 02:25:57 AM by jjppof » Logged

View Profile WWW
Salanewt
His Sexiness
Global Moderator

Oh yeah, baby!

Prodigy
*

Coins: 0
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4593

« Reply #27 on: June 04, 2014, 02:37:27 AM »

I think I understand what you're asking now! So...

The base rates in the spoiler are used in the formula regardless of whether a class/enemy is vulnerable to it or not (with the only exceptions being the flat success rates, as those don't use the formula). All a vulnerability does is add +25% to the value calculated earlier in the formula, and it won't do this if the class/enemy does not have a particular vulnerability. I guess it basically makes +0% the default, yeah.


Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #28 on: June 04, 2014, 07:08:57 PM »

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

for the elemental level, what is the element? Which of the four element I choose? Element of the skill I'm casting? Ask is good... hahahahaha


---------------------------

see how the code is:

function state_rate(caster, taker, state_id, skill){
    element = skill.element_id
    levelRate = 0
    if caster.isEnemy
       levelRate = eLevel_Enemy[caster.id][element] - eLevel_Ally[taker.id][element]
    else
       levelRate = eLevel_Ally[caster.id][element] - eLevel_Enemy[taker.id][element]

    floorThing = (caster.luck/2).floor

    baseChance = getBaseChance(state_id)

    unk_arg = 1

    abilities = getAbilities(caster)
    vulnerabity = 0
    if state_id in abilities
       vulnerabity = 0.25 
 
    value = (((((levelRate - floorThing) * 3) + baseChance + vulnerabity) * unk_arg) / 100)
    return value
  }

//in other function....
[...]
if rand(0,99) <= state_rate(caster, taker, state_id, skill)
        add_state(state_id)
[...]
« Last Edit: June 04, 2014, 09:01:38 PM by jjppof » Logged

View Profile WWW
leaf
Potions class is starting
Venus Clan

Death Eater+Grass Snake = Snake Eater? SNAAAAAAAKE

Veteran Member
*

Coins: 0
Offline Offline

Posts: 1322

« Reply #29 on: June 05, 2014, 04:25:24 AM »

Yes, element of the skill you're casting. So if you're casting haunt, you would use venus elemental levels for the attacker and defender. If you're casting delude, you would use the jupiter elemental levels for the attacker and defender. And so on.
Logged

Spoiler for 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
View Profile
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #30 on: June 06, 2014, 01:35:11 AM »

Ailment Recovery

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

Every turn I have to check this?
Logged

View Profile WWW
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 0
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2454

« Reply #31 on: June 06, 2014, 05:21:11 AM »

Quote
unk_arg = 1
This should be 100. (Or you could leave it if you get rid of the /100 part.)

Think like this: a * 100 / 100 = a * 1

Anyway, it still looks like unk_arg is for multi-target.

First (Primary Target) = 100%
Second (Next to the target) = 60%
Third = 30%
Forth = 30%
Fifth = 30%
Sixth = 30%

But if you want to use decimals... then be my guest. ( a * # without the /100 in the equation. For example, a * 0.6)

Quote
Every turn I have to check this?
Yes.
« Last Edit: June 06, 2014, 05:25:56 AM by Teawater » Logged

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...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #32 on: June 06, 2014, 05:27:34 AM »

Quote
Every turn I have to check this?
Yes.

But which states I have to check this? I cant have this check for downed, for example.

------------
and this unk_arg = 100 for the main target
                       = 60 to the next to
                       = 30 and so on
                                 ?
« Last Edit: June 06, 2014, 05:33:42 AM by jjppof » Logged

View Profile WWW
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 0
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2454

« Reply #33 on: June 06, 2014, 05:51:25 AM »

There might have been a chance that I misread...

If you're asking where the checks should be done, I believe it is done at the end of a Round. (After everyone has taken a turn.) Hopefully I read that right. ; I believe that the check is made for each character, so that's probably how I misread.)

*Went back to quickly double check something*
Spoiler for Hidden:
81247F8 = End

Random chance of recovering from an ailment/debuff
(((Luck * 3) - (Turns * 5) + base_chance) * 655) >= 16BIT[rand()]
Attack = 30%
Defense = 20%
Resistance = 20%
Delusion = 30%
Confuse = 60%
Charm = 70%
Stun = 20%
Sleep = 50%
Psy-seal = 30%
08124810 = Start
08124850 = End

08124854 = Decrement Attack (De)Buff Turn Duration
081248B4 = Decrement Defense (De)Buff Turn Duration
08124914 = Decrement Resistance (De)Buff Turn Duration
08124974 = Decrement Delusion Turn Duration
(Sees clearly once again.)
081249B0 = Decrement Confuse Turn Duration
(Regains consciousness.)
081249EC = Decrement Charm Turn Duration
(Regains consciousness.)
08124A28 = Decrement Stun Turn Duration
08124A64 = Decrement Sleep Turn Duration
08124AA0 = Decrement Psy-seal Turn Duration
(Psynergy seal)
08124AF8 = Decrement Regenerate Turn Duration
(Recovering HP)
 08124B56 = [18][1]'s HP is fully restored!
 08124B68 = [18][1] recovers [22] HP!
08124BA8 = Decrement Reflect Turn Duration
08124BCC = Decrement Agility Buff Turn Duration
08124BFC = Unknown (Djinn-related)
08124CAC = Unknown (Djinn-related) (Linked from pub only.)
08124CC0 = Return
08124CC4 = Start
 08124D92 = [21] is set to [18][1]!
08124E1A = End

End of round (+ status effects)
08124E20 = Start of function.
08124F0C = [21] is set to [18][1]!
0812501E = Approximate location for setting Counter-Attack (Reflux) to 0.
081250A8 = [18][1]'s HP is fully restored!
081250B0 = [18][1] recovers [22] HP!
08125104 = [18][1]'s PP is fully restored!
08125120 = [18][1] recovers [22] PP!
08125150 = [18][1]'s Agility returns to normal!
0812517A = [18][1]'s Attack returns to normal!
081251A4 = [18][1]'s Defense returns to normal!
081251CE = [18][1]'s Resistances return to normal!
081251F8 = [18][1] sees clearly once again!
08125222 = [18][1] regains consciousness! (3306)
0812524C = [18][1] regains consciousness! (3310)
0812527C = [18][1] is no longer stunned!
081252AC = [18][1] wakes from slumber!
081252D6 = [18][1]'s Psynergy seal is gone!
08125300 = [18][1] stopped recovering HP!
0812530C = Call Decrement Reflect Turn Duration
0812532A = Reflect no longer affects [18][1]!
0812535A = End of function.
Apparently, my documentation didn't list it detailed enough...

"But which states I have to check this?" = states? *confused and feels lame for not understanding*

Each character has a series of bytes for each status effect counter. For example, you'll need 5+ Sleep count-downs, one for each PC and enemy, and 5+ for Stun, and everything else that counts turns.., I forget what happens when your character is Downed, but I could assume you could set all these count-downs to 0.



@unk_arg = Yes, pretty much... it stops at "Sixth" (11 characters) because going further is not supported.
« Last Edit: June 06, 2014, 05:59:31 AM by Teawater » Logged

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...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile
Salanewt
His Sexiness
Global Moderator

Oh yeah, baby!

Prodigy
*

Coins: 0
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4593

« Reply #34 on: June 06, 2014, 06:05:58 AM »

I think you're actually supposed to be cured of everything when you are downed though, so it shouldn't check in that instance anyway. It's actually one of the easiest ways to get rid of haunt if you're somehow broke and have Revive or something.

Cool, thanks for the info Teawater! I'll add it to the first post.


And... Researching the "effect only" formula right now. Some of it seems pretty complicated, but I have figured out this much so far:

((Output Damage * 100)/100)/(Multi-Penalty)
Multi-Penalty = 1 for primary target, 2 for secondary, 5 for tertiary, 10 for quaternary


I'm still trying to figure out exactly how "Output Damage" is calculated, but it does involve using the difference between the attacker's ePow and the defender's eRes stats. This shared function also has some code that defines the max eStat difference range to be from -199~200, so a difference that is a greater or lesser amount than one in that range will simply be overwritten with the floor or cap. Basically, this means that there is no difference between ePow/eRes stats of 0/200 or 50/250 (ignoring the cap of 200 of course).


Edit: Renamed "unk_arg" to "multi_arg" in the formula, seeing as it's not an unknown variable anymore.
« Last Edit: June 06, 2014, 02:42:37 PM by Salanewt » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
leaf
Potions class is starting
Venus Clan

Death Eater+Grass Snake = Snake Eater? SNAAAAAAAKE

Veteran Member
*

Coins: 0
Offline Offline

Posts: 1322

« Reply #35 on: June 06, 2014, 08:06:27 AM »

Quote
Multi-Penalty = 0 for primary target, 2 for secondary, 5 for tertiary, 10 for quaternary
So I'm guessing you meant it should be 1 for the primary target, unless it has infinite success rate >_>
Logged

Spoiler for 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
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 0
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2454

« Reply #36 on: June 06, 2014, 09:19:07 AM »

--- Part 1: Defense Mod(?) ---

@Multi-target for Effect Only: Are you sure that's multi-target?

"1" = 1/2 (0200064B is 1 when Isaac's defending. Maybe that's how Defend's defense is done?)
"2" = 2/5
"3" = 1/10

So that you can understand how the scaling looks:
"1" = 5/10
"2" = 4/10
"3" = 1/10


--- Part 2: Multi-target damage ---

Anyway, as for Multi-Target Damage, the percents are:

100%
50%
30%
10%
10%
10%


--- Part 3: My attempt to look at the formula ---

For the formula, I'm seeing..

damage * unknown * (multi_target_value_out_of_100/100) * defense_mod

Notes:
damage = includes the elemental mod.
unknown = Too lazy to look up at the very moment.
multi-target = see second part of post.
defense_mod = See first part of post.
« Last Edit: June 06, 2014, 09:22:07 AM by Teawater » Logged

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...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #37 on: June 06, 2014, 01:01:11 PM »

I will try to express me better...

Every turn end I have a function that apply the recovery formula and update the states tuns count:

function update_state_turns(){
   foreach state in chars: //loop all states of all chars in battle
      actualChar = state.getActor
      luck = actualChar.luck
      actual_state_turn = state.turnCount
      recoveryBaseChance = getRecoveryBaseChance(state.id)
      formulaValue = (((luck * 3) - (actual_state_turn * 5) + recoveryBaseChance) * 655)
      randomNumber = rand(0, 65535)
      if formulaValue >= randomNumber
        remove_state(state.id)
      else
         state.turnCount -= 1
   }
}

function end_turn{
[...]
   update_state_turns()
[...]
}


What I'm asking is:
this method update_state_turns is checking all kinds of states, including downed (hahahahaha every end turn a char has a chance to revive). Beyond this state, which others can't be checked?
I dont know, but haunt and poison cant be recovered by this formula, I guess....
« Last Edit: June 06, 2014, 01:11:03 PM by jjppof » Logged

View Profile WWW
Salanewt
His Sexiness
Global Moderator

Oh yeah, baby!

Prodigy
*

Coins: 0
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4593

« Reply #38 on: June 06, 2014, 03:02:46 PM »

leaf: Oops, that's right! Fixed it.

Teawater: I was pretty sure, but I just double checked and I think you might be right. Defending cuts almost all damage in half, and I tested the code with a 3-target Drain spell. Whenever I switched the primary target between two enemies, the secondary enemy always took half the damage it took when it was the primary target; neither of them had the defend command to begin with. That's why I was mistaken.

That being said, I don't see one for the "95% damage decrease" effect in here. I guess that might be because it was added in GS2 and Camelot figured out a better way to calculate it. Or something.

As for attempt 3, that's pretty much what I have now. That "unknown" part is what I'm looking into right now, and that's what uses the ePow/eRes calculation code to modify the base damage. It looks like almost every damage formula uses it, so figuring this out would make figuring the rest of the formulas out much easier. I think.

And... here's exactly what I have now in my .txt file, with your corrections in place:

Base Damage
(
(Output Damage(multi_mod * 100)/100))*def_mod
"multi_mod" = 100% for primary, 50% secondary, 30% tertiary, 10% everyone else
"def_mod" = 100% for normal, 50% for 50% damage off, 40% for 60% off, 10% for the 90% effect. Probably hard-coded in every damage formula, yay!

The "Output Damage" part is what is calculated with base damage and the eStat differences; I've figured a fair bit of it out, so I'll continue doing a little more research until I get back to work. It's temporary until I figure out exactly how it is calculated, in which case it will be replaced with the earlier parts of the formula. It also seems to happen in the "multiply by 1.28?" function that you weren't too sure about in the data document. It also looks like I don't have your "unknown" modifier in the formula; would you mind looking into that at some point while I research this other part?

Edit: When the time comes to add the completed formula to the first post, I'm probably not going to bold the "def_mod" part because that's seems to be a part of the damage formula out of laziness. I don't know. The 95% one isn't in here anyway, so... yeah.


jj: I think this function is supposed to apply to every unit at the end of the round, so everyone should be finished their own turns by then. It also shouldn't apply to poison/deadly poison, haunt, death curse/countdown, and death/downed. Or buffs! Happy






« Last Edit: June 06, 2014, 03:50:56 PM by Salanewt » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
jjppof
Modafoca

Regular Member
**

Coins: 0
Offline Offline

Gender: Male
Posts: 107

« Reply #39 on: June 06, 2014, 04:12:04 PM »



jj: I think this function is supposed to apply to every unit at the end of the round, so everyone should be finished their own turns by then


Yeah, in the way that the code is, It is applying for everyone.



It also shouldn't apply to poison/deadly poison, haunt, death curse/countdown, and death/downed. Or buffs! Happy



Thats the information I wanted!! Thanksss  Happy
Logged

View Profile WWW
Pages: 1 [2] 3 4   Go Up
  Print  
 
Jump to:  

Cbox
December 04, 2019, 11:48:57 AM
Fox: (Uh... Ignore "Love" at the beginning... I think I started to say it in a different way, then changed my mind.)
December 04, 2019, 11:47:50 AM
Fox: Love gsiconcompressor has been updated... Mainly an attempt to make icon editing a bit more straight-forward than ever before. Although, the coding wasn't exactly that straight-forward.
November 14, 2019, 01:50:02 PM
Fox: So like... a layers offset might normally be located at +0xC, but in Tennis, it is at +0x10)
November 14, 2019, 01:48:51 PM
Fox: (Talking about the data in map header thingy.)
November 14, 2019, 01:48:10 PM
Fox: So took a look at Tennis.... Seems Atrius's editor displays all maps incorrectly because he forgot that some stuff was offsetted by 4 (You know with everything from layer offsets and files/etc.)  Fix that, and it seems to display properly. Hm.
November 14, 2019, 06:18:29 AM
Fox: That is a quote I found somewhere. How amusing. xD
November 14, 2019, 06:18:06 AM
Fox: only canadians give up dont be a canadian
November 11, 2019, 03:27:02 AM
Salanewt: Especially since there might be a v0.5.1.1 in the near future, if any bugs are found by people playing the demo.
November 11, 2019, 03:26:38 AM
Salanewt: Oh yeah, so for people who aren't aware; v0.5.1 of the AI Overhaul is available on the Discord, but I'm delaying the creation of a downloads page + topic until I finish the demo.
November 02, 2019, 12:05:31 PM
Fox: And yeah, there's a topic for the Discord. in News & Announcements (http://forum.goldensunhacking.net/index.php?topic=2831.0)
November 02, 2019, 11:55:00 AM
Fox: Went to go study some German a little earlier. (Using duolingo to give it a try.) ... And. Huh. German capitalizes all nouns? (Not necessarily pronouns, though.)
November 01, 2019, 07:49:25 AM
thenightsshadow: Didn't realize there was a Discord at all.
October 31, 2019, 07:22:02 AM
Fox: (Which I guess not having Special badges in inventory was by purpose.... So I'll ifnore that bit. Just whats with the dup Halloween badge in inv?)
October 31, 2019, 07:18:26 AM
Fox: Question about badges = Why do I have two of the same Halloween badge in my inventory... but not on my profile? And by two, I mean the Honk badge is not there.
October 31, 2019, 06:56:26 AM
Fox: Does tns want to join the most active part of GSHC? - Its Discord? :D  And welcome back!
October 31, 2019, 06:52:17 AM
Fox: (Ofcourse it would be capitalized if it were the name of a system, and anytime that system would be referenced... but I'm more going with why we *never* see Psynergy and Djinni not capitalized.)
October 31, 2019, 06:49:58 AM
thenightsshadow: Yeah, just kinda got an email out of nowhere and it reminded me.
October 31, 2019, 06:42:40 AM
Fox: and main reason I said "not intended to become part of English" ... was because I thought of words like "animals"... and they can technically still be lowercase at times.
October 31, 2019, 06:41:17 AM
Fox: group/type/thing/whatever
October 31, 2019, 06:38:54 AM
Fox: Not saying it is exacly that... but it is a thought, at least.

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.317 seconds with 22 queries.