Jump to content
  • 0

Mana Regen


Question

9 answers to this question

Recommended Posts

  • 0
Posted

It should be in character templates (since these things are attached to a player character class).

 

Movement/Wait mode modifiers are hardcoded, check formulas or related Func implementing classes if you need to change them as well.

  • 0
Posted

Easy to say hard to do it as a beginner. Can you give me more information so i can do what i want?

 

As an alterbative, if make a passive skill which give more mp regen and put that skill in all classes will be the same?

  • 0
Posted (edited)

Character templates used to be in SQL, but now they are in XML, although the paths differ in different serverpacks (datapack, look for char_templates or character or similar folders).

 

And no, it will not be exactly the same (unless you use a multiplier instead of a flat value):

MP_regen = max(orgMP_regen × menBonusF × levelBonus × skillMP_regenPer + skillMP_regenDiff, 1)
P.S. I am unsure if CHA affects regen as well.

 

In short:

If you want to multiply/divide the MP regen (e.g. make it double) -> the result will be the same.

If you want to add a flat value (e.g. +5 / recovery tick), it will not be the same (MEN, level bonuses as well as mul/div effects will have no effect on the value added by a skill).

 

Of course, L2J's generalized calculator allows you to simply use a smaller order value (this means you would effectively create a custom MP regen formula without changing code). I think it was 32 (0x20) for add/sub instead of 64 (0x40).

Edited by _dev_
  • 0
Posted

Character templates used to be in SQL, but now they are in XML, although the paths differ in different serverpacks (datapack, look for char_templates or character or similar folders).

 

And no, it will not be exactly the same (unless you use a multiplier instead of a flat value):

MP_regen = max(orgMP_regen × menBonusF × levelBonus × skillMP_regenPer + skillMP_regenDiff, 1)
P.S. I am unsure if CHA affects regen as well.

 

In short:

If you want to multiply/divide the MP regen (e.g. make it double) -> the result will be the same.

If you want to add a flat value (e.g. +5 / recovery tick), it will not be the same (MEN, level bonuses as well as mul/div effects will have no effect on the value added by a skill).

 

Of course, L2J's generalized calculator allows you to simply use a smaller order value (this means you would effectively create a custom MP regen formula without changing code). I think it was 32 (0x20) for add/sub instead of 64 (0x40).

 

there's no column in character template for mp reg and there's no xml file for char stats.i checked them both. So i will try to add it on passive skill and i please the gods to work fine. Is there a guide for the orders(0x20,0x40 etc.) because there's no guide to fully explain how orders exactly work... :/

  • 0
Posted

there's no column in character template for mp reg and there's no xml file for char stats.i checked them both. So i will try to add it on passive skill and i please the gods to work fine. Is there a guide for the orders(0x20,0x40 etc.) because there's no guide to fully explain how orders exactly work... :/

Well, I was primarily referring to this: https://github.com/L2J/L2J_DataPack/blob/master/dist/game/data/stats/chars/baseStats/AbyssWalker.xml

 

Here's a short guide for the orders. Assume you have certain values, already with operation attached:

 

+10 -20 *6 *2 *1.05 +63.2 *0.5 /3

 

You need to calculate a value. An easy way to do it is (parenthesis emphasize the natural operation order):

10 - (20 * 6 * 2 * 1.05) + (63.2 * 0.5 / 3)

 

Obviously, the "insertion order" calculation is not good for… mostly anything.

 

So now you have certain values with both operation and order attached, e.g.

 

+10[1] -20[15] *6[5] *2[5] *1.05[2] +63.2[15] *0.5[10] /3[2]

 

Now, you only have to sort the orders:

((((10) / 3 * 1.05) * 6 * 2) * 0.5) + 63.2 - 20

 

Which will end up providing a different value.

 

Obviously, you would want to avoid +- having the same order as */, because for the same order value, they can end up ordered in any way, and (x*2)+10 is different than (x+10)*2.

 

In order to allow intermediate values (for future updates), l2j has selected certain order values to be used in item/skill templates:

0x10 for base value <set>

0x20 for base value <add/sub>

0x30 for (base) value <mul/div> (due to multiplication semantics, we do not need to split it into two)

0x40 for modifying the precomputed value by <add/sub>

0x50 for one-sided <set> (overriding the completely computed value)

  • 0
Posted

lol why so hard coding  while he can do it with the easy way LAWL?

He asked to change (note the difference between 'adjust'/'modify' and 'change'/'replace') the default value. So it is only natural that we tried to guide him to the default values.

 

Once again, a skill with <mul> will participate in MP regen formula differently than a skill with <add>, when compared to just changing the default value.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Inventory restock: Premium business accounts are now available.   ✔ Wallester Business EU 🇪🇺|💳 Unlimited virtual cards, physical cards, 🏦 multi-currency IBAN, ₿ crypto & stablecoin deposits. ✔ Stripe Business UK 🇬🇧|💳 Instant virtual cards (Visa/Mastercard), high-conversion checkout, multi-currency payouts, ₿ crypto payments, no-code payment links. ✔ Mercury Business US 🇺🇸|🏦 US checking & savings, 💳 unlimited virtual cards, domestic & International wires, native stablecoin settlement. ✔ Payset Business EU 🇪🇺|🏦 Multiple IBANs, UK sort code, SEPA Instant, 💳 unlimited virtual cards, multi-currency accounts. ✔ Novo Business US 🇺🇸|🏦 Business checking account, ACH payments & invoicing, 💳 virtual & physical cards, novo boost.
    • Let me see if I understand correctly, older gentlemen, when a newcomer shows up to create modern things with the help of AI, doing what you charge them to do, you point the finger and laugh. I believe that's why everything is stagnant. The product isn't for programming experts, it's for newcomers. Don't buy from you if they can do it themselves using this base. You're going to deliver a similar product, maybe even worse than this one, so why are you complaining? PowerShell, as you well know, started with it, then came new platforms and new apps, new creation models, all with different languages; I chose the simplest one for my taste. This is about being organized and knowing how to choose the right words for each situation. It's not 100%, but it already gives a good impression. Nothing is 100%, so a topic written by AI, and all the code that you charge an absurd amount for to prohibit and sell hacks, could be open source so that everyone can create new practices, new models, new information for passing packets, prohibiting the use of cheats that cause server owners to break so much. Let's remember that the Admin doesn't always shut down the server; it's the players who find problems and take advantage by buying and reselling items, and they say that the GM shuts down the server every week, but that's a lie. What they do is duplicate items with packages and sell them, but perhaps this could give some future developers a starting point to create their own protection following the model in the initial documentation. Because none of you answer a question from a newbie, you think you're superior because you have knowledge, but with AI, people like that can have the same knowledge as you, but with less practice. And if they practice a lot, 10,000 hours, they can be as good as all of you older developers in the L2J field.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..