882 - Suggestion for weighting
What is the enhancement in mind? How should it look and feel?
Allowing non-binary weights for each preferred mount.
Please provide any additional information below.
GoGoMount currently uses Lua tables to store lists of mounts, so if you place any in the "preferred" category, it pulls only from that list. Likewise, if you place any in the "excluded" category, it pulls only from the global pool MINUS that list.
I haven't looked at the code, but I assume it just rolls a random number and uses the entry at that index, once either list has been created.
If you were to also assign a weight value to each entry (so each entry would become { mount-id, weight }), you could roll a second number as a weight check and only select the mount if that roll was below the weight. So, if I like the brown horse and weigh it as 90, but sorta-dislike the flying death chicken, giving it a weight of 20... if you pick the brown horse and then roll a 73, that mount get used. OTOH, had you picked the chicken with the 73, that would fail and pick a new random mount until it finds one that passes.
This would give us more control over how often various mounts actually show up, without having to say NEVER show me this, or ALWAYS use this. And if the preferred or excluded list is empty, no second roll would be needed... just assume anything not entered would be a 100 (or a 0 meaning excluded).
Effectively, this would merge the two lists into a single one that would have 100 being the current "always use" choice and 0 being the "never use" choice.
And obviously, you'd want an upper bound on how many re-rolls can happen, so if you make 10 random numbers and still don't hit, just take it anyways unless it was a true exclusion (0 weight).
| User | When | Change |
|---|---|---|
| Dread-Quixadhal | Sep 26, 2016 at 06:09 UTC | Create |
- 1 comment
- 1 comment
Facts
- Reported
- Sep 26, 2016
- Status
- New - Issue has not had initial review yet.
- Type
- Enhancement - A change which is intended to better the project in some way
- Priority
- Medium - Normal priority.
- Votes
- 0
- Reply
- #1
tiker Oct 24, 2016 at 01:04 UTC - 0 likesSome sort of % based selection is planned for the re-write. Not sure how I'll do it yet.
Want to chat? You'll find me here if I'm online:
[email protected]
(XMPP / Jabber Group Chat)