Difference between revisions of "Sacred 2:How is a character's natural Stamina calculated?"
(Created page with "It all starts in '''blueprint.txt'''. There is a bonus called '''crbonus_attr_sta_pc'''. <pre> newBonus = { -- name = "crbonus_attr_sta_pc", rating = 0, basedonskill = "S...") |
(Add references) |
||
Line 78: | Line 78: | ||
The generic formula for blueprint bonuses is: | The generic formula for blueprint bonuses is: | ||
− | <blockquote>ValueOfBonus = FLOOR((FLOOR | + | <blockquote>ValueOfBonus = FLOOR((FLOOR((ValueAt200 - ValueAt0) * (1 / 200) * CreatureOrItemLevel) + ValueAt0) * Intensity * 0.001)</blockquote> |
For Stamina (and attributes in general), there are no additional operations to perform: | For Stamina (and attributes in general), there are no additional operations to perform: | ||
Line 84: | Line 84: | ||
We can adapt and simplify the formula like so: | We can adapt and simplify the formula like so: | ||
− | <blockquote>Stamina = FLOOR((FLOOR | + | <blockquote>Stamina = FLOOR((FLOOR((ValueAt200 - ValueAt0) * (1 / 200) * CharacterLevel) + ValueAt0) * Intensity * 0.001)</blockquote> |
− | <blockquote>Stamina = FLOOR((FLOOR | + | <blockquote>Stamina = FLOOR((FLOOR((525 - 23) * (1 / 200) * CharacterLevel) + 23) * Intensity * 0.001)</blockquote> |
− | <blockquote>Stamina = FLOOR((FLOOR(( | + | <blockquote>Stamina = FLOOR((FLOOR(502 * (1 / 200) * CharacterLevel) + 23) * Intensity * 0.001)</blockquote> |
<blockquote>Stamina = FLOOR((FLOOR(2.51 * CharacterLevel) + 23) * Intensity * 0.001)</blockquote> | <blockquote>Stamina = FLOOR((FLOOR(2.51 * CharacterLevel) + 23) * Intensity * 0.001)</blockquote> | ||
Line 497: | Line 497: | ||
| 200 || 546 || 525 || 525 || 525 || 525 || 546 || 525 | | 200 || 546 || 525 || 525 || 525 || 525 || 546 || 525 | ||
|} | |} | ||
+ | |||
+ | |||
+ | |||
+ | == References == | ||
+ | * https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7146103 | ||
+ | * https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7144874 |
Latest revision as of 17:54, 26 September 2024
It all starts in blueprint.txt. There is a bonus called crbonus_attr_sta_pc.
newBonus = { -- name = "crbonus_attr_sta_pc", rating = 0, basedonskill = "SKILL_INVALID", type = "BONUS_STATS", spez = "STAT_STA", spez2 = "", usagebits = 65535, minconstraints = {1,0,0}, difficultyvaluerange0 = {0,23,525}, difficultyvaluerange1 = {1,23,525}, difficultyvaluerange2 = {2,23,525}, difficultyvaluerange3 = {3,23,525}, difficultyvaluerange4 = {4,23,525}, } mgr.createBonus(33, newBonus);
In creatures.txt, each character receives this bonus at a different "intensity" value.
The Dragon Mage:
mgr.addCreatureBonus( 1949, { intensity = 1040, bonus = 33, })
The Dryad:
mgr.addCreatureBonus( 94, { intensity = 1000, bonus = 33, })
The High Elf:
mgr.addCreatureBonus( 209, { intensity = 1000, bonus = 33, })
The Inquisitor:
mgr.addCreatureBonus( 51, { intensity = 1000, bonus = 33, })
The Seraphim:
mgr.addCreatureBonus( 1, { intensity = 1000, bonus = 33, })
The Shadow Warrior:
mgr.addCreatureBonus( 93, { intensity = 1040, bonus = 33, })
The Temple Guardian:
mgr.addCreatureBonus( 210, { intensity = 1000, bonus = 33, })
TODO Guide on how to interpret blueprint bonuses.
The generic formula for blueprint bonuses is:
ValueOfBonus = FLOOR((FLOOR((ValueAt200 - ValueAt0) * (1 / 200) * CreatureOrItemLevel) + ValueAt0) * Intensity * 0.001)
For Stamina (and attributes in general), there are no additional operations to perform:
Stamina = ValueOfBonus
We can adapt and simplify the formula like so:
Stamina = FLOOR((FLOOR((ValueAt200 - ValueAt0) * (1 / 200) * CharacterLevel) + ValueAt0) * Intensity * 0.001)
Stamina = FLOOR((FLOOR((525 - 23) * (1 / 200) * CharacterLevel) + 23) * Intensity * 0.001)
Stamina = FLOOR((FLOOR(502 * (1 / 200) * CharacterLevel) + 23) * Intensity * 0.001)
Stamina = FLOOR((FLOOR(2.51 * CharacterLevel) + 23) * Intensity * 0.001)
By using the formula, we can fill in the following table:
Character level | Stamina | ||||||
Dragon Mage | Dryad | High Elf | Inquisitor | Seraphim | Shadow Warrior | Temple Guardian | |
1 | 26 | 25 | 25 | 25 | 25 | 26 | 25 |
2 | 29 | 28 | 28 | 28 | 28 | 29 | 28 |
3 | 31 | 30 | 30 | 30 | 30 | 31 | 30 |
4 | 34 | 33 | 33 | 33 | 33 | 34 | 33 |
5 | 36 | 35 | 35 | 35 | 35 | 36 | 35 |
6 | 39 | 38 | 38 | 38 | 38 | 39 | 38 |
7 | 41 | 40 | 40 | 40 | 40 | 41 | 40 |
8 | 44 | 43 | 43 | 43 | 43 | 44 | 43 |
9 | 46 | 45 | 45 | 45 | 45 | 46 | 45 |
10 | 49 | 48 | 48 | 48 | 48 | 49 | 48 |
11 | 52 | 50 | 50 | 50 | 50 | 52 | 50 |
12 | 55 | 53 | 53 | 53 | 53 | 55 | 53 |
13 | 57 | 55 | 55 | 55 | 55 | 57 | 55 |
14 | 60 | 58 | 58 | 58 | 58 | 60 | 58 |
15 | 62 | 60 | 60 | 60 | 60 | 62 | 60 |
16 | 65 | 63 | 63 | 63 | 63 | 65 | 63 |
17 | 67 | 65 | 65 | 65 | 65 | 67 | 65 |
18 | 70 | 68 | 68 | 68 | 68 | 70 | 68 |
19 | 72 | 70 | 70 | 70 | 70 | 72 | 70 |
20 | 75 | 73 | 73 | 73 | 73 | 75 | 73 |
21 | 78 | 75 | 75 | 75 | 75 | 78 | 75 |
22 | 81 | 78 | 78 | 78 | 78 | 81 | 78 |
23 | 83 | 80 | 80 | 80 | 80 | 83 | 80 |
24 | 86 | 83 | 83 | 83 | 83 | 86 | 83 |
25 | 88 | 85 | 85 | 85 | 85 | 88 | 85 |
26 | 91 | 88 | 88 | 88 | 88 | 91 | 88 |
27 | 93 | 90 | 90 | 90 | 90 | 93 | 90 |
28 | 96 | 93 | 93 | 93 | 93 | 96 | 93 |
29 | 98 | 95 | 95 | 95 | 95 | 98 | 95 |
30 | 101 | 98 | 98 | 98 | 98 | 101 | 98 |
31 | 104 | 100 | 100 | 100 | 100 | 104 | 100 |
32 | 107 | 103 | 103 | 103 | 103 | 107 | 103 |
33 | 109 | 105 | 105 | 105 | 105 | 109 | 105 |
34 | 112 | 108 | 108 | 108 | 108 | 112 | 108 |
35 | 114 | 110 | 110 | 110 | 110 | 114 | 110 |
36 | 117 | 113 | 113 | 113 | 113 | 117 | 113 |
37 | 119 | 115 | 115 | 115 | 115 | 119 | 115 |
38 | 122 | 118 | 118 | 118 | 118 | 122 | 118 |
39 | 124 | 120 | 120 | 120 | 120 | 124 | 120 |
40 | 127 | 123 | 123 | 123 | 123 | 127 | 123 |
41 | 130 | 125 | 125 | 125 | 125 | 130 | 125 |
42 | 133 | 128 | 128 | 128 | 128 | 133 | 128 |
43 | 135 | 130 | 130 | 130 | 130 | 135 | 130 |
44 | 138 | 133 | 133 | 133 | 133 | 138 | 133 |
45 | 140 | 135 | 135 | 135 | 135 | 140 | 135 |
46 | 143 | 138 | 138 | 138 | 138 | 143 | 138 |
47 | 145 | 140 | 140 | 140 | 140 | 145 | 140 |
48 | 148 | 143 | 143 | 143 | 143 | 148 | 143 |
49 | 150 | 145 | 145 | 145 | 145 | 150 | 145 |
50 | 153 | 148 | 148 | 148 | 148 | 153 | 148 |
51 | 157 | 151 | 151 | 151 | 151 | 157 | 151 |
52 | 159 | 153 | 153 | 153 | 153 | 159 | 153 |
53 | 162 | 156 | 156 | 156 | 156 | 162 | 156 |
54 | 164 | 158 | 158 | 158 | 158 | 164 | 158 |
55 | 167 | 161 | 161 | 161 | 161 | 167 | 161 |
56 | 169 | 163 | 163 | 163 | 163 | 169 | 163 |
57 | 172 | 166 | 166 | 166 | 166 | 172 | 166 |
58 | 174 | 168 | 168 | 168 | 168 | 174 | 168 |
59 | 177 | 171 | 171 | 171 | 171 | 177 | 171 |
60 | 179 | 173 | 173 | 173 | 173 | 179 | 173 |
61 | 183 | 176 | 176 | 176 | 176 | 183 | 176 |
62 | 185 | 178 | 178 | 178 | 178 | 185 | 178 |
63 | 188 | 181 | 181 | 181 | 181 | 188 | 181 |
64 | 190 | 183 | 183 | 183 | 183 | 190 | 183 |
65 | 193 | 186 | 186 | 186 | 186 | 193 | 186 |
66 | 195 | 188 | 188 | 188 | 188 | 195 | 188 |
67 | 198 | 191 | 191 | 191 | 191 | 198 | 191 |
68 | 200 | 193 | 193 | 193 | 193 | 200 | 193 |
69 | 203 | 196 | 196 | 196 | 196 | 203 | 196 |
70 | 205 | 198 | 198 | 198 | 198 | 205 | 198 |
71 | 209 | 201 | 201 | 201 | 201 | 209 | 201 |
72 | 211 | 203 | 203 | 203 | 203 | 211 | 203 |
73 | 214 | 206 | 206 | 206 | 206 | 214 | 206 |
74 | 216 | 208 | 208 | 208 | 208 | 216 | 208 |
75 | 219 | 211 | 211 | 211 | 211 | 219 | 211 |
76 | 221 | 213 | 213 | 213 | 213 | 221 | 213 |
77 | 224 | 216 | 216 | 216 | 216 | 224 | 216 |
78 | 226 | 218 | 218 | 218 | 218 | 226 | 218 |
79 | 229 | 221 | 221 | 221 | 221 | 229 | 221 |
80 | 231 | 223 | 223 | 223 | 223 | 231 | 223 |
81 | 235 | 226 | 226 | 226 | 226 | 235 | 226 |
82 | 237 | 228 | 228 | 228 | 228 | 237 | 228 |
83 | 240 | 231 | 231 | 231 | 231 | 240 | 231 |
84 | 242 | 233 | 233 | 233 | 233 | 242 | 233 |
85 | 245 | 236 | 236 | 236 | 236 | 245 | 236 |
86 | 247 | 238 | 238 | 238 | 238 | 247 | 238 |
87 | 250 | 241 | 241 | 241 | 241 | 250 | 241 |
88 | 252 | 243 | 243 | 243 | 243 | 252 | 243 |
89 | 255 | 246 | 246 | 246 | 246 | 255 | 246 |
90 | 257 | 248 | 248 | 248 | 248 | 257 | 248 |
91 | 261 | 251 | 251 | 251 | 251 | 261 | 251 |
92 | 263 | 253 | 253 | 253 | 253 | 263 | 253 |
93 | 266 | 256 | 256 | 256 | 256 | 266 | 256 |
94 | 268 | 258 | 258 | 258 | 258 | 268 | 258 |
95 | 271 | 261 | 261 | 261 | 261 | 271 | 261 |
96 | 273 | 263 | 263 | 263 | 263 | 273 | 263 |
97 | 276 | 266 | 266 | 266 | 266 | 276 | 266 |
98 | 278 | 268 | 268 | 268 | 268 | 278 | 268 |
99 | 281 | 271 | 271 | 271 | 271 | 281 | 271 |
100 | 284 | 274 | 274 | 274 | 274 | 284 | 274 |
101 | 287 | 276 | 276 | 276 | 276 | 287 | 276 |
102 | 290 | 279 | 279 | 279 | 279 | 290 | 279 |
103 | 292 | 281 | 281 | 281 | 281 | 292 | 281 |
104 | 295 | 284 | 284 | 284 | 284 | 295 | 284 |
105 | 297 | 286 | 286 | 286 | 286 | 297 | 286 |
106 | 300 | 289 | 289 | 289 | 289 | 300 | 289 |
107 | 302 | 291 | 291 | 291 | 291 | 302 | 291 |
108 | 305 | 294 | 294 | 294 | 294 | 305 | 294 |
109 | 307 | 296 | 296 | 296 | 296 | 307 | 296 |
110 | 310 | 299 | 299 | 299 | 299 | 310 | 299 |
111 | 313 | 301 | 301 | 301 | 301 | 313 | 301 |
112 | 316 | 304 | 304 | 304 | 304 | 316 | 304 |
113 | 318 | 306 | 306 | 306 | 306 | 318 | 306 |
114 | 321 | 309 | 309 | 309 | 309 | 321 | 309 |
115 | 323 | 311 | 311 | 311 | 311 | 323 | 311 |
116 | 326 | 314 | 314 | 314 | 314 | 326 | 314 |
117 | 328 | 316 | 316 | 316 | 316 | 328 | 316 |
118 | 331 | 319 | 319 | 319 | 319 | 331 | 319 |
119 | 333 | 321 | 321 | 321 | 321 | 333 | 321 |
120 | 336 | 324 | 324 | 324 | 324 | 336 | 324 |
121 | 339 | 326 | 326 | 326 | 326 | 339 | 326 |
122 | 342 | 329 | 329 | 329 | 329 | 342 | 329 |
123 | 344 | 331 | 331 | 331 | 331 | 344 | 331 |
124 | 347 | 334 | 334 | 334 | 334 | 347 | 334 |
125 | 349 | 336 | 336 | 336 | 336 | 349 | 336 |
126 | 352 | 339 | 339 | 339 | 339 | 352 | 339 |
127 | 354 | 341 | 341 | 341 | 341 | 354 | 341 |
128 | 357 | 344 | 344 | 344 | 344 | 357 | 344 |
129 | 359 | 346 | 346 | 346 | 346 | 359 | 346 |
130 | 362 | 349 | 349 | 349 | 349 | 362 | 349 |
131 | 365 | 351 | 351 | 351 | 351 | 365 | 351 |
132 | 368 | 354 | 354 | 354 | 354 | 368 | 354 |
133 | 370 | 356 | 356 | 356 | 356 | 370 | 356 |
134 | 373 | 359 | 359 | 359 | 359 | 373 | 359 |
135 | 375 | 361 | 361 | 361 | 361 | 375 | 361 |
136 | 378 | 364 | 364 | 364 | 364 | 378 | 364 |
137 | 380 | 366 | 366 | 366 | 366 | 380 | 366 |
138 | 383 | 369 | 369 | 369 | 369 | 383 | 369 |
139 | 385 | 371 | 371 | 371 | 371 | 385 | 371 |
140 | 388 | 374 | 374 | 374 | 374 | 388 | 374 |
141 | 391 | 376 | 376 | 376 | 376 | 391 | 376 |
142 | 394 | 379 | 379 | 379 | 379 | 394 | 379 |
143 | 396 | 381 | 381 | 381 | 381 | 396 | 381 |
144 | 399 | 384 | 384 | 384 | 384 | 399 | 384 |
145 | 401 | 386 | 386 | 386 | 386 | 401 | 386 |
146 | 404 | 389 | 389 | 389 | 389 | 404 | 389 |
147 | 406 | 391 | 391 | 391 | 391 | 406 | 391 |
148 | 409 | 394 | 394 | 394 | 394 | 409 | 394 |
149 | 411 | 396 | 396 | 396 | 396 | 411 | 396 |
150 | 414 | 399 | 399 | 399 | 399 | 414 | 399 |
151 | 418 | 402 | 402 | 402 | 402 | 418 | 402 |
152 | 420 | 404 | 404 | 404 | 404 | 420 | 404 |
153 | 423 | 407 | 407 | 407 | 407 | 423 | 407 |
154 | 425 | 409 | 409 | 409 | 409 | 425 | 409 |
155 | 428 | 412 | 412 | 412 | 412 | 428 | 412 |
156 | 430 | 414 | 414 | 414 | 414 | 430 | 414 |
157 | 433 | 417 | 417 | 417 | 417 | 433 | 417 |
158 | 435 | 419 | 419 | 419 | 419 | 435 | 419 |
159 | 438 | 422 | 422 | 422 | 422 | 438 | 422 |
160 | 440 | 424 | 424 | 424 | 424 | 440 | 424 |
161 | 444 | 427 | 427 | 427 | 427 | 444 | 427 |
162 | 446 | 429 | 429 | 429 | 429 | 446 | 429 |
163 | 449 | 432 | 432 | 432 | 432 | 449 | 432 |
164 | 451 | 434 | 434 | 434 | 434 | 451 | 434 |
165 | 454 | 437 | 437 | 437 | 437 | 454 | 437 |
166 | 456 | 439 | 439 | 439 | 439 | 456 | 439 |
167 | 459 | 442 | 442 | 442 | 442 | 459 | 442 |
168 | 461 | 444 | 444 | 444 | 444 | 461 | 444 |
169 | 464 | 447 | 447 | 447 | 447 | 464 | 447 |
170 | 466 | 449 | 449 | 449 | 449 | 466 | 449 |
171 | 470 | 452 | 452 | 452 | 452 | 470 | 452 |
172 | 472 | 454 | 454 | 454 | 454 | 472 | 454 |
173 | 475 | 457 | 457 | 457 | 457 | 475 | 457 |
174 | 477 | 459 | 459 | 459 | 459 | 477 | 459 |
175 | 480 | 462 | 462 | 462 | 462 | 480 | 462 |
176 | 482 | 464 | 464 | 464 | 464 | 482 | 464 |
177 | 485 | 467 | 467 | 467 | 467 | 485 | 467 |
178 | 487 | 469 | 469 | 469 | 469 | 487 | 469 |
179 | 490 | 472 | 472 | 472 | 472 | 490 | 472 |
180 | 492 | 474 | 474 | 474 | 474 | 492 | 474 |
181 | 496 | 477 | 477 | 477 | 477 | 496 | 477 |
182 | 498 | 479 | 479 | 479 | 479 | 498 | 479 |
183 | 501 | 482 | 482 | 482 | 482 | 501 | 482 |
184 | 503 | 484 | 484 | 484 | 484 | 503 | 484 |
185 | 506 | 487 | 487 | 487 | 487 | 506 | 487 |
186 | 508 | 489 | 489 | 489 | 489 | 508 | 489 |
187 | 511 | 492 | 492 | 492 | 492 | 511 | 492 |
188 | 513 | 494 | 494 | 494 | 494 | 513 | 494 |
189 | 516 | 497 | 497 | 497 | 497 | 516 | 497 |
190 | 518 | 499 | 499 | 499 | 499 | 518 | 499 |
191 | 522 | 502 | 502 | 502 | 502 | 522 | 502 |
192 | 524 | 504 | 504 | 504 | 504 | 524 | 504 |
193 | 527 | 507 | 507 | 507 | 507 | 527 | 507 |
194 | 529 | 509 | 509 | 509 | 509 | 529 | 509 |
195 | 532 | 512 | 512 | 512 | 512 | 532 | 512 |
196 | 534 | 514 | 514 | 514 | 514 | 534 | 514 |
197 | 537 | 517 | 517 | 517 | 517 | 537 | 517 |
198 | 539 | 519 | 519 | 519 | 519 | 539 | 519 |
199 | 542 | 522 | 522 | 522 | 522 | 542 | 522 |
200 | 546 | 525 | 525 | 525 | 525 | 546 | 525 |