Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ┌─────────────────┐ RollGear gets called when
- │ RollDrops() │ a rand check succeeds in ┌─────────────────────────────────────┐
- │-----------------│ RollDrops. │GetGearId(GEARTYPE) │
- │.@baseDropRates │ │------------------------- │
- │.@dropMods │ ┌─────────────────────┐ │ ├─────────────────────────┐
- │ │ │ RollGear(GEARTYPE) ├───────►│.@rarity=DetermineRarity(); │ │
- ┌───────────────┐ │ │ │---------------------│ │.@dropGroup=GetDropGroup(fmod,rarity)├─┐ │
- │OnMobDead: ├───►│RollGear(WEAPON) ├─────►│GetGearId(GEARTYPE)◄─┼────┐ │.@id=rollIdFromDropGroup(dropGroup) │ │ │
- │ RollDrops(); │ │RollGear(ARMOR) │ │GetRandomOpts(id) │ │ │ │ │ │
- └───────────────┘ │RollGear(ACC) │ └─────────────────┬───┘ │ │ │ │ │
- When a mob dies, the first │RollItem(CONS) │ │ │ │ │ │ │
- thing we do is call a │RollItem(CATA) │ │ └───┤return: itemId │ │ │
- RollDrops(); function in │ │ │ └─────────────────────────────────────┘ │ │
- the OnMobDead label. │return: none │ │ │ │
- └─────────────────┘ │ │ │
- RollDrops just aggregates a few │ │ │
- different types of drop rolls. │ │ │
- It might also setup the "base" │ ┌───────────────────▼─────────────┐ │
- drop rate for item types, such │ │GetDropGroup(fMod,rarity) │ │
- that consumables have a 20% drop rate │ │-------------------------- │ │
- and weapons have a 5% drop rate. └────────────────┐ │switch fmod: │ │
- │ │ case 0-3: │ │
- ┌─────────────────────┐ │ GetDropGroup │ .@common=strata1 │ │
- │DetermineRarity() │ There are 4 rarity tiers: │ has tables to │ .@uncommon=strata2 │ │
- │---------------------│ COMMON = 1-5000 │ map fmod and │ .@rare=strata2 │ │
- │.@roll=rand(1,10000);│ UNCOMMON = 5001-8500 │ rarity so that│ .@mythical=strata3 │ │
- │ │ RARE = 8501-9700 │ you end up │ case 4-6: │ │
- │.@mythical<=.@roll │ MYTHICAL = 9701-10000 │ with an ID of │ .@common=strata2 │ │
- │ .@rarity=MYTYHICAL │ DetermineRarity returns the │ the drop group│ .@uncommon=strata3 │ │
- │ │ rolled Rarity enum. │ based on your │ etc... │ │
- │return: RARITY_ENUM │ │ rolled rarity.│ │ │
- └─────────────────────┘ │ │switch rarity: │ │
- │ │ case COMMON: │ │
- ┌──────────────────────────────────────────────────────────────────────────┘ │ .@dG=getdropgroup(.@common) │ │
- ▼ │ case UNCOMMON: │ │
- │ .@dG=getdropgroup(.@uncommon)│ │
- │ etc... │ │
- │ │ │
- │ return: .@dG ├─────────┘
- └─────────────────────────────────┘
Advertisement
Add Comment
Please, Sign In to add comment