forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

Skull system

Open rookgaard opened this issue 3 years ago • 14 comments

Pull Request Prelude

Changes Proposed

Introduced skull system described in https://tibia.fandom.com/wiki/Skull_System

rookgaard avatar Mar 25 '21 23:03 rookgaard

@EPuncker Can you add reviewers?

rookgaard avatar Mar 25 '21 23:03 rookgaard

Please use the new string formatting style fmt

MillhioreBT avatar Mar 26 '21 04:03 MillhioreBT

@MillhioreBT Where do you want me to use that formatting?

rookgaard avatar Mar 26 '21 06:03 rookgaard

@MillhioreBT Where do you want me to use that formatting?

Sorry for not specifically suggesting where In everything that makes use of: std::ostringstream

This is suggested in the PR #3351, apparently the idea is to get rid of the use of std::ostringstream and using fmt instead

MillhioreBT avatar Mar 26 '21 07:03 MillhioreBT

@MillhioreBT In my opinion, as long as there are usages of ostringstream inside that file, we shouldn't mix up different approaches. There should be a separate PR to replace all uses to fmt in iologindata.cpp.

rookgaard avatar Mar 26 '21 08:03 rookgaard

I would rather have the control be done in Lua instead, but I consider it an improvement over the current situation.

I also support the idea of ​​handling this in lua, as this seems to be a feature that anyone would want to manipulate for their own purposes and modifications ;), but as rani says, this is fine in any case

MillhioreBT avatar Mar 27 '21 23:03 MillhioreBT

It actually shouldn't be hard to move to lua, it's bunch of queries and some logic and we have ondeath/onpreparedeath/onkill events, so you can slap skull system there easily. Honestly I don't see any limitations to make this in lua.

nekiro avatar Mar 28 '21 11:03 nekiro

@nekiro @DSpeichert

rookgaard avatar May 12 '21 17:05 rookgaard

I don't see it being one system vs the other but rather as different parameters to the same system. We could even ship presets, e.g. make skulls in config.lua be a table and allow to set skulls = skullPreset.default or skulls = skullPreset.legacy

ranisalt avatar May 13 '21 16:05 ranisalt

If this is the correct behavior there is no reason not to add it to 1.5, and for those who like the old version, they could simply use version 1.4 along with the 10.98 protocol.

omarcopires avatar Jan 17 '22 12:01 omarcopires

We could leave both systems in place simultaneously - have per day/week/month limits + frag decay and red skull threshold.

But this is okay new behavior as-is.

DSpeichert avatar Jan 25 '22 23:01 DSpeichert

@DSpeichert I rebased it and solved conflicts.

EPuncker avatar May 08 '22 01:05 EPuncker

when merged is going to be added?

pasturryx avatar Jan 17 '23 17:01 pasturryx

I believe this system can be implemented in Lua. When a player is killed by another, recalculate the skull; using a storage value to keep track of skull duration and an event to clear it if the player is online when it expires, or check on login. We already have skull functions in Lua.

ranisalt avatar Jan 18 '23 13:01 ranisalt