Add usage of constants on item_db.conf structure

Ragno

Retired Staff
Messages
133
Points
0
Github
AtlantisRO
Emulator
There are some numeric values that are constant to all items and doesn't change, it could be changed to constants and improve the understanding of item_db.

Those values are: Type, Upper, Gender, Loc, View (can be seen constant name on lub files), Stack and Sprite.

Example:

{
Id: 1626
AegisName: "Piercing_Staff"
Name: "Piercing Staff"
Type: TYPE_WEAPON
Buy: 20
Weight: 500
Atk: 80
Matk: 145
Range: 1
Job: {
Magician: true
Acolyte: true
Priest: true
Wizard: true
Monk: true
Sage: true
}
Upper: {
Upper: true
Third Job: true
Upper Third Job: true
Baby Third Job: true
}
Loc: LOC_WEAPON
WeaponLv: 3
EquipLv: 70
View: WEAPONTYPE_ROD
Script: <"
bonus bInt,4;
bonus bIgnoreMdefRate,10+getrefine();
">
},


In this example is changed values from Type, Upper, Loc and View to constants.

 
Last edited by a moderator:
In most fields already possible to use constants.

But only need use name in quotes:

Code:
...
Type: "IT_WEAPON"
...
 
In most fields already possible to use constants.

But only need use name in quotes:

...
Type: "IT_WEAPON"
...
You are totally right, and also there are the constants for item types, but not for Loc and View fields.

I also try to put the upper field separated as job, but it wasn't successful.

 
Back
Top