Difference between revisions of "Talk:LeveledItem"
Jump to navigation
Jump to search
imported>Scrivener07 (→Leveled Item Health: new section) |
DavidJCobb (talk | contribs) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 5: | Line 5: | ||
::I tried using the "preview calculated result" button and tested a bunch of lists that use the "Special Loot" flag, but it doesn't ever generate anything higher than the player's level, and thus the option appears to do nothing. Of course, this may simply be a problem with the "preview calculated result" button not working right for Special Loot. | ::I tried using the "preview calculated result" button and tested a bunch of lists that use the "Special Loot" flag, but it doesn't ever generate anything higher than the player's level, and thus the option appears to do nothing. Of course, this may simply be a problem with the "preview calculated result" button not working right for Special Loot. | ||
::The other thing I noticed, though, is that every list I found with the Special Loot flag ticked also differed from similar lists by NOT having the "calculate from all levels <= PC's level" flag ticked. Thus, these lists always generate the highest level item at or below the PC's level, instead of any item randomly. Of course, this doesn't require the Special Loot flag to work--but this setup is at least fairly consistent in the vanilla lists from what I have observed. If anyone gets a chance to test this option in game, let us know how it goes. -- [[User:Egocarib|Egocarib]] ([[User talk:Egocarib|talk]]) 2013-09-14T10:35:14 (EDT) | ::The other thing I noticed, though, is that every list I found with the Special Loot flag ticked also differed from similar lists by NOT having the "calculate from all levels <= PC's level" flag ticked. Thus, these lists always generate the highest level item at or below the PC's level, instead of any item randomly. Of course, this doesn't require the Special Loot flag to work--but this setup is at least fairly consistent in the vanilla lists from what I have observed. If anyone gets a chance to test this option in game, let us know how it goes. -- [[User:Egocarib|Egocarib]] ([[User talk:Egocarib|talk]]) 2013-09-14T10:35:14 (EDT) | ||
:::I dug through the 32-bit Creation Kit in a disassembler and found the code that computes leveled list results. I couldn't see any reference to the "Special Loot" flag at ''all'' anywhere in that code. [[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 17:57, 2 July 2024 (EDT) | |||
::::Turns out, Bethesda only compiled the Special Loot formula into TESV.exe and not CreationKit.exe. Strange. I'm working on reverse-engineering the math now. [[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 21:19, 15 July 2024 (EDT) | |||
Okay, I've got the formula. All game settings used by it have names beginning with ''fSpecialLoot''; for brevity, these prefixes have been shortened to "gs". | |||
<math> | |||
\begin{align} | |||
C_{min} & = (Player\ Level \times gsMinPCLevelMult)+gsMinPCLevelBase+gsMinZoneLevelBase+(Encounter\ Level \times gsMinZoneLevelMult) \\ | |||
C_{max} & = (Player\ Level \times gsMaxPCLevelMult)+gsMaxPCLevelBase+gsMaxZoneLevelBase+(Encounter\ Level \times gsMaxZoneLevelMult) \\ | |||
C_{diff} & = C_{max} - C_{min} \\ | |||
Used\ Level & = C_{min} + C_{diff} \times \operatorname{rand}\left(-0.5, 0.5\right)^{gsWeighting} | |||
\end{align} | |||
</math> | |||
The "Encounter Level" is based on multiple factors: | |||
* If the leveled list is being used to generate an inventory item, then use the encounter level of the ObjectReference whose inventory that is (see algorithm below). | |||
* If the leveled list is being used to generate the ingredient the player just harvested from a [[Flora]], then the encounter level is the player's level. | |||
* If the leveled list is being used to generate a newly-spawned ref for a ReferenceAlias, then the encounter level is the player's level. | |||
* If the leveled list is being used to generate a dying (or starts-dead spawning) actor's death item, then the encounter level is the actor's level. | |||
* If the leveled list is the argument to [[AttachAshPile - Actor]], then the encounter level is the actor's level. | |||
* If the leveled list is the base form used for any variation on "PlaceAtMe" (e.g. the console command; the Papyrus function), then the encounter level is based on the "basis" ref (i.e. the "me" ref). | |||
To compute an encounter level from an arbitrary ref: | |||
* If the arbitrary ref is an actor, then return the actor's level unmodified. | |||
* Attempt to find the ref's containing [[Encounter Zone|encounter zone]]. If the zone exists and is not the hardcoded <code>NoZoneZone</code>, then let ''n'' be its level; otherwise, let ''n'' be the player's level. | |||
* Adjust ''n'' by a counter: | |||
** The game keeps a persistent counter in memory and every time a ref's "encounter level" is queried, the counter is increased by one. If the counter's value after being incremented exceeds ''iCalcLevelAdjustUp'', then the counter is overwritten with -''iCalcLevelAdjustDown''. Once all this is done and the counter's value is fully updated, add the counter's value to ''n''. The default values for both settings are 1, which means that whenever a reference's encounter is queried, there is a variance of ±1. | |||
* If ''n'' is less than 1, set it to 1. | |||
* Return ''n''. | |||
[[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 21:48, 15 July 2024 (EDT) | |||
== Leveled Item Health == | == Leveled Item Health == | ||
The user [[User:LBGSHI|LBGSHI]] Added the notes, "For weapons and armor, 100 or less equals normal, 110 Fine, 120 Superior, 130 Exquisite, 140 Flawless, 150 Epic, and 160-200 Legendary. | |||
[[User:LBGSHI]] Added the notes, "For weapons and armor, 100 or less equals normal, 110 Fine, 120 Superior, 130 Exquisite, 140 Flawless, 150 Epic, and 160-200 Legendary. | |||
". Looks like a nice contribution. Can anyone else verify? [[User:Scrivener07|Scrivener07]] ([[User talk:Scrivener07|talk]]) 2018-03-05T05:50:22 (EST) | ". Looks like a nice contribution. Can anyone else verify? [[User:Scrivener07|Scrivener07]] ([[User talk:Scrivener07|talk]]) 2018-03-05T05:50:22 (EST) | ||
:"You could always take a look at my PS4 mod, Smithed Equipment in Loot & Shops: https://bethesda.net/en/mods/skyrim/mod-detail/4054897 :) " [[User:LBGSHI|LBGSHI]] | |||
::I found a comparable list that matches your findings on [[GetItemHealthPercent - ObjectReference]]. The only difference is that [[User:Rasikko|Rasikko's]] finding are described as floats (decimal) in papyrus. Id say thats verified enough. Thanks for the contribution. [[User:Scrivener07|Scrivener07]] ([[User talk:Scrivener07|talk]]) 2018-03-05T18:09:21 (EST) | |||
::: That function will not return 100.0, 110.0, etc, but 1.xx instead, his values for the levelitem form are still acceptable by the game, since those fields are designed like that. It would have been less confusing, if such fields were instead worded as weapon/armor tempering level. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2018-03-08T08:41:18 (EST) |
Latest revision as of 21:54, 15 July 2024
Special Loot formula[edit source]
Any idea what this is?
- Only info I could find on this is from UESP's page on Dungeons. Special Loot is like boss loot so it's meant to be at a higher level than you would normally receive with the leveled loot formula - probably it does something like calculate as if you are 150% your current level. --Dragonsong (talk) 2013-03-02T22:36:07 (EST)
- I tried using the "preview calculated result" button and tested a bunch of lists that use the "Special Loot" flag, but it doesn't ever generate anything higher than the player's level, and thus the option appears to do nothing. Of course, this may simply be a problem with the "preview calculated result" button not working right for Special Loot.
- The other thing I noticed, though, is that every list I found with the Special Loot flag ticked also differed from similar lists by NOT having the "calculate from all levels <= PC's level" flag ticked. Thus, these lists always generate the highest level item at or below the PC's level, instead of any item randomly. Of course, this doesn't require the Special Loot flag to work--but this setup is at least fairly consistent in the vanilla lists from what I have observed. If anyone gets a chance to test this option in game, let us know how it goes. -- Egocarib (talk) 2013-09-14T10:35:14 (EDT)
- I dug through the 32-bit Creation Kit in a disassembler and found the code that computes leveled list results. I couldn't see any reference to the "Special Loot" flag at all anywhere in that code. DavidJCobb (talk) 17:57, 2 July 2024 (EDT)
- Turns out, Bethesda only compiled the Special Loot formula into TESV.exe and not CreationKit.exe. Strange. I'm working on reverse-engineering the math now. DavidJCobb (talk) 21:19, 15 July 2024 (EDT)
- I dug through the 32-bit Creation Kit in a disassembler and found the code that computes leveled list results. I couldn't see any reference to the "Special Loot" flag at all anywhere in that code. DavidJCobb (talk) 17:57, 2 July 2024 (EDT)
Okay, I've got the formula. All game settings used by it have names beginning with fSpecialLoot; for brevity, these prefixes have been shortened to "gs".
The "Encounter Level" is based on multiple factors:
- If the leveled list is being used to generate an inventory item, then use the encounter level of the ObjectReference whose inventory that is (see algorithm below).
- If the leveled list is being used to generate the ingredient the player just harvested from a Flora, then the encounter level is the player's level.
- If the leveled list is being used to generate a newly-spawned ref for a ReferenceAlias, then the encounter level is the player's level.
- If the leveled list is being used to generate a dying (or starts-dead spawning) actor's death item, then the encounter level is the actor's level.
- If the leveled list is the argument to AttachAshPile - Actor, then the encounter level is the actor's level.
- If the leveled list is the base form used for any variation on "PlaceAtMe" (e.g. the console command; the Papyrus function), then the encounter level is based on the "basis" ref (i.e. the "me" ref).
To compute an encounter level from an arbitrary ref:
- If the arbitrary ref is an actor, then return the actor's level unmodified.
- Attempt to find the ref's containing encounter zone. If the zone exists and is not the hardcoded
NoZoneZone
, then let n be its level; otherwise, let n be the player's level. - Adjust n by a counter:
- The game keeps a persistent counter in memory and every time a ref's "encounter level" is queried, the counter is increased by one. If the counter's value after being incremented exceeds iCalcLevelAdjustUp, then the counter is overwritten with -iCalcLevelAdjustDown. Once all this is done and the counter's value is fully updated, add the counter's value to n. The default values for both settings are 1, which means that whenever a reference's encounter is queried, there is a variance of ±1.
- If n is less than 1, set it to 1.
- Return n.
DavidJCobb (talk) 21:48, 15 July 2024 (EDT)
Leveled Item Health[edit source]
The user LBGSHI Added the notes, "For weapons and armor, 100 or less equals normal, 110 Fine, 120 Superior, 130 Exquisite, 140 Flawless, 150 Epic, and 160-200 Legendary. ". Looks like a nice contribution. Can anyone else verify? Scrivener07 (talk) 2018-03-05T05:50:22 (EST)
- "You could always take a look at my PS4 mod, Smithed Equipment in Loot & Shops: https://bethesda.net/en/mods/skyrim/mod-detail/4054897 :) " LBGSHI
- I found a comparable list that matches your findings on GetItemHealthPercent - ObjectReference. The only difference is that Rasikko's finding are described as floats (decimal) in papyrus. Id say thats verified enough. Thanks for the contribution. Scrivener07 (talk) 2018-03-05T18:09:21 (EST)
- That function will not return 100.0, 110.0, etc, but 1.xx instead, his values for the levelitem form are still acceptable by the game, since those fields are designed like that. It would have been less confusing, if such fields were instead worded as weapon/armor tempering level. --Rasikko (talk) 2018-03-08T08:41:18 (EST)
- I found a comparable list that matches your findings on GetItemHealthPercent - ObjectReference. The only difference is that Rasikko's finding are described as floats (decimal) in papyrus. Id say thats verified enough. Thanks for the contribution. Scrivener07 (talk) 2018-03-05T18:09:21 (EST)