Jump to content

Recommended Posts

  • Developer

M2 Download Center

This is the hidden content, please
( Internal )

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 

This is the hidden content, please
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 cache, it read the tables once on boot, then the db core setup 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".

Edited by Ikarus_
  • Metin2 Dev 180
  • Dislove 1
  • Angry 2
  • Think 2
  • Confused 1
  • Lmao 1
  • Good 49
  • Love 11
  • Love 124

My youtube channel  on which you can see my works here

Link to comment
https://metin2.dev/topic/21200-setting-drop-via-mysql-tables/
Share on other sites

  • Developer
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

  • Love 2

My youtube channel  on which you can see my works here

  • Premium

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.

  • Love 3
  • Developer
On 5/11/2019 at 11:27 PM, 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:

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

2. You can use query to get filtered information or to edit multiple lines in one shot.

3. They are easier to edit.

4. You can connect these infornations with a wiki in your web site every time 100% uptodate because you are using the same table loaded from game...

Ad more..

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

Edited by Ikarus_

My youtube channel  on which you can see my works here

  • Active Member
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?

  • Love 1
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 

This is the hidden content, please
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

Edited by Metin2 Dev
Core X - External 2 Internal
  • Developer
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.

Edited by Metin2 Dev
Core X - External 2 Internal

My youtube channel  on which you can see my works here

  • Developer
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.

  • Love 2

My youtube channel  on which you can see my works here

  • Developer

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

My youtube channel  on which you can see my works here

  • Developer

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".

  • Love 1

My youtube channel  on which you can see my works here

  • Active+ Member
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 :)

  • Love 1

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.

  • Developer
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.

  • Love 1

My youtube channel  on which you can see my works here

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.