Modding Discussion Best way to distribute "currency"

Discussion in 'Starbound Modding' started by projectmayhem, Apr 26, 2017.

  1. projectmayhem

    projectmayhem Spaceman Spiff

    I been looking through the treasurePool files, and unless my assumption is wrong, the weight for the collective pool has to equal 1, correct?

    So, I was wanting to find a way to distribute Republic Credits in my Star Wars mod, but it seems like patching any of the treasurePools to add drops, would make it less likely to be compatible with other mods, because if they alter the treasure drops, only one mod would take effect, right?

    Does anyone have an opinion on the best way to distribute currency? I was thinking of patching the tenantGift and adding it there. I'd like to do it in a way that ensures I won't interfere with other mods if I can help it. But still have a steady way to get the currency.
     
  2. Cyel

    Cyel Scruffy Nerf-Herder

    quoting healthire from the discord's modding channel:
     
  3. bk3k

    bk3k Oxygen Tank

    If the totals equal 1.0, that makes the math very easy(because 1.0 would equal 100%). Nothing more, nothing less. There is no requirement.

    Something with a 0.15 weight where the total weight equals 1.0 has a 15% percent chance.
    Something with a 0.30 weight where the total weight equals 2.0 has a 15% percent chance.
    weight / total weight = chance.
     
    projectmayhem and Cyel like this.
  4. projectmayhem

    projectmayhem Spaceman Spiff


    Well that makes it a lot easier! I patched the tenant file to make a new gift list called swmGift. But I guess I'll just change it so all tenants have a chance to give it. Now, one more question, the part that says ""poolRounds" : 1," does that mean just 1 item from the pool? Will changing it to a higher number give more gifts per collection?
     
  5. bk3k

    bk3k Oxygen Tank

    I haven't played with that, but I'd think your assumption is likely correct.
     

Share This Page