Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 01:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[How-To] Link your constants.cpp to your item_attr

Discussion on [How-To] Link your constants.cpp to your item_attr within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2016
Posts: 5
Received Thanks: 5
Post [How-To] Link your constants.cpp to your item_attr

[How-To] Link your constants.cpp to your item_attr

Hello guys, today im gonna show you a simple trick that lets you use what you have in your Srcs/server/constants.cpp
What are those constants? They simply are the defined skills with they're index number.
You ever asked yourself how to implement on items some bonuses like RESIST CLAW or RESIST ICE or DEFENCE POINTS and stuff like that?
Well in constants.cpp you will face what are the bonus you got in your source (this is not how to implement new bonus, you will use the existent one)

The part we are interested in is:
Code:
const TApplyInfo aApplyInfo[MAX_APPLY_NUM] =
And below you got all the things you need like
Code:
	// Point Type
	{ POINT_NONE,			},   // APPLY_NONE,		INDEX=0
	{ POINT_MAX_HP,		        },   // APPLY_MAX_HP,		INDEX=1
	{ POINT_MAX_SP,		        },   // APPLY_MAX_SP,		INDEX=2
	{ POINT_HT,			        },   // APPLY_CON,		INDEX=3
	{ POINT_IQ,			        },   // APPLY_INT,		INDEX=4
So what does this mean?
You just have to see this strings like this
Code:
	{ POINT_MAX_HP,		        },   // APPLY_MAX_HP,		1

	ITS EQUAL TO MAX_HP BONUS INDEX 1
What is this "INDEX" ? Well index is just a counter for your list of bonus, so you will start from 0 and get to xx
Why dont i have the INDEX in my source? Well i just added them to make you understand what is in a simple way.

So to be short you got your bonus identified with POINT_*
Of course if it says MAX_HP that should be it right? Right!

Now, lets say we have the CLAW RESISTANCE implemented in our source but when we change bonus on armors it doesnt appears even if we have insert it in the item_attr
This is because you have to follow the INDEX !

So lets get back to business, implementing the resist claw on armors n stuff
in the source, you will have something like this:
Code:
	{ POINT_RESIST_CLAW,			},	// APPLY_RESIST_CLAW,	INDEX=96 
	or 
	{ POINT_RESIST_CLAW,			},	// APPLY_RESIST_CLAW,			96 CLAW¿¡°Ô ÀúÇ×
Wich are equal, or you can just count from the MAX_HP wich is 1 to RESIST_CLAW line wich will be X

so if we have
Code:
	{ POINT_RESIST_SHIT,			},	// This will be index 0
	{ POINT_MAX_HP,			},	// This will be index 1
	{ POINT_RESIST_WTF,			},	// This will be index 2
	{ POINT_RESIST_ZOZO,			},	// This will be index 3
	{ POINT_RESIST_XXX,			},	// This will be index 4
	{ POINT_RESIST_CLAW,			},	// This will be index 5
In default i think its 96 the resist_claw but you should check your source.



-------------------------------------------------------------------------------------------------------------------------------------------------------------

Now we got our bonus index, how do we set that on item_attr?
Simply, we go to navicat (or whatever)
Right Click on "item_attr"
Select "Design Table"
You will have something like this



Now go on the ... button near "Values:"
You will have this:



What do i do now? Its simple but you have to read carefully what im typing.

This list respects a rule, this rule is the INDEX.
As you can see it starts from MAX_HP that have an index equal to 1.
If you want to add the bonus resist claw that in our case is 96 you have to reach this INDEX.
How do i do that?
Simple, you will have a " + " to add VALUES.
Count how many values you have there, if you have 80 values then your index is until 80, you have to add other 16 values there
to reach the "96".

So to make it short again, count how many values you have and add how many you need to reach your desired index bonus.
Like this:



I called them with numbers because i prefer them like that but you can name them as you want, if you want to rename 96 with "RESIST_CLAW" is the same.
Now you have to add this bonus in your item_attr.
Like this:



Where prob = probability to get this bonus on your item lv1 to lv5 are the variables for this bonus,
with weapon,body,wrist,foots,neck,head,shield,ear you select the % of successfully obtain that bonus on the select part of equipment.

I think thats all, changing your bonus ingame will show you the results.

And if you have any translation problem n stuff, you have to edit your locale_game.txt in your locale folder.

Thanks, if you want to share please keep credits.
Sorry if this kind of guide does exists, i dont want to make something that has been already made with proper instructions, if so delete this.

If you have any questions feel free to ask

__For the screenshots not showing, not my fault, epvp has this rules where a new user cant show screenshots in his guide! :/
666 Weaboo Sensei 420 is offline  
Thanks
1 User
Old 12/14/2016, 17:23   #2
 
VeSpacco's Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 81
Received Thanks: 27
Hey boss, surely a very good guide! It's very good explained! Thank you
VeSpacco is offline  
Old 12/15/2016, 11:20   #3


 
Kira Mikami's Avatar
 
elite*gold: 0
Join Date: Nov 2012
Posts: 1,620
Received Thanks: 1,746
Quote:
Originally Posted by 666 Weaboo Sensei 420 View Post
[How-To] Link your constants.cpp to your item_attr

Hello guys, today im gonna show you a simple trick that lets you use what you have in your Srcs/server/constants.cpp
What are those constants? They simply are the defined skills with they're index number.
You ever asked yourself how to implement on items some bonuses like RESIST CLAW or RESIST ICE or DEFENCE POINTS and stuff like that?
Well in constants.cpp you will face what are the bonus you got in your source (this is not how to implement new bonus, you will use the existent one)

The part we are interested in is:
Code:
const TApplyInfo aApplyInfo[MAX_APPLY_NUM] =
And below you got all the things you need like
Code:
	// Point Type
	{ POINT_NONE,			},   // APPLY_NONE,		INDEX=0
	{ POINT_MAX_HP,		        },   // APPLY_MAX_HP,		INDEX=1
	{ POINT_MAX_SP,		        },   // APPLY_MAX_SP,		INDEX=2
	{ POINT_HT,			        },   // APPLY_CON,		INDEX=3
	{ POINT_IQ,			        },   // APPLY_INT,		INDEX=4
So what does this mean?
You just have to see this strings like this
Code:
	{ POINT_MAX_HP,		        },   // APPLY_MAX_HP,		1

	ITS EQUAL TO MAX_HP BONUS INDEX 1
What is this "INDEX" ? Well index is just a counter for your list of bonus, so you will start from 0 and get to xx
Why dont i have the INDEX in my source? Well i just added them to make you understand what is in a simple way.

So to be short you got your bonus identified with POINT_*
Of course if it says MAX_HP that should be it right? Right!

Now, lets say we have the CLAW RESISTANCE implemented in our source but when we change bonus on armors it doesnt appears even if we have insert it in the item_attr
This is because you have to follow the INDEX !

So lets get back to business, implementing the resist claw on armors n stuff
in the source, you will have something like this:
Code:
	{ POINT_RESIST_CLAW,			},	// APPLY_RESIST_CLAW,	INDEX=96 
	or 
	{ POINT_RESIST_CLAW,			},	// APPLY_RESIST_CLAW,			96 CLAW¿¡°Ô ÀúÇ×
Wich are equal, or you can just count from the MAX_HP wich is 1 to RESIST_CLAW line wich will be X

so if we have
Code:
	{ POINT_RESIST_SHIT,			},	// This will be index 0
	{ POINT_MAX_HP,			},	// This will be index 1
	{ POINT_RESIST_WTF,			},	// This will be index 2
	{ POINT_RESIST_ZOZO,			},	// This will be index 3
	{ POINT_RESIST_XXX,			},	// This will be index 4
	{ POINT_RESIST_CLAW,			},	// This will be index 5
In default i think its 96 the resist_claw but you should check your source.



-------------------------------------------------------------------------------------------------------------------------------------------------------------

Now we got our bonus index, how do we set that on item_attr?
Simply, we go to navicat (or whatever)
Right Click on "item_attr"
Select "Design Table"
You will have something like this



Now go on the ... button near "Values:"
You will have this:



What do i do now? Its simple but you have to read carefully what im typing.

This list respects a rule, this rule is the INDEX.
As you can see it starts from MAX_HP that have an index equal to 1.
If you want to add the bonus resist claw that in our case is 96 you have to reach this INDEX.
How do i do that?
Simple, you will have a " + " to add VALUES.
Count how many values you have there, if you have 80 values then your index is until 80, you have to add other 16 values there
to reach the "96".

So to make it short again, count how many values you have and add how many you need to reach your desired index bonus.
Like this:



I called them with numbers because i prefer them like that but you can name them as you want, if you want to rename 96 with "RESIST_CLAW" is the same.
Now you have to add this bonus in your item_attr.
Like this:



Where prob = probability to get this bonus on your item lv1 to lv5 are the variables for this bonus,
with weapon,body,wrist,foots,neck,head,shield,ear you select the % of successfully obtain that bonus on the select part of equipment.

I think thats all, changing your bonus ingame will show you the results.

And if you have any translation problem n stuff, you have to edit your locale_game.txt in your locale folder.

Thanks, if you want to share please keep credits.
Sorry if this kind of guide does exists, i dont want to make something that has been already made with proper instructions, if so delete this.

If you have any questions feel free to ask

__For the screenshots not showing, not my fault, epvp has this rules where a new user cant show screenshots in his guide! :/
^ With Screenshots ^
Kira Mikami is offline  
Old 12/15/2016, 16:20   #4

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Long story short:
Code:
SELECT apply, apply + 0 FROM item_attr;
rollback is offline  
Thanks
1 User
Old 12/15/2016, 20:04   #5
 
elite*gold: 0
Join Date: Dec 2016
Posts: 5
Received Thanks: 5
Quote:
Originally Posted by rollback View Post
Long story short:
Code:
SELECT apply, apply + 0 FROM item_attr;
Yea its a pretty simple thing but i wanted to let people understand whats behind this in a simple way, because i saw a lot of people not following the correct index, my how to are for dummies (like i am)
666 Weaboo Sensei 420 is offline  
Old 12/17/2016, 19:20   #6
 
VeSpacco's Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 81
Received Thanks: 27
And what about adding or modifing effect of a attr? Do you know how to do it? For example: adding the % vs tree mobs!
VeSpacco is offline  
Old 12/19/2016, 01:42   #7
 
elite*gold: 0
Join Date: Dec 2016
Posts: 5
Received Thanks: 5
Quote:
Originally Posted by VeSpacco View Post
And what about adding or modifing effect of a attr? Do you know how to do it? For example: adding the % vs tree mobs!
Sure, but im not gonna share a full guide to that right now.

Ill give you something that can clear your ideas, go into your client/server source folder, use notepad++ to search the string you want to duplicate (Strong vs orcs as example)

Dont forget your race flag orc to search for that too
Code:
	RACE_FLAG_ORC		= (1 << 4),


Someone quote me to let ppl view the image please.

Then add this bonus into your item_attr or where you want to have this bonus and add setRaceFlag in mob_proto
The you will have to do the client locale part

This is a sumup on what you will have to do, if you have any answers tell me
666 Weaboo Sensei 420 is offline  
Reply


Similar Threads Similar Threads
Item_ATTR
06/20/2015 - Metin2 Private Server - 2 Replies
Hallo, derzeit habe ich einige Probleme, die User beschweren sich dass das Switchen ewigkeiten dauern , aber dennoch einige Erfolge kommen. An den Bonis möchte ich nichts ändern, was sollte ich an der Spalte ändern und wie ? Die Spalte " prob " erhöht , verringert die Chance den Boni zu erhalten. Sobald ich alles auf 1 stelle, hat man innerhalb 2-3 Stunden komplettes PvM , PvP EQ fertig. :s
Item_Attr
03/18/2014 - Metin2 Private Server - 3 Replies
Hallo Epvp, ich will die bonis von meinem Server ändern. Jedoch weiss ich den namen der folgenden Bonis in der item_attr nicht: Blitzwiederstand zaubergeschwindigkeit chance auf tp absorbieren wäre nett, wenn mir sie jemand schnell sagen könnte
[Release] +5500 Packets structure , client/packets constants
10/07/2012 - CO2 PServer Guides & Releases - 10 Replies
edit : if u know nothing about packets go to this post first explaining what is packets , and explaining a packet with details and everything http://www.elitepvpers.com/forum/co2-pserver-disc ussions-questions/2162344-packets-packets-packets. html#post19074533 i start making my very own packet structure to use them on my new proxy but i thought of ripping them from the source so yeah the following packets is ripped of trinity base source right now im just providing the packets structure...
[S]item_attr DE Like
02/02/2012 - Metin2 Private Server - 0 Replies
Wie die Überschrift schon sagt suche ich die orginale Boniliste von DE. Leider sind bei meinen Files die Sachen schon verändert und ich habe nirgends was gefunden, wo die DE like Bonis drin sind. Falls die DE like Bonis in irgendwelchen Files mit dabei sind, lass es mich wissen in welchen :D Lg ;)
Item_attr
02/20/2010 - Metin2 Private Server - 1 Replies
Hallo könnt mir jmd bitte seine item_attr hochladen da ich meine gecrashed habe danke^^



All times are GMT +2. The time now is 01:12.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.