metin2united
Ikarus_

[RELEASE] Setting Drop via Mysql Tables (instead of buggy txt)

31 posts in this topic

I think the title should explain all.
The system give way to set mob's drops via tables (Database) instead to use mob_drop_item.txt, common_drop_item.txt, drop_item_group.txt which can be buggy (easly, just a wrong space) without trace any error in your game expirience.

WARNING : The System doens't disable the txts so you can use the txts and the tables without any problems.


I have inserted "/reload d" command to reload the drop tables without restart channels.
i will code a small tool in python to convert the txts to tables (i will be added to the repository).

The drop chance by default is set to 1/1000 (so in table you should set it to 1000 to give 100% drop chance 'base' , it will change via the ymir's algorithm depend on the levels killer/victim).

you can chance this scale to use 100 instead 1000 basically changing  in lenght.h the value of DROP_SCALE_TABLE 

here you can find the repository.

 

MySkype: live:ikarus.developer

 

 

update:
Added a small part to install only if you are using __SEND_TARGET_INFO__ to show the drop in the target board

 

WARNING:

i noticed some people think this system is a realtime database reading based system.

i want explain it better , to make sure every body know how  this system works.

This system works using caching, it reading the tables once on boot, then the db core will update all core during core boot using cache.
Only if you want to reload (refreshing the cache) the db core will read again the tables and will send to every core the "update".

  • Like 11
  • Thanks 5

Share this post


Link to post
Share on other sites
41 minutes ago, Syriza said:

Thank you 

Is this compitable with target Info? Would be sick

No you need some changes I think 

Share this post


Link to post
Share on other sites
3 hours ago, Syriza said:

Thank you 

Is this compitable with target Info? Would be sick

tomorrow i will add the TargetInfo part don't worry, i will update the post after done

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
vor 8 Stunden schrieb Ikarus_:

tomorrow i will add the TargetInfo part don't worry, i will update the post after done

Thanks your Release is very useful but i think Most people wouldnt use without 

thank you!

Share this post


Link to post
Share on other sites

Added the small part about __SEND_TARGET_INFO__

Added HOWTO.txt to know how to setting the drop

  • Like 1
  • Thanks 3

Share this post


Link to post
Share on other sites

Personally I would not suggest you to move your data from .txt files to database tables. 

Keeping the data in a file like .txt or .csv or whatever allows you to integrate it in a versioning system like Git, which is a great advantage. If your simply don’t like the txt file parser written by Ymir, you can anytime convert to a different markup language like json or xml.

  • Like 3

Share this post


Link to post
Share on other sites
16 hours ago, HuNterukh said:

Personally I would not suggest you to move your data from .txt files to database tables. 

Keeping the data in a file like .txt or .csv or whatever allows you to integrate it in a versioning system like Git, which is a great advantage. If your simply don’t like the txt file parser written by Ymir, you can anytime convert to a different markup language like json or xml.

The reasons to use table instead of sample file can be various. For example:

I think every body makes periodically database backup to save the data, well you can save the drop data too...

You can use query to get filtered information.

More easy to edit.

You can connect this info with a wiki in your web site every time 100% uptodate because you are using the same table loaded from game.... And other reasons....

Anyway you can choose to code your version with json ahah that s ok , every body work like he likes

If you need to integrate the tables in the Git Repo, you can also do it using a dumped file (.sql for example)

Share this post


Link to post
Share on other sites

About SendTargetInfo:
i previously forgot to add the changes about mob_drop_item.h (3 lines to add )
now i added it.

Share this post


Link to post
Share on other sites
16 godzin temu, HuNterukh napisał:

Personally I would not suggest you to move your data from .txt files to database tables. 

Keeping the data in a file like .txt or .csv or whatever allows you to integrate it in a versioning system like Git, which is a great advantage. If your simply don’t like the txt file parser written by Ymir, you can anytime convert to a different markup language like json or xml.

kek, did you hear about something like eg liquibase?

  • Haha 1

Share this post


Link to post
Share on other sites
On 5/9/2019 at 10:47 PM, Ikarus_ said:

I think the title should explain all.
The system give way to set mob's drops via tables (Database) instead to use mob_drop_item.txt, common_drop_item.txt, drop_item_group.txt which can be buggy (easly, just a wrong space) without trace any error in your game expirience.

WARNING : The System doens't disable the txts so you can use the txts and the tables without any problems.


I have inserted "/reload d" command to reload the drop tables without restart channels.
i will code a small tool in python to convert the txts to tables (i will be added to the repository).

The drop chance by default is set to 1/1000 (so in table you should set it to 1000 to give 100% drop chance 'base' , it will change via the ymir's algorithm depend on the levels killer/victim).

you can chance this scale to use 100 instead 1000 basically changing  in lenght.h the value of DROP_SCALE_TABLE 

here you can find the repository.

 

MySkype: live:ikarus.developer

 

 

update:
Added a small part to install only if you are using __SEND_TARGET_INFO__ to show the drop in the target board

help. can you upload the convecter.exe ?

Ekran-Al-nt-s.png

Share this post


Link to post
Share on other sites
10 hours ago, Sumnix said:

help. can you upload the convecter.exe ?

Ekran-Al-nt-s.png

I m developing it, when done i will update the post.

Share this post


Link to post
Share on other sites
Gerade eben schrieb Ikarus_:

0 bugs found from users, just to update who want wait to install it.

 

man thank you for your work, just ignore the People who Always think they know better

Share this post


Link to post
Share on other sites
13 hours ago, Ikarus_ said:

0 bugs found from users, just to update who want wait to install it.

When to upload the converter.exe? Because i can't build the project.

Share this post


Link to post
Share on other sites
12 minutes ago, Sumnix said:

When to upload the converter.exe? Because i can't build the project.

you can't build the projects because i have not pushed yet.
in the next days i will finish to code it.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Ikarus_ said:

you can't build the projects because i have not pushed yet.
in the next days i will finish to code it.

i waiting you bro

Share this post


Link to post
Share on other sites

The common_drop_item.txt conversion works
you can build and use the drop converter now.

left : 
       mob_drop_item.txt
       drop_item_group.txt 

 

i will code the other conversion in the next days

Share this post


Link to post
Share on other sites

WARNING:

i noticed some people think this system is a realtime database reading based system.

i want explain it better , to make sure every body know how  this system works.

This system works using caching, it reading the tables once on boot, then the db core will update all core during core boot using cache.
Only if you want to reload (refreshing the cache) the db core will read again the tables and will send to every core the "update".

  • Thanks 1

Share this post


Link to post
Share on other sites
12 hours ago, Ikarus_ said:

WARNING:

i noticed some people think this system is a realtime database reading based system.

i want explain it better , to make sure every body know how  this system works.

This system works using caching, it reading the tables once on boot, then the db core will update all core during core boot using cache.
Only if you want to reload (refreshing the cache) the db core will read again the tables and will send to every core the "update".

The system is not bad. When is full working then I will add in my files and you become a thanks :)

  • Haha 1

Share this post


Link to post
Share on other sites

Hello @Ikarus_, i'm interested in the cache part you used designing this system and have a few questions, performance-wise is it better than allocating stuffs on heap and freeing? cache is shared thourgh out every core? and last and more important do you mind if I take some parts of your code for a different system? I will neither sell anything nor copy/paste releasing contents.

Share this post


Link to post
Share on other sites
1 hour ago, OtherChoice said:

Hello @Ikarus_, i'm interested in the cache part you used designing this system and have a few questions, performance-wise is it better than allocating stuffs on heap and freeing? cache is shared thourgh out every core? and last and more important do you mind if I take some parts of your code for a different system? I will neither sell anything nor copy/paste releasing contents.

I agree to give you license to get a part of my code.

Anyway i used STL containers (map, vector) to store data in the cache. The stl containers using heap to store data.

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.