-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept multiple IDs in loot #3280
Comments
It looks good, although my opinion is irrelevant, because I no longer use the monster system through xml |
Something similar has received negative feedback from @DSpeichert, IIRC. 🤔 |
Indeed, you're mixing custom format (semicolon delimited list) with XML. <item-select chance="4450">
<item id="7632" count="2" chance="80" />
<item id="7633" count="3" />
</item-select> Where you have 4450 chance to get one of the items, and then you get 80% chance to get 2x 7632 or else you get 3x 7633. Keep in mind that the nested "chance" is still "select 1 out of N", it's just weighted select. In other words, those are not independent lotteries like current loot items, this nested lottery is one skewed lottery. |
@DSpeichert suggestion looks quite elegant and conforms to XML format, I don't know to what extent it may be necessary, but I like it ;) |
This is good, but defies the purpose of the proposed changes, which is to reduce lines. Also, there's no case on original Tibia which you loot one item or else another item, like you suggested. It's a nice idea but it's more like a custom thing than a necessary one. |
Then XML is simply not the way to go. It's a machine format, not human format.
Probably right but we also can't know for sure, can we? I interpret @EPuncker's original issue as having a shared chance for either of two colors of the pearl. |
actually now that they implemented the bestiary feature we can know what creature drop, this issue is no longer needed (for my initial intention) and can be closed if you want, there is no longer such thing as a monster dropping 2 different items with shared chance |
This is kinda trivial, but bothered me for years already, right now I can only remember giant shimmering pearl needing a change like this, but there may be others and also it open doors for small customizations.
Current Situation
There are monsters that drop giant shimmering pearl, but they have two colors, thus two IDs, they share the same chance (?), currently our code is like this:
My Proposal
We could use something like this instead:
<item id="7632;7633" chance="4450" /><!-- giant shimmering pearl -->
(using ; or , I don't know, up to decision)
And also maybe put a safe limit of items in the array
The text was updated successfully, but these errors were encountered: