Jump to content


Photo

Add usage of constants on item_db.conf structure


  • Please log in to reply
3 replies to this topic

#1 Ragno

Ragno

    Advanced Member

  • Script Developers
  • 128 posts
  • Emulator:Hercules
  • Github:AtlantisRO

Posted 10 March 2017 - 09:48 PM

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.


Edited by Ragno, 10 March 2017 - 09:58 PM.

Ragno

#2 evilpuncker

evilpuncker

    The Suggester

  • Community Contributors
  • 2122 posts
  • Locationbr br hue hue

Posted 13 March 2017 - 02:47 AM

good one


before asking for help, click here

some people that I admire:

Ai4rei (tools and client stuff) • Aeomin (the awesome thor patcher) • AnnieRuru (very helpful with script and source stuff)

Neo (N.E.M.O... do I need to say more?) • KeyWord (roBrowser <3) • k3dt (clients and clients) • Tokeiburu (awesome tools)

Dastgir (lua stuff) • Yommy • Ind • Haru • malufett

 

:ok:    and everyone that contributed in any way to the *Athena community in general (emulator, releases, support etc)  :no1: 


#3 4144

4144

    Advanced Member

  • Core Developers
  • 231 posts
  • Emulator:Hercules
  • Github:4144

Posted 13 March 2017 - 10:16 PM

In most fields already possible to use constants.

But only need use name in quotes:

 

 

...
Type: "IT_WEAPON"
...



#4 Ragno

Ragno

    Advanced Member

  • Script Developers
  • 128 posts
  • Emulator:Hercules
  • Github:AtlantisRO

Posted 14 March 2017 - 01:41 AM

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.


Ragno




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


This topic has been visited by 24 user(s)