Log:Game engine ideas (Meta, no ontology)
From Compile Worlds
(Created page with "== Arle Nadja == === Techniques === ;Fire:[Fire Rock] (fireball) ;Ice Storm:[Water Cold Water] (ice pellets) ;Thunder:[Air Searing Air Cold] (first pair gives lightning, seco...") |
m (Kawachan 6.4 upgrade: replacing #img with #embed) |
||
(15 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
+ | == Damage calculation == | ||
+ | Damage calculation is performed in a somewhat complicated manner. | ||
+ | |||
+ | The first step is to split up the attack into constituent parts, for example, pellet-based attacks will be split up into one unit per pellet. However, attacks which have multiple types do not get split up at this stage. | ||
+ | |||
+ | Next, calculate the Base Damage for the attack: | ||
+ | #Count the total number of Material types and the total number of Volatile types involved in the attack. | ||
+ | #Type Factor := [(# Volatile types) - (# Material types)] ÷ # Total types | ||
+ | #Base Damage := Attacker's Power × Attacker's Offense × (Attacker's Volatile ^ Type Factor). ''where (a^b) means a raised to the power b'' | ||
+ | |||
+ | Next, we do the accuracy calculation. If the accuracy is exactly 100%, this step does not need to be performed, leaving two cases that need to be dealt with in this step: case 1, when the accuracy is < 100%, and case 2, when the accuracy is > 100%; in the latter case, the attack power is supplemented with energy drawn from the character's surroundings (because it's, you know, freaking epic). With a high enough accuracy, what tends to happen is the attacking character simultaneously deals massive damage to the enemy in front while healing the ally behind. | ||
+ | |||
+ | For case 1, no supplement needs to be considered, but the attack needs to be spread out. At the extreme case of 0% accuracy, the attack exhibits a uniform distribution through all possible angles of the sphere. As accuracy improves towards 100%, the mean and standard deviation of the (normally distributed) defect angles approaches zero. A defect angle ∠TargetLatitude is chosen by the RNG and a second angle ∠TargetLongitude is chosen using a uniform distribution. These two angles are then combined to determine the direction in which the attack is fired. | ||
+ | |||
+ | For case 2, the target of the attack is always dead-on. However, a similar method is used to determine the parameters for the energy source; the reciprocal of the accuracy is used, and the target direction undergoes a polar flip. This means that the attack (part) becomes two sub-parts; one for the attack proper, and another to heal whatever was in the other direction. | ||
+ | |||
+ | There was going to be some stuff about Gaussian blurs, but that was a load of nonsense, so it's not here any more. | ||
+ | |||
+ | The final step is to look at the body/armor of the defender. We calculate the attack as a ray from the source (usually the attacking character, but may be different, for example in the case of lightning bolts) to the target (taking the accuracy calculation into account of course). We then find all the body/armor parts that intersect that ray and sort them based on the distance along the ray, with the closest part to the attacker coming first. Now we initialize the variable Damage to Base Damage, and for each part in the list, in order, do the following: | ||
+ | #Multiply Damage by the appropriate factor from the type chart. | ||
+ | #*for example, if the attack is Arcane-type, and the currently defending part is Rock-type, we multiply it by 200%. | ||
+ | #If Damage is negative, immediately exit this loop and run the absorption algorithm. | ||
+ | #Part Damage := Damage × Defender's Offense ÷ (Defender's Volatile ^ Type Factor). ''where ''Type Factor'' is the same value we calculated earlier'' | ||
+ | #Look at the health of the part, where 100% is full health and 0% is dead. | ||
+ | #Damage := Damage × (100% - Part Health). ''this value will be carried over to the next iteration of the loop'' | ||
+ | #Part Health := Part Health - Part Damage | ||
+ | #If Part Health is zero or negative, kill/destroy the part (whatever this may involve is specific to the type of part). | ||
+ | #If Damage is zero, immediately exit the loop, otherwise, continue to the next part. | ||
+ | Note that the loop will continue as far as the range of the attack, until something absorbs the attack, or until Damage is reduced to zero. | ||
+ | |||
+ | To do: absorption algorithm | ||
+ | |||
+ | == Elemental Resistances == | ||
+ | *For a material defense against a volatile attack, damage multiplier is the appropriate cell of the table. | ||
+ | **ex: arcane attacks rock => 200% effectiveness | ||
+ | *For a volatile defense against a material attack, damage multiplier is the reciprocal of the appropriate cell of the table. | ||
+ | **ex: bone attacks wind => 33% effectiveness | ||
+ | *For a material attack against the ''same'' material defense, damage multiplier is always 1. | ||
+ | **ex: flesh attacks flesh => 100% effectiveness | ||
+ | *For a material attack against a ''different'' material defense, damage multiplier is the bottom cell value for the defending material divided by the bottom cell value for the attacking material. | ||
+ | **ex: bone attacks cloth => 2 ÷ ½ = 400% effectiveness | ||
+ | *For a volatile attack against the ''same'' volatile defense, damage multiplier is always -1 (the defender absorbs the entire attack). | ||
+ | **ex: fire attacks fire => 100% of attack power absorbed into the defender's health | ||
+ | *For a volatile attack against a ''different'' volatile defense, damage multiplier is the rightmost cell value for the attacking material divided by the rightmost cell value for the defending material. | ||
+ | **ex: psychic attacks searing => 2 ÷ 1½ = 133% effectiveness | ||
+ | |||
+ | Note that material defenses usually originate from a character's body/outfit, while volatile defenses usually originate from shields put up. Similarly, material attacks are usually performed with physical weapons, while volatile attacks are usually performed with magic or technology. | ||
+ | |||
+ | <table class='wikitable' style='text-align: center;'> | ||
+ | <tr><th style='width: 20%;'> </th><th style='width: 8%;'>Flesh</th><th style='width: 8%;'>Bone</th><th style='width: 8%;'>Cloth</th><th style='width: 8%;'>Ice</th><th style='width: 8%;'>Rock</th><th style='width: 8%;'>Metal</th><th style='width: 8%;'>Wood</th><th style='width: 8%;'>Water</th><th style='width: 8%;'>Lava</th><th style='width: 8%;'>(Volatiles)</th></tr> | ||
+ | <tr><td style='text-align: left;'>Electric</td><td>2</td><td>1½</td><td></td><td>0</td><td>0</td><td>4</td><td>½</td><td>3</td><td></td><td></td></tr> | ||
+ | <tr><td style='text-align: left;'>Fire</td><td>½</td><td>½</td><td>3</td><td>2</td><td>½</td><td>½</td><td>2</td><td>½</td><td>-½</td><td></td></tr> | ||
+ | <tr><td style='text-align: left;'>Arcane</td><td>1½</td><td></td><td></td><td>½</td><td>2</td><td>½</td><td>½</td><td>2</td><td></td><td>2</td></tr> | ||
+ | <tr><td style='text-align: left;'>Psychic</td><td>2</td><td></td><td></td><td></td><td>½</td><td></td><td></td><td></td><td></td><td>2</td></tr> | ||
+ | <tr><td style='text-align: left;'>Wind</td><td></td><td>3</td><td>0</td><td>½</td><td>½</td><td></td><td>2</td><td></td><td></td><td></td></tr> | ||
+ | <tr><td style='text-align: left;'>Life</td><td>-1</td><td></td><td></td><td></td><td>4</td><td></td><td></td><td></td><td></td><td>½</td></tr> | ||
+ | <tr><td style='text-align: left;'>Searing</td><td>4</td><td></td><td></td><td>½</td><td>½</td><td>½</td><td>2</td><td>1½</td><td></td><td>1½</td></tr> | ||
+ | <tr><td style='text-align: left;'>Ghost</td><td>0</td><td>0</td><td>2</td><td></td><td></td><td></td><td></td><td>2</td><td></td><td></td></tr> | ||
+ | <tr><td style='text-align: left;'>Poison</td><td>2</td><td></td><td></td><td>0</td><td>0</td><td>0</td><td>1½</td><td>3</td><td>0</td><td></td></tr> | ||
+ | <tr><td style='text-align: left;'>(Materials)</td><td></td><td>½</td><td>2</td><td></td><td>½</td><td>½</td><td></td><td>2</td><td>½</td></tr> | ||
+ | </table> | ||
+ | |||
+ | == Body descriptions == | ||
+ | <[#embed [hash 8341T7RQD9HYGBWRJS67Y3Y1D6]]> | ||
+ | *Notation - letters (Uppercase are prefixes, lowercase are suffixes): | ||
+ | **T = top, B = bottom | ||
+ | **S = skirt (loose fitting on bottom half), C = cape/cloak (loose fitting on top half) | ||
+ | **L = left side only, R = right side only (mirrored on diagram due to stage left vs. character left) | ||
+ | **f = front only, b = back only | ||
+ | **s = open at sides; combining with f/b makes it wrap around the sides instead | ||
+ | **l/r = like s, but affect left/right side only | ||
+ | *Notation - numbers | ||
+ | **0 = waistband | ||
+ | **1 = chest/pelvis | ||
+ | **2 = shoulder/hip | ||
+ | **3 = biceps/thigh | ||
+ | **4 = forearm/shin | ||
+ | **5 = wrist/ankle | ||
+ | **6 = palm/sole (and equivalent areas on back) | ||
+ | **7 = fingers/toes (not shown in diagram due to lack of space) | ||
+ | *Examples: | ||
+ | **T0-2 = short sleeved shirt | ||
+ | **T1-B1 = leotard | ||
+ | **T3-6 = [[Hatsune Miku]]'s sleeves | ||
+ | **B1 = panties | ||
+ | **S1 = miniskirt | ||
+ | **S1-2 = Arle's skirt | ||
+ | **S1-3 = Nanako's skirt | ||
+ | **T1-S0s-S5s = Chinadress | ||
+ | **C1b-S3b = [http://www.hardcoregaming101.net/puyo/arlenadja.jpg Arle's YON cape] | ||
+ | |||
== [[Arle Nadja]] == | == [[Arle Nadja]] == | ||
=== Techniques === | === Techniques === | ||
- | ;Fire: | + | ;Fire:Projectile-style Fire-type |
- | ;Ice Storm: | + | ;Ice Storm:Pellet-style Ice-type |
- | ;Thunder: | + | ;Thunder:Bolt-style Sky-origin Electric-type |
- | ;Daiacute: | + | ;Daiacute:Raise own accuracy |
- | ;Brain Damudo: | + | ;Brain Damudo:Lower enemy accuracy |
- | ;Hanachikara: | + | ;Hanachikara:Spore-Pellet-style Life-type |
- | ;Jugem: | + | ;Jugem:Give enemy damp status, Homing-style Electric-type, Remove enemy damp status, Give enemy flaming status |
- | ;Bayoen: | + | ;Bayoen:Beam-Pellet-style Searing-type |
+ | |||
+ | === Stats === | ||
+ | *Speed: TBA% | ||
+ | *Power: TBA% | ||
+ | *Accuracy: TBA% | ||
+ | *Offense: 100% | ||
+ | *Volatile: 200% | ||
+ | |||
+ | === Body === | ||
+ | *Cloth on T0-2, T5 and S1-2. | ||
+ | *"Leather" on B5-7. | ||
+ | *Metal on LT2 and LT1f. | ||
- | + | Note that "Leather" is treated as Flesh type as far as calculating damage is concerned. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Latest revision as of 22:44, 29 December 2013
Damage calculation
Damage calculation is performed in a somewhat complicated manner.
The first step is to split up the attack into constituent parts, for example, pellet-based attacks will be split up into one unit per pellet. However, attacks which have multiple types do not get split up at this stage.
Next, calculate the Base Damage for the attack:
- Count the total number of Material types and the total number of Volatile types involved in the attack.
- Type Factor := [(# Volatile types) - (# Material types)] ÷ # Total types
- Base Damage := Attacker's Power × Attacker's Offense × (Attacker's Volatile ^ Type Factor). where (a^b) means a raised to the power b
Next, we do the accuracy calculation. If the accuracy is exactly 100%, this step does not need to be performed, leaving two cases that need to be dealt with in this step: case 1, when the accuracy is < 100%, and case 2, when the accuracy is > 100%; in the latter case, the attack power is supplemented with energy drawn from the character's surroundings (because it's, you know, freaking epic). With a high enough accuracy, what tends to happen is the attacking character simultaneously deals massive damage to the enemy in front while healing the ally behind.
For case 1, no supplement needs to be considered, but the attack needs to be spread out. At the extreme case of 0% accuracy, the attack exhibits a uniform distribution through all possible angles of the sphere. As accuracy improves towards 100%, the mean and standard deviation of the (normally distributed) defect angles approaches zero. A defect angle ∠TargetLatitude is chosen by the RNG and a second angle ∠TargetLongitude is chosen using a uniform distribution. These two angles are then combined to determine the direction in which the attack is fired.
For case 2, the target of the attack is always dead-on. However, a similar method is used to determine the parameters for the energy source; the reciprocal of the accuracy is used, and the target direction undergoes a polar flip. This means that the attack (part) becomes two sub-parts; one for the attack proper, and another to heal whatever was in the other direction.
There was going to be some stuff about Gaussian blurs, but that was a load of nonsense, so it's not here any more.
The final step is to look at the body/armor of the defender. We calculate the attack as a ray from the source (usually the attacking character, but may be different, for example in the case of lightning bolts) to the target (taking the accuracy calculation into account of course). We then find all the body/armor parts that intersect that ray and sort them based on the distance along the ray, with the closest part to the attacker coming first. Now we initialize the variable Damage to Base Damage, and for each part in the list, in order, do the following:
- Multiply Damage by the appropriate factor from the type chart.
- for example, if the attack is Arcane-type, and the currently defending part is Rock-type, we multiply it by 200%.
- If Damage is negative, immediately exit this loop and run the absorption algorithm.
- Part Damage := Damage × Defender's Offense ÷ (Defender's Volatile ^ Type Factor). where Type Factor is the same value we calculated earlier
- Look at the health of the part, where 100% is full health and 0% is dead.
- Damage := Damage × (100% - Part Health). this value will be carried over to the next iteration of the loop
- Part Health := Part Health - Part Damage
- If Part Health is zero or negative, kill/destroy the part (whatever this may involve is specific to the type of part).
- If Damage is zero, immediately exit the loop, otherwise, continue to the next part.
Note that the loop will continue as far as the range of the attack, until something absorbs the attack, or until Damage is reduced to zero.
To do: absorption algorithm
Elemental Resistances
- For a material defense against a volatile attack, damage multiplier is the appropriate cell of the table.
- ex: arcane attacks rock => 200% effectiveness
- For a volatile defense against a material attack, damage multiplier is the reciprocal of the appropriate cell of the table.
- ex: bone attacks wind => 33% effectiveness
- For a material attack against the same material defense, damage multiplier is always 1.
- ex: flesh attacks flesh => 100% effectiveness
- For a material attack against a different material defense, damage multiplier is the bottom cell value for the defending material divided by the bottom cell value for the attacking material.
- ex: bone attacks cloth => 2 ÷ ½ = 400% effectiveness
- For a volatile attack against the same volatile defense, damage multiplier is always -1 (the defender absorbs the entire attack).
- ex: fire attacks fire => 100% of attack power absorbed into the defender's health
- For a volatile attack against a different volatile defense, damage multiplier is the rightmost cell value for the attacking material divided by the rightmost cell value for the defending material.
- ex: psychic attacks searing => 2 ÷ 1½ = 133% effectiveness
Note that material defenses usually originate from a character's body/outfit, while volatile defenses usually originate from shields put up. Similarly, material attacks are usually performed with physical weapons, while volatile attacks are usually performed with magic or technology.
Flesh | Bone | Cloth | Ice | Rock | Metal | Wood | Water | Lava | (Volatiles) | |
---|---|---|---|---|---|---|---|---|---|---|
Electric | 2 | 1½ | 0 | 0 | 4 | ½ | 3 | |||
Fire | ½ | ½ | 3 | 2 | ½ | ½ | 2 | ½ | -½ | |
Arcane | 1½ | ½ | 2 | ½ | ½ | 2 | 2 | |||
Psychic | 2 | ½ | 2 | |||||||
Wind | 3 | 0 | ½ | ½ | 2 | |||||
Life | -1 | 4 | ½ | |||||||
Searing | 4 | ½ | ½ | ½ | 2 | 1½ | 1½ | |||
Ghost | 0 | 0 | 2 | 2 | ||||||
Poison | 2 | 0 | 0 | 0 | 1½ | 3 | 0 | |||
(Materials) | ½ | 2 | ½ | ½ | 2 | ½ |
Body descriptions
- Notation - letters (Uppercase are prefixes, lowercase are suffixes):
- T = top, B = bottom
- S = skirt (loose fitting on bottom half), C = cape/cloak (loose fitting on top half)
- L = left side only, R = right side only (mirrored on diagram due to stage left vs. character left)
- f = front only, b = back only
- s = open at sides; combining with f/b makes it wrap around the sides instead
- l/r = like s, but affect left/right side only
- Notation - numbers
- 0 = waistband
- 1 = chest/pelvis
- 2 = shoulder/hip
- 3 = biceps/thigh
- 4 = forearm/shin
- 5 = wrist/ankle
- 6 = palm/sole (and equivalent areas on back)
- 7 = fingers/toes (not shown in diagram due to lack of space)
- Examples:
- T0-2 = short sleeved shirt
- T1-B1 = leotard
- T3-6 = Hatsune Miku's sleeves
- B1 = panties
- S1 = miniskirt
- S1-2 = Arle's skirt
- S1-3 = Nanako's skirt
- T1-S0s-S5s = Chinadress
- C1b-S3b = Arle's YON cape
Arle Nadja
Techniques
- Fire
- Projectile-style Fire-type
- Ice Storm
- Pellet-style Ice-type
- Thunder
- Bolt-style Sky-origin Electric-type
- Daiacute
- Raise own accuracy
- Brain Damudo
- Lower enemy accuracy
- Hanachikara
- Spore-Pellet-style Life-type
- Jugem
- Give enemy damp status, Homing-style Electric-type, Remove enemy damp status, Give enemy flaming status
- Bayoen
- Beam-Pellet-style Searing-type
Stats
- Speed: TBA%
- Power: TBA%
- Accuracy: TBA%
- Offense: 100%
- Volatile: 200%
Body
- Cloth on T0-2, T5 and S1-2.
- "Leather" on B5-7.
- Metal on LT2 and LT1f.
Note that "Leather" is treated as Flesh type as far as calculating damage is concerned.