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

    • Experience L2Gold like never before – available ONLY on Saturdays & Sundays! Custom Armors: Dynasty, Apella Custom Weapons: L2Gold Weapons Custom Jewelry: L2Gold Jewelry Custom Teleport System & AIO Buffer Custom Zones, NPCs & Raidbosses This is not just another private server – it’s a limited-time battleground for the ultimate L2 experience! Play only on weekends Website: https://l2kandra.online/ Info & Contact: https://www.facebook.com/profile.php?id=61578869175323  
    • 突发新闻! Twitter Premium(推特高级版) 现以优惠价发售!立即尝试 — 限时优惠! ➡ Twitter Premium X 订阅(适用于您的推特账户),可选 1 个月 / 1 年(任选)。需要登录授权您的推特账户。价格:每月 $7–13(每年 $75) ➡ Twitter X Premium Plus 订阅 + GROK AI 助手(适用于您的推特账户),可选 1 个月 / 1 年(任选)。需要登录授权您的推特账户。价格:每月 $48–55(每年 $480) ➡ 2010–2023 年老推特账号,带蓝色认证标志(Tier 1/2/3 国家)| 提供完整访问权限(含登录名、密码和令牌)| 价格:起价 $9 ➡ 2010–2023 年老推特 NFT 账号,带蓝色认证标志(Tier 1/2/3 国家)| 提供完整访问权限(含登录名、密码和令牌)| 价格:起价 $9 ➡ 2010–2023 年老推特账号,带蓝色认证标志 + 真实粉丝(100–20000,可自选)| Tier 1/2/3 国家 | 提供完整访问权限(含登录名、密码和令牌)| 支持补充:30+ 天 | 价格:起价 $9.5 ➡ 2010–2023 年老推特账号,带广告管理器(ADS Manager)和蓝色认证标志,并绑定信用卡 | 区域:Tier 1 国家 | 提供完整访问权限(含登录名、密码和令牌)| 价格:起价 $35 您可以在我们的网站商店或通过 Telegram 机器人购买! ➡ 数字商品商店(网站):前往 ➡ 商店 Telegram 机器人:前往 ➡ Telegram Stars 购买机器人:前往 ➡ SMM 面板:前往 – 推广您的社交媒体账户。 我们为您呈现最新的优惠与特别活动,用于购买我们平台的商品和服务: 1. 使用优惠码 OCTOBER2025(8% 折扣)在十月于我们的网站或机器人中购物!首次购买还可使用优惠码 SOCNET(15% 折扣) 2. 注册后在我们网站的论坛主题中按以下格式留言,即可获得 $1 商店余额或 10–20% 折扣:"SEND ME BONUS, MY USERNAME IS..." 3. 首次试用 SMM 面板即可获得 $1:只需在网站支持中心提交标题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道与 Telegram Stars 购买机器人每周举行 Telegram Stars 抽奖活动! 新闻资讯: ➡ Telegram 频道:https://t.me/accsforyou_shop✅ ➡ WhatsApp 频道:https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t✅ ➡ Discord 服务器:https://discord.gg/y9AStFFsrh✅ 联系方式与支持: ➡ Telegram:https://t.me/socnet_support✅ ➡ WhatsApp:https://wa.me/79051904467✅ ➡ Discord:socnet_support ✅ ➡ ✉ 邮箱:solomonbog@socnet.store ✅
    • Breaking News! Twitter Premium now available at a discounted price! Try it right now — limited-time offer! ➡ Twitter Premium X subscription for your Twitter account for 1 month / 1 year (your choice). Requires login authorization to your Twitter account. Price from: $7–13 per 1 month ($75 per 12 months) ➡ Twitter X Premium Plus subscription and GROK AI assistant for your Twitter account for 1 month / 1 year (your choice). Requires login authorization to your Twitter account. Price from: $48–55 per 1 month ($480 per 12 months) ➡ Old Twitter Accounts 2010–2023 with BLUE Regular Tick (Tier 1/2/3 countries) | Full access with Login, Password, and Token included! | Price from: $9 ➡ Old Twitter NFT Accounts 2010–2023 with BLUE Tick (Tier 1/2/3 countries) | Full access with Login, Password, and Token included! | Price from: $9 ➡ Old Twitter Accounts 2010–2023 with BLUE Regular Tick and real followers: 100–20000 (followers of your choice) | Tier 1/2/3 countries | Full access with Login, Password, and Token included | Refill: 30+ days | Price from: $9.5 ➡ Old Twitter Accounts 2010–2023 with ADS Manager and BLUE Regular Tick linked with Credit Card | GEO: Tier 1 countries | Full access with Login, Password, and Token included | Price from: $35 Shop in our online store or through our Telegram bot! ➡ Digital goods store (Website): Go ➡ Store Telegram bot: Go ➡ Telegram bot for purchasing Telegram Stars: Go ➡ SMM Panel: Go – promote your social media accounts. We would like to present you with the latest list of promotions and special offers for purchasing products and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website or Bot) in October! You can also use the first-time promo code SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — just post your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." – post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a support ticket with the title “Get Trial Bonus” on our website (Support). 4. Weekly giveaways of Telegram Stars in our Telegram channel and our Telegram bot for Star purchases! News: ➡ Telegram channel: https://t.me/accsforyou_shop✅ ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t✅ ➡ Discord server: https://discord.gg/y9AStFFsrh✅ Contacts and Support: ➡ Telegram: https://t.me/socnet_support✅ ➡ WhatsApp: https://wa.me/79051904467✅ ➡ Discord: socnet_support ✅ ➡ ✉ Email: solomonbog@socnet.store ✅
    • Breaking News! Twitter Premium now available at a discounted price! Try it right now — limited-time offer! ➡ Twitter Premium X subscription for your Twitter account for 1 month / 1 year (your choice). Requires login authorization to your Twitter account. Price from: $7–13 per 1 month ($75 per 12 months) ➡ Twitter X Premium Plus subscription and GROK AI assistant for your Twitter account for 1 month / 1 year (your choice). Requires login authorization to your Twitter account. Price from: $48–55 per 1 month ($480 per 12 months) ➡ Old Twitter Accounts 2010–2023 with BLUE Regular Tick (Tier 1/2/3 countries) | Full access with Login, Password, and Token included! | Price from: $9 ➡ Old Twitter NFT Accounts 2010–2023 with BLUE Tick (Tier 1/2/3 countries) | Full access with Login, Password, and Token included! | Price from: $9 ➡ Old Twitter Accounts 2010–2023 with BLUE Regular Tick and real followers: 100–20000 (followers of your choice) | Tier 1/2/3 countries | Full access with Login, Password, and Token included | Refill: 30+ days | Price from: $9.5 ➡ Old Twitter Accounts 2010–2023 with ADS Manager and BLUE Regular Tick linked with Credit Card | GEO: Tier 1 countries | Full access with Login, Password, and Token included | Price from: $35 Shop in our online store or through our Telegram bot! ➡ Digital goods store (Website): Go ➡ Store Telegram bot: Go ➡ Telegram bot for purchasing Telegram Stars: Go ➡ SMM Panel: Go – promote your social media accounts. We would like to present you with the latest list of promotions and special offers for purchasing products and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website or Bot) in October! You can also use the first-time promo code SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — just post your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." – post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a support ticket with the title “Get Trial Bonus” on our website (Support). 4. Weekly giveaways of Telegram Stars in our Telegram channel and our Telegram bot for Star purchases! News: ➡ Telegram channel: https://t.me/accsforyou_shop✅ ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t✅ ➡ Discord server: https://discord.gg/y9AStFFsrh✅ Contacts and Support: ➡ Telegram: https://t.me/socnet_support✅ ➡ WhatsApp: https://wa.me/79051904467✅ ➡ Discord: socnet_support ✅ ➡ ✉ Email: solomonbog@socnet.store ✅
    • Enthusiasm about everything functioning perfectly, until those files became public. These files taught me the difference between making things work in a private, commercial environment versus releasing your work publicly and facing intense scrutiny over even the smallest details.  
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock