WEBVTT 1 00:00:05.770 --> 00:00:09.841 Game Advanced Combat System Formulas in MORPGs 2 00:00:09.841 --> 00:00:12.281 GCC Academy 3 00:00:27.144 --> 00:00:28.800 Hello everyone 4 00:00:28.800 --> 00:00:31.719 This is Park Hyung-seon, in charge of Action RPG Balance Game Design 5 00:00:32.359 --> 00:00:38.120 In this session, we will discuss the combat system formulas used in MORPG games 6 00:00:38.480 --> 00:00:40.880 I will explain the most common combat formulas 7 00:00:40.880 --> 00:00:43.040 and the method of converting defense values 8 00:00:43.040 --> 00:00:46.040 into defense rates for calculations 9 00:00:46.040 --> 00:00:48.560 Additionally, to achieve balanced gameplay, 10 00:00:48.560 --> 00:00:50.840 it is crucial to convert defense 11 00:00:50.840 --> 00:00:52.680 into health points 12 00:00:52.680 --> 00:00:54.400 using combat formulas 13 00:00:54.400 --> 00:00:57.200 I will introduce this method in detail 14 00:00:57.200 --> 00:00:58.919 The foundation of combat balance 15 00:00:58.919 --> 00:01:01.480 lies in organizing values for attack factors 16 00:01:01.480 --> 00:01:03.480 and defense factors 17 00:01:03.480 --> 00:01:05.800 to ensure equilibrium between the two 18 00:01:05.800 --> 00:01:09.480 I will explain the methodology for achieving this balance 19 00:01:09.936 --> 00:01:14.116 Combat Formulas and Converting Defense into Defense Rate 20 00:01:14.800 --> 00:01:19.620 This is the first step in organizing values and standards related to combat balance 21 00:01:21.000 --> 00:01:24.039 Today, we will examine combat formulas 22 00:01:24.599 --> 00:01:30.620 and the formulas for calculating defense values and defense rates 23 00:01:32.160 --> 00:01:36.160 A basic attack consists of four hits over two seconds 24 00:01:36.160 --> 00:01:37.820 A mob has 100 HP 25 00:01:38.400 --> 00:01:41.000 It takes four hits 26 00:01:41.000 --> 00:01:45.379 from the player to defeat a mob 27 00:01:45.879 --> 00:01:51.299 Since the basic attack executes four hits in two seconds, 28 00:01:51.879 --> 00:01:53.640 each hit deals 25 damage, 29 00:01:54.301 --> 00:01:58.641 resulting in a damage output of 50 per second 30 00:02:00.000 --> 00:02:04.060 A skill attack can be used once every 20 seconds 31 00:02:04.480 --> 00:02:09.639 Each use of the skill deals 100 damage to three enemies 32 00:02:10.399 --> 00:02:12.599 This results in a total skill damage output of 300 per use, 33 00:02:12.979 --> 00:02:16.319 so for one second, the skill attack is 15 34 00:02:16.919 --> 00:02:19.059 So, in the end, 35 00:02:19.759 --> 00:02:26.339 The basic attack DPS of 50 + 36 00:02:26.859 --> 00:02:31.479 the skill attack DPS 15 37 00:02:31.479 --> 00:02:37.140 results in 65 damage per second 38 00:02:38.420 --> 00:02:45.199 The duration of a single combat session is three minutes, which equals 180 seconds 39 00:02:45.819 --> 00:02:51.899 180 x 65 40 00:02:52.559 --> 00:02:58.599 means the maximum damage for three minutes is 11,700 41 00:03:00.219 --> 00:03:07.040 Now, let’s break this down in a more intuitive way 42 00:03:08.240 --> 00:03:12.080 Suppose each mob has 100 HP 43 00:03:13.600 --> 00:03:18.139 The fact that a basic attack consists of four hits executed over two seconds 44 00:03:18.679 --> 00:03:22.240 means that an attack sequence consists of 45 00:03:22.240 --> 00:03:25.599 slash, slash, slash, and boom 46 00:03:26.759 --> 00:03:29.800 The total execution time of two seconds 47 00:03:30.360 --> 00:03:35.119 also includes average movement time 48 00:03:35.119 --> 00:03:39.000 If we count only the animation frames, 49 00:03:39.000 --> 00:03:42.260 it would be slightly shorter than two seconds 50 00:03:42.600 --> 00:03:47.700 However, considering movement animation and other factors, 51 00:03:48.240 --> 00:03:51.639 we round this to two seconds 52 00:03:51.639 --> 00:03:57.079 Each hit deals 25 damage 53 00:03:57.839 --> 00:04:00.240 After four hits, the total damage reaches 100 54 00:04:00.240 --> 00:04:04.220 And this includes the time for movement 55 00:04:04.720 --> 00:04:07.580 So that's two seconds 56 00:04:08.520 --> 00:04:12.539 So it is 50 for a minute 57 00:04:12.839 --> 00:04:18.840 So the basic attack's DPS is 50 58 00:04:19.320 --> 00:04:25.520 DPS, again, refers to damage per second 59 00:04:25.520 --> 00:04:33.439 So the DPS, the damage per second, for basic attack is 50 60 00:04:34.559 --> 00:04:38.180 So that concludes the basic attack damage 61 00:04:38.880 --> 00:04:42.140 Now, we move on to the skill damage 62 00:04:42.920 --> 00:04:45.160 Since a skill attack is used every 20 seconds 63 00:04:45.160 --> 00:04:51.939 and deals 100 damage to each of three mobs, 64 00:04:52.679 --> 00:04:55.140 the damage per use is 300 65 00:04:55.140 --> 00:04:58.000 dividing by 20, the cooldown time, 66 00:04:59.579 --> 00:05:03.559 gives a DPS of 15 67 00:05:03.559 --> 00:05:06.379 That's the calculation 68 00:05:07.959 --> 00:05:16.620 Because the player can use skill and basic attacks, 69 00:05:18.040 --> 00:05:19.799 we add the values 70 00:05:19.799 --> 00:05:23.279 The basic attack DPS of 50, 71 00:05:24.199 --> 00:05:26.200 with the skill attack DPS of 15, 72 00:05:26.200 --> 00:05:29.579 these are the DPS values we add up 73 00:05:29.579 --> 00:05:34.359 We are assuming that the player could 74 00:05:34.359 --> 00:05:36.159 use the skills along with the basic attacks 75 00:05:36.799 --> 00:05:40.079 So the total DPS is 65 76 00:05:40.959 --> 00:05:45.180 One combat lasts three minutes, or 180 seconds, 77 00:05:46.000 --> 00:05:50.320 because that's the optimal duration for player engagement 78 00:05:50.320 --> 00:05:52.299 That's the reason 79 00:05:53.559 --> 00:05:57.140 So DPS here is 65, 80 00:05:57.140 --> 00:06:01.699 adding the DPS values of basic and skill attacks 81 00:06:01.699 --> 00:06:04.059 So it is 50 + 15 = 65 82 00:06:04.419 --> 00:06:10.960 And multiplying it by 180 gives us 11,700 83 00:06:11.720 --> 00:06:16.279 So the DPS values for the player, for basic and skill attacks, 84 00:06:16.279 --> 00:06:19.959 are multiplied by three minutes, which gives us 11,700 85 00:06:21.359 --> 00:06:29.160 So, the player can inflict 11,700 damage for three minutes 86 00:06:30.720 --> 00:06:32.279 Now, the enemies should withstand 87 00:06:32.279 --> 00:06:36.200 this much damage, of 11,700, for three minutes 88 00:06:37.000 --> 00:06:38.959 Now, I'm talking about all enemies 89 00:06:38.959 --> 00:06:43.500 This does not separate boss monsters 90 00:06:45.900 --> 00:06:47.720 from regular mobs 91 00:06:48.060 --> 00:06:50.119 We combine the two, 92 00:06:50.119 --> 00:06:57.680 or even three, including the little boss mobs, to get the value 11,700 93 00:06:58.600 --> 00:07:01.440 So here is the formula for it 94 00:07:03.160 --> 00:07:08.419 We have the HP for one mob, 95 00:07:09.559 --> 00:07:10.980 which is 100 96 00:07:12.700 --> 00:07:18.019 Now, we divide the HP for boss and mob 97 00:07:19.519 --> 00:07:24.979 Let's say the boss gets half of 11,700 98 00:07:26.059 --> 00:07:29.720 The reason is, we want the player 99 00:07:31.040 --> 00:07:38.960 to be fighting the boss for around 1.5 minutes 100 00:07:39.720 --> 00:07:47.399 And fight the mobs for the other 1.5 minutes 101 00:07:47.879 --> 00:07:50.519 So first, halve the value 102 00:07:51.199 --> 00:07:55.519 So the mobs get 5850 103 00:07:55.519 --> 00:07:58.459 And we rounded this value 104 00:07:58.756 --> 00:07:59.756 to have 5900 for boss HP 105 00:08:00.039 --> 00:08:03.560 and 5800 for the total mobs HP 106 00:08:03.560 --> 00:08:06.280 One mob gets 100 HP 107 00:08:06.920 --> 00:08:12.800 So 5800 divided by that will give us 58 mobs 108 00:08:13.480 --> 00:08:16.319 This is how we can fine-tune the details 109 00:08:17.239 --> 00:08:21.140 So, here is the summary of our values from lastt class 110 00:08:22.120 --> 00:08:29.159 The player can inflict 50 damage with basic attack per second 111 00:08:29.679 --> 00:08:34.239 With skill attacks, the damage is 15 per second 112 00:08:34.559 --> 00:08:38.200 We have four basic attacks in two seconds and one skill in 20 seconds 113 00:08:39.100 --> 00:08:41.860 The total play time is 3 minutes, 114 00:08:41.861 --> 00:08:45.221 so the player can inflict the total of 11,700 damage 115 00:08:45.840 --> 00:08:49.919 And this equates the total mobs HP for one stage 116 00:08:50.419 --> 00:08:53.999 Each mob gets 100 HP, 117 00:08:54.544 --> 00:08:56.324 and there are 58 of it 118 00:08:56.639 --> 00:09:01.440 There is one boss with the HP of 5900 119 00:09:01.440 --> 00:09:06.439 So the sum of the mobs HP becomes 11,700 120 00:09:08.639 --> 00:09:13.479 So this is the most foundational criteria 121 00:09:13.479 --> 00:09:17.940 So the player total attack damage equates the enemies total HP 122 00:09:18.880 --> 00:09:22.139 The total DPS that the player can deal over three minutes 123 00:09:22.679 --> 00:09:26.880 must be absorbed by the enemy over the same period, 124 00:09:26.880 --> 00:09:28.239 so that's the total HP 125 00:09:28.239 --> 00:09:35.140 Please keep in mind this fundamental concept 126 00:09:37.540 --> 00:09:44.039 Key Elements to Adjust in Combat Balance 127 00:09:46.239 --> 00:09:50.519 First, we have damage formulas and the conversion of defense into defense rate 128 00:09:51.119 --> 00:09:59.539 Next are standard stats for enemies across 100 stages 129 00:10:01.339 --> 00:10:06.200 Understanding how to calculate the damage dealt to enemies, 130 00:10:07.040 --> 00:10:12.600 along with concepts like defense and defense rate, is crucial 131 00:10:13.480 --> 00:10:15.380 The amount of damage dealt per hit 132 00:10:16.280 --> 00:10:21.840 Next, converting defense into HP to simplify balancing 133 00:10:22.760 --> 00:10:27.280 I will explain the detailed formulas for this later 134 00:10:27.880 --> 00:10:32.880 Additionally, I will go over the standard stats for enemies across 100 stages 135 00:10:34.080 --> 00:10:37.900 Each stage contains mobs 136 00:10:38.820 --> 00:10:45.280 that have specific values for HP, defense, and attack power 137 00:10:47.320 --> 00:10:52.479 If we assume that there are 100 stages, 138 00:10:52.479 --> 00:10:54.180 we need to establish 139 00:10:54.784 --> 00:10:56.724 baseline values for attack power, defense, 140 00:10:57.260 --> 00:11:01.860 and HP per second for the mobs in each stage 141 00:11:03.640 --> 00:11:08.339 Typically, we create base stat values using formulas 142 00:11:09.179 --> 00:11:13.719 We start with these base stats, 143 00:11:13.719 --> 00:11:16.259 which are then adjusted 144 00:11:16.919 --> 00:11:22.300 with modifiers and fine-tuned for balance 145 00:11:23.760 --> 00:11:27.260 This is essential for combat balance 146 00:11:27.700 --> 00:11:33.200 Matching the total HP and attack power of players and enemies 147 00:11:34.400 --> 00:11:38.220 For example, if we are currently designing Stage 10, 148 00:11:39.200 --> 00:11:43.400 the player's stats like attack power and HP will reflect 149 00:11:43.400 --> 00:11:48.473 their equipped gear and character progression 150 00:11:49.000 --> 00:11:52.679 Similarly, enemies will have predefined 151 00:11:53.640 --> 00:11:56.120 attack power and HP values 152 00:11:57.599 --> 00:12:00.499 Adjustments can be made 153 00:12:01.052 --> 00:12:04.232 through gear and experience rewards 154 00:12:05.119 --> 00:12:09.039 After determining the enemy attack power, 155 00:12:09.500 --> 00:12:15.220 the player's attack power and HP must be set accordingly 156 00:12:16.340 --> 00:12:21.139 This is done by adjusting gear rewards 157 00:12:21.759 --> 00:12:23.720 and ensuring that 158 00:12:24.292 --> 00:12:30.392 the player's stats align with the enemy's attack level 159 00:12:30.980 --> 00:12:34.340 Let's break this down further 160 00:12:35.420 --> 00:12:39.300 First, we determined 161 00:12:40.221 --> 00:12:44.601 how much damage the player can deal over three minutes 162 00:12:44.960 --> 00:12:50.799 Next, we calculated how much total HP enemies must have to endure this damage 163 00:12:50.799 --> 00:12:56.019 Now, we must also determine how much damage 164 00:12:56.286 --> 00:13:00.226 the enemy should deal to the player over the same duration 165 00:13:00.859 --> 00:13:02.400 Based on that information, 166 00:13:02.791 --> 00:13:08.551 we adjust the player's HP accordingly 167 00:13:08.551 --> 00:13:16.000 The key concept here is symmetry between player and enemy stats 168 00:13:16.300 --> 00:13:21.520 The player’s total attack power must match the enemy’s total HP 169 00:13:21.900 --> 00:13:28.460 The enemy’s total attack power must match the player’s total HP 170 00:13:28.560 --> 00:13:31.939 This calculation must be time-based 171 00:13:32.559 --> 00:13:36.159 If we set the standard combat duration to three minutes, we must: 172 00:13:36.579 --> 00:13:42.359 Determine the total damage the player can deal in three minutes 173 00:13:42.359 --> 00:13:45.719 Playtest to determine how much damage 174 00:13:46.679 --> 00:13:52.300 the enemy should deal to the player in three minutes 175 00:13:52.300 --> 00:13:57.179 Use this data to set the player’s HP accordingly 176 00:13:59.159 --> 00:14:02.279 Establishing the Balancing Goals 177 00:14:03.219 --> 00:14:12.500 In an action MORPG, let’s assume we have 100 stages of standard battles 178 00:14:13.420 --> 00:14:22.500 We must set enemy attack power, HP, and defense across these stages 179 00:14:23.080 --> 00:14:25.120 Accordingly, we then adjust 180 00:14:25.852 --> 00:14:28.272 the player’s attack power, HP, 181 00:14:29.000 --> 00:14:34.400 and defense to maintain difficulty balance 182 00:14:34.635 --> 00:14:38.815 The goal is to maintain this equilibrium 183 00:14:40.320 --> 00:14:43.699 When the game begins, 184 00:14:43.700 --> 00:14:48.446 there are many stages unfolding, 185 00:14:49.479 --> 00:14:53.379 like stage 1, 2, 3, 4, and on 186 00:14:54.799 --> 00:14:57.519 Each stage must have a set playtime 187 00:14:58.439 --> 00:15:00.519 So ensuring that 188 00:15:01.008 --> 00:15:05.168 player and enemy stats remain balanced throughout the progression 189 00:15:05.828 --> 00:15:07.368 is crucial for balance 190 00:15:08.239 --> 00:15:12.099 The stage should be clearable within the set playtime 191 00:15:12.899 --> 00:15:17.920 So, we first define the stages we will release 192 00:15:17.921 --> 00:15:23.640 and adjust the balance for each stage accordingly 193 00:15:25.000 --> 00:15:31.739 Each stage must be individually fine-tuned to ensure the proper difficulty curve 194 00:15:32.479 --> 00:15:37.780 To achieve this, we need to study how defense affects incoming damage 195 00:15:38.520 --> 00:15:42.320 through combat and damage formulas 196 00:15:43.280 --> 00:15:47.040 The reason we balance stage-by-stage 197 00:15:47.940 --> 00:15:54.340 is that the game’s service model is stage-based 198 00:15:54.940 --> 00:15:58.479 While we’ve used 100 stages as an example, 199 00:15:58.479 --> 00:16:02.760 in a real open beta scenario, 200 00:16:03.320 --> 00:16:05.459 we might launch with 300+ stages 201 00:16:05.460 --> 00:16:09.297 Each of these must be carefully balanced before release 202 00:16:09.619 --> 00:16:12.040 To simplify, think of it this way 203 00:16:12.716 --> 00:16:18.296 Player and enemy strength must scale appropriately for each stage 204 00:16:19.080 --> 00:16:21.820 we delve into it, it gets more complex 205 00:16:22.480 --> 00:16:25.620 because we have to consider player equipment 206 00:16:26.080 --> 00:16:30.400 Unlike static enemy stats, 207 00:16:31.360 --> 00:16:35.400 players gain stronger gear as they progress 208 00:16:35.960 --> 00:16:41.079 This means stats are always improving, affecting the balance curve 209 00:16:41.559 --> 00:16:46.280 Because of this, we must adjust not only combat balance 210 00:16:46.280 --> 00:16:51.099 but also reward balance and economic balance 211 00:16:51.100 --> 00:16:54.260 to that progress 212 00:16:54.260 --> 00:16:58.059 to create a smooth progression 213 00:16:59.719 --> 00:17:03.659 Let's now discuss the combat formula 214 00:17:05.239 --> 00:17:11.640 Assuming the defense absorbs part of incoming damage, 215 00:17:12.560 --> 00:17:18.640 we can express it through different formulas 216 00:17:20.000 --> 00:17:27.720 Let's set example values for the defense 217 00:17:28.500 --> 00:17:31.539 Let's say the attack power is 100, 218 00:17:32.568 --> 00:17:34.048 the defense 50, 219 00:17:34.649 --> 00:17:36.929 and HP 100 220 00:17:38.119 --> 00:17:44.619 Let's use simple subtraction method 221 00:17:45.799 --> 00:17:49.620 So the allies attack damage is 100, 222 00:17:50.720 --> 00:17:55.440 and the enemies defense 50 223 00:17:56.020 --> 00:17:58.860 100 - 50 = 50 224 00:17:59.780 --> 00:18:06.100 We can just use simple addition and subtraction 225 00:18:07.900 --> 00:18:14.899 So one allies attack will result in 100-50 for the enemy HP 226 00:18:15.319 --> 00:18:21.580 But the problem is, this isn't always the case 227 00:18:22.900 --> 00:18:26.559 Let's consider this instead 228 00:18:27.219 --> 00:18:30.979 If attack power equates to defense, 229 00:18:32.359 --> 00:18:36.599 with defense of 100 and HP 100, 230 00:18:38.680 --> 00:18:41.640 Attack - Defense = 0 231 00:18:41.641 --> 00:18:44.821 It's a subtraction method 232 00:18:46.140 --> 00:18:51.319 So 100 attack damage with the 100 defense 233 00:18:52.199 --> 00:18:56.320 will result in a 100% defense, 234 00:18:57.140 --> 00:18:59.820 or 0 damage inflicted 235 00:18:59.920 --> 00:19:02.020 There is no damage 236 00:19:03.116 --> 00:19:05.676 So with this simple subtraction method, 237 00:19:07.140 --> 00:19:12.019 a major flaw appears 238 00:19:12.704 --> 00:19:14.884 when defense exceeds attack 239 00:19:15.419 --> 00:19:19.280 Even after a lot of attack, the HP is not affected 240 00:19:19.956 --> 00:19:23.276 This will make a very boring game 241 00:19:23.599 --> 00:19:29.180 So this combat formula is not what we want 242 00:19:29.480 --> 00:19:34.560 Some indie games have mistakenly used this formula, 243 00:19:34.561 --> 00:19:39.401 but players tend to find these games unfun 244 00:19:40.801 --> 00:19:47.140 Because of these major flaws, most modern games 245 00:19:48.240 --> 00:19:51.639 do not use subtraction-based defense 246 00:19:53.379 --> 00:19:57.940 Instead, most games use a proportional damage absorption formula 247 00:19:59.028 --> 00:20:01.868 The standard formula 248 00:20:03.140 --> 00:20:09.999 that converts defense into a percentage-based reduction 249 00:20:11.219 --> 00:20:19.520 is Damage Absorption = Defense / (Defense + Defense Constant) 250 00:20:20.200 --> 00:20:26.080 Damage absorption is the same as defense 251 00:20:26.081 --> 00:20:27.401 It's the same term 252 00:20:28.400 --> 00:20:33.240 And defense constant is a variable 253 00:20:33.640 --> 00:20:37.779 Here, we use 1000 for defense constant 254 00:20:38.799 --> 00:20:44.940 Let me demonstrate how the value changes 255 00:20:44.940 --> 00:20:47.860 as the defense constant changes 256 00:20:48.696 --> 00:20:52.216 Let's say the attack power is 100 257 00:20:52.760 --> 00:20:56.000 and defense absorption, 0.8 258 00:20:57.148 --> 00:21:00.868 0.8 equates to 80% 259 00:21:01.660 --> 00:21:09.220 It means that 80% of the attack damage is absorbed 260 00:21:09.860 --> 00:21:13.012 So 0.8 means 80% 261 00:21:14.056 --> 00:21:18.896 It should never exceed 1 262 00:21:20.160 --> 00:21:22.960 100 x 0.8 is 20 263 00:21:23.476 --> 00:21:25.936 So 20 is the damage that gets through, 264 00:21:26.157 --> 00:21:29.717 while 80 is being blocked 265 00:21:30.857 --> 00:21:32.819 To remember it, 266 00:21:34.800 --> 00:21:39.379 0.8 of damage absorption 267 00:21:39.848 --> 00:21:42.368 is like a shield 268 00:21:42.839 --> 00:21:45.019 0.8 of it is shielded, 269 00:21:45.940 --> 00:21:48.940 while 0.8 means 80% 270 00:21:49.899 --> 00:21:55.619 So we get 80% of the damage being shielded 271 00:21:56.479 --> 00:21:59.610 But let's say that the conditions change 272 00:21:59.908 --> 00:22:04.508 For example, 0.8 with the attack power of 100 273 00:22:06.160 --> 00:22:08.280 means it's a 80% shield 274 00:22:08.547 --> 00:22:11.947 So it blocks 80 and receives only 20 damage 275 00:22:12.294 --> 00:22:15.394 But the attack power can change 276 00:22:16.154 --> 00:22:19.339 What if the attack power is not 100 but 1000? 277 00:22:19.339 --> 00:22:24.467 We have 0.8 damage absorption, or 80% shield 278 00:22:25.347 --> 00:22:30.840 So 800 is being blocked and 200 inflicted 279 00:22:31.900 --> 00:22:39.239 Damage absorption means the amount of damage or attack power absorbed 280 00:22:40.920 --> 00:22:44.559 Defense literally means the defense rate 281 00:22:45.208 --> 00:22:47.488 By adding a number, 282 00:22:47.759 --> 00:22:52.360 this defense formula will give you the damage absorption rate 283 00:22:52.897 --> 00:22:56.157 Let's go over the formula once again 284 00:22:56.760 --> 00:23:01.579 Damage absorption is defense divided by defense plus defense constant, 285 00:23:02.508 --> 00:23:06.348 for which we'll use 1000 286 00:23:06.999 --> 00:23:11.700 Then the damage absorption is defense plus defense divided by 1000 287 00:23:12.580 --> 00:23:14.440 So let's say that damage absorption 288 00:23:14.948 --> 00:23:18.148 or the final value is the y value 289 00:23:19.020 --> 00:23:22.820 Then the defense is the input value, or the x value 290 00:23:22.820 --> 00:23:29.559 So y = x + x / 1000 291 00:23:31.299 --> 00:23:37.280 Next, the Formula for Damage Taken Ratio 292 00:23:39.640 --> 00:23:45.659 The defense constant is a freely adjustable value in the formula 293 00:23:46.519 --> 00:23:51.460 Its value affects the graph’s sensitivity 294 00:23:52.700 --> 00:23:58.680 With defense constants of 100, 1000, and 5000, 295 00:23:59.560 --> 00:24:05.039 I will show how defense and damage absorption change 296 00:24:07.559 --> 00:24:12.220 Defense rate is the same as damage absorption 297 00:24:12.220 --> 00:24:15.120 The formula for both is: 298 00:24:15.688 --> 00:24:19.588 Defense / (Defense + Defense Constant) 299 00:24:20.880 --> 00:24:24.199 The x value is the input 300 00:24:24.539 --> 00:24:28.679 that represents defense 301 00:24:28.679 --> 00:24:43.360 For example, values like 0, 100, 1000, 5000, and 30,000 are set 302 00:24:43.760 --> 00:24:46.259 It equals defense 303 00:24:47.464 --> 00:24:50.344 Since x is the input, it equals defense 304 00:24:51.240 --> 00:24:55.110 The defense constant varies, 305 00:24:55.550 --> 00:25:00.850 so we’ll test different values 306 00:25:01.960 --> 00:25:04.160 I will provide three examples, 307 00:25:05.124 --> 00:25:07.044 when defense constant is 5000, 308 00:25:08.120 --> 00:25:15.100 1000, and 100, in that order 309 00:25:15.900 --> 00:25:19.500 Any formula can be customized, 310 00:25:21.319 --> 00:25:25.299 but let’s start with 5000 311 00:25:26.322 --> 00:25:35.222 With defense 100 and constant 5000, the result is 0.021 312 00:25:35.222 --> 00:25:42.757 With defense 1000 and constant 5000, it’s 0.167 313 00:25:42.897 --> 00:25:50.667 It also equates to 16.7% damage blocked 314 00:25:51.160 --> 00:25:53.259 Damage absorption, defense rate, 315 00:25:53.260 --> 00:25:57.700 and shield all mean the same 316 00:25:58.699 --> 00:26:00.519 A defense rate, 317 00:26:00.840 --> 00:26:03.920 meaning the damage blocked, 318 00:26:04.501 --> 00:26:07.641 is 16.7% 319 00:26:09.259 --> 00:26:14.699 Now, with a defense constant of 1000: 320 00:26:15.499 --> 00:26:17.940 At defense 1000, 321 00:26:18.504 --> 00:26:21.944 the rate jumps from 16.7% 322 00:26:23.020 --> 00:26:28.319 to 50% with the defense constant becoming 1000 323 00:26:28.320 --> 00:26:30.000 It's a huge difference 324 00:26:30.072 --> 00:26:35.132 At defense 1000, the rate jumps from 16.7% to 50% 325 00:26:35.612 --> 00:26:39.259 With a constant of 100, 326 00:26:40.520 --> 00:26:43.719 a defense value of 1000 blocks .909 327 00:26:44.440 --> 00:26:51.179 or 90.9% of damage 328 00:26:52.299 --> 00:26:57.160 So if the x value is 1000 329 00:26:57.455 --> 00:26:59.855 with the defense constant 1000, 330 00:27:00.176 --> 00:27:03.651 it is excessively high 331 00:27:04.580 --> 00:27:07.719 Blocking 90.9% 332 00:27:08.472 --> 00:27:11.199 means almost no damage is taken 333 00:27:11.199 --> 00:27:14.839 If defense grows beyond 1000, 334 00:27:14.840 --> 00:27:18.085 there arises a big problem 335 00:27:18.712 --> 00:27:21.452 Balance becomes difficult 336 00:27:22.199 --> 00:27:26.140 with defense over 1000 337 00:27:26.141 --> 00:27:33.203 With a defense constant of 100, a defense of 1000 already blocks 90.9% 338 00:27:33.483 --> 00:27:36.700 So everything is already used out 339 00:27:37.348 --> 00:27:39.128 Thus, in practice, 340 00:27:39.568 --> 00:27:43.908 small defense constants like 100 should not be used 341 00:27:43.908 --> 00:27:49.180 In real applications, 1000 or higher is used for defense constants 342 00:27:49.465 --> 00:27:50.705 So, in practice, 343 00:27:51.412 --> 00:27:52.992 this damage formula, 344 00:27:53.680 --> 00:27:58.040 or this conversion formula uses 345 00:27:59.120 --> 00:28:00.900 values over 1000 346 00:28:01.620 --> 00:28:08.500 and typically between 1000 and 5000 for the defense constant 347 00:28:08.800 --> 00:28:11.121 If you look at the graph on the right, 348 00:28:11.576 --> 00:28:13.626 when using a defense constant of 100, 349 00:28:14.343 --> 00:28:19.103 the curve rises too steeply 350 00:28:19.520 --> 00:28:23.821 With a defense constant of 1000, it rises evenly 351 00:28:23.975 --> 00:28:28.935 And with 5000, the increase is gradual 352 00:28:29.480 --> 00:28:34.581 If you want to use large defense values in your game, 353 00:28:35.457 --> 00:28:39.976 a defense constant of 5000 is suitable 354 00:28:40.880 --> 00:28:46.319 For a general game, a defense constant of 1000 is appropriate 355 00:28:46.319 --> 00:28:52.651 To prevent setting excessively small defense values, 356 00:28:52.879 --> 00:28:56.679 it is best not to use a defense constant below 1000 357 00:28:56.800 --> 00:28:59.320 By comparing the graphs, 358 00:28:59.731 --> 00:29:02.481 you can clearly see how defense rate changes 359 00:29:02.881 --> 00:29:07.080 depending on the input defense value 360 00:29:08.719 --> 00:29:17.630 Now, let’s look at various derived formulas based on the defense rate formula 361 00:29:17.880 --> 00:29:23.050 This part is quite complex, so it may be difficult 362 00:29:23.243 --> 00:29:27.792 I will explain it slowly 363 00:29:29.599 --> 00:29:39.569 First, damage absorption is calculated as Defense / (Defense + Defense Constant) 364 00:29:40.719 --> 00:29:44.361 Now, let’s consider the reverse concept 365 00:29:45.185 --> 00:29:48.135 This leads to the idea of the damage taken ratio 366 00:29:48.760 --> 00:29:52.960 The formula for damage taken ratio is 1 - Damage Absorption 367 00:29:54.280 --> 00:29:56.160 This is the inverse concept 368 00:29:57.024 --> 00:29:59.274 We defined damage absorption as a shield 369 00:29:59.560 --> 00:30:05.609 If the absorption rate is 0.8, it means the shield blocks 80% of the damage 370 00:30:06.059 --> 00:30:10.309 The damage taken ratio is simply 1 - 0.8 = 0.2 371 00:30:10.815 --> 00:30:13.555 Thus, 20% of the damage penetrates the shield 372 00:30:14.359 --> 00:30:17.820 In other words, 0.2, 373 00:30:17.821 --> 00:30:21.446 or 20% of the attack is actually received 374 00:30:21.738 --> 00:30:24.878 The damage taken ratio represents this remaining percentage 375 00:30:26.079 --> 00:30:29.291 For deriving the defense values, 376 00:30:30.177 --> 00:30:32.197 by extending this formula, 377 00:30:32.336 --> 00:30:35.356 we can define a new equation as follows 378 00:30:36.640 --> 00:30:43.751 The formula for damage taken ratio is this 379 00:30:44.890 --> 00:30:52.180 Defense Constant / (Defense + Defense Constant) 380 00:30:52.181 --> 00:30:54.321 For Defense + Defense Constant, 381 00:30:55.040 --> 00:30:57.400 we need to make the value 1 382 00:30:58.287 --> 00:31:04.066 So the numerator and denominator have the same values 383 00:31:04.239 --> 00:31:12.380 (Defense + Defense Constant) / (Defense + Defense Constant) = 1 384 00:31:12.500 --> 00:31:18.620 We can rewrite it as 1 - (Defense / (Defense + Defense Constant)) 385 00:31:19.120 --> 00:31:22.701 It subtracts the damage absorption, 386 00:31:22.702 --> 00:31:25.302 and we already defined damage absorption 387 00:31:25.943 --> 00:31:28.822 Defense / (Defense + Defense Constant) 388 00:31:29.400 --> 00:31:35.540 So, the damage taken ratio has been newly formulated into a rather complex equation 389 00:31:35.541 --> 00:31:37.621 Once again, 390 00:31:38.760 --> 00:31:43.187 (Defense + Defense Constant) 391 00:31:43.187 --> 00:31:46.687 / (Defense + Defense Constant) 392 00:31:46.688 --> 00:31:50.871 It subtracts the second part from the first 393 00:31:52.239 --> 00:31:56.360 We can simplify this equation further 394 00:31:58.160 --> 00:31:58.975 Since 395 00:31:59.336 --> 00:32:02.675 the denominator remains the same, 396 00:32:02.675 --> 00:32:04.381 the denominator across 397 00:32:04.963 --> 00:32:07.583 this complex equation is consistently Defense + Defense Constant 398 00:32:11.260 --> 00:32:13.359 So, we can simply subtract the numerators 399 00:32:13.622 --> 00:32:14.902 Since the denominator remains the same, 400 00:32:15.679 --> 00:32:19.540 the left side retains Defense + Defense Constant, 401 00:32:19.540 --> 00:32:21.819 and the right side retains Defense 402 00:32:21.819 --> 00:32:26.191 Subtracting these leaves only Defense Constant in the numerator 403 00:32:26.447 --> 00:32:30.267 Thus, the final equation for the damage taken ratio is: 404 00:32:30.998 --> 00:32:35.837 Defense Constant / (Defense + Defense Constant) 405 00:32:37.640 --> 00:32:39.660 Now, we've gone through three steps of calculation 406 00:32:39.661 --> 00:32:41.993 Next, we substitute values 407 00:32:42.760 --> 00:32:48.430 Multiplying both sides by the denominator: 408 00:32:49.386 --> 00:32:54.605 (Damage Taken Ratio) × (Defense + Defense Constant) = Defense Constant 409 00:32:55.079 --> 00:32:58.301 The reason for repeated adjustments 410 00:32:58.453 --> 00:33:00.994 is ultimately to derive a formula for Defense itself 411 00:33:00.994 --> 00:33:02.871 That is the purpose of this calculation 412 00:33:04.279 --> 00:33:11.359 In step four, we have: (Damage Taken Ratio) × (Defense + Defense Constant) 413 00:33:11.360 --> 00:33:14.080 Now, we move this term to the right-hand side 414 00:33:14.419 --> 00:33:20.080 On the left remains Defense + Defense Constant, 415 00:33:20.080 --> 00:33:25.680 and on the right remains Defense Constant / Damage Taken Ratio 416 00:33:26.220 --> 00:33:31.710 This makes it easier to isolate Defense 417 00:33:32.542 --> 00:33:35.502 The final equation for Defense is: 418 00:33:36.272 --> 00:33:40.251 (Defense Constant / Damage Taken Ratio) - Defense Constant 419 00:33:41.079 --> 00:33:43.120 By performing these calculations, 420 00:33:43.899 --> 00:33:46.139 and using these formulae, 421 00:33:46.620 --> 00:33:49.200 we derive a formula for Defense 422 00:33:49.839 --> 00:33:53.900 Now, an important new concept appears 423 00:33:54.692 --> 00:33:57.512 Effective Health 424 00:33:57.512 --> 00:33:59.881 We will discuss this next 425 00:34:00.120 --> 00:34:04.900 Effective health is defined as Health / Damage Taken Ratio 426 00:34:05.160 --> 00:34:09.579 We will explain why this is the case later 427 00:34:11.479 --> 00:34:16.679 Let’s review the Damage Taken Ratio concept 428 00:34:18.219 --> 00:34:22.459 If Damage Absorption is 0.8, then Damage Taken Ratio = 429 00:34:23.599 --> 00:34:24.680 1 - 0.8 = 0.2 430 00:34:25.278 --> 00:34:28.138 The Damage Taken Ratio is the inverse of Damage Absorption 431 00:34:30.199 --> 00:34:33.400 Subtracting the shield portion, 432 00:34:33.400 --> 00:34:36.300 this is the remaining damage taken 433 00:34:38.720 --> 00:34:45.139 Let’s summarize the Defense and Defense Rate formulas again 434 00:34:45.719 --> 00:34:48.059 Since we already calculated these above, 435 00:34:48.328 --> 00:34:50.288 you just need to review them 436 00:34:52.120 --> 00:34:56.059 Damage Absorption = Defense / (Defense + Defense Constant) 437 00:34:56.060 --> 00:34:58.800 Damage Taken Ratio = 1 - Damage Absorption 438 00:34:58.800 --> 00:35:01.639 And as explained earlier, 439 00:35:01.640 --> 00:35:04.520 after intermediate calculations, 440 00:35:04.919 --> 00:35:12.540 Defense is (Defense Constant / Damage Taken Ratio) - Defense Constant 441 00:35:12.840 --> 00:35:15.723 The blue text is the key equation 442 00:35:16.237 --> 00:35:18.297 Another key concept is 443 00:35:18.836 --> 00:35:20.876 Effective Health 444 00:35:21.170 --> 00:35:25.500 Effective Health = Health / Damage Taken Ratio 445 00:35:25.834 --> 00:35:29.873 Connverting Defense into Health 446 00:35:30.280 --> 00:35:37.879 Here’s a more detailed explanation of Effective Health 447 00:35:38.679 --> 00:35:43.961 If the Damage Taken Ratio is 0.1, 448 00:35:43.961 --> 00:35:47.401 meaning only 10% of the damage is taken, 449 00:35:48.320 --> 00:35:54.559 this means the actual health is effectively 10 times higher 450 00:35:56.239 --> 00:35:57.100 For example, 451 00:35:59.480 --> 00:36:01.821 let’s consider a case with an ally and an enemy 452 00:36:02.719 --> 00:36:03.959 Ally health: 100 453 00:36:03.959 --> 00:36:05.180 Enemy attack power: 100 454 00:36:06.460 --> 00:36:09.680 A single hit depletes all 100 HP 455 00:36:10.104 --> 00:36:14.364 This is assuming the ally has no damage absorption 456 00:36:15.179 --> 00:36:18.200 Now, let’s consider the opposite case 457 00:36:19.637 --> 00:36:21.117 Ally health: 100 458 00:36:21.458 --> 00:36:23.498 Damage absorption: 0.9 459 00:36:23.879 --> 00:36:25.860 Damage taken ratio: 0.1 460 00:36:26.372 --> 00:36:29.892 If the enemy attack power is 100, 461 00:36:31.840 --> 00:36:35.081 90% is blocked by the shield 462 00:36:35.770 --> 00:36:39.889 The damage taken ratio is 0.1 463 00:36:40.360 --> 00:36:44.861 So, out of 100 attack power, only 10 damage is received 464 00:36:44.861 --> 00:36:45.861 Only 10 damage 465 00:36:46.320 --> 00:36:50.360 Since each hit only does 10 damage, 466 00:36:50.521 --> 00:36:52.241 the ally must be hit 10 times 467 00:36:52.626 --> 00:36:58.546 This effectively makes their health 10 times higher, meaning 1000 HP 468 00:36:58.966 --> 00:37:02.659 This is when the ally has damage absorption 469 00:37:03.439 --> 00:37:09.699 Comparing with the previous case where there was no defense, 470 00:37:10.499 --> 00:37:14.800 taking 100 damage would immediately reduce HP from 100 to 0 471 00:37:15.962 --> 00:37:18.462 With 90% damage absorption, or 0.9, 472 00:37:18.563 --> 00:37:21.343 and 10% damage taken ratio, or 0.1, 473 00:37:21.945 --> 00:37:23.340 only 10% 474 00:37:23.624 --> 00:37:25.784 or 10 of the attack is received 475 00:37:25.954 --> 00:37:28.934 This is the same as having 1000 HP 476 00:37:29.719 --> 00:37:33.521 Since the ally can endure 10 extra hits, 477 00:37:33.522 --> 00:37:39.141 it effectively has 1000 HP 478 00:37:39.141 --> 00:37:41.841 This is the concept of Effective Health 479 00:37:41.901 --> 00:37:43.501 Effective health is the true HP, 480 00:37:43.502 --> 00:37:45.273 sometimes called the real HP 481 00:37:47.199 --> 00:37:53.319 Effective Health = Health / Damage Taken Ratio 482 00:37:54.399 --> 00:37:58.930 If Damage Constant = 1000, and Health = 1000, 483 00:37:59.930 --> 00:38:06.729 The key concept is that Defense can be converted into Health 484 00:38:07.679 --> 00:38:11.790 Defense can be expressed as Health 485 00:38:11.978 --> 00:38:16.338 That's the basic concept, that defense can be health 486 00:38:17.739 --> 00:38:29.059 As the Damage Taken Ratio changes from 1 → 0.95 → 0.9 → 0.85 → 0.8 → 0.75 → 0.7 → 0.65 → 0.6, 487 00:38:30.299 --> 00:38:35.079 if the Damage Taken Ratio is 1, it means no shield exists 488 00:38:35.519 --> 00:38:39.781 Since Damage Taken Ratio = (1 - Shield), 489 00:38:40.960 --> 00:38:45.100 if the Damage Taken Ratio is 0.9, 490 00:38:45.101 --> 00:38:48.280 the shield is 0.1 491 00:38:48.679 --> 00:38:49.721 To put it simply, 492 00:38:50.553 --> 00:38:57.032 if Damage Taken Ratio = 0.5, then half of the damage is blocked 493 00:38:57.032 --> 00:38:58.421 And Defense = 1000 494 00:38:58.558 --> 00:39:01.338 With Defense = 1000 and Defense Constant = 100, 495 00:39:02.115 --> 00:39:04.015 the Damage Taken Ratio becomes 0.5 496 00:39:04.016 --> 00:39:05.851 Since half the damage is blocked, 497 00:39:05.851 --> 00:39:08.071 Effective Health = 200 498 00:39:08.250 --> 00:39:11.260 This means the effective HP is doubled 499 00:39:12.385 --> 00:39:16.145 Now, why do we convert Defense into Health? 500 00:39:17.439 --> 00:39:22.580 Without this conversion, balancing involves three variables: 501 00:39:22.997 --> 00:39:26.177 Defense, Health, and Attack Power 502 00:39:27.080 --> 00:39:32.059 Balancing both ally and enemy defense is complicated 503 00:39:32.719 --> 00:39:39.340 But if we reduce balancing to only two variables, it's much easier 504 00:39:39.800 --> 00:39:44.500 If we only consider Health and Attack Power, 505 00:39:44.967 --> 00:39:48.327 we simply match Enemy HP to Ally Attack Power 506 00:39:48.507 --> 00:39:52.087 and Ally HP to Enemy Attack Power 507 00:39:52.307 --> 00:39:56.280 So, by converting Defense into Effective Health, 508 00:39:56.281 --> 00:40:01.560 balancing requires only two factors, 509 00:40:02.042 --> 00:40:03.042 making it easier 510 00:40:03.679 --> 00:40:07.700 The core of combat balance is adjusting 511 00:40:08.035 --> 00:40:12.334 Attack factors and defense factors 512 00:40:12.719 --> 00:40:16.381 So, if everything is converted to Attack Power and Health, 513 00:40:16.381 --> 00:40:19.821 balancing becomes simple 514 00:40:20.760 --> 00:40:23.540 For attack power, 515 00:40:23.541 --> 00:40:29.312 attack-related things like critical hits are converted to DPS 516 00:40:29.719 --> 00:40:33.001 And Defense is converted into Health, 517 00:40:33.432 --> 00:40:36.232 so by comparing the attack power and health, 518 00:40:36.233 --> 00:40:38.826 you can efficiently balance combat 519 00:40:40.820 --> 00:40:42.479 This concludes today's lecture 520 00:40:42.818 --> 00:40:44.498 Great job, everyone 521 00:40:44.498 --> 00:40:45.300 Thank you 522 00:40:45.741 --> 00:40:47.301 Combat Mechanics & Balance Factors Key elements of combat balance: Damage formula, defense, and defense ratio Enemy stats for 100 stages HP and attack 523 00:40:47.301 --> 00:40:48.642 Damage absorption = Defense ratio Defense / (Defense + Defense Constant) Determines how much damage is blocked when attacked 524 00:40:48.642 --> 00:40:50.403 If damage absorption = 0.8 (80%), an enemy attack of 100 deals only 20 damage 525 00:40:50.403 --> 00:40:51.624 Defense value: Direct stat representing a character's defense Used in the defense ratio formula to calculate damage absorption 526 00:40:51.625 --> 00:40:53.345 Formulas for Defense & Damage Taken Damage Absorption = Defense / (Defense + Defense Constant Damage Taken Ratio = 1 - Damage Absorption 527 00:40:53.345 --> 00:40:55.445 Damage Taken Ratio = (Defense Constant / (Defense + Defense Constant)) (Damage Taken Ratio) × (Defense + Defense Constant) = Defense Constant 528 00:40:55.445 --> 00:40:57.666 Defense = (Defense Constant / Damage Taken Ratio) - Defense Constant Effective Health = HP / Damage Taken Ratio 529 00:40:57.666 --> 00:40:58.908 If Damage Taken Ratio = 0.1 (taking only 10% of damage), 530 00:40:58.908 --> 00:41:00.368 the character effectively has 10x HP Defense can be converted into HP equivalent 531 00:41:00.368 --> 00:41:01.269 Why Convert Defense to HP? Without conversion, too many variables to balance 532 00:41:01.269 --> 00:41:02.030 With conversion, only two factors to balance (HP & Attack Power), simplifying calculations 533 00:41:02.030 --> 00:41:02.891 Combat Balance Basics Key principle: Adjust attack factors and defense factors to maintain balance 534 00:41:02.891 --> 00:41:03.723 Convert all stats into Attack Power (DPS) and Effective Health (EHP) for simplified combat balancing