Jump to content

Question

Posted

Hello:

Why the P.def values in ingame status are or appear to be incorrect?

I mean, for example with a new character. He starts with 40 P.def . if i equip a pair of gloves that gives +10 P.Def that should be at least 50 and not inferior.

It confuses me a lot, because i cannot understand how this is calculated. Or if it is a bug.

Where is this stuff calculated in core?
I was unable to find anything related to this.

I'm using Interlude acis.

Thank you.

Recommended Posts

  • 0
Posted

Thank you, i'm looking at it now.

Can someone explain to me, why is there a need to discount -8 from the glove being equiped? in case of equiping gloves.

There is such a thing for everything.
Discount a little bit in almost everything. For what is this? or why? 

  • 0
Posted (edited)

I'm very good at making formulas, a bit more complex than games.

But what i dont know much, is code, im learning. but i have someone for the code part also.

I'm learning that bit by bit.
You sayd L2j implemented it that way. well that is obvious. I was looking for a reason on why there is a subtraction from equiped values.
Just to understand it.

I found the file you mentioned above the FuncPDefMod . i did a quick test . in gloves i put a 0 in the subtract part. 
The result was almost correct. when addint +10 from gloves, the 50 of total P.def rised to 59 instead of 51.

There most be other place that interfier with this, something like a skill . but i removed all skills from the char. so it should not be a skill i dont know what can it be.

If someone knows the exact files of this calculation please tell me.
By looking at them all, i should be able to come up with something.

I'm also completly new to eclipse, that's why i'm asking there are a lot of files there i dont know much about or where stuff is.

Edited by ali3npt
  • 0
Posted

Pdef computation is simply base * char level (and the sub effect for players), all leftover is about armor addition and skills effects (passive and active skills). I give you both places where the pdef was calculated, there isn't more.

 

About the reason, ask to whoever added it that way, back in time :P.

  • 0
Posted

I dont know what orders are ^^

Where can i see the stats of Pdef and others that increase by level?

I already check all that 2 files. and yes the only thing i found about the values that im testing the gloves. Even with a zero there it still subtract instead of riseing it to at least to the poit of being equal the + amount from the equiped glove

  • 0
Posted (edited)

I dont know what orders are ^^

 

Where can i see the stats of Pdef and others that increase by level?

 

I already check all that 2 files. and yes the only thing i found about the values that im testing the gloves. Even with a zero there it still subtract instead of riseing it to at least to the poit of being equal the + amount from the equiped glove

 

 

orders are like ( ) in formulas, they change the calculation priority

 

add 0x30 50

mul 0x31 2

add 0x32 15

 

will result in 115

 

whereas this is unpredictable and proably buggy since you don't know if the multiplication or the add goes first and thats probably defined by the order its placed on the XML

 

add 0x30 50

mul 0x30 2

 

result ? (probably 100) but its wrong to do it that way.

Edited by xxdem
  • 0
Posted

Yeah, i was looking into it till now.

I just cant figure it out, from where the other effects come from.

I changed the subtraction in FuncPDefMod of gloves to 0 

Already adds +8 to the current Pdef . but gloves have 9 Pdef. so there is something else making somekind of discount.
Before i changed it, in the case i am testing it. it only add +1.

I Just dont see the logic or reason to this be like that.
If you have 50 P.Def and you have an item that says +10 P.Def . it should always add that 10 and that value should never be bellow 60 ( 50 + 10 ) never bellow. same or more because of bonuees % of other stuff. It is very confusing for new people starting playing this, and understand this stuff like it is without any plausible explanation/info ingame. same gos to Shield P.Def info.
At first i was thinking that , that Pdef was added to the current  P Def . But now, it means the DEF only of that shield. But that is ok, can be moded into giving also that P.def, that way the player will not be confused (much).

Back to the point i was, about the stats reduction.
I dont see any reason on why if you are a level 1 and have a pair of gloves, there are discounts in what you see wnat what you finely get. it should be always up never down.
Down is when something literaly says that will take way some Pdef or Spell in case of pvp etc.

Till now i dint manage to find what makes this subtractions.
If anyone have an explanation or a way to edit this and can share. thank you.

  • 0
Posted (edited)

Dude, did you see the incidence of level modifier before saying crap ?

 

Also, shield pdef is added to pdef or mdef. The formula is straight on this point :

			case SHIELD_DEFENSE_SUCCEED:
				if (!Config.ALT_GAME_SHIELD_BLOCKS)
					defence += target.getShldDef();
				break;

Maybe stop to make assumptions when you got no clue how things should work ? You need a shield success in order to get shield defense counted into total pdef/mdef. Getting a shield alone isn't enough to make it counted as a shield block. Activate all toggles of a paladin and you will see if things don't work.

Edited by Tryskell
  • 0
Posted

Dude, did you see the incidence of level modifier before saying crap ?

 

Also, shield pdef is added to pdef or mdef. The formula is straight on this point :

			case SHIELD_DEFENSE_SUCCEED:
				if (!Config.ALT_GAME_SHIELD_BLOCKS)
					defence += target.getShldDef();
				break;

Maybe stop to make assumptions when you got no clue how things should work ? You need a shield success in order to get shield defense counted into total pdef/mdef. Getting a shield alone isn't enough to make it counted as a shield block. Activate all toggles of a paladin and you will see if things don't work.

 

L2J formulas are far than perfect being born only as Guesses from l2off servers

  • 0
Posted

L2J formulas are far than perfect being born only as Guesses from l2off servers

 

That is not the point, and I know than 80% of formulas are either wrong or miscalculated.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...