lists:

  <span style\="color:#f21bc0;" class\="glow1" color\="#f21bc0">mythical</span> ^ 0.05
  <span style\="color:#fcd928;" class\="glow2" color\="#fcd928">legendary</span> ^ 0.1
  <span style\="color:#d7e32b;" class\="glow3" color\="#d7e32b">epic</span> ^ 0.5
  <span style\="color:#2929e6;" class\="glow4" color\="#2929e6">rare</span> ^ 1
  <span style\="color:#4cbf17;">uncommon</span> ^ 2.5
  <span style\="color:#919191;">common</span> ^ 5
prefix
  plain ^5
  <span style\="color:#CF6A32;">hale's own</span> ^ 0.2
  <span style\="color:#CF6A32;">scarcely lethal</span> ^ 0.2
  <span style\="color:#8650AC;">unusual</span> ^ 0.01
  <span style\="color:#CF6A32;">StatTrak™</span> ^ 1
  horrid ^2
  big momma's
  amazing
suffix
  ^4
  of destiny ^0.1
  of doom ^0.1
  <span class\="glow">★</span> ^0.1
  <span class\="glow">★★</span> ^0.05
  <span class\="glow">★★★</span> ^0.025
  <span class\="glow">★★★★</span> ^0.0125
rarityTier
  <span style\="color:#afafaf;">Consumer</span> ^ 2
  <span style\="color:#6496e1;">Industrial</span> ^ 0.5
  <span style\="color:#8847ff;">Mil-spec</span> ^ 0.25
  <span style\="color:#6496e1;">Restricted</span> ^ 0.125
  <span style\="color:#d32ce6;">Classified</span> ^ 0.0625
  <span style\="color:#eb4b4b;">Convert</span> ^ 0.01
  <span style\="color:#886a08;">Contraband</span> ^ 0.005

output:

output = [pre = prefix] [...] [suf = suffix]

level = lv{1-100} [rar = rarity] [r.level]
quality = [qua = rarityTier]
value = [1/(pre.$odds) * 1/(suf.$odds) * 1/(rar.$odds) * 1/(qua.$odds) * r.value]

Problem is, qua.$odds doesn’t seem to exist! Is this a quirk with the Perchance engine, or is it just faulty programming?

  • wthit56@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    I don’t know, seems to work okay for me. Could you give me a link to what you’re working on so I can see it not working?

    Normally this is kinda redundant: quality = [qua = rarityTier]. You could just do qua = [rarityTier] instead.

    Know that setting it to rarityTier will just reference that list object, not a selected item from that object. If you wanted to select a random item and find the odds of that, you’d want to use rarityTier.selectOne instead.