Difference between revisions of "Sacred 2:Ancient Magic - formulas and tables"

From SacredWiki
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 92: Line 92:
 
| style="padding: 5px 10px;" rowspan="2" | Skill level || style="padding: 5px 10px; text-align: center;" | Pre-mastery || style="padding: 5px 10px; text-align: center;" colspan="2" | Post-mastery
 
| style="padding: 5px 10px;" rowspan="2" | Skill level || style="padding: 5px 10px; text-align: center;" | Pre-mastery || style="padding: 5px 10px; text-align: center;" colspan="2" | Post-mastery
 
|- class="skillsth"
 
|- class="skillsth"
| style="padding: 5px 10px; text-align: center;" | Damage +X% || style="padding: 5px 10px; text-align: center;" | Damage +X% || style="padding: 5px 10px; text-align: center;" | Opponents' Immunities +X%
+
| style="padding: 5px 10px; text-align: center;" | Damage +X% || style="padding: 5px 10px; text-align: center;" | Damage +X% || style="padding: 5px 10px; text-align: center;" | Opponents' Immunities -X%
 
|-
 
|-
 
| 1 || +4.9% ||  ||  
 
| 1 || +4.9% ||  ||  
Line 899: Line 899:
 
== References ==
 
== References ==
 
* https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7146451
 
* https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7146451
 +
* https://darkmatters.org/forums/index.php?/topic/18511-how-is-sacred-2-weapon-damage-calculated/&do=findComment&comment=7146939

Latest revision as of 16:44, 23 November 2024

The skill definition can be found in creatures.txt.

mgr.createSkill {
	skill_name = "skill_ancient_magic_lore",
	advance_level = 75,
	min_level = 0,
	mean_value = 100,
	advance_mean_value = 150,
	skillgroup = "SKG_ASPECTS",
	adv_skill_name = "skill_ancient_magic_mastery",
}

Almost all skills (including this one) use the following method to determine a single "SkillValue":

For pre-mastery skill levels:

MeanValue = mean_value

AdjustedSkillLevel = SkillLevel

For post-mastery skill levels:

MeanValue = advance_mean_value

AdjustedSkillLevel = SkillLevel - FLOOR((advance_level + 1) / 2.222)

Then:

SkillValue = FLOOR(20 * MeanValue * (AdjustedSkillLevel + SkillPivotPoint * 0.015) / (AdjustedSkillLevel + SkillPivotPoint))

Where:

  • SkillLevel - total skill points in the skill.
  • SkillPivotPoint - from balance.txt. Default value is 100.
  • mean_value - from the skill definition in creatures.txt.
  • advance_level - from the skill definition in creatures.txt.
  • advance_mean_value - from the skill definition in creatures.txt.


This "SkillValue" is then used to determine the value of each bonus that the skill provides. Ancient Magic provides two bonuses: Damage +X% and Opponents' Immunities -X%.


The formula for Damage +X% is:

ValueOfBonus = SkillValue

TooltipValue = ValueOfBonus * 0.1

The TooltipValue is subject to precision loss from 32-bit floats! This means that the shown value could be 0.1 less than the real value.


The formula for Opponents' Immunities -X% is:

ValueOfBonus = 1000 * SkillValue / (1000 + SkillValue)

TooltipValue = -1 * ValueOfBonus * 0.1

The TooltipValue is also rounded down to one decimal place.


Opponents' Immunities -X% reduces the damage mitigation in the following way:

NewDamageMitigation = FLOOR(DamageMitigation * (1 - OpponentsImmunities / 1000))

Where:

  • DamageMitigation - The ValueOfBonus for the damage mitigation bonus. If the percentage is 51.6%, then the ValueOfBonus is 516. Note to self: Test if all-channel and single-channel damage mitigation are reduced separately.
  • OpponentsImmunities - The ValueOfBonus for the opponents' immunities bonus.


Since most of the parameters are known in advance, we can simplify the formulas:

For pre-mastery skill levels:

SkillValue = FLOOR(20 * MeanValue * (AdjustedSkillLevel + SkillPivotPoint * 0.015) / (AdjustedSkillLevel + SkillPivotPoint))

SkillValue = FLOOR(20 * 100 * (SkillLevel + 100 * 0.015) / (SkillLevel + 100))

SkillValue = FLOOR(2000 * (SkillLevel + 1.5) / (SkillLevel + 100))

For post-mastery skill levels:

AdjustedSkillLevel = SkillLevel - FLOOR((advance_level + 1) / 2.222)

AdjustedSkillLevel = SkillLevel - FLOOR((75 + 1) / 2.222)

AdjustedSkillLevel = SkillLevel - FLOOR(76 / 2.222)

AdjustedSkillLevel = SkillLevel - FLOOR(34.2034203420342)

AdjustedSkillLevel = SkillLevel - 34

SkillValue = FLOOR(20 * MeanValue * (AdjustedSkillLevel + SkillPivotPoint * 0.015) / (AdjustedSkillLevel + SkillPivotPoint))

SkillValue = FLOOR(20 * 150 * (SkillLevel - 34 + 100 * 0.015) / (SkillLevel - 34 + 100))

SkillValue = FLOOR(3000 * (SkillLevel - 34 + 1.5) / (SkillLevel + 66))

SkillValue = FLOOR(3000 * (SkillLevel - 32.5) / (SkillLevel + 66))

And now, by using these formulas, we can fill in the following table:

Note: The values for Damage +X% are without precision loss, and the values for Opponents' Immunities +X% are not rounded down, because these operations affect only the tooltips and not actual combat.

Skill level Pre-mastery Post-mastery
Damage +X% Damage +X% Opponents' Immunities -X%
1 +4.9%
2 +6.8%
3 +8.7%
4 +10.5%
5 +12.3%
6 +14.1%
7 +15.8%
8 +17.5%
9 +19.2%
10 +20.9%
11 +22.5%
12 +24.1%
13 +25.6%
14 +27.1%
15 +28.6%
16 +30.1%
17 +31.6%
18 +33%
19 +34.4%
20 +35.8%
21 +37.1%
22 +38.5%
23 +39.8%
24 +41.1%
25 +42.4%
26 +43.6%
27 +44.8%
28 +46%
29 +47.2%
30 +48.4%
31 +49.6%
32 +50.7%
33 +51.8%
34 +52.9%
35 +54%
36 +55.1%
37 +56.2%
38 +57.2%
39 +58.2%
40 +59.2%
41 +60.2%
42 +61.2%
43 +62.2%
44 +63.1%
45 +64.1%
46 +65%
47 +65.9%
48 +66.8%
49 +67.7%
50 +68.6%
51 +69.5%
52 +70.3%
53 +71.2%
54 +72%
55 +72.9%
56 +73.7%
57 +74.5%
58 +75.3%
59 +76.1%
60 +76.8%
61 +77.6%
62 +78.3%
63 +79.1%
64 +79.8%
65 +80.6%
66 +81.3%
67 +82%
68 +82.7%
69 +83.4%
70 +84.1%
71 +84.7%
72 +85.4%
73 +86.1%
74 +86.7%
75 +87.4% +90.4% -47.4789915966387%
76 +88% +91.9% -47.8895257946847%
77 +88.7% +93.3% -48.2669425763063%
78 +89.3% +94.7% -48.6389316897792%
79 +89.9% +96.2% -49.0316004077472%
80 +90.5% +97.6% -49.3927125506073%
81 +91.1% +98.9% -49.7234791352438%
82 +91.7% +100.3% -50.0748876684973%
83 +92.3% +101.6% -50.3968253968254%
84 +92.9% +103% -50.7389162561576%
85 +93.5% +104.3% -51.052373959863%
86 +94% +105.5% -51.338199513382%
87 +94.6% +106.8% -51.6441005802708%
88 +95.2% +108.1% -51.9461797212878%
89 +95.7% +109.3% -52.2216913521261%
90 +96.3% +110.5% -52.4940617577197%
91 +96.8% +111.7% -52.7633443552197%
92 +97.3% +112.9% -53.0295913574448%
93 +97.9% +114.1% -53.2928538066324%
94 +98.4% +115.3% -53.5531816070599%
95 +98.9% +116.4% -53.7892791127542%
96 +99.4% +117.5% -54.0229885057471%
97 +100% +118.7% -54.2752629172382%
98 +100.5% +119.8% -54.5040946314832%
99 +101% +120.9% -54.7306473517429%
100 +101.5% +121.9% -54.9346552501127%
101 +101.9% +123% -55.1569506726457%
102 +102.4% +124.1% -55.3770638107988%
103 +102.9% +125.1% -55.5752998667259%
104 +103.4% +126.1% -55.7717823971694%
105 +103.9% +127.1% -55.9665345662704%
106 +104.3% +128.1% -56.1595791319597%
107 +104.8% +129.1% -56.3509384548232%
108 +105.2% +130.1% -56.5406345067362%
109 +105.7% +131.1% -56.728688879273%
110 +106.1% +132.1% -56.9151227919001%
111 +106.6% +133% -57.0815450643777%
112 +107% +133.9% -57.2466866182129%
113 +107.5% +134.9% -57.428693060877%
114 +107.9% +135.8% -57.5911789652248%
115 +108.3% +136.7% -57.752429235319%
116 +108.7% +137.6% -57.9124579124579%
117 +109.2% +138.5% -58.0712788259958%
118 +109.6% +139.4% -58.2289055973267%
119 +110% +140.2% -58.368026644463%
120 +110.4% +141.1% -58.5234342596433%
121 +110.8% +141.9% -58.6606035551881%
122 +111.2% +142.8% -58.8138385502471%
123 +111.6% +143.6% -58.9490968801314%
124 +112% +144.4% -59.0834697217676%
125 +112.4% +145.2% -59.2169657422512%
126 +112.8% +146% -59.349593495935%
127 +113.2% +146.8% -59.4813614262561%
128 +113.5% +147.6% -59.6122778675283%
129 +113.9% +148.4% -59.7423510466989%
130 +114.3% +149.2% -59.8715890850722%
131 +114.7% +150% -60%
132 +115% +150.7% -60.1116872756282%
133 +115.4% +151.5% -60.2385685884692%
134 +115.8% +152.2% -60.3489294210944%
135 +116.1% +152.9% -60.4586793198893%
136 +116.5% +153.7% -60.5833661805282%
137 +116.8% +154.4% -60.6918238993711%
138 +117.2% +155.1% -60.7996863974912%
139 +117.5% +155.8% -60.9069585613761%
140 +117.9% +156.5% -61.0136452241715%
141 +118.2% +157.2% -61.1197511664075%
142 +118.5% +157.9% -61.2252811167119%
143 +118.9% +158.6% -61.3302397525135%
144 +119.2% +159.2% -61.4197530864198%
145 +119.5% +159.9% -61.5236629472874%
146 +119.9% +160.6% -61.6270145817345%
147 +120.2% +161.2% -61.7151607963247%
148 +120.5% +161.9% -61.8174875906835%
149 +120.8% +162.5% -61.9047619047619%
150 +121.2% +163.1% -61.9916381603953%
151 +121.5% +163.8% -62.0924943138741%
152 +121.8% +164.4% -62.178517397882%
153 +122.1% +165% -62.2641509433962%
154 +122.4% +165.6% -62.3493975903615%
155 +122.7% +166.2% -62.4342599549211%
156 +123% +166.8% -62.5187406296852%
157 +123.3% +167.4% -62.602842183994%
158 +123.6% +168% -62.6865671641791%
159 +123.9% +168.6% -62.7699180938198%
160 +124.2% +169.2% -62.852897473997%
161 +124.5% +169.8% -62.9355077835434%
162 +124.8% +170.3% -63.0040695523492%
163 +125% +170.9% -63.0860095976375%
164 +125.3% +171.5% -63.1675874769797%
165 +125.6% +172% -63.2352941176471%
166 +125.9% +172.6% -63.3162142333089%
167 +126.2% +173.1% -63.3833760527279%
168 +126.4% +173.7% -63.4636463280965%
169 +126.7% +174.2% -63.5302698760029%
170 +127% +174.7% -63.5966508918821%
171 +127.3% +175.3% -63.6759898292772%
172 +127.5% +175.8% -63.7418419144307%
173 +127.8% +176.3% -63.8074556641332%
174 +128.1% +176.8% -63.8728323699422%
175 +128.3% +177.3% -63.9379733141003%
176 +128.6% +177.8% -64.0028797696184%
177 +128.8% +178.3% -64.0675530003593%
178 +129.1% +178.8% -64.1319942611191%
179 +129.3% +179.3% -64.1962047977086%
180 +129.6% +179.8% -64.2601858470336%
181 +129.8% +180.3% -64.3239386371745%
182 +130.1% +180.8% -64.3874643874644%
183 +130.3% +181.3% -64.4507643085674%
184 +130.6% +181.8% -64.513839602555%
185 +130.8% +182.2% -64.5641389085755%
186 +131.1% +182.7% -64.6268128758401%
187 +131.3% +183.2% -64.6892655367232%
188 +131.5% +183.6% -64.7390691114245%
189 +131.8% +184.1% -64.8011263639564%
190 +132% +184.5% -64.8506151142355%
191 +132.3% +185% -64.9122807017544%
192 +132.5% +185.4% -64.9614576033637%
193 +132.7% +185.9% -65.0227352221056%
194 +132.9% +186.3% -65.0716032134125%
195 +133.2% +186.7% -65.1203348447855%
196 +133.4% +187.2% -65.1810584958217%
197 +133.6% +187.6% -65.2294853963839%
198 +133.8% +188% -65.2777777777778%
199 +134.1% +188.4% -65.3259361997226%
200 +134.3% +188.9% -65.3859466943579%
201 +134.5% +189.3% -65.4338057379883%
202 +134.7% +189.7% -65.4815326199517%
203 +134.9% +190.1% -65.5291278869355%
204 +135.1% +190.5% -65.5765920826162%
205 +135.4% +190.9% -65.6239257476796%
206 +135.6% +191.3% -65.6711294198421%
207 +135.8% +191.7% -65.7182036338704%
208 +136% +192.1% -65.7651489216022%
209 +136.2% +192.5% -65.8119658119658%
210 +136.4% +192.9% -65.8586548310003%
211 +136.6% +193.3% -65.9052165018752%
212 +136.8% +193.7% -65.9516513449098%
213 +137% +194% -65.9863945578231%
214 +137.2% +194.4% -66.0326086956522%
215 +137.4% +194.8% -66.078697421981%
216 +137.6% +195.2% -66.1246612466125%
217 +137.8% +195.5% -66.1590524534687%
218 +138% +195.9% -66.2047989185536%
219 +138.2% +196.3% -66.2504218697266%
220 +138.4% +196.6% -66.2845583277141%
221 +138.6% +197% -66.3299663299663%
222 +138.8% +197.3% -66.3639421459805%
223 +139% +197.7% -66.4091367148136%
224 +139.1% +198.1% -66.4542099966454%
225 +139.3% +198.4% -66.4879356568365%
226 +139.5% +198.8% -66.5327978580991%
227 +139.7% +199.1% -66.5663657639585%
228 +139.9% +199.4% -66.5998663994656%
229 +140.1% +199.8% -66.6444296197465%
230 +140.3% +200.1% -66.6777740753082%
231 +140.4% +200.5% -66.7221297836938%
232 +140.6% +200.8% -66.7553191489362%
233 +140.8% +201.1% -66.7884423779475%
234 +141% +201.5% -66.832504145937%
235 +141.1% +201.8% -66.8654738237243%
236 +141.3% +202.1% -66.898378020523%
237 +141.5% +202.4% -66.9312169312169%
238 +141.7% +202.7% -66.9639907499174%
239 +141.8% +203.1% -67.0075882547014%
240 +142% +203.4% -67.04021094265%
241 +142.2% +203.7% -67.0727691801119%
242 +142.3% +204% -67.1052631578947%
243 +142.5% +204.3% -67.1376930660532%
244 +142.7% +204.6% -67.1700590938936%
245 +142.8% +204.9% -67.202361429977%
246 +143% +205.2% -67.2346002621232%
247 +143.2% +205.5% -67.2667757774141%
248 +143.3% +205.8% -67.2988881621975%
249 +143.5% +206.1% -67.3309376020908%
250 +143.7% +206.4% -67.3629242819843%
251 +143.8% +206.7% -67.394848386045%
252 +144% +207% -67.4267100977199%
253 +144.1% +207.3% -67.4585095997397%
254 +144.3% +207.6% -67.4902470741222%
255 +144.5% +207.9% -67.521922702176%
256 +144.6% +208.2% -67.5535366645036%
257 +144.8% +208.5% -67.5850891410049%
258 +144.9% +208.7% -67.6060900550696%
259 +145.1% +209% -67.6375404530744%
260 +145.2% +209.3% -67.6689298415778%
261 +145.4% +209.6% -67.7002583979328%
262 +145.5% +209.9% -67.7315262988061%
263 +145.7% +210.1% -67.7523379554982%
264 +145.8% +210.4% -67.7835051546392%
265 +146% +210.7% -67.8146121660766%
266 +146.1% +210.9% -67.8353168221293%
267 +146.3% +211.2% -67.866323907455%
268 +146.4% +211.5% -67.8972712680578%
269 +146.6% +211.7% -67.9178697465512%
270 +146.7% +212% -67.9487179487179%
271 +146.9% +212.3% -67.979506884406%
272 +147% +212.5% -68%
273 +147.1% +212.8% -68.0306905370844%
274 +147.3% +213% -68.0511182108626%
275 +147.4% +213.3% -68.0817108203%
276 +147.6% +213.5% -68.1020733652313%
277 +147.7% +213.8% -68.1325685149777%
278 +147.8% +214% -68.1528662420382%
279 +148% +214.3% -68.1832643970729%
280 +148.1% +214.5% -68.2034976152623%
281 +148.2% +214.8% -68.2337992376112%
282 +148.4% +215% -68.2539682539683%
283 +148.5% +215.3% -68.2841738027276%
284 +148.6% +215.5% -68.3042789223455%
285 +148.8% +215.8% -68.3343888537049%
286 +148.9% +216% -68.3544303797468%
287 +149% +216.2% -68.3744465528147%
288 +149.2% +216.5% -68.4044233807267%
289 +149.3% +216.7% -68.4243763814335%
290 +149.4% +216.9% -68.4443041969075%
291 +149.6% +217.2% -68.4741488020177%
292 +149.7% +217.4% -68.4940138626339%
293 +149.8% +217.6% -68.5138539042821%
294 +150% +217.9% -68.5435671594841%
295 +150.1% +218.1% -68.5633448601069%
296 +150.2% +218.3% -68.5830977065661%
297 +150.3% +218.5% -68.6028257456829%
298 +150.5% +218.8% -68.6323713927227%
299 +150.6% +219% -68.6520376175549%
300 +150.7% +219.2% -68.671679197995%
301 +150.8% +219.4% -68.6912961803381%
302 +150.9% +219.7% -68.7206756334063%
303 +151.1% +219.9% -68.7402313222882%
304 +151.2% +220.1% -68.7597625741956%
305 +151.3% +220.3% -68.7792694349048%
306 +151.4% +220.5% -68.798751950078%
307 +151.5% +220.7% -68.8182101652635%
308 +151.7% +220.9% -68.8376441258959%
309 +151.8% +221.2% -68.8667496886675%
310 +151.9% +221.4% -68.8861232109521%
311 +152% +221.6% -68.9054726368159%
312 +152.1% +221.8% -68.9247980111871%
313 +152.3% +222% -68.944099378882%
314 +152.4% +222.2% -68.9633767846058%
315 +152.5% +222.4% -68.9826302729529%
316 +152.6% +222.6% -69.0018598884067%
317 +152.7% +222.8% -69.0210656753408%
318 +152.8% +223% -69.0402476780186%
319 +152.9% +223.2% -69.0594059405941%
320 +153% +223.4% -69.0785405071119%
321 +153.2% +223.6% -69.097651421508%
322 +153.3% +223.8% -69.1167387276096%
323 +153.4% +224% -69.1358024691358%
324 +153.5% +224.2% -69.1548426896977%
325 +153.6% +224.4% -69.173859432799%
326 +153.7% +224.6% -69.1928527418361%
327 +153.8% +224.8% -69.2118226600985%
328 +153.9% +225% -69.2307692307692%
329 +154% +225.1% -69.2402337742233%
330 +154.1% +225.3% -69.2591454042422%
331 +154.2% +225.5% -69.2780337941628%
332 +154.3% +225.7% -69.2968989867977%
333 +154.5% +225.9% -69.3157410248543%
334 +154.6% +226.1% -69.3345599509353%
335 +154.7% +226.3% -69.3533558075391%
336 +154.8% +226.4% -69.3627450980392%
337 +154.9% +226.6% -69.3815064298836%
338 +155% +226.8% -69.4002447980416%
339 +155.1% +227% -69.4189602446483%
340 +155.2% +227.2% -69.4376528117359%
341 +155.3% +227.3% -69.4469905285671%
342 +155.4% +227.5% -69.4656488549618%
343 +155.5% +227.7% -69.4842844064693%
344 +155.6% +227.9% -69.5028972247637%
345 +155.7% +228.1% -69.5214873514172%
346 +155.8% +228.2% -69.5307739183425%
347 +155.9% +228.4% -69.5493300852619%
348 +156% +228.6% -69.5678636640292%
349 +156.1% +228.7% -69.5771219957408%
350 +156.2% +228.9% -69.5956217695348%
351 +156.3% +229.1% -69.6140990580371%
352 +156.4% +229.3% -69.6325539022168%
353 +156.5% +229.4% -69.6417729204615%
354 +156.6% +229.6% -69.6601941747573%
355 +156.7% +229.8% -69.6785930867192%
356 +156.7% +229.9% -69.6877841770233%
357 +156.8% +230.1% -69.7061496516207%
358 +156.9% +230.3% -69.7244928852558%
359 +157% +230.4% -69.7336561743341%
360 +157.1% +230.6% -69.7519661222021%
361 +157.2% +230.7% -69.7611127910493%
362 +157.3% +230.9% -69.7793895436688%
363 +157.4% +231.1% -69.7976442162489%
364 +157.5% +231.2% -69.8067632850242%
365 +157.6% +231.4% -69.8249849124925%
366 +157.7% +231.5% -69.8340874811463%
367 +157.8% +231.7% -69.8522761531504%
368 +157.9% +231.9% -69.8704429044893%
369 +157.9% +232% -69.8795180722892%
370 +158% +232.2% -69.8976520168573%
371 +158.1% +232.3% -69.9067108034908%
372 +158.2% +232.5% -69.9248120300752%
373 +158.3% +232.6% -69.9338544798557%
374 +158.4% +232.8% -69.9519230769231%
375 +158.5% +232.9% -69.9609492340042%
376 +158.6% +233.1% -69.9789852897028%
377 +158.7% +233.2% -69.9879951980792%
378 +158.7% +233.4% -70.00599880024%
379 +158.8% +233.5% -70.0149925037481%
380 +158.9% +233.7% -70.0329637398861%
381 +159% +233.8% -70.0419412822049%
382 +159.1% +234% -70.059880239521%
383 +159.2% +234.1% -70.0688416641724%
384 +159.2% +234.3% -70.0867484295543%
385 +159.3% +234.4% -70.0956937799043%
386 +159.4% +234.6% -70.1135684399283%
387 +159.5% +234.7% -70.1224977591873%
388 +159.6% +234.9% -70.1403404001194%
389 +159.7% +235% -70.1492537313433%
390 +159.7% +235.1% -70.1581617427634%
391 +159.8% +235.3% -70.1759618252311%
392 +159.9% +235.4% -70.1848539057841%
393 +160% +235.6% -70.2026221692491%
394 +160.1% +235.7% -70.2114983616324%
395 +160.2% +235.9% -70.2292348913367%
396 +160.2% +236% -70.2380952380952%
397 +160.3% +236.1% -70.246950312407%
398 +160.4% +236.3% -70.2646446625037%
399 +160.5% +236.4% -70.2734839476813%
400 +160.6% +236.5% -70.2823179791976%


References