ServUO Loot Generation: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 47: | Line 47: | ||
# ApplyAttribute | # ApplyAttribute | ||
#* Scale(.....) the attribute, random the percent, do a luck roll to see if we should bump the value | #* Scale(.....) the attribute, random the percent, do a luck roll to see if we should bump the value by some overly complex way. (change this to make it simpler, and more rewarding/impactful/noticeable) | ||
#* apply the attribute | #* apply the attribute | ||
Latest revision as of 00:27, 4 January 2024
Loot Generation Order
- BaseCreature.cs, OnBeforeDeath()
- calls GenerateLoot(false)
- BaseCreature.cs, GenerateLoot(bool spawning)
- If !spawning then m_KillersLuck = killer/highest-damage-dealers luck
- calls BaseCreature.cs GenerateLoot()
- MOBILE.cs has public override void GenerateLoot() which will AddLoot() all LootPack
- if m_Paragon (mobile is paragon) then add extra AddLoot() based on fame (from Meager to UltraRich)
- BaseCreature.cs, AddLoot(LootPack pack)
- calls LootPack.cs pack.Generate(this, backpack, m_spawning, m_KillersLuck)
- LootPack.cs, Generate (Mobile from, Container cont, bool spawning, int luckChance)
- for each item (LootPackEntry) in the LootPack check if we should create the item. If Items spawn chance * 100 > random(10000 ) create item
- If random failed to create, do another check against players luck
- If random succeeds to create, call LootPackEntry.Construct (from, luckchance, spawning)
- for each item (LootPackEntry) in the LootPack check if we should create the item. If Items spawn chance * 100 > random(10000 ) create item
587
- Lootpack.cs LootPackEntry.Construct (Mobile from, int luckChance, bool spawning)
- Choose an item type to make from LootPackEntry.items[]
- calls Mutate(from, luckChance, item.Construct(SEE BELOW))
1000
- Lootpack.cs LootPackItem.Construct (bool inTokuno, bool isMondain, bool isStygian)
- will pick a random item from the BaseType depending on if it's Tokuno, Mondain, or Stygian
657
- LootPack.cs Item Mutate (Mobile from, int luckChance, Item item)
- Random 1 in 100 chance to turn into a FireHorn
- If item is BaseWeapon, BaseArmor, BaseJewel, or BaseHat
- If >= HighSeas generate using new item reforging system
- determine bonus properties from GetBonusProperties()
- if bonus properties < max properties then do a luck check to see if we should add 1 more property
- properties = 1 + bonus properties (cap at max properties)
- call BaseRunicTool.ApplyAttributesTo((BaseCATEGORY)item, falce, luckChance, props, m_MinIntensity, m_MaxIntensity)
- If item is BaseInstrument
- pick a random slayer
- BaseRunicTool.cs ApplyAttributesTo(BaseCATEGORY category, bool playerMade, int luckchance, int attributeCount, int min, int max)
- if not player made, and using new item system, runic reforge create it
- apply all attributes
- pick a random attribute that is available to apply
- call ApplyAttribute (primary/secondary, min, max, ATTRIBUTE, minimum attribute value, maximum attribute value)
- ApplyAttribute
- Scale(.....) the attribute, random the percent, do a luck roll to see if we should bump the value by some overly complex way. (change this to make it simpler, and more rewarding/impactful/noticeable)
- apply the attribute