Jump to content

Maybe its time to switch to this


Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...