lyrical

Untitled

Jan 26th, 2023
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.99 KB | None | 0 0
  1. ┌─────────────────┐ RollGear gets called when
  2. │ RollDrops() │ a rand check succeeds in ┌─────────────────────────────────────┐
  3. │-----------------│ RollDrops. │GetGearId(GEARTYPE) │
  4. │.@baseDropRates │ │------------------------- │
  5. │.@dropMods │ ┌─────────────────────┐ │ ├─────────────────────────┐
  6. │ │ │ RollGear(GEARTYPE) ├───────►│.@rarity=DetermineRarity(); │ │
  7. ┌───────────────┐ │ │ │---------------------│ │.@dropGroup=GetDropGroup(fmod,rarity)├─┐ │
  8. │OnMobDead: ├───►│RollGear(WEAPON) ├─────►│GetGearId(GEARTYPE)◄─┼────┐ │.@id=rollIdFromDropGroup(dropGroup) │ │ │
  9. │ RollDrops(); │ │RollGear(ARMOR) │ │GetRandomOpts(id) │ │ │ │ │ │
  10. └───────────────┘ │RollGear(ACC) │ └─────────────────┬───┘ │ │ │ │ │
  11. When a mob dies, the first │RollItem(CONS) │ │ │ │ │ │ │
  12. thing we do is call a │RollItem(CATA) │ │ └───┤return: itemId │ │ │
  13. RollDrops(); function in │ │ │ └─────────────────────────────────────┘ │ │
  14. the OnMobDead label. │return: none │ │ │ │
  15. └─────────────────┘ │ │ │
  16. RollDrops just aggregates a few │ │ │
  17. different types of drop rolls. │ │ │
  18. It might also setup the "base" │ ┌───────────────────▼─────────────┐ │
  19. drop rate for item types, such │ │GetDropGroup(fMod,rarity) │ │
  20. that consumables have a 20% drop rate │ │-------------------------- │ │
  21. and weapons have a 5% drop rate. └────────────────┐ │switch fmod: │ │
  22. │ │ case 0-3: │ │
  23. ┌─────────────────────┐ │ GetDropGroup │ .@common=strata1 │ │
  24. │DetermineRarity() │ There are 4 rarity tiers: │ has tables to │ .@uncommon=strata2 │ │
  25. │---------------------│ COMMON = 1-5000 │ map fmod and │ .@rare=strata2 │ │
  26. │.@roll=rand(1,10000);│ UNCOMMON = 5001-8500 │ rarity so that│ .@mythical=strata3 │ │
  27. │ │ RARE = 8501-9700 │ you end up │ case 4-6: │ │
  28. │.@mythical<=.@roll │ MYTHICAL = 9701-10000 │ with an ID of │ .@common=strata2 │ │
  29. │ .@rarity=MYTYHICAL │ DetermineRarity returns the │ the drop group│ .@uncommon=strata3 │ │
  30. │ │ rolled Rarity enum. │ based on your │ etc... │ │
  31. │return: RARITY_ENUM │ │ rolled rarity.│ │ │
  32. └─────────────────────┘ │ │switch rarity: │ │
  33. │ │ case COMMON: │ │
  34. ┌──────────────────────────────────────────────────────────────────────────┘ │ .@dG=getdropgroup(.@common) │ │
  35. ▼ │ case UNCOMMON: │ │
  36. │ .@dG=getdropgroup(.@uncommon)│ │
  37. │ etc... │ │
  38. │ │ │
  39. │ return: .@dG ├─────────┘
  40. └─────────────────────────────────┘
Advertisement
Add Comment
Please, Sign In to add comment