Sacred 2:Speed Lore - formulas and tables

From SacredWiki
Revision as of 22:55, 27 November 2024 by Maneus (talk | contribs) (Created page with "The skill definition can be found in '''creatures.txt'''. <pre> mgr.createSkill { skill_name = "skill_speed_lore", advance_level = 75, min_level = 1, mean_value = 150, ad...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The skill definition can be found in creatures.txt.

mgr.createSkill {
	skill_name = "skill_speed_lore",
	advance_level = 75,
	min_level = 1,
	mean_value = 150,
	advance_mean_value = 225,
	skillgroup = "SKG_ATTACK",
	adv_skill_name = "skill_speed_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. Speed Lore provides two bonuses: Attack and Defence Value +X and Run Speed +X%.


The formula for Attack and Defense Value +X is:

ValueOfBonus = SkillValue

TooltipValue = ValueOfBonus * 0.1

This TooltipValue is then rounded down.


The formula for Run Speed +X% is:

ValueOfBonus = FLOOR(SkillValue / 15)

TooltipValue = ValueOfBonus * 0.1

This TooltipValue is then subject to precision loss from 32-bit floats, and is rounded down to one decimal place. In short, the resulting value may end up being lower by 0.1.


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 * 150 * (SkillLevel + 100 * 0.015) / (SkillLevel + 100))

SkillValue = FLOOR(3000 * (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 * 225 * (SkillLevel - 34 + 100 * 0.015) / (SkillLevel - 34 + 100))

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

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


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

Note: The listed values for Attack and Defense Value +X are the actual percentages and not the fixed values. And the listed values for Run Speed +X% are before applying precision loss. The reason is these operations affect only the tooltip.

Skill level Pre-mastery Post-mastery
Attack and Defense Value +X Run Speed +X% Attack and Defense Value +X Run Speed +X%
1 +7.4% +0.4%
2 +10.2% +0.6%
3 +13.1% +0.8%
4 +15.8% +1%
5 +18.5% +1.2%
6 +21.2% +1.4%
7 +23.8% +1.5%
8 +26.3% +1.7%
9 +28.8% +1.9%
10 +31.3% +2%
11 +33.7% +2.2%
12 +36.1% +2.4%
13 +38.4% +2.5%
14 +40.7% +2.7%
15 +43% +2.8%
16 +45.2% +3%
17 +47.4% +3.1%
18 +49.5% +3.3%
19 +51.6% +3.4%
20 +53.7% +3.5%
21 +55.7% +3.7%
22 +57.7% +3.8%
23 +59.7% +3.9%
24 +61.6% +4.1%
25 +63.6% +4.2%
26 +65.4% +4.3%
27 +67.3% +4.4%
28 +69.1% +4.6%
29 +70.9% +4.7%
30 +72.6% +4.8%
31 +74.4% +4.9%
32 +76.1% +5%
33 +77.8% +5.1%
34 +79.4% +5.2%
35 +81.1% +5.4%
36 +82.7% +5.5%
37 +84.3% +5.6%
38 +85.8% +5.7%
39 +87.4% +5.8%
40 +88.9% +5.9%
41 +90.4% +6%
42 +91.9% +6.1%
43 +93.3% +6.2%
44 +94.7% +6.3%
45 +96.2% +6.4%
46 +97.6% +6.5%
47 +98.9% +6.5%
48 +100.3% +6.6%
49 +101.6% +6.7%
50 +103% +6.8%
51 +104.3% +6.9%
52 +105.5% +7%
53 +106.8% +7.1%
54 +108.1% +7.2%
55 +109.3% +7.2%
56 +110.5% +7.3%
57 +111.7% +7.4%
58 +112.9% +7.5%
59 +114.1% +7.6%
60 +115.3% +7.6%
61 +116.4% +7.7%
62 +117.5% +7.8%
63 +118.7% +7.9%
64 +119.8% +7.9%
65 +120.9% +8%
66 +121.9% +8.1%
67 +123% +8.2%
68 +124.1% +8.2%
69 +125.1% +8.3%
70 +126.1% +8.4%
71 +127.1% +8.4%
72 +128.1% +8.5%
73 +129.1% +8.6%
74 +130.1% +8.6%
75 +131.1% +8.7% +135.6% +9%
76 +132.1% +8.8% +137.8% +9.1%
77 +133% +8.8% +140% +9.3%
78 +133.9% +8.9% +142.1% +9.4%
79 +134.9% +8.9% +144.3% +9.6%
80 +135.8% +9% +146.4% +9.7%
81 +136.7% +9.1% +148.4% +9.8%
82 +137.6% +9.1% +150.5% +10%
83 +138.5% +9.2% +152.5% +10.1%
84 +139.4% +9.2% +154.5% +10.3%
85 +140.2% +9.3% +156.4% +10.4%
86 +141.1% +9.4% +158.3% +10.5%
87 +141.9% +9.4% +160.2% +10.6%
88 +142.8% +9.5% +162.1% +10.8%
89 +143.6% +9.5% +164% +10.9%
90 +144.4% +9.6% +165.8% +11%
91 +145.2% +9.6% +167.6% +11.1%
92 +146% +9.7% +169.4% +11.2%
93 +146.8% +9.7% +171.2% +11.4%
94 +147.6% +9.8% +172.9% +11.5%
95 +148.4% +9.8% +174.6% +11.6%
96 +149.2% +9.9% +176.3% +11.7%
97 +150% +10% +178% +11.8%
98 +150.7% +10% +179.7% +11.9%
99 +151.5% +10.1% +181.3% +12%
100 +152.2% +10.1% +182.9% +12.1%
101 +152.9% +10.1% +184.5% +12.3%
102 +153.7% +10.2% +186.1% +12.4%
103 +154.4% +10.2% +187.7% +12.5%
104 +155.1% +10.3% +189.2% +12.6%
105 +155.8% +10.3% +190.7% +12.7%
106 +156.5% +10.4% +192.2% +12.8%
107 +157.2% +10.4% +193.7% +12.9%
108 +157.9% +10.5% +195.2% +13%
109 +158.6% +10.5% +196.7% +13.1%
110 +159.2% +10.6% +198.1% +13.2%
111 +159.9% +10.6% +199.5% +13.3%
112 +160.6% +10.7% +200.9% +13.3%
113 +161.2% +10.7% +202.3% +13.4%
114 +161.9% +10.7% +203.7% +13.5%
115 +162.5% +10.8% +205.1% +13.6%
116 +163.1% +10.8% +206.4% +13.7%
117 +163.8% +10.9% +207.7% +13.8%
118 +164.4% +10.9% +209.1% +13.9%
119 +165% +11% +210.4% +14%
120 +165.6% +11% +211.6% +14.1%
121 +166.2% +11% +212.9% +14.1%
122 +166.8% +11.1% +214.2% +14.2%
123 +167.4% +11.1% +215.4% +14.3%
124 +168% +11.2% +216.7% +14.4%
125 +168.6% +11.2% +217.9% +14.5%
126 +169.2% +11.2% +219.1% +14.6%
127 +169.8% +11.3% +220.3% +14.6%
128 +170.3% +11.3% +221.5% +14.7%
129 +170.9% +11.3% +222.6% +14.8%
130 +171.5% +11.4% +223.8% +14.9%
131 +172% +11.4% +225% +15%
132 +172.6% +11.5% +226.1% +15%
133 +173.1% +11.5% +227.2% +15.1%
134 +173.7% +11.5% +228.3% +15.2%
135 +174.2% +11.6% +229.4% +15.2%
136 +174.7% +11.6% +230.5% +15.3%
137 +175.3% +11.6% +231.6% +15.4%
138 +175.8% +11.7% +232.7% +15.5%
139 +176.3% +11.7% +233.7% +15.5%
140 +176.8% +11.7% +234.8% +15.6%
141 +177.3% +11.8% +235.8% +15.7%
142 +177.8% +11.8% +236.8% +15.7%
143 +178.3% +11.8% +237.9% +15.8%
144 +178.8% +11.9% +238.9% +15.9%
145 +179.3% +11.9% +239.9% +15.9%
146 +179.8% +11.9% +240.9% +16%
147 +180.3% +12% +241.9% +16.1%
148 +180.8% +12% +242.8% +16.1%
149 +181.3% +12% +243.8% +16.2%
150 +181.8% +12.1% +244.7% +16.3%
151 +182.2% +12.1% +245.7% +16.3%
152 +182.7% +12.1% +246.6% +16.4%
153 +183.2% +12.2% +247.6% +16.5%
154 +183.6% +12.2% +248.5% +16.5%
155 +184.1% +12.2% +249.4% +16.6%
156 +184.5% +12.3% +250.3% +16.6%
157 +185% +12.3% +251.2% +16.7%
158 +185.4% +12.3% +252.1% +16.8%
159 +185.9% +12.3% +253% +16.8%
160 +186.3% +12.4% +253.8% +16.9%
161 +186.7% +12.4% +254.7% +16.9%
162 +187.2% +12.4% +255.5% +17%
163 +187.6% +12.5% +256.4% +17%
164 +188% +12.5% +257.2% +17.1%
165 +188.4% +12.5% +258.1% +17.2%
166 +188.9% +12.5% +258.9% +17.2%
167 +189.3% +12.6% +259.7% +17.3%
168 +189.7% +12.6% +260.5% +17.3%
169 +190.1% +12.6% +261.3% +17.4%
170 +190.5% +12.7% +262.1% +17.4%
171 +190.9% +12.7% +262.9% +17.5%
172 +191.3% +12.7% +263.7% +17.5%
173 +191.7% +12.7% +264.5% +17.6%
174 +192.1% +12.8% +265.3% +17.6%
175 +192.5% +12.8% +266% +17.7%
176 +192.9% +12.8% +266.8% +17.7%
177 +193.3% +12.8% +267.5% +17.8%
178 +193.7% +12.9% +268.3% +17.8%
179 +194% +12.9% +269% +17.9%
180 +194.4% +12.9% +269.8% +17.9%
181 +194.8% +12.9% +270.5% +18%
182 +195.2% +13% +271.2% +18%
183 +195.5% +13% +271.9% +18.1%
184 +195.9% +13% +272.7% +18.1%
185 +196.3% +13% +273.4% +18.2%
186 +196.6% +13.1% +274.1% +18.2%
187 +197% +13.1% +274.8% +18.3%
188 +197.3% +13.1% +275.4% +18.3%
189 +197.7% +13.1% +276.1% +18.4%
190 +198.1% +13.2% +276.8% +18.4%
191 +198.4% +13.2% +277.5% +18.5%
192 +198.8% +13.2% +278.1% +18.5%
193 +199.1% +13.2% +278.8% +18.5%
194 +199.4% +13.2% +279.5% +18.6%
195 +199.8% +13.3% +280.1% +18.6%
196 +200.1% +13.3% +280.8% +18.7%
197 +200.5% +13.3% +281.4% +18.7%
198 +200.8% +13.3% +282.1% +18.8%
199 +201.1% +13.4% +282.7% +18.8%
200 +201.5% +13.4% +283.3% +18.8%
201 +201.8% +13.4% +283.9% +18.9%
202 +202.1% +13.4% +284.6% +18.9%
203 +202.4% +13.4% +285.2% +19%
204 +202.7% +13.5% +285.8% +19%
205 +203.1% +13.5% +286.4% +19%
206 +203.4% +13.5% +287% +19.1%
207 +203.7% +13.5% +287.6% +19.1%
208 +204% +13.6% +288.2% +19.2%
209 +204.3% +13.6% +288.8% +19.2%
210 +204.6% +13.6% +289.4% +19.2%
211 +204.9% +13.6% +289.9% +19.3%
212 +205.2% +13.6% +290.5% +19.3%
213 +205.5% +13.7% +291.1% +19.4%
214 +205.8% +13.7% +291.6% +19.4%
215 +206.1% +13.7% +292.2% +19.4%
216 +206.4% +13.7% +292.8% +19.5%
217 +206.7% +13.7% +293.3% +19.5%
218 +207% +13.8% +293.9% +19.5%
219 +207.3% +13.8% +294.4% +19.6%
220 +207.6% +13.8% +295% +19.6%
221 +207.9% +13.8% +295.5% +19.7%
222 +208.2% +13.8% +296% +19.7%
223 +208.5% +13.9% +296.6% +19.7%
224 +208.7% +13.9% +297.1% +19.8%
225 +209% +13.9% +297.6% +19.8%
226 +209.3% +13.9% +298.2% +19.8%
227 +209.6% +13.9% +298.7% +19.9%
228 +209.9% +13.9% +299.2% +19.9%
229 +210.1% +14% +299.7% +19.9%
230 +210.4% +14% +300.2% +20%
231 +210.7% +14% +300.7% +20%
232 +210.9% +14% +301.2% +20%
233 +211.2% +14% +301.7% +20.1%
234 +211.5% +14.1% +302.2% +20.1%
235 +211.7% +14.1% +302.7% +20.1%
236 +212% +14.1% +303.2% +20.2%
237 +212.3% +14.1% +303.7% +20.2%
238 +212.5% +14.1% +304.1% +20.2%
239 +212.8% +14.1% +304.6% +20.3%
240 +213% +14.2% +305.1% +20.3%
241 +213.3% +14.2% +305.6% +20.3%
242 +213.5% +14.2% +306% +20.4%
243 +213.8% +14.2% +306.5% +20.4%
244 +214% +14.2% +307% +20.4%
245 +214.3% +14.2% +307.4% +20.4%
246 +214.5% +14.3% +307.9% +20.5%
247 +214.8% +14.3% +308.3% +20.5%
248 +215% +14.3% +308.8% +20.5%
249 +215.3% +14.3% +309.2% +20.6%
250 +215.5% +14.3% +309.7% +20.6%
251 +215.8% +14.3% +310.1% +20.6%
252 +216% +14.4% +310.6% +20.7%
253 +216.2% +14.4% +311% +20.7%
254 +216.5% +14.4% +311.4% +20.7%
255 +216.7% +14.4% +311.9% +20.7%
256 +216.9% +14.4% +312.3% +20.8%
257 +217.2% +14.4% +312.7% +20.8%
258 +217.4% +14.4% +313.1% +20.8%
259 +217.6% +14.5% +313.6% +20.9%
260 +217.9% +14.5% +314% +20.9%
261 +218.1% +14.5% +314.4% +20.9%
262 +218.3% +14.5% +314.8% +20.9%
263 +218.5% +14.5% +315.2% +21%
264 +218.8% +14.5% +315.6% +21%
265 +219% +14.6% +316% +21%
266 +219.2% +14.6% +316.4% +21%
267 +219.4% +14.6% +316.8% +21.1%
268 +219.7% +14.6% +317.2% +21.1%
269 +219.9% +14.6% +317.6% +21.1%
270 +220.1% +14.6% +318% +21.2%
271 +220.3% +14.6% +318.4% +21.2%
272 +220.5% +14.7% +318.8% +21.2%
273 +220.7% +14.7% +319.2% +21.2%
274 +220.9% +14.7% +319.6% +21.3%
275 +221.2% +14.7% +320% +21.3%
276 +221.4% +14.7% +320.3% +21.3%
277 +221.6% +14.7% +320.7% +21.3%
278 +221.8% +14.7% +321.1% +21.4%
279 +222% +14.8% +321.5% +21.4%
280 +222.2% +14.8% +321.8% +21.4%
281 +222.4% +14.8% +322.2% +21.4%
282 +222.6% +14.8% +322.6% +21.5%
283 +222.8% +14.8% +322.9% +21.5%
284 +223% +14.8% +323.3% +21.5%
285 +223.2% +14.8% +323.7% +21.5%
286 +223.4% +14.8% +324% +21.6%
287 +223.6% +14.9% +324.4% +21.6%
288 +223.8% +14.9% +324.7% +21.6%
289 +224% +14.9% +325.1% +21.6%
290 +224.2% +14.9% +325.4% +21.6%
291 +224.4% +14.9% +325.8% +21.7%
292 +224.6% +14.9% +326.1% +21.7%
293 +224.8% +14.9% +326.5% +21.7%
294 +225% +15% +326.8% +21.7%
295 +225.1% +15% +327.2% +21.8%
296 +225.3% +15% +327.5% +21.8%
297 +225.5% +15% +327.8% +21.8%
298 +225.7% +15% +328.2% +21.8%
299 +225.9% +15% +328.5% +21.9%
300 +226.1% +15% +328.8% +21.9%
301 +226.3% +15% +329.2% +21.9%
302 +226.4% +15% +329.5% +21.9%
303 +226.6% +15.1% +329.8% +21.9%
304 +226.8% +15.1% +330.2% +22%
305 +227% +15.1% +330.5% +22%
306 +227.2% +15.1% +330.8% +22%
307 +227.3% +15.1% +331.1% +22%
308 +227.5% +15.1% +331.4% +22%
309 +227.7% +15.1% +331.8% +22.1%
310 +227.9% +15.1% +332.1% +22.1%
311 +228.1% +15.2% +332.4% +22.1%
312 +228.2% +15.2% +332.7% +22.1%
313 +228.4% +15.2% +333% +22.2%
314 +228.6% +15.2% +333.3% +22.2%
315 +228.7% +15.2% +333.6% +22.2%
316 +228.9% +15.2% +333.9% +22.2%
317 +229.1% +15.2% +334.2% +22.2%
318 +229.3% +15.2% +334.5% +22.3%
319 +229.4% +15.2% +334.8% +22.3%
320 +229.6% +15.3% +335.1% +22.3%
321 +229.8% +15.3% +335.4% +22.3%
322 +229.9% +15.3% +335.7% +22.3%
323 +230.1% +15.3% +336% +22.4%
324 +230.3% +15.3% +336.3% +22.4%
325 +230.4% +15.3% +336.6% +22.4%
326 +230.6% +15.3% +336.9% +22.4%
327 +230.7% +15.3% +337.2% +22.4%
328 +230.9% +15.3% +337.5% +22.5%
329 +231.1% +15.4% +337.7% +22.5%
330 +231.2% +15.4% +338% +22.5%
331 +231.4% +15.4% +338.3% +22.5%
332 +231.5% +15.4% +338.6% +22.5%
333 +231.7% +15.4% +338.9% +22.5%
334 +231.9% +15.4% +339.1% +22.6%
335 +232% +15.4% +339.4% +22.6%
336 +232.2% +15.4% +339.7% +22.6%
337 +232.3% +15.4% +340% +22.6%
338 +232.5% +15.5% +340.2% +22.6%
339 +232.6% +15.5% +340.5% +22.7%
340 +232.8% +15.5% +340.8% +22.7%
341 +232.9% +15.5% +341% +22.7%
342 +233.1% +15.5% +341.3% +22.7%
343 +233.2% +15.5% +341.6% +22.7%
344 +233.4% +15.5% +341.8% +22.7%
345 +233.5% +15.5% +342.1% +22.8%
346 +233.7% +15.5% +342.4% +22.8%
347 +233.8% +15.5% +342.6% +22.8%
348 +234% +15.6% +342.9% +22.8%
349 +234.1% +15.6% +343.1% +22.8%
350 +234.3% +15.6% +343.4% +22.8%
351 +234.4% +15.6% +343.7% +22.9%
352 +234.6% +15.6% +343.9% +22.9%
353 +234.7% +15.6% +344.2% +22.9%
354 +234.9% +15.6% +344.4% +22.9%
355 +235% +15.6% +344.7% +22.9%
356 +235.1% +15.6% +344.9% +22.9%
357 +235.3% +15.6% +345.2% +23%
358 +235.4% +15.6% +345.4% +23%
359 +235.6% +15.7% +345.7% +23%
360 +235.7% +15.7% +345.9% +23%
361 +235.9% +15.7% +346.1% +23%
362 +236% +15.7% +346.4% +23%
363 +236.1% +15.7% +346.6% +23.1%
364 +236.3% +15.7% +346.9% +23.1%
365 +236.4% +15.7% +347.1% +23.1%
366 +236.5% +15.7% +347.3% +23.1%
367 +236.7% +15.7% +347.6% +23.1%
368 +236.8% +15.7% +347.8% +23.1%
369 +236.9% +15.7% +348.1% +23.2%
370 +237.1% +15.8% +348.3% +23.2%
371 +237.2% +15.8% +348.5% +23.2%
372 +237.3% +15.8% +348.8% +23.2%
373 +237.5% +15.8% +349% +23.2%
374 +237.6% +15.8% +349.2% +23.2%
375 +237.7% +15.8% +349.4% +23.2%
376 +237.9% +15.8% +349.7% +23.3%
377 +238% +15.8% +349.9% +23.3%
378 +238.1% +15.8% +350.1% +23.3%
379 +238.3% +15.8% +350.3% +23.3%
380 +238.4% +15.8% +350.6% +23.3%
381 +238.5% +15.9% +350.8% +23.3%
382 +238.6% +15.9% +351% +23.4%
383 +238.8% +15.9% +351.2% +23.4%
384 +238.9% +15.9% +351.5% +23.4%
385 +239% +15.9% +351.7% +23.4%
386 +239.1% +15.9% +351.9% +23.4%
387 +239.3% +15.9% +352.1% +23.4%
388 +239.4% +15.9% +352.3% +23.4%
389 +239.5% +15.9% +352.5% +23.5%
390 +239.6% +15.9% +352.7% +23.5%
391 +239.8% +15.9% +353% +23.5%
392 +239.9% +15.9% +353.2% +23.5%
393 +240% +16% +353.4% +23.5%
394 +240.1% +16% +353.6% +23.5%
395 +240.3% +16% +353.8% +23.5%
396 +240.4% +16% +354% +23.6%
397 +240.5% +16% +354.2% +23.6%
398 +240.6% +16% +354.4% +23.6%
399 +240.7% +16% +354.6% +23.6%
400 +240.9% +16% +354.8% +23.6%

References