-
Notifications
You must be signed in to change notification settings - Fork 772
Support for monster drops with Random Options #2309
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
Support for monster drops with Random Options #2309
Conversation
src/map/mob.c
Outdated
|
|
||
| // count avoids a too long loop that would cause lag. if after 10 full iterations it still fails | ||
| // it'll stop in one random index in the next one. | ||
| count = 10 * options->options[i].option_count + (rnd() % options->options[i].option_count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't like this count, I think it kind of breaks the idea of rates, but I couldn't really think of a better way. One idea was to make something like we do with boxes, where we put how many times that item appears in the set.
|
|
|
@tlacson7 this is probably because hpm hooks not updated. |
|
Hello everybody, sorry for the delay. mob_db.conf: option_drop_group: (structure that is in this PR already) what you guys think? |
|
yes having a separate group structure is better just want to make sure ... this thing is entirely custom ... unofficial right ? |
|
Official servers does have drops with random options (e.g. Crimsom Weapons), but the implementation itself is solely based on the information I could find (which isn't much). So I made it as customizable as possible to try to cover whatever is needed once those items are implemented. |
|
@guilherme-gm Groups would be nice :) |
|
oh ok, http://www.playragnarok.com/news/updatedetail.aspx?id=280&p=1 Ps: |
f9b368c to
a785a13
Compare
|
PR updated, I did some major changes to support the extra db file and changed a bit how it is stored (I believe this way will save more memory when compared to the old approach), I tried to remember all the changes requested while fixing it and hopefully I haven't forgot anything. Thanks for your reviews :) |
a785a13 to
ab40508
Compare
|
according ci, server crashing with memory manager |
0706ed7 to
d176d28
Compare
d176d28 to
a1ca68e
Compare
AnnieRuru
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my review is done.
technical C language structure, ... not really my soup of taste
8e2c390 to
c3c1f7a
Compare
c3c1f7a to
8289c07
Compare
52dea5d to
44462af
Compare
44462af to
7810113
Compare

Pull Request Prelude
Changes Proposed
Change 1 : Support to random option drop
This PR adds support for dropping items that contains Random Options in them (used by some official features -- e.g: Crimsom Weapons).
A new database file was included:
db/option_drop_group.confthat allows users to create groups of options with their rates.These groups are then linked on
mob_db.confdrop entries, I have changed a bit the Drops to provide an alternate syntax:AegisName: (chance, "GROUP_NAME").I didn't like how I coded the part that picks an option for a slot (I'll make a comment in this line), but I couldn't think of another way until now, so I'm open fo suggestions on that.
Change 2 : Moved mobs drop data to
mob_dropstructure (as suggested in PR review)Issues addressed:
I think there isn't one.
Thanks to @Ridley8819 for explaining me how this was supposed to work, @Asheraf and @MishimaHaruna for giving suggestions on the structure.