Stats and SFX from augument.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
kakaini
Posts: 6
Joined: Sat Aug 31, 2013 5:03 pm

Stats and SFX from augument.

Post by kakaini »

L2J Revision Number: 5937
L2JDP Revision Number: 9641

BACKGROUND FOR MY QUESTION:
So i was wondering about augments and i found how to create base skill number here: viewtopic.php?f=80&t=11122&p=48959&hili ... 077#p48959

But i could not find anything about bonus stats, just that they are defined in client. So through quite long process i found out about the "C:\server\game\data\stats\options" folder and concluded that when people said "defined in client" they were talking about augment description on client.

The next thing i noticed was augment glow changes. While i came to the previous conclusion i documented some augment number and effect relations.

Code: Select all

16285       - aug skill id1067253760  - Aug start, no particle1067254670  - No particle end1067254671  - Particle start1067255580  - Particle peak1067255581  - Lightning start1067257400  - Strong glow end1067257401  - no glow3640        - Glow Cycle (910 => 911 => Add Particles => 1820 => 1821 => Add Lightning => 340 => Lightning Peak) |cycle - Stat| 0 - Noone1 - Acu 1.59 & Crit 15.552 - ~"~3 - Acu 1.6 & Crit 10.37 (glow no more)4 - ~"~5 - +Passive fire P.def                        +1 gives Passive Holy def6 - Max mp 34.04 & HP regen 0.147 - None8 - None9 - None ends at 1067319295 => 1067319296 is new skill id (16286)|cycle - Stat| has same results
I didn't see anything that defines glow in XML files tho. I tried changing names to the ones that had glow, but that didn't do anything.

QUESTIONS:
Augment description is defined in client, actual effects are server sided - correct?
In "Character.properties" you can define augment glow chances. Do these chances only determine in what id range it will randomise and the actual augment-glow relationship is defined in client only?

Example:

Code: Select all

<option id="3640" name="o_f_75_1u_91">        <!-- Accuracy increases by 1.59. Critical increases by 15.55. -->        <for>            <add order="0x40" stat="accCombat" val="1.587203" />            <add order="0x40" stat="rCrit" val="15.549451948" />        </for></option>
What for is the name tag and what does o_f_75_1u_91 actually mean? And what is the order tag explanation?
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Stats and SFX from augument.

Post by UnAfraid »

Code: Select all

int stat12 = 0x0000FFFF & augment;int stat34 = (augment >> 16);
and stat12, stat34 = option id
Image
kakaini
Posts: 6
Joined: Sat Aug 31, 2013 5:03 pm

Re: Stats and SFX from augument.

Post by kakaini »

Thanks. You're quite vague but i found it in source. Though i certainly need more help x:

I'm not that familiar with binary arithmetics but i sort of figured this one.
I found the "AugmentationStatBoni" function in source which takes the number from DB, then ,from it, gets the base augment and option IDs using the formula you provided and then applies the effects if they exist.

Questions still remaining:
In "Character.properties" you can define augment glow chances. Do these chances only determine in what augment id ranges it will randomise and augment SFX/glow is assigned by client only?

What for is the name tag and what does o_f_75_1u_91 actually mean? And what is the order tag explanation?
Example:

Code: Select all

<option id="3640" name="o_f_75_1u_91">        <!-- Accuracy increases by 1.59. Critical increases by 15.55. -->        <for>            <add order="0x40" stat="accCombat" val="1.587203" />            <add order="0x40" stat="rCrit" val="15.549451948" />        </for></option>
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Stats and SFX from augument.

Post by UnAfraid »

kakaini wrote:Thanks. You're quite vague but i found it in source. Though i certainly need more help x:

I'm not that familiar with binary arithmetics but i sort of figured this one.
I found the "AugmentationStatBoni" function in source which takes the number from DB, then ,from it, gets the base augment and option IDs using the formula you provided and then applies the effects if they exist.

Questions still remaining:
In "Character.properties" you can define augment glow chances. Do these chances only determine in what augment id ranges it will randomise and augment SFX/glow is assigned by client only?

What for is the name tag and what does o_f_75_1u_91 actually mean? And what is the order tag explanation?
Example:

Code: Select all

<option id="3640" name="o_f_75_1u_91">        <!-- Accuracy increases by 1.59. Critical increases by 15.55. -->        <for>            <add order="0x40" stat="accCombat" val="1.587203" />            <add order="0x40" stat="rCrit" val="15.549451948" />        </for></option>
That name is not used for anything in game server.
Order is priority of execution in characters's stats calculators.
Name tag is not used in game server.
Glow is one byte between 1 and 4 if i remember fine i just don't remember at which bit it is located.
Image
kakaini
Posts: 6
Joined: Sat Aug 31, 2013 5:03 pm

Re: Stats and SFX from augument.

Post by kakaini »

By order is it meant to which part of the stat it adds? like for example base, weapon or final?

I have not had enough time to dig around the source, but i took a quick look at "EnchantOptions.java" just because of the name. You say i have to look for a byte and i see one allocated there + this script mentions "options" so I'm guessing I'm close if not spot on.

Code: Select all

/** * @author UnAfraid */public class EnchantOptions{    private final int _level;    private final int[] _options;        public EnchantOptions(int level)    {        _level = level;        _options = new int[3];    }        public int getLevel()    {        return _level;    }        public int[] getOptions()    {        return _options;    }        public void setOption(byte index, int option)    {        if (_options.length > index)        {            _options[index] = option;        }    }}
Am i?
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Stats and SFX from augument.

Post by UnAfraid »

That class is for something totally different.
That class is made to handle different weapon effects on different enchant levels only few items using that atm.
Vitality Belt, Christmas Shirt, Olf's T-shirt, Weaver's Multi-colored Clothes
Image
Post Reply