Jump to content
Haru

Item DB file structure overhaul

Recommended Posts

Hi, does the itemdb2.conf have a limit? I started my custom items from ID 40000 and it doesn't seem to work. Item cannot be found. But When I was using ID 30000 it works.

Share this post


Link to post
Share on other sites

The limit is possesed by clientside I guess, so we have to be on that limit too.

max id one can have is 32767

Share this post


Link to post
Share on other sites

Hello @ All :)

and special Hello Haru :)

 

I really like this new eazy to read structure, its awsome :excl:

 

But now i have a problem. I need to convert the item_db2.conf into SQL, to use it in FLUX CP. I searched this forum for hours ( special thanks to the stupid search function :angry: for wasting my time ). My last hope is to get some help here. Is there a script to do this ?

 

MfG

 

Snowflake

Share this post


Link to post
Share on other sites

Hello @ All :)

and special Hello Haru :)

 

I really like this new eazy to read structure, its awsome :excl:

 

But now i have a problem. I need to convert the item_db2.conf into SQL, to use it in FLUX CP. I searched this forum for hours ( special thanks to the stupid search function :angry: for wasting my time ). My last hope is to get some help here. Is there a script to do this ?

 

MfG

 

Snowflake

 

Here... http://herc.ws/wiki/Db2sql

Share this post


Link to post
Share on other sites

I've try to convery my item_db from hercules format using the online tool. However, it seems that none of the line in the item_db.conf could be read. May I ask how could I trace the source of the error or could anyone provide a solution for me? Thanks

Share this post


Link to post
Share on other sites

I've try to convery my item_db from hercules format using the online tool. However, it seems that none of the line in the item_db.conf could be read. May I ask how could I trace the source of the error or could anyone provide a solution for me? Thanks

Any error?

Share this post


Link to post
Share on other sites

 

I've try to convery my item_db from hercules format using the online tool. However, it seems that none of the line in the item_db.conf could be read. May I ask how could I trace the source of the error or could anyone provide a solution for me? Thanks

Any error?

The map server just can't read the whole item_db so the mob drop items keep alerting the error of missing item. The errors flows extremely quick and I can't even can't the first line of the error. In addition, I am from Hong Kong so the item names are all in traditional Chinese. I've changed the item_db.conf to utf8 but it still can't solve the problem.

Share this post


Link to post
Share on other sites

Maybe, show us your item_db.conf file.

Thanks! I would show it tonight. It's 17:04 in Hong Kong right now.

By the way, I think Hercules is a wonderful emulator that has optimized resources usage with other useful features.

Sorry for my poor English.

Share this post


Link to post
Share on other sites

You shouldn't use utf8 for your files (Hercules and *Athena don't really support it, nor does the client). You should save it with the same file encoding as your original file (which seems to be Big5, but it also seems to be broken, my text editor warns me about issues on line 3389 (item #5571) and line 4481 (item #7156) of your .txt file)

 

You might want to fix those names in your .txt file first, then try to re-convert it, and save the .conf file as Big5 as well.

 

Please note that your item scripts contain errors though (wrong case, wrong arguments, non existent functions, etc), so you'll also need to edit it in order to work with Hercules.

Share this post


Link to post
Share on other sites

You shouldn't use utf8 for your files (Hercules and *Athena don't really support it, nor does the client). You should save it with the same file encoding as your original file (which seems to be Big5, but it also seems to be broken, my text editor warns me about issues on line 3389 (item #5571) and line 4481 (item #7156) of your .txt file)

 

You might want to fix those names in your .txt file first, then try to re-convert it, and save the .conf file as Big5 as well.

 

Please note that your item scripts contain errors though (wrong case, wrong arguments, non existent functions, etc), so you'll also need to edit it in order to work with Hercules.

Thanks for your explanation. I just used the default coding(ANSI) before and it didn't work. I don't know how to convert the item_db.conf to BIG5 since there are just 4 options (ANSI/UTF-8/Unicode/Unicode-Big endian) when I use notepad to open it. If the coding really matter, does users from any non-English counties need to convert their item_db.conf to suit their languages? Besides, I've checked item#5571 and item#7156 and it seems that there is no problem with these two items. Below are the converted item scripts :

{

 Id: 5571

 AegisName: "Rasta_Wig"

 Name: "拉司塔的假髮"

 Type: 4

 Buy: 20

 Weight: 100

 Def: 1

 Upper: 63

 Loc: 256

 View: 552

 Script: <" bonus bStr,1; ">

},

{

 Id: 7156

 AegisName: "Broken_Shuriken"

 Name: "破舊之手裏劍"

 Type: 3

 Buy: 470

 Weight: 10

},

 

Edited by lucas9586

Share this post


Link to post
Share on other sites

I don't have a chance to check Notepad (I'm not on windows, so I don't have that), but I guess with "ANSI" they mean "the appropriate local charset for whatever language this computer is set to", which would produce Big5 or some variant of it in your case, so that's what you should use. Again, this is just a guess.

 

The broken lines from the .txt file you posted (if I load it as Big5) are:

5574,Pencil_In_Mouth,叼在嘴?媢]筆,4,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,555,{ bonus bDex,2; bonus bHitRate,3; },{},{}7156,Broken_Shuriken,破舊之手?媦C,3,470,,10,,,,,,,,,,,,,{},{},{}
(I wrote #5571, but I meant #5574, sorry).

 

The questionmark is there to say that it wasn't able to load some character, I'm not sure why it happens.

Share this post


Link to post
Share on other sites

 

I don't have a chance to check Notepad (I'm not on windows, so I don't have that), but I guess with "ANSI" they mean "the appropriate local charset for whatever language this computer is set to", which would produce Big5 or some variant of it in your case, so that's what you should use. Again, this is just a guess.

 

The broken lines from the .txt file you posted (if I load it as Big5) are:

5574,Pencil_In_Mouth,叼在嘴?媢]筆,4,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,555,{ bonus bDex,2; bonus bHitRate,3; },{},{}7156,Broken_Shuriken,破舊之手?媦C,3,470,,10,,,,,,,,,,,,,{},{},{}
(I wrote #5571, but I meant #5574, sorry).

 

The questionmark is there to say that it wasn't able to load some character, I'm not sure why it happens.

 

 

I don't have a chance to check Notepad (I'm not on windows, so I don't have that), but I guess with "ANSI" they mean "the appropriate local charset for whatever language this computer is set to", which would produce Big5 or some variant of it in your case, so that's what you should use. Again, this is just a guess.

 

The broken lines from the .txt file you posted (if I load it as Big5) are:

5574,Pencil_In_Mouth,叼在嘴?媢]筆,4,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,555,{ bonus bDex,2; bonus bHitRate,3; },{},{}7156,Broken_Shuriken,破舊之手?媦C,3,470,,10,,,,,,,,,,,,,{},{},{}
(I wrote #5571, but I meant #5574, sorry).

 

The questionmark is there to say that it wasn't able to load some character, I'm not sure why it happens.

I finally find the reason of the errors. I use script-checker.bat to check the item_db.conf. I find that hercules's system can't read a bunch of Chinese words. Maybe it's because of the coding. In addition, the item_bonus have a big different to Rathena in lower cases and upper cases. Other than that, Rathena item_db allows duplicated AegisName but Hercules doesn't. Item #5574 and #7156 doesn't get any problems in my case.

 

Therefore, if a Rathena user wanna convert there item_db to Hercules format, they need to edit all of the item_bonus first. Otherwise, it will show a lot of errors though they don't face any coding problems.

Share this post


Link to post
Share on other sites

 

 

I don't have a chance to check Notepad (I'm not on windows, so I don't have that), but I guess with "ANSI" they mean "the appropriate local charset for whatever language this computer is set to", which would produce Big5 or some variant of it in your case, so that's what you should use. Again, this is just a guess.

 

The broken lines from the .txt file you posted (if I load it as Big5) are:

5574,Pencil_In_Mouth,叼在嘴?媢]筆,4,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,555,{ bonus bDex,2; bonus bHitRate,3; },{},{}7156,Broken_Shuriken,破舊之手?媦C,3,470,,10,,,,,,,,,,,,,{},{},{}
(I wrote #5571, but I meant #5574, sorry).

 

The questionmark is there to say that it wasn't able to load some character, I'm not sure why it happens.

 

 

 

 

I don't have a chance to check Notepad (I'm not on windows, so I don't have that), but I guess with "ANSI" they mean "the appropriate local charset for whatever language this computer is set to", which would produce Big5 or some variant of it in your case, so that's what you should use. Again, this is just a guess.

 

The broken lines from the .txt file you posted (if I load it as Big5) are:

5574,Pencil_In_Mouth,叼在嘴?媢]筆,4,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,555,{ bonus bDex,2; bonus bHitRate,3; },{},{}7156,Broken_Shuriken,破舊之手?媦C,3,470,,10,,,,,,,,,,,,,{},{},{}
(I wrote #5571, but I meant #5574, sorry).

 

The questionmark is there to say that it wasn't able to load some character, I'm not sure why it happens.

I finally find the reason of the errors. I use script-checker.bat to check the item_db.conf. I find that hercules's system can't read a bunch of Chinese words. Maybe it's because of the coding. In addition, the item_bonus have a big different to Rathena in lower cases and upper cases. Other than that, Rathena item_db allows duplicated AegisName but Hercules doesn't. Item #5574 and #7156 doesn't get any problems in my case.

 

Therefore, if a Rathena user wanna convert there item_db to Hercules format, they need to edit all of the item_bonus first. Otherwise, it will show a lot of errors though they don't face any coding problems.

 

rAthena is not using case-sensitive, while we are using CaseSensitve Words.

Also AegisName should differ from other. because , hercules sets item AegisName as ID, so you can call it via script also, like

if (countitem(Red_Potion) > 1){    //do anything}

same applies to mob_db, they are also CaseSensitive and should not be duplicated.

 

(I agree to the point that, we lack many item_bonus, that rA have like the Class_* one, which is also in Aegis)

Share this post


Link to post
Share on other sites

Is there a guide to change it back to the old format? I got so used to doing my edits that way.. How would i revert?

 

take it back.. shzts dabOMB!

Edited by Azul

Share this post


Link to post
Share on other sites

 

Is there a way to revert into the old way?

You can use search function always...

(http://herc.ws/board/topic/5363-item-dbconf-to-item-dbtxt/)

 

 

Is there a guide to change it back to the old format? I got so used to doing my edits that way.. How would i revert?

 

take it back.. shzts dabOMB!

Follow Dastgir's link.

Share this post


Link to post
Share on other sites

 

 

Is there a way to revert into the old way?

You can use search function always...

(http://herc.ws/board/topic/5363-item-dbconf-to-item-dbtxt/)

 

 

 

>Is there a guide to change it back to the old format? I got so used to doing my edits that way.. How would i revert?

 

take it back.. shzts dabOMB!

Follow Dastgir's link.

@mysterious, I think he meant, can server read txt files.

@Azul, Emulator don't read txt.. but you can convert conf to txt via (http://herc.ws/board/topic/5363-item-dbconf-to-item-dbtxt/) and then convert it back to conf when you are done with editing via (https://github.com/HerculesWS/Hercules/blob/master/tools/itemdbconverter.pl) or (http://haru.ws/hercules/itemdbconverter)

Share this post


Link to post
Share on other sites

Is there any tool can translate the Name field of item_db.conf  by reference to idnum2itemdisplaynametable.txt (my country ro still  read  txt file  )? Becoz  my player's native language isn't English, I need to translate them to my native language .I have a tool can translate old format item_db.txt  ,I can convert it to old format  and did translation and convert back item_db.conf like Dastgir says, but after this update 8dc6717 , itemdbconverter.pl or online converter  seems no longer  compatible with new format of item_db.conf , so if there is  a tool  can translate the Name field of item_db.conf directly, non English country users would be appreciated :thx:

Edited by Angelmelody

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.