Author Topic: Labyrinth of Touhou 2 - 14F  (Read 219672 times)

ZXNova

  • Life is an explosion!
Re: Labyrinth of Touhou 2 - 14F
« Reply #150 on: November 26, 2014, 06:46:24 PM »
Iku is more Lightning than Wind. It makes more sense for it to be either Aya, Sanae or Kanako.

Iku in SWR/Soku attacks with both Wind and Electricity. Besides, Wind and Electric are the same in this game, so her having a passive that reduces wind damage would not be far fetched at all.

Re: Labyrinth of Touhou 2 - 14F
« Reply #151 on: November 26, 2014, 08:33:59 PM »
Or, Take flandre for a walk (Equip with genji glove or any boost attacking items) Buff attack/speed with enhancer sakuya And boost speed with aya

Axel Ryman

  • Fear me
Re: Labyrinth of Touhou 2 - 14F
« Reply #152 on: November 27, 2014, 12:21:18 AM »
Out of curiosity Ethan, would you be able to find any damage formulas using that?

EthanSilver

  • Lunatic Programmer
  • Got squid, will travel.
    • Ethan Silver's Junkpile - Hacks and translation patches
Re: Labyrinth of Touhou 2 - 14F
« Reply #153 on: November 27, 2014, 02:49:58 AM »
Out of curiosity Ethan, would you be able to find any damage formulas using that?
Damage is apparently calculated as follows for most commands...
((ATK * CommandATK% + MAG * CommandMAG%) - (DEF * CommandDEF% + MND * CommandMND%)) / (Affinity/100)

For instance, Rabies Bite has 150 CommandATK% and 50 CommandDEF%, so the formula for it would be...
((ATK * 1.5) - (DEF * 0.5)) / (PHYAffinity / 100)

It should be noted that there appears to be a hidden affinity. The game has values for 9 of them. It looks as though the "hidden" affinity is for magic attacks (ie, melee attacks by characters whose MAG exceeds their ATK). Why the game hides it is unclear...

But, there's also a multiplier applied somewhere in there (not sure where yet; either to the damage portion or (most likely) to the (damage - defense) portion... or to the whole formula; Rabies Bite's is 150% for instance) which generally goes up by 5% / additional spellcard level. In addition, there's some degree of randomization I'm unclear on. Sudden Impulse multiplies the min variance by 10 * Lv and the max variance by 5 * Lv (or maaaaybe the other way around), for instance. And of course, passive skills can have an impact on a lot of this (ex, Enhanced Normal Attack adds 30 to the CommandATK or CommandMAG, depending on which type of attack is being carried out).

I'll probably have the specifics later on. I'm busying myself with the skills at the moment so it's likely to turn up soon enough...
« Last Edit: November 27, 2014, 02:59:37 AM by EthanSilver »


Latest works
The Strongest

Kirin no Sora

  • Wanderer of Gensokyo
  • I have returned from the nothingness once more...
Re: Labyrinth of Touhou 2 - 14F
« Reply #154 on: November 27, 2014, 03:43:15 AM »
The function which sets up a character's passive stat boost skills looks like this. To sum it up, a character's default skills are switched "on". The game then checks all tomes that were used and switches those skills "on" as well. Then, it assigns the ID of the corresponding passive stat boost skill, checking to see if it's handling Rinnosuke and assigning the "high boost" skill IDs instead if that's the case. Then some stuff that I-don't-know-wtf-yet-but-it's-probably-not-too-important.

There's no easy way to control for individual characters, but you can change the ID of who gets the "high boost" skills by changing the 0x03 at 00061791 (Rinnosuke's character ID) to something else.
You can also make everyone get the "high boost" skills by changing the 0x01 at 00061799 to 0x19 (making it so the default skills for boost skills uses the "high boost" list).

So it's possible to give everyone the High Boost skills, then... Thanks for the info.

I haven't looked into this yet but the original LoT gave each skill a set of parameters (MP / %ATK / %MAG / %DEF / %MND / Post-use delay / targetting info, etc..) and handled additional effects (like the influence of Marisa's remaining MP on Master Spark's damage calculations, or other oddball things) through code. I'd assume most passive skills are code-based (can't really see how they could be handled with just a bunch of parameters... there's too little overlap between their effects) but a very quick look through my listing makes me think spellcards are handled like they were in the original LoT. In other words, most damage calculations and the likes can be tweaked with a hex editor but the more complex stuff is handled through code on a per-spellcard basis.

Can I presume that healing HP is parameter based and curing status ailments is code based, yes? Also, I can safely presume that anything that restores MP is code based(Magic Transfer mainly), yes?

Damage is apparently calculated as follows for most commands...
((ATK * CommandATK% + MAG * CommandMAG%) - (DEF * CommandDEF% + MND * CommandMND%)) / (Affinity/100)

For instance, Rabies Bite has 150 CommandATK% and 50 CommandDEF%, so the formula for it would be...
((ATK * 1.5) - (DEF * 0.5)) / (PHYAffinity / 100)

It should be noted that there appears to be a hidden affinity. The game has values for 9 of them. It looks as though the "hidden" affinity is for magic attacks (ie, melee attacks by characters whose MAG exceeds their ATK). Why the game hides it is unclear...

But, there's also a multiplier applied somewhere in there (not sure where yet; either to the damage portion or (most likely) to the (damage - defense) portion... or to the whole formula; Rabies Bite's is 150% for instance) which generally goes up by 5% / additional spellcard level. In addition, there's some degree of randomization I'm unclear on. Sudden Impulse multiplies the min variance by 10 * Lv and the max variance by 5 * Lv (or maaaaybe the other way around), for instance. And of course, passive skills can have an impact on a lot of this (ex, Enhanced Normal Attack adds 30 to the CommandATK or CommandMAG, depending on which type of attack is being carried out).

I'll probably have the specifics later on. I'm busying myself with the skills at the moment so it's likely to turn up soon enough...


A few things...

1. A hidden affinity, hm? What is the affinity written as in code?
2. Aren't melee attacks that use the MAG stat MYS affinity?
3. I think that the game probably uses a constantly changing variable (read: time) as the means to randomize the damage. By how much, I don't know.

I do believe that we all appreciate what you're doing, Ethan. Thanks.
There is no greater joy than knowing that the Touhou invasion is unstoppable, and the legacy of Gensokyo will never fade away...

EthanSilver

  • Lunatic Programmer
  • Got squid, will travel.
    • Ethan Silver's Junkpile - Hacks and translation patches
Re: Labyrinth of Touhou 2 - 14F
« Reply #155 on: November 27, 2014, 04:58:54 AM »
Can I presume that healing HP is parameter based and curing status ailments is code based, yes? Also, I can safely presume that anything that restores MP is code based(Magic Transfer mainly), yes?
Healing is handled in the same way as regular damage, only the CommandATK% and CommandMAG% values are negative. Healing spellcards rarely (never?) set a value for DEF/MND and skip the affinity calculation (I haven't confirmed this, but it sounds reasonable to assume so...) For instance, Exorcising Border has a MAG of -66 (and a base multiplier of 100), so its formula before applying passives/randomization is...
MAG * 0.66 (+5% per level above 1)

Ailments are removed when they have a negative value (usually -1).

Magic Transfer, I'm having a look at right now. I'll edit this post once I see how it handles itself. I'm guess it's code-based though, nothing in the basic spellcard structure seems like it would account for an effect like that...
(Edit: Yeeeep, code-based.)

1. A hidden affinity, hm? What is the affinity written as in code?

It comes up in a number of places. Enemies and characters, for instance, have an extra parameter right after their affinity list with a value that looks affinity-like (100 in many cases). Spellcards set their element through a series of flags (isElementFIR, isElementSPI, isElementPHY...) stored as an array of 9 values, not 8. I haven't found one that uses the 9th one yet but then again, I've only looked at a few spellcards so far.

Here's the Kedama's affinities and resistances. Note that resistances also seem to have a few extra parameters...

2. Aren't melee attacks that use the MAG stat MYS affinity?
Hmm. Then, I'm not sure. "MAG affinity" is just my guess - it could also be some supar secreat hiddan nazi elemunt!!!, or something that was simply dummied out. All's I know for sure is that it exists in memory, is defined for characters/enemies/spellcards, and can be used (but isn't necessarily used) by all affinity-related code.

I do believe that we all appreciate what you're doing, Ethan. Thanks.
Thanks. :) I figured I may as well share my discoveries - so far, the wiki is kind of sparse as to the specifics of each spellcard/skills/formulas so I'd be glad to help work out the game's mysteries.

I've been considering moving these mechanics-related findings to RaNGE to avoid cluttering the thread too much and distracting from actual gameplay discussion. Or is this the right place? Any thoughts? I kinda feel like I'm posting plenty of walls of text...

Oh, craaaap, forgot supper on the stove while I was typing this up x_x
« Last Edit: November 27, 2014, 05:36:20 AM by EthanSilver »


Latest works
The Strongest

Axel Ryman

  • Fear me
Re: Labyrinth of Touhou 2 - 14F
« Reply #156 on: November 27, 2014, 05:02:40 AM »
I'd say I love you but I'm not that kind of guy. Excuse me while I backtrack through the thread so that I can do some formula/enemy stat finding.

Re: Labyrinth of Touhou 2 - 14F
« Reply #157 on: November 27, 2014, 06:23:18 AM »
I am not sure if this will affect the player characters, but I know some enemies are more resistance to some singular stats debuffs than others, maybe that might have something to do with it?
There might be something on how resistant to the strength of a status or debuff is, and not just the affliction rate.

EthanSilver

  • Lunatic Programmer
  • Got squid, will travel.
    • Ethan Silver's Junkpile - Hacks and translation patches
Re: Labyrinth of Touhou 2 - 14F
« Reply #158 on: November 27, 2014, 10:17:14 AM »
I'll just leave this here and turn in for the night.

Spellcard formulas, part 1

A few things are missing and I can't guarantee I haven't made any mistakes (it's like, 5 am; cut me some slack :( ). I hope to have every character done in a day or two, and maybe I'll tackle the enemy spellcards after that. A few quick notes...

  • (ailment/debuff) chance may or may not be a percentage value. I really don't know how the game uses this; I just got out the info that was in the spellcards. But the higher, the more likely the effect/debuff will be caused.
  • Some effects are handled through code. I have a good idea where, but I don't have enough information to reverse-engineer those parts yet. I've left a TODO where appropriate.
  • Some spellcards have a second version used by the boss version of their owner. The stats are often different. I left a note to that effect in the relevant cases (mainly, Youmu, Komachi, Kaguya).
  • All damaging spellcards have a resistance of 50% DEF or MND so far. Dunno if that's always the case. Also, increasing their level will always increase the multiplier by 5% in addition to other possible effects.

More tomorrow. G'nite!


Latest works
The Strongest

Re: Labyrinth of Touhou 2 - 14F
« Reply #159 on: November 27, 2014, 11:20:46 AM »
Wow, good information.
I was trying out spell card testing on the first stage and yeah, I noticed that the increase when levelling up damage cards were lackluster.

Quote
Spellcards set their element through a series of flags (isElementFIR, isElementSPI, isElementPHY...) stored as an array of 9 values, not 8. I haven't found one that uses the 9th one yet but then again, I've only looked at a few spellcards so far.

Of the 9, have you counted Maribel's Void element?

Axel Ryman

  • Fear me
Re: Labyrinth of Touhou 2 - 14F
« Reply #160 on: November 27, 2014, 01:05:26 PM »
I'll just leave this here and turn in for the night.

Spellcard formulas, part 1

A few things are missing and I can't guarantee I haven't made any mistakes (it's like, 5 am; cut me some slack :( ). I hope to have every character done in a day or two, and maybe I'll tackle the enemy spellcards after that. A few quick notes...

  • (ailment/debuff) chance may or may not be a percentage value. I really don't know how the game uses this; I just got out the info that was in the spellcards. But the higher, the more likely the effect/debuff will be caused.
  • Some effects are handled through code. I have a good idea where, but I don't have enough information to reverse-engineer those parts yet. I've left a TODO where appropriate.
  • Some spellcards have a second version used by the boss version of their owner. The stats are often different. I left a note to that effect in the relevant cases (mainly, Youmu, Komachi, Kaguya).
  • All damaging spellcards have a resistance of 50% DEF or MND so far. Dunno if that's always the case. Also, increasing their level will always increase the multiplier by 5% in addition to other possible effects.

More tomorrow. G'nite!



...I thought it was Thanksgiving today, not Christmas.


I take back what I said, I love you. In a "You're freaking amazing" way.

Re: Labyrinth of Touhou 2 - 14F
« Reply #161 on: November 27, 2014, 02:57:47 PM »
Wow I love getting some accurate info on the spellcards, those vague descriptions in-game are so annoying.

There's two things in that list that I'd like to point out:

1) The damage formula of "Narrow Confines of Avici" really does rival all the other big nukes out there, as was tested before with Satori.

2) Super Scope 3D and Parsee's big nuke "Jealousy of Kind and Lovely" have identical damage formulas. Certainly something to consider when planning strong nukers for end-game.

Now I'm curious to see what the damage formula for Killing Doll is, since it's one of those skills that focus more on damage multiplier over the "ATK * xxx %" skills.

Thanks for the info Ethan! :)

Kirin no Sora

  • Wanderer of Gensokyo
  • I have returned from the nothingness once more...
Re: Labyrinth of Touhou 2 - 14F
« Reply #162 on: November 27, 2014, 03:07:06 PM »
Healing is handled in the same way as regular damage, only the CommandATK% and CommandMAG% values are negative. Healing spellcards rarely (never?) set a value for DEF/MND and skip the affinity calculation (I haven't confirmed this, but it sounds reasonable to assume so...) For instance, Exorcising Border has a MAG of -66 (and a base multiplier of 100), so its formula before applying passives/randomization is...
MAG * 0.66 (+5% per level above 1)

Ailments are removed when they have a negative value (usually -1).

Magic Transfer, I'm having a look at right now. I'll edit this post once I see how it handles itself. I'm guess it's code-based though, nothing in the basic spellcard structure seems like it would account for an effect like that...
(Edit: Yeeeep, code-based.)

Thank you for confirming my thoughts on the whole HP, MP, and ailment curing stuff, Ethan. Although I do consider it odd that Exorcising Border isn't a composite stat heal.

It comes up in a number of places. Enemies and characters, for instance, have an extra parameter right after their affinity list with a value that looks affinity-like (100 in many cases). Spellcards set their element through a series of flags (isElementFIR, isElementSPI, isElementPHY...) stored as an array of 9 values, not 8. I haven't found one that uses the 9th one yet but then again, I've only looked at a few spellcards so far.

Here's the Kedama's affinities and resistances. Note that resistances also seem to have a few extra parameters...
Hmm. Then, I'm not sure. "MAG affinity" is just my guess - it could also be some supar secreat hiddan nazi elemunt!!!, or something that was simply dummied out. All's I know for sure is that it exists in memory, is defined for characters/enemies/spellcards, and can be used (but isn't necessarily used) by all affinity-related code.
Thanks. :) I figured I may as well share my discoveries - so far, the wiki is kind of sparse as to the specifics of each spellcard/skills/formulas so I'd be glad to help work out the game's mysteries.

Well, I would say something about said element, but...

Of the 9, have you counted Maribel's Void element?

I do believe that Starxsword brings up a good point about the "Void element".

I'll just leave this here and turn in for the night.

Spellcard formulas, part 1

A few things are missing and I can't guarantee I haven't made any mistakes (it's like, 5 am; cut me some slack :( ). I hope to have every character done in a day or two, and maybe I'll tackle the enemy spellcards after that. A few quick notes...

  • (ailment/debuff) chance may or may not be a percentage value. I really don't know how the game uses this; I just got out the info that was in the spellcards. But the higher, the more likely the effect/debuff will be caused.
  • Some effects are handled through code. I have a good idea where, but I don't have enough information to reverse-engineer those parts yet. I've left a TODO where appropriate.
  • Some spellcards have a second version used by the boss version of their owner. The stats are often different. I left a note to that effect in the relevant cases (mainly, Youmu, Komachi, Kaguya).
  • All damaging spellcards have a resistance of 50% DEF or MND so far. Dunno if that's always the case. Also, increasing their level will always increase the multiplier by 5% in addition to other possible effects.

More tomorrow. G'nite!

A few things to that...

1. Either 50% DEF or 50% MND, hm? If this is indeed true, then... Ah! I see. The programmers must of did that as a shortcut for the sake of skills that allow you to ignore a part of the enemy defenses, as well as to simplify the calculations for the system in general. And on the one bright side to this, it means that there are no spells that account for the both DEF and MND, which would make certain attacks seemingly more viable for the sake of attacking enemies(read: every spell that uses both ATT and MAG stats for attack damage). On the other hand, it actually confuses me that some people don't use composite stats for their spells when they clearly have skills and possibly stats to back up such a thing. Oh well...
2. It seems like some of the info from the wiki is wrong, should this stuff be accurate. White Album, in particular, is a card that was said to increase in power via level up, when the info here says that it does not. And most of the buff spells seem to appear much lower than the wiki would indicate. That seems strange to me...
3. I had noted from the Kedama file that there is a resistance to debuffs to Accuracy and Evade, meaning that it's possible to debuff them in the first place. However, the only way that player characters can do that(or buff up said stats, for that matter) is via skills, not spells, so I don't understand as to why they're there in the first place. The bright side to this is that depending on how the code for buffs and debuffs work, it may be possible to make it so that you can buff and debuff ACC and EVA via parameter editing, which would be rather interesting to see in terms of results...

Again, as everyone else is saying thank you for the info, Ethan.
There is no greater joy than knowing that the Touhou invasion is unstoppable, and the legacy of Gensokyo will never fade away...

Axel Ryman

  • Fear me
Re: Labyrinth of Touhou 2 - 14F
« Reply #163 on: November 27, 2014, 03:15:47 PM »
 On the subject of Stat Debuffs and such, this is just my theory on it. Also when you say Kedama, I'm guessing you mean the regular Kedama you encounter on the first couple floors and not Small Kedama. [Just noticed there were 2 on that floor and I was thinking Small Kedama, then I noticed the stronger one]


Kedama has the following resistances to debuffs.

Quote
00097380   [this+0x0198] = 10   ; - Attack
0009738D   [this+0x019c] = 0
00097397   [this+0x01a0] = 10   ;  - Defense
000973A4   [this+0x01a4] = 0   ;   
000973AE   [this+0x01a8] = 10 - Magic
000973BB   [this+0x01ac] = 0
000973C5   [this+0x01b0] = 10 - Mind
000973D2   [this+0x01b4] = 0
000973DC   [this+0x01b8] = 10 - Speed
000973E9   [this+0x01bc] = 0
000973F3   [this+0x01c0] = 10 - Accuracy
00097400   [this+0x01c4] = 0
0009740A   [this+0x01c8] = 10 - Evasion
00097417   [this+0x01cc] = 0

As a note, I almost got confused since I followed it from the text mentioning the stats having individual defenses, however, one thing that's been noticed by others and myself is that certain stats tend to get debuffed a lot more compared to others, so each stat having its own debuff resistance isn't a surprise. On realization, I realized the line with DBF was probably for Attack, with the last one being Evasion. As such this could mean the the Rating for it in the Beastiary is just based off the Total of all stat debuff resistances combined. On another note, this is for enemies only, not party members, who I'm guessing have the same Individual Stat Debuff Resistance as the Debuff Resistance Stat (I.E 50 Debuff Resistance = 50 to all stats)

Now for the numbers part. The 10 is pretty much similar to having a 10 on the Resistance stat itself. Since there's 8 stats, that's a total of 80, which is...well low, but it's not the lowest since it's a Red X, not Dark Red. While I want to compare that number with the Elemental Affinities, I don't think that would be accurate since I'd need a bit more numbers, mainly from enemies with Dark Red X, Triangle, Circle, Double Circle, and Star Affinities, and even Resistances as well. I'm not sure if the 0 after means anything, but I'm tempted to say it's how much that stat and such is altered, though this makes little sense due to Elemental Affinities also having it without any method of lowering, so I'm guessing I'm just overthinking it and it means nothing.

With that said, I remember someone mentioning how an enemy had a Resistance to something, not sure what, that capped out at 1000. If we use this with Stat Debuffs, then it would probably be something like 125 for each stat (125 * 8 = 1000), meaning the 10 is a 10% Chance to resist that Stat reduction. So why 125? Reisen's Intense Vertigo skill. While that number totaling at -25 for the skill is probably insane, it would make sense as a means to prevent certain stats from being debuffed. This could also apply to skills that increase chances of inflicting other ailments as well. Just another theory until actual numbers are found. I could also be wrong in that it's not subtracted from but lowers it by a %, due to what I mentioned at the start about a Resistance capping at 1000. On the other hand, the 1000 could just easily be a method for the Devs to say "No, you're not inflicting this on boss, at all".


Ok so now let's look at the Party Members. I'll only look at Kasen since it's the easiest one for me to find. Using the formula for Kasen's Higekiri's Cursed Arm, we have these numbers

Quote
Higekiri's Cursed Arm
      -   ((ATK 165%) - (DEF 50%)) * (1.60 + 0.05 * Lv)
      -   TRR power  = 16000
      -   TRR chance = 100
      -   ATK Debuff = -18
      -   ATK chance = 100
      -   SPD Debuff = -18
      -   SPD chance = 100

Ok, so Chance = 100 would probably mean it's, by default, a 100% chance of inflicting it with 0 Resistance. Now let's look at the Kendama's resistances for Terror, Attack Debuffs, and Speed Debuffs.

Quote
Kedama
0009733B   [this+0x0180] = 10   ; - Terror
00097348   [this+0x0184] = 0
00097380   [this+0x0198] = 10   ; - Attack
0009738D   [this+0x019c] = 0
000973DC   [this+0x01b8] = 10 - Speed
000973E9   [this+0x01bc] = 0

Using those 10s, we subtract that from the chance, so now it's a 90% Chance for each effect to activate. But there's another thing we need to look at, and for HCA, that's TRR power. Now I'm not entirely sure about this one, especially since....well..

Ok so I hacked Kasen's stats so they're at 1 Attack so she can't kill the Kedama. With HCA, I was able to inflict Terror. With Kasen at 10,000 Speed and a party member having 9999 so they'd go directly after, I was able to get 2 different results from the Terror Power upon inflicting.

Kedama 1: 15392 Terror
Kedama 2:  14592 Terror

So similar to dealing damage, there's some RNG being thrown in to alter the final output. To note, I tested a few more times and never hit  16000. At the same time however, I hit a Great Tree's Enormous Wasp with Terror, and the number was 17600. When comparing it's Terror resistance, it was a Dark Red X, compared to the Kedama, which was just a normal Red X. This makes sense though.

But now this kinda questions my earlier theory about the Resistance levels. It could just be Stat Debuffs use a different method to determine it



I also feel that Elemental Affinities use a different method to determine it's ranking.

Looking through the Elemental Affinities, Fire and Dark are 66 and everything else is at 100. On the Beastiary page, the enemy is Neutral to those 6 elements but Fire and Dark are a Red X.  Using my current Beastiary and checking all the Elemental Affinities, I've found only 2 enemies with a Dark Red X, and they're both from Post Game (Emerald Nut and Green Ooze, both with a Fire Weakness). Considering 100 is Neutral, and the Kendama's 66 for Fire and Dark is just a Red X, I'd probably say that Dark Red X, Red X, Red Triangle, and Neutral are around the following values.

0-49 = Dark Red X
50-74 = Red X
75-99 = Triangle
100 = Neutral

Obviously without any numbers just yet for Circle, Double Circle, and Star, I can't compare those properly.


Again, this is all just theorizing. Once more numbers show up and such, maybe we can figure it out more.

Re: Labyrinth of Touhou 2 - 14F
« Reply #164 on: November 27, 2014, 03:44:35 PM »
The 9th affinity is almost assuredly Void, yes.

I hadn't considered the possibility of those extra ailment resistances being DBF. That does explain why they're mostly all the same, except for bosses.

Regarding the representation for dbf in Keine's school...
For lv42 Tenshi, her dbf is listed as "○", which is between 50 and 74 (from an earlier code dive I did)

Her specific dbf values are:

60
0
60
0
100
0
0

I can't average these out to be within that range, even if I ignore acc/eva. However, I also don't recall seeing any kind of special handling for dbf at all to give it a different range. It's possible that the listed dbf resistance is just for the first value, which should be atk.

Similarly, Remilia's debuff stats:

0
32
0
32
32
32
32

Most of hers are pretty good... except atk and mag. And she has a red X according to Keine, so yeah I'm pretty sure it's just using the first value and ignoring the rest.


Damage is apparently calculated as follows for most commands...
((ATK * CommandATK% + MAG * CommandMAG%) - (DEF * CommandDEF% + MND * CommandMND%)) / (Affinity/100)

For instance, Rabies Bite has 150 CommandATK% and 50 CommandDEF%, so the formula for it would be...
((ATK * 1.5) - (DEF * 0.5)) / (PHYAffinity / 100)

It should be noted that there appears to be a hidden affinity. The game has values for 9 of them. It looks as though the "hidden" affinity is for magic attacks (ie, melee attacks by characters whose MAG exceeds their ATK). Why the game hides it is unclear...

But, there's also a multiplier applied somewhere in there (not sure where yet; either to the damage portion or (most likely) to the (damage - defense) portion... or to the whole formula; Rabies Bite's is 150% for instance) which generally goes up by 5% / additional spellcard level. In addition, there's some degree of randomization I'm unclear on. Sudden Impulse multiplies the min variance by 10 * Lv and the max variance by 5 * Lv (or maaaaybe the other way around), for instance. And of course, passive skills can have an impact on a lot of this (ex, Enhanced Normal Attack adds 30 to the CommandATK or CommandMAG, depending on which type of attack is being carried out).

I'll probably have the specifics later on. I'm busying myself with the skills at the moment so it's likely to turn up soon enough...


Awesome! All of that info is great. Does the code for Parsee's nuke just remove trr, or also increase damage based on the strength of the trr effect?

Seems kinda odd that everything is 50% def or mnd. LoT1's damage formulas had a decent variance, as I recall.
« Last Edit: November 27, 2014, 03:47:42 PM by qazmlpok »

Kirin no Sora

  • Wanderer of Gensokyo
  • I have returned from the nothingness once more...
Re: Labyrinth of Touhou 2 - 14F
« Reply #165 on: November 27, 2014, 04:52:51 PM »
Seems kinda odd that everything is 50% def or mnd. LoT1's damage formulas had a decent variance, as I recall.

As I had said before, I believe that the programmers did so as a means to simplify the damage calculations. And on the bright side, that means that composite attacks are far more useful in this game than in LoT1, since none of the spells target both defensive stats.
There is no greater joy than knowing that the Touhou invasion is unstoppable, and the legacy of Gensokyo will never fade away...

Axel Ryman

  • Fear me
Re: Labyrinth of Touhou 2 - 14F
« Reply #166 on: November 27, 2014, 05:07:51 PM »
Then my alternate thought is the more likely one. 0 = Dark Red X, 1+ = Red X.

Re: Labyrinth of Touhou 2 - 14F
« Reply #167 on: November 27, 2014, 05:18:52 PM »
Then my alternate thought is the more likely one. 0 = Dark Red X, 1+ = Red X.

No, I already got the exact values for that. It's probably in the last thread somewhere, but also on the wiki.

Ailments:
| x - 0-9 | x - 10-19 | △ - 20-29 | -- - 30-49 | ○ - 50-74 | ◎ - 75-99 | ★ - 100+ |

Affinities:
| x - 0-33 | x - 34-65 | △ - 66-99 | -- - 100-139 | ○ - 140-199 | ◎ - 200-299 | ★ - 300+ |

Re: Labyrinth of Touhou 2 - 14F
« Reply #168 on: November 27, 2014, 10:27:33 PM »
Quote
Thank you for confirming my thoughts on the whole HP, MP, and ailment curing stuff, Ethan. Although I do consider it odd that Exorcising Border isn't a composite stat heal.

I believe it was MAG in Labyrinth 1, so there is no reason to change it. Reimu isn't completely composite, she favors MAG over attack by a bit. Of course, because of how Composite works, it sucks to be a composite attacker. Her formula's gotten better, since it doesn't allow both Mind and Defense to work against it.

Quote
Seems kinda odd that everything is 50% def or mnd. LoT1's damage formulas had a decent variance, as I recall.

I am pretty sure the formulas for Labyrinth 1 is the same way. The wiki just consolidates it for easier reading.

Yuyuko's Saigyouji Flawless Nirvana formula is something like 魔力反映率(Magic) = 300, 精神反映率(Mind) = 50, 攻撃力倍率(???) = 100, ダメージ倍率(damage multiplier) = 300, 行動カウント値(Gauge) = 4,000. So, something like (3.00 MAG - 0.50 MIND) * 3 Damage Multiplier. Wiki just makes it 900 MAG - 150 MIND.

edit: correction on my multiplication
« Last Edit: November 28, 2014, 01:18:04 AM by Starxsword »

Re: Labyrinth of Touhou 2 - 14F
« Reply #169 on: November 27, 2014, 10:39:34 PM »
Misdirection is 50% def, 25% mnd.
Silent Selene is 25% mnd
Phoenix Spread Wings is 25% def
Icicle fall 50/50
Perfect freeze same
Falling Leaves of Madness is 10% mnd
Owotoshi Harvester 30% mnd
Flashing Cherry Blossoms 25% def

Okay, there's a lot more 0's and 50's than I remember, but there are definitely other values in there.

Re: Labyrinth of Touhou 2 - 14F
« Reply #170 on: November 27, 2014, 11:13:51 PM »
Quote
I'm pretty sure it's just using the first value and ignoring the rest.

This would certainly explain why in the fight against the Guardian and his crystals you can easily land multiple debuffs on all of the enemies, even though two of the crystals have a star resist to debuffs according to Keine's bestiary.

jaxter0987

  • Umiiro Shoujo ni Miserarete
  • Umi is love, Umi is life
Re: Labyrinth of Touhou 2 - 14F
« Reply #171 on: November 27, 2014, 11:50:37 PM »
I've added the spell card formulas to the wiki.

Speaking of the wiki, anyone know how to standardize the column lengths in tables? They look horrendous at the moment and its really bothering me.

So, something like (3.00 MAG - 0.50 MIND) * 3 Damage Multiplier. Wiki just makes it 900 MAG - 100 MIND.
That can't be the way the formula is written, otherwise the wiki is just plain wrong.

Assuming 100 MAG and 100 MND, the first formula yields 750 as the damage whereas the wiki's description would yield 800.

This is assuming you pulled those numbers from a real example and didn't make a typo when transcribing them.
« Last Edit: November 27, 2014, 11:56:38 PM by jaxter0987 »

Re: Labyrinth of Touhou 2 - 14F
« Reply #172 on: November 28, 2014, 12:43:22 AM »
That can't be the way the formula is written, otherwise the wiki is just plain wrong.

Assuming 100 MAG and 100 MND, the first formula yields 750 as the damage whereas the wiki's description would yield 800.

This is assuming you pulled those numbers from a real example and didn't make a typo when transcribing them.

Wiki lists 900 - 150, which is correct. He made a mistake in multiplying and wrote -100 instead of -150.

Re: Labyrinth of Touhou 2 - 14F
« Reply #173 on: November 28, 2014, 01:17:00 AM »
Yes, I multiplied it wrong. Wow, I can't believe that I can't do 0.5 x 3.

Quote
Okay, there's a lot more 0's and 50's than I remember, but there are definitely other values in there.

I didn't realize there were other numbers. But you are right, there are other numbers, even if it is rare. Though, I should have remembered Minoriko's skill, since it has defense penetration.

Quote
This is assuming you pulled those numbers from a real example and didn't make a typo when transcribing them.

These numbers are gotten from the DataBase directory of the Touhou Labyrinth Special Disk. Just open the index.html with any web browser and go to the third square column. That lists the spellcards and their damage formulas. If you are interested, second column is a list of enemies.

EthanSilver

  • Lunatic Programmer
  • Got squid, will travel.
    • Ethan Silver's Junkpile - Hacks and translation patches
Re: Labyrinth of Touhou 2 - 14F
« Reply #174 on: November 28, 2014, 01:34:33 AM »
Annnnd.... done. Pardon possible human errors, mad science can only do so much for me until I figure out how to make my brain bionic some of it was written in the wee hours of morning with little coffee to assist me...

LoT2 Character Spellcard Formulas

Next up, gonna take a quick little day-long break or so to get some work done on another project and I'll be back with the subclass spellcard formulas.  :V

Of the 9, have you counted Maribel's Void element?
Aha! That sounds likely. Thanks for that, I'm pretty sure that's what the 9th affinity is for. It makes sense, given that everyone seems to have 100 as a value for it and Mari's spellcard isn't supposed to be defendable.

1. Either 50% DEF or 50% MND, hm?
It turns out a FEW spellcards have different values (often, 25%, though the late-game characters have different values too). But MANY spellcards use 50%, so as a rule of thumb we could say that every 2 point of DEF or MND reduces damage by 1 before the multiplier is applied.

2. It seems like some of the info from the wiki is wrong, should this stuff be accurate. White Album, in particular, is a card that was said to increase in power via level up, when the info here says that it does not. And most of the buff spells seem to appear much lower than the wiki would indicate. That seems strange to me...
I'm guessing the wiki didn't always take into account the spellcard level when testing. Or, it could be taken from an earlier patch. Nitori's PVM, for instance, is nowhere near like what the wiki describes.

The bright side to this is that depending on how the code for buffs and debuffs work, it may be possible to make it so that you can buff and debuff ACC and EVA via parameter editing, which would be rather interesting to see in terms of results...
Hmm.  Let's try this...



Yup. Skills can have ACC/EVA buffs and debuffs. Cool.

Awesome! All of that info is great. Does the code for Parsee's nuke just remove trr, or also increase damage based on the strength of the trr effect?
I haven't played around with the "code" portion of spellcards but the data suggests that damage is increased in the code when the target has TRR. By default, it doesn't do any exceptional damage, so something else has to tweak the numbers at some point.

I've added the spell card formulas to the wiki.
Thank you for your work. :) The wiki can certainly stand to have more specific info in it.


Latest works
The Strongest

jaxter0987

  • Umiiro Shoujo ni Miserarete
  • Umi is love, Umi is life
Re: Labyrinth of Touhou 2 - 14F
« Reply #175 on: November 28, 2014, 01:57:51 AM »
Annnnd.... done. Pardon possible human errors, mad science can only do so much for me until I figure out how to make my brain bionic some of it was written in the wee hours of morning with little coffee to assist me...
LoT2 Character Spellcard Formulas
Thank you for your work. :) The wiki can certainly stand to have more specific info in it.
Taking my own little break and then finishing the rest of the spellcard formulas on the wiki.

I've figured out a temporary solution to the ugliness of the varying table sizes but a more proper solution would still be nice.

Axel Ryman

  • Fear me
Re: Labyrinth of Touhou 2 - 14F
« Reply #176 on: November 28, 2014, 02:15:18 AM »
Annnnd.... done. Pardon possible human errors, mad science can only do so much for me until I figure out how to make my brain bionic some of it was written in the wee hours of morning with little coffee to assist me...

LoT2 Character Spellcard Formulas



.......I thought it was Christmas but it turns out it's my birthday too? Either time is flying faster than I thought or something else.



Kinda got confused when I started seeing RES but then I realized you meant MND. Definitely surprised at some of these formulas though.

Re: Labyrinth of Touhou 2 - 14F
« Reply #177 on: November 28, 2014, 03:47:31 AM »
I haven't played around with the "code" portion of spellcards but the data suggests that damage is increased in the code when the target has TRR. By default, it doesn't do any exceptional damage, so something else has to tweak the numbers at some point.

No, her nuke does 0 damage if the target isn't afflicted with terror. What I'm asking is 'does a strong trr do more damage than a weak trr'. And her nuke does incredibly exceptional damage. I get the feeling we're talking about different spells.

Also, hina's Misfortune spell debuffs EVERYONE, including party members. Party members should get a weaker effect, however. Should mark that as todo, at least.

...Giga flare does not completely ignore mnd. It uses 5%. Huh. That explains things - I recall trying to use it against a boss with skyhigh mind and was amazed at the 0 damage.


Thanks for all of this. Since you're doing helpful stuff, I'll work on making a complete dump of all enemy info, with exact stats and the multiple copies. This is probably going to be too much information for a simple table, so if someone wants to volunteer to make simple HTML pages for it or something, that'd be greatly appreciated. Otherwise I might just leave it as JSON or something.

Kirin no Sora

  • Wanderer of Gensokyo
  • I have returned from the nothingness once more...
Re: Labyrinth of Touhou 2 - 14F
« Reply #178 on: November 28, 2014, 03:50:52 AM »

.......I thought it was Christmas but it turns out it's my birthday too? Either time is flying faster than I thought or something else.


It's mad science, man. Time is but a funny looking roadcone as far as it's concerned(and no, that's not supposed to make sense, that's the entire point).

Annnnd.... done. Pardon possible human errors, mad science can only do so much for me until I figure out how to make my brain bionic some of it was written in the wee hours of morning with little coffee to assist me...

LoT2 Character Spellcard Formulas


Ah, yes. The info that we all have been seeking. I do believe that you sir deserve an internet.

It turns out a FEW spellcards have different values (often, 25%, though the late-game characters have different values too). But MANY spellcards use 50%, so as a rule of thumb we could say that every 2 point of DEF or MND reduces damage by 1 before the multiplier is applied.

Interesting. I'll check the listings to see which is which, then.

I'm guessing the wiki didn't always take into account the spellcard level when testing. Or, it could be taken from an earlier patch. Nitori's PVM, for instance, is nowhere near like what the wiki describes.

Ah, so the wiki's out of date. Sigh.

Hmm.  Let's try this...



Yup. Skills can have ACC/EVA buffs and debuffs. Cool.

I presume that you mean spells, yes? If so, then I'm glad that it's possible to put that in there.

There is no greater joy than knowing that the Touhou invasion is unstoppable, and the legacy of Gensokyo will never fade away...

EthanSilver

  • Lunatic Programmer
  • Got squid, will travel.
    • Ethan Silver's Junkpile - Hacks and translation patches
Re: Labyrinth of Touhou 2 - 14F
« Reply #179 on: November 28, 2014, 04:43:57 AM »
.......I thought it was Christmas but it turns out it's my birthday too? Either time is flying faster than I thought or something else.
The passage of time is relative. The closer you approach the speed of light, the more time slows down for you. It's sorta like one-way time travel into the future. Thus, I would suggest reducing your monitor's brightness slightly. Failing that, I wouldn't mind a couple of winning lottery numbers now that you're there then... :)

Kinda got confused when I started seeing RES but then I realized you meant MND. Definitely surprised at some of these formulas though.
Oops, my bad. Yeah, any "RES" in there should be "MND" (Nazrin's spellcards, and a few others). I seem to have gotten confused with another game at some point.

No, her nuke does 0 damage if the target isn't afflicted with terror. What I'm asking is 'does a strong trr do more damage than a weak trr'. And her nuke does incredibly exceptional damage. I get the feeling we're talking about different spells.
I don't have the code-related effects yet so I can't answer your question at the moment. Given that the spellcard stores values to calculate damage, I'm guessing the code will only do something like checking for TRR and setting the final damage value to 0 if it's not present. (And yeah, I think I was looking at/thinking of the wrong spellcard when I posted my first reply; sorry about that). I'll keep this one in mind for when I'll start reverse-engineering spellcard code.

Thanks for all of this. Since you're doing helpful stuff, I'll work on making a complete dump of all enemy info, with exact stats and the multiple copies.
If it's any help, the "Kedama" example I provided isn't the first enemy in the list. The enemy data starts one entry before it, at 00096760 ("Small Kedama").

I presume that you mean spells, yes? If so, then I'm glad that it's possible to put that in there.
Basically, I modified Nitori's PVM so that one of the buffs would be the buff "after" SPD, and ACC came up. The way Mari's DIY Border skill works is similar, so there may be several additional different types of bonuses hiding away in there (probably used by some passive skills or something; those can alter the spellcard info and add effects or change values around).


Latest works
The Strongest