Jump to content

Maybe its time to switch to this


themon

Recommended Posts


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  240
  • Reputation:   40
  • Joined:  04/27/13
  • Last Seen:  

item_db.txt to item_db.conf

http://haru.ws/hercules/itemdbconverter/

 

13114,P_Revolver3,Eden Revolver III,4,0,,0,76,,7,0,0x41000000,63,2,34,3,60,0,17,{ bonus bHit,-5; },{},{}
13115,Upg_Revolver,Upg Revolver,4,20,,500,35,,7,1,0x41000000,63,2,34,3,1,1,17,{ bonus bBaseAtk,(getrefine()*5); bonus bLongAtkRate,(getrefine()*2); if(BaseLevel>70) bonus bBaseAtk,(((BaseLevel-70)/10)*5); },{},{}
13116,Novice_Revolver,Novice Revolver,4,0,,500,20,,7,0,0x41000000,63,2,34,1,1,0,17,{ bonus bHit,-5; },{},{}
13118,Spark_Light,Spark Light,4,1,,100,0,,,,0x41000000,63,2,34,1,1,1,17,{},{},{}
13119,Spark_Of_Freedom,Spark Of Freedom,4,1,,100,100,,,,0x41000000,63,2,34,3,1,1,17,{},{},{}

 

item_db: (
/******************************************************************************
************* Entry structure ************************************************
******************************************************************************
{
// =================== Mandatory fields ===============================
Id: ID (int)
AegisName: "Aegis_Name" (string, optional if Inherit: true)
Name: "Item Name" (string, optional if Inherit: true)
// =================== Optional fields ================================
Type: Item Type (int, defaults to 3 = etc item)
Buy: Buy Price (int, defaults to Sell * 2)
Sell: Sell Price (int, defaults to Buy / 2)
Weight: Item Weight (int, defaults to 0)
Atk: Attack (int, defaults to 0)
Matk: Magical Attack (int, defaults to 0, ignored in pre-re)
Def: Defense (int, defaults to 0)
Range: Attack Range (int, defaults to 0)
Slots: Slots (int, defaults to 0)
Job: Job mask (int, defaults to all jobs = 0xFFFFFFFF)
Upper: Upper mask (int, defaults to any = 0x3f)
Gender: Gender (int, defaults to both = 2)
Loc: Equip location (int, required value for equipment)
WeaponLv: Weapon Level (int, defaults to 0)
EquipLv: Equip required level (int, defaults to 0)
EquipLv: [min, max] (alternative syntax with min / max level)
Refine: Refineable (boolean, defaults to true)
View: View ID (int, defaults to 0)
BindOnEquip: true/false (boolean, defaults to false)
Script: <"
Script
(it can be multi-line)
">
OnEquipScript: <" OnEquip Script (can also be multi-line) ">
OnUnequipScript: <" OnUnequip Script (can also be multi-line) ">
// =================== Optional fields (item_db2 only) ================
Inherit: true/false (boolean, if true, inherit the values
that weren't specified, from item_db.conf,
else override it and use default values)
},
******************************************************************************/

{
Id: 13114
AegisName: "P_Revolver3"
Name: "Eden Revolver III"
Type: 4
Buy: 0
Atk: 76
Range: 7
Job: 0x41000000
Upper: 63
Loc: 34
WeaponLv: 3
EquipLv: 60
Refine: false
View: 17
Script: <" bonus bHit,-5; ">
},
{
Id: 13115
AegisName: "Upg_Revolver"
Name: "Upg Revolver"
Type: 4
Buy: 20
Weight: 500
Atk: 35
Range: 7
Slots: 1
Job: 0x41000000
Upper: 63
Loc: 34
WeaponLv: 3
EquipLv: 1
View: 17
Script: <"
bonus bBaseAtk,(getrefine()*5);
bonus bLongAtkRate,(getrefine()*2);
if(BaseLevel>70) bonus bBaseAtk,(((BaseLevel-70)/10)*5);
">
},
{
Id: 13116
AegisName: "Novice_Revolver"
Name: "Novice Revolver"
Type: 4
Buy: 0
Weight: 500
Atk: 20
Range: 7
Job: 0x41000000
Upper: 63
Loc: 34
WeaponLv: 1
EquipLv: 1
Refine: false
View: 17
Script: <" bonus bHit,-5; ">
},
{
Id: 13118
AegisName: "Spark_Light"
Name: "Spark Light"
Type: 4
Buy: 1
Weight: 100
Job: 0x41000000
Upper: 63
Loc: 34
WeaponLv: 1
EquipLv: 1
View: 17
},
{
Id: 13119
AegisName: "Spark_Of_Freedom"
Name: "Spark Of Freedom"
Type: 4
Buy: 1
Weight: 100
Atk: 100
Job: 0x41000000
Upper: 63
Loc: 34
WeaponLv: 3
EquipLv: 1
View: 17
},
)

Edited by themon
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

why? I think the item_db.txt structure is fine and I have no any  valid reason to switch.

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

It makes it more readable to human eyes, but just like LuLu has said, the current item_db.txt is fine for me  /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  240
  • Reputation:   40
  • Joined:  04/27/13
  • Last Seen:  

Well if that's rathena decision to be stuck to the old item_db.txt with so many unwanted ,,,,,,,,,,,, so be it

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  182
  • Reputation:   22
  • Joined:  12/30/12
  • Last Seen:  

We can't say that what we're currently using is "old" because some other emulator is using a "new" one.

 

Our present item_db.txt is pretty much easier to edit especially on text editors that has the capability to edit swiftly through columns.

Edited by Boom
Link to comment
Share on other sites


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Several things need to be considered when thinking about something like that:

  • How does that affect SQL usage
  • How does that affect currently in-use item database tools
  • How does that affect control panels
  • How does that affect any custom source that reads from the item database
  • How does that affect websites that read item data

Judging by the responses in that announcement thread, it looks like very little regard was given for the above list. The only real benefit to users would be that it's easier to read. Personally, i see that as a waste of time.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

There are plenty of programs that already do this, for example: http://rathena.org/board/files/file/2252-rathena-database-editor/

GUIs will do a better job than any formatting of a plain-text file.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  175
  • Reputation:   7
  • Joined:  09/13/12
  • Last Seen:  

just because its implemented in hercules doesnt mean it should be implemented here too

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

just because its implemented in hercules doesnt mean it should be implemented here too

Yep, I agree with orange

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

PROS

This is only visual more appealing

CONS

Increase document size by a large amount

Breaks backwards combatability

Breaks combatability with all 3rd party programs that read the item_db, websites control panels etc...

Would this decrease processing times? More then likely not.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Combatibility? Maybe you mean compatibility  /kis2

That will be useful only if you're actively adding lots of custom items by yourself, but if you're just using the default item_db.txt, then probably you won't need it  /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  247
  • Reputation:   207
  • Joined:  10/23/12
  • Last Seen:  

At the current point in time, the development team has decided not to merge this.  I think the previous points given are enough.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

At the current point in time, the development team has decided not to merge this.  I think the previous points given are enough.

 

 

Totally agree, glad to hear that :3 

 

Well if that's rathena decision to be stuck to the old item_db.txt with so many unwanted ,,,,,,,,,,,, so be it

 

ow i can't imagine using this awful item_db and, what a pity! i'm not just saying this to provoke anyone

 

i say this because that item_db totally does not fallow a basic principle that any devolper/scripter must fallow and that's the

KISS PRINCIPLE

 

http://en.wikipedia.org/wiki/KISS_principle

 

what's next, a modification that makes the server lag?

 

One thing is improve and other thing is getting worsen, no offense

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

For me, actually I'm 50-50 on this, how if this kind is implemented and just keep current CSV works.

 

Just what I can't accept, because of it, makes whole item_db has too many lines, and the good point, it's easy to read.

I just keep on my mind, if support 'old' item_db.txt and item_db.conf (so item_db.conf just works like db/item_db2.txt, that placed on same dir 'db', be read after item_db.txt itself)

 

I can't resist, if the format is really really easy to read (well, just remind me about some kinds of PHP frameworks which use association array that make easy to edit)

  • Upvote 1
Link to comment
Share on other sites

×
×
  • Create New...