[DIS] Phylactery

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

User avatar
WildX
Source of Mana
Source of Mana
Posts: 2084
Joined: 07 Aug 2010, 14:13
Location: United Kingdom
Contact:

[DIS] Phylactery

Post by WildX »

Essentially what happened is that someone decided that the Phylactery is indeed broken, but should remain broken because of other priorities.

I privated the announcement because I thought it was premature and there hadn't been enough discussion. I think that fixing broken stats is so simple that anyone could do it (including myself) and there's no reason to delay the decision when I know people would be willing to contribute and do something.

It would be helpful to first gather some opinions from experienced players. My initial instinct is to cut all the stats to zero for now because:
Screenshot 2022-10-16 163132.png
Screenshot 2022-10-16 163132.png (21.62 KiB) Viewed 1393 times
Based on that, it seems it was broken by allowing its use outside of the intended area. To avoid placing location restrictions on the item I think it makes sense to simply replace the attack speed bonus with something like a reasonable health bonus which also makes sense with the item. It's a simple quick fix and means the item can also remain as a prize for the Hungry Fluffies event.

TMW Team member

User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: [DIS] Phylactery

Post by jesusalva »

Personally I think any attack range bonus should never work for melee weapons, so a ranged only restriction is fine in my book.

Well, there could be an item which allows bows to not use ammo, but this probably would just break the balance even further, so I don't think it'll have any support... But it's probably an option too

https://messworld.tmw2.org/items/5130

(PS. My assessment is a statement, the Phylactery was never meant to be used outside the crypt. It's not a suggestion nor a statement we should bring back location restrictions — which only work in Evolved by the way)

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

User avatar
WildX
Source of Mana
Source of Mana
Posts: 2084
Joined: 07 Aug 2010, 14:13
Location: United Kingdom
Contact:

Re: [DIS] Phylactery

Post by WildX »

Why break the way bows work instead of fixing how this item works? oO

TMW Team member

User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: [DIS] Phylactery

Post by jesusalva »

I actually mistook Phylactery and Underworld Mask on that statement

Phylactery main worry is what Moubootaur Legends mitigated but no other server did — after a certain point, extra aspd bonuses simply don't work but weapons have different aspd growths, so in ML when aspd falls below 300ms it switches to an alternative formula. This allowed ML to work even with more agi and aspd bonus and faster weapons, without breaking the slow ones.

As a positive side effect, using a haste potion on a slow weapon is more effective than in a fast weapon, which is important as ML has three different kinds of haste bonuses.

(The ideal fix would be replacing aspd with an exponential formula where you need infinite aspd to reach the minimum of 190)

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

User avatar
WildX
Source of Mana
Source of Mana
Posts: 2084
Joined: 07 Aug 2010, 14:13
Location: United Kingdom
Contact:

Re: [DIS] Phylactery

Post by WildX »

You explained why a larger and more comprehensive solution is not possible (and/or advertised ML), but why can we not adjust the stats to resolve the immediate problems?

TMW Team member

User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: [DIS] Phylactery

Post by jesusalva »

To make clear, I want to collect more feedback from other developers regarding this before any decision is taken.

I do have the tendency to mix up crypt items. Phylactery issue is that with max agi and a high speed weapon e.g. Setzer, it goes straight in a "red zone" which originally is not meant to be reachable, while for low speed weapons like bows it will be comfortable.

So if we just tweak back the attack speed bonus, it'll break the Setzer speed (and I know most players like their weapons at the fastest speed possible ─ 190ms ─ but it is not good balance-wise, and was one with the issues for Banshee which was fixed as well).

TL;DR It is a small hack on tmwa source code which when your attack speed bonuses would drop your attack below 300ms, it nerfs the effect of your bonuses. So the gap between 300ms ("red zone") and 190ms ("absolute minimum") is of 220 aspd points instead of 110.
Which means powerful ASPD items like the Phylactery would be very effective on e.g. bows, but when used on already fast builds e.g. Setzer, it would hit this "red zone" and have the effectiveness reduced.


Or more technically...
Instead of continuing the charade of buff-nerf-buff-nerf-buff-nerf which went on for a while, I would rather hear other opinions or see if after HoraK finish the more relevant issue we have, he is up to going to git.themanaworld.org/legacy/tmwa/src/map/pc.cpp:1403-1406 (or the equivalent in battle.cpp:730,758,790) and porting git.themanaworld.org/ml/hercules/src/map/status.c:6133-6135 ─ or improving the hack fix.

Which is my proposed solution and even I could do it

Code: Select all

sd->aspd = std::max(sd->aspd, battle_config.max_aspd);
Being replaced with an if statement that if sd->aspd < 300, sd->aspd *= 2, then the max statement (crudely, I still think TMW2 implementation was a bit more elegant ─ even if the 300 is hardcoded).

A simple

Code: Select all

if (sd->aspd < 300)
        sd->aspd += (sd->aspd / 2);
sd->aspd = std::max(sd->aspd, battle_config.max_aspd);
Or not-so-simple and probably illegal in C++ due to mixed type comparison / implicit conversion:

Code: Select all

if (sd->aspd < (battle_config.max_aspd * 1.6))
        sd->aspd += (sd->aspd / 2);
sd->aspd = std::max(sd->aspd, battle_config.max_aspd);
With this proposed fix, you add a special behavior on the red zone (attacks faster than 300ms, which is a kinda magic number) that requires 1.5× more the ASPD bonus to be effective.

So even if the Phylactery gains more ASPD bonus, under the same rules which Moubootaur Legends use (described above), it will end up having a flattening effect, so a Beheader + Phylactery will be more effective than a Setzer + Phylactery, and players aiming for the maximum speed won't be able to hit it as easily as before (so Setzer + max agi + max level + dark conc potion will no longer
hit the cap ─ you'll also need another attack speed or agility boosting item to do the trick, while being barely noticeable in gameplay, yet easily reflected on the game stats windows)
And yes, I know the proto code has a bug ─ refer to the linked code in C to see what exactly I meant.

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: [DIS] Phylactery

Post by jesusalva »

Captura de tela em 2022-10-16 21-36-08.png
Captura de tela em 2022-10-16 21-36-08.png (25.16 KiB) Viewed 1318 times
The X axis is your current ASPD penalty, and the Y axis the corresponding speed. The lower the X is, the faster you are ─ all ASPD bonuses act as reductions to the penalty, and the equipped weapon (even if it is your fists) gives the default penalty.

The green line is the behavior TMWA currently have: It linearly goes all the way down to 190ms, when it hits the absolute minimum.

The red line is the formula Moubootaur Legends currently use: Once you hit 300ms, computation switches to a secondary formula which forces you have even more ASPD bonus to reach the minimum.

The proposal is either the red line formula, or a linear line to reach the same cutting point.
Spoiler:
This plot was made with Python.

Code: Select all

import matplotlib.pyplot as plt
import matplotlib as mpl

i=0; x=[]; a1=[]; a2=[]
while i < 600:
    x.append(i)
    a1.append(max(i, 190))
    if i < 300:
            a2.append(max(min(i*1.5, 300), 190))
    else:
            a2.append(max(i, 190))
    i+=1

mpl.style.use('seaborn-v0_8')
fig, ax = plt.subplots(figsize=(3, 3))
ax.set_title("ASPD Formula", color='C0')
ax.plot(x, a1, "C1", label='TMWA Formula')
ax.plot(x, a2, "C2", label='Evol2 Formula')
ax.legend()
plt.show()

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

User avatar
WildX
Source of Mana
Source of Mana
Posts: 2084
Joined: 07 Aug 2010, 14:13
Location: United Kingdom
Contact:

Re: [DIS] Phylactery

Post by WildX »

My proposal involves simply swapping the attack speed bonus with a HP bonus making the item generally useful for any class but solving this attack speed problem without C++ and graphs.

TMW Team member

User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: [DIS] Phylactery

Post by jesusalva »

Graphs are cool 8)

(No issue with just swapping the bonus, just would prefer if at least every dev voiced their opinion first; as it changes a bit what the item does)

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

User avatar
Hello=)
TMW Classic
TMW Classic
Posts: 650
Joined: 11 Jun 2009, 12:46

Re: [DIS] Phylactery

Post by Hello=) »

On side note I wonder how this item interacts with magic (on TMWA). I got impression it can be quite useless in this regard, doubly so if it only works in crypt. Have I got it right? Are these computations applied to magic? And what slot it uses? Furthermore, is it bow that is most worrysome part now? I got impression most "aggressive" players gone assasin/rager melee setup at this point, clearly hinting most advantageous setup, at least on TMWA. That's where idea about melee gets its point. But once again what counts as melee? E.g. does #chiza or #upmarmu still counts as melee?
User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: [DIS] Phylactery

Post by jesusalva »

Hello=) wrote: 17 Oct 2022, 18:57 On side note I wonder how this item interacts with magic (on TMWA). I got impression it can be quite useless in this regard, doubly so if it only works in crypt. Have I got it right? Are these computations applied to magic? And what slot it uses? Furthermore, is it bow that is most worrysome part now? I got impression most "aggressive" players gone assasin/rager melee setup at this point, clearly hinting most advantageous setup, at least on TMWA. That's where idea about melee gets its point. But once again what counts as melee? E.g. does #chiza or #upmarmu still counts as melee?
1. It does not affect magic. Magic never reads sd->aspd because in fact, TMWA does not support neither getunitdata(), nor readbattleparam() ─ the later isn't supported by Hercules either FTR. It is calculated along haste potions, after all.

2. The bow is exactly what I refer about: Bows are slow by definition, so adding ASPD bonuses to them will make them quick, maybe as quick as swords, but not broken quick like the old Banshee.
However, swords are fast by definition, so high ASPD bonuses will just run in the minimum limit making them as quick as the old banshee and... You know what happens.

3. I don't think chiza and upmarmu are affected by this item and potions either, but I might be wrong, overrideattack() can be a bit confusing at times.

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

User avatar
Wellvin
Novice
Novice
Posts: 53
Joined: 04 Nov 2018, 21:50
Contact:

Re: [DIS] Phylactery

Post by Wellvin »

What does ASPD mean ?
User avatar
WildX
Source of Mana
Source of Mana
Posts: 2084
Joined: 07 Aug 2010, 14:13
Location: United Kingdom
Contact:

Re: [DIS] Phylactery

Post by WildX »

TMW Team member

User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: [DIS] Phylactery

Post by jesusalva »

You mean Attack Speed, no?

See also: Attack Speed (Evol2/Renewal)
PS. The "300" is a magic number because I'm handling ASPD after the graph from above link (so when the value was already converted to ms). In the link it probably would be somewhere between 152 and 172.

The ultimate issue is exactly that normally, a full aspd-focused gear is not supposed to go past the 152 mark, but we want to keep adding attack speed bonuses on items e.g. Phylactery, which can do that quite easily for items which already have high aspd like the setzer.
While we could swap the attack speed bonus for an HP one as WildX suggested, the underlying problem that we do not honor this 152 soft limit is still there, and imo, we should just add some extra calculation code which make the interval between 152 and 190 to be larger ─ so we can keep adding attack speed bonuses on items, without running in the risk of breaking the (somewhat broken) game balance.

PPS. It can be any value between 152 and 172 actually, I'm using 152 as a reference.

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

User avatar
Hello=)
TMW Classic
TMW Classic
Posts: 650
Joined: 11 Jun 2009, 12:46

Re: [DIS] Phylactery

Post by Hello=) »

1. Okay... so seems spells affected by stats but not "direct" changes like that?

2. As for melee I got impression it already what I'd call OP on TMWA, in at least some setups, its a bit annoying when "aggressive" players (those obsessed on XP rate/DPS) use only 1-2 particular setups. Though these setups are known to be quite fragile so maybe some def malus to "discourage" that further could be an option? E.g. if someone really wants to play berserk, maybe its fine at expense of they die easily? But I'm still concerned it could make OP melee even worse. And then when it comes to balancing I'd say mages have lowest DPS at levels >90. So maybe it makes sense to make some items useful for magic once we're on it? This item isn't any worse than others I guess. Just some random ideas tho.

3. Um ye, this attack replacement is a bit tricky to understand, that's why I asked. On side note I also wonder if DEX haves any effect vs offensive spells (e.g. atk delay). Actually its interesting on both ranged and "melee" spells like mentioned ones.
Post Reply