Difference between revisions of "User talk:Rasikko"
imported>Rasikko |
imported>Rasikko m |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Various Array Helper Functions == | |||
Work in progress. | |||
; Change Form to whatever the types are. | |||
<source lang="papyrus"> | |||
Bool Function ArrayIncludes(Form akArray, Form akValueToSearchFor) | |||
; Returns true of akArray contains akValueToSearchFor | |||
int = 0 | |||
int index = akArray.length | |||
while i < index | |||
if akArray[i] == akValueToSearchFor | |||
return true | |||
endif | |||
i += 1 | |||
endif | |||
return false | |||
EndFunction | |||
</source> | |||
== Time Functions == | |||
Self explanatory. They will all require GetFractionOfDay and assume that you will use the globalvariable GameDaysPassed. | |||
<source lang=papyrus> | |||
Float Function GetFractionOfDay(Float daysPassed) | |||
; Returns the hours passed for the day as a fraction. | |||
if daysPassed < 1.0 | |||
return daysPassed | |||
endif | |||
return dayPassed - daysPassed as int | |||
EndFunction | |||
</source> | |||
<br> | |||
<source lang=papyrus> | |||
Float Function GetHoursPassed(Float daysPassed) | |||
; Converts the days passed to the hours passed for the day. | |||
return GetFractionOfDay(daysPassed) * 24.0 | |||
EndFunction | |||
</source> | |||
<br> | |||
<source lang=papyrus> | |||
Float Function GetMinutesPassed(Float daysPassed) | |||
; Converts the days passed to minutes passed for the day. | |||
return GetFractionOfDay(daysPassed) * 24.0 * 60.0 | |||
EndFunction | |||
</source> | |||
<br> | |||
<source lang=papyrus> | |||
Float Function GetSecondsPassed(Float daysPassed) | |||
; Converts the days passed to seconds passed for the day. | |||
return GetFractionOfDay(daysPassed) * 24.0 * 60.0 * 3600.0 | |||
EndFunction | |||
</source> | |||
== Enchanted Item Gold Value Mystery == | == Enchanted Item Gold Value Mystery == | ||
I'm trying to solve the mystery of calculating the gold value for player enchanted items. This was figured out for weapons, but that formula doesn't work for non weapons. My findings so far..:<br> | I'm trying to solve the mystery of calculating the gold value for player enchanted items. This was figured out for weapons, but that formula doesn't work for non weapons. My findings so far..:<br> | ||
Line 15: | Line 66: | ||
|Skill Level | |Skill Level | ||
|Modified Cost | |Modified Cost | ||
|Reduction | |||
|- | |- | ||
|220 | |220 | ||
|0 | |0 | ||
|1277 | |1277 | ||
| - | |||
|- | |- | ||
| - | | - | ||
|1 | |1 | ||
|1202 | |1202 | ||
| 75 | |||
|- | |- | ||
| - | | - | ||
|10 | |10 | ||
|1041 | |1041 | ||
|161 | |||
|- | |- | ||
| - | | - | ||
|'''15''' | |'''15''' | ||
|'''987''' | |'''987''' | ||
|'''54''' | |||
|- | |- | ||
| - | | - | ||
|20 | |20 | ||
|943 | |943 | ||
|44 | |||
|- | |- | ||
| - | | - | ||
|30 | |30 | ||
|867 | |867 | ||
|76 | |||
|- | |- | ||
| - | | - | ||
|40 | |40 | ||
|804 | |804 | ||
|63 | |||
|- | |- | ||
| - | | - | ||
|50 | |50 | ||
|748 | |748 | ||
|56 | |||
|- | |- | ||
| - | | - | ||
|60 | |60 | ||
|698 | |698 | ||
|50 | |||
|- | |- | ||
| - | | - | ||
|70 | |70 | ||
|651 | |651 | ||
|47 | |||
|- | |- | ||
| - | | - | ||
|80 | |80 | ||
|608 | |608 | ||
|40 | |||
|- | |- | ||
| - | | - | ||
|90 | |90 | ||
|568 | |568 | ||
|35 | |||
|- | |- | ||
| - | | - | ||
Line 72: | Line 136: | ||
|529 | |529 | ||
|} | |} | ||
1277 - 529 = 748<br> | |||
1277 x 0.51 = 651.27<br> | |||
1277 at skill 0 is about 2.414 times that of 529 at skill 100.<br> | 1277 at skill 0 is about 2.414 times that of 529 at skill 100.<br> | ||
I've found a formula from the UESP, which does work some but the portion involving the skill is still unknown to me: | I've found a formula from the UESP, which does work some but the portion involving the skill is still unknown to me: | ||
Line 101: | Line 167: | ||
*Epic = 1.833 | *Epic = 1.833 | ||
*Legendary = 1.999 | *Legendary = 1.999 | ||
== | == Close but no cigar == | ||
I believe I have reached the end of my testings and have discovered nothing more so far. The remaining issue is gold values being modified with an enchanting skill level less than 100. I have also modified the formula for vanilla enchanted gear.<br> | I believe I have reached the end of my testings and have discovered nothing more so far. The remaining issue is gold values being modified with an enchanting skill level less than 100. I have also modified the formula for vanilla enchanted gear.<br> | ||
To get the gold value for Player Enchanted gear: | To get the gold value for Player Enchanted gear('''This formula works for Alteration enchantments only.'''): | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Math.Floor((BaseItemGoldValue * TemperingLevel) + (0.12 * SoulGemPower) - (SkillLvl * 0.5)) | Math.Floor((BaseItemGoldValue * TemperingLevel) + (0.12 * SoulGemPower) - (SkillLvl * 0.5)) | ||
</source> | </source> | ||
To get the gold value for vanilla enchanted gear( | To get the gold value for vanilla enchanted gear(apparel only): | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; if the enchantment has no duration: | ; if the enchantment has no duration, the game will use 1: | ||
Math.Ceiling((EffectBase * (Magnitude * Math.Pow(Duration/10, 1.1))) + BaseGoldValue) | |||
</source> | </source> | ||
It seems different calculations is needed for different types of enchantments. For the skill based enchantments, the calculations is certainly not the same. | |||
== Contributions, Thank You == | |||
Thanks for your contributions to the creation kit wiki.[[User:Scrivener07|Scrivener07]] ([[User talk:Scrivener07|talk]]) 2017-12-02T13:30:03 (EST) | |||
: No problem. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2017-12-02T14:09:07 (EST) |
Latest revision as of 05:30, 2 October 2021
Various Array Helper Functions[edit source]
Work in progress.
- Change Form to whatever the types are.
Bool Function ArrayIncludes(Form akArray, Form akValueToSearchFor)
; Returns true of akArray contains akValueToSearchFor
int = 0
int index = akArray.length
while i < index
if akArray[i] == akValueToSearchFor
return true
endif
i += 1
endif
return false
EndFunction
Time Functions[edit source]
Self explanatory. They will all require GetFractionOfDay and assume that you will use the globalvariable GameDaysPassed.
Float Function GetFractionOfDay(Float daysPassed)
; Returns the hours passed for the day as a fraction.
if daysPassed < 1.0
return daysPassed
endif
return dayPassed - daysPassed as int
EndFunction
Float Function GetHoursPassed(Float daysPassed)
; Converts the days passed to the hours passed for the day.
return GetFractionOfDay(daysPassed) * 24.0
EndFunction
Float Function GetMinutesPassed(Float daysPassed)
; Converts the days passed to minutes passed for the day.
return GetFractionOfDay(daysPassed) * 24.0 * 60.0
EndFunction
Float Function GetSecondsPassed(Float daysPassed)
; Converts the days passed to seconds passed for the day.
return GetFractionOfDay(daysPassed) * 24.0 * 60.0 * 3600.0
EndFunction
Enchanted Item Gold Value Mystery[edit source]
I'm trying to solve the mystery of calculating the gold value for player enchanted items. This was figured out for weapons, but that formula doesn't work for non weapons. My findings so far..:
- The maximum skill level to effect an enchanted item's gold value is capped at 100.
- The lower the skill level, the higher the enchanted item's gold value will be.
- The gold value boosted from tempering is counted towards the gold value calculations.
- Perks have no effect on the gold value.
- Vanilla Apparel with more than 1 enchantment, only the first enchantment determines the gold value.
- The base gold value for the base item of a vanilla enchanted item is added to the gold value.
- For weapons(formula not documented here), duration is used instead of an EffectBase(which is also 0).
The chart below uses an unenchanted helmet, with its base gold value in the first column. The value in the third column is the value when it's enchanted. The enchantment is Fortify Alteration. The bold value is the default skill level.
Base Value | Skill Level | Modified Cost | Reduction |
220 | 0 | 1277 | - |
- | 1 | 1202 | 75 |
- | 10 | 1041 | 161 |
- | 15 | 987 | 54 |
- | 20 | 943 | 44 |
- | 30 | 867 | 76 |
- | 40 | 804 | 63 |
- | 50 | 748 | 56 |
- | 60 | 698 | 50 |
- | 70 | 651 | 47 |
- | 80 | 608 | 40 |
- | 90 | 568 | 35 |
- | 99 | 533 | |
- | 100 | 529 |
1277 - 529 = 748
1277 x 0.51 = 651.27
1277 at skill 0 is about 2.414 times that of 529 at skill 100.
I've found a formula from the UESP, which does work some but the portion involving the skill is still unknown to me:
BaseItemCost + (0.12 * SoulGemPower)
; Working example: 220 + (0.12 * 3000) = 580; This gets cut down to 529 with 100 skill.
Where SoulGemPower is the value of the current soul trapped in the Soul Gem.
Mystery Almost Solved[edit source]
I have discovered the next missing piece for the above formula for getting the gold value for player created enchanted items.
Gold Value = ((BaseItemGoldValue * 2) + (0.12 * SoulGemPower) - ((SkillLevel * 0.5)) - 1
;Working example: ((220 * 2) + (0.12 * 3000) - (100*0.5)) - 1 = 749.
This works well when the skill is at level 100. Testing with skill 0, and or any levels before 100, another piece of the puzzle is missing unfortunately. Level 100 is the only level that really matters for the Enchanting skill anyhow, so I think this will still be very useful to folks. More testing will be carried out before I put this on respective pages. Rasikko (talk) 2017-11-29T14:03:58 (EST)
- There are quite a few problems that have sprung up now that may be beyond my knowledge to over come hmm... but at least I figured out how to get the value for level 100. Rasikko (talk) 2017-11-29T15:43:42 (EST)
Math.Floor((BaseItemGoldValue * TemperingLevel) + (0.12 * SoulGemPower) - (SkillLvl * 0.5))
Where the tempering level is:
- Fine = 1.166
- Superior = 1.333
- Exquisite = 1.499
- Flawless = 1.666
- Epic = 1.833
- Legendary = 1.999
Close but no cigar[edit source]
I believe I have reached the end of my testings and have discovered nothing more so far. The remaining issue is gold values being modified with an enchanting skill level less than 100. I have also modified the formula for vanilla enchanted gear.
To get the gold value for Player Enchanted gear(This formula works for Alteration enchantments only.):
Math.Floor((BaseItemGoldValue * TemperingLevel) + (0.12 * SoulGemPower) - (SkillLvl * 0.5))
To get the gold value for vanilla enchanted gear(apparel only):
; if the enchantment has no duration, the game will use 1:
Math.Ceiling((EffectBase * (Magnitude * Math.Pow(Duration/10, 1.1))) + BaseGoldValue)
It seems different calculations is needed for different types of enchantments. For the skill based enchantments, the calculations is certainly not the same.
Contributions, Thank You[edit source]
Thanks for your contributions to the creation kit wiki.Scrivener07 (talk) 2017-12-02T13:30:03 (EST)