DarkflameUniverse / DarkflameServer

The main repository for the Darkflame Universe Server Emulator project.
https://www.darkflameuniverse.org/
GNU Affero General Public License v3.0
642 stars 172 forks source link

BUG: server doesn't allow same skill in multiple slots #1339

Open Terrev opened 9 months ago

Terrev commented 9 months ago

Make sure you've done the following:

DarkflameServer Version

ours. thats all i got rn

Issue Description

if two items equipped in different slots share a skill, you only get the skill in one slot upon equipping both at once

https://explorer.lu-dev.net/objects/12601 Padded Toque of Healing https://explorer.lu-dev.net/objects/12742 Medic Shield https://explorer.lu-dev.net/objects/12733 Heavy Staff (via subitem 13804 Heavy Staff Left Hand Proxy) all use skill 1006 Healing Pulse but equipping the toque (headgear) at the same time as either the shield or staff (hand items) will not give you the skill of the second item equipped. things also get funky upon unequipping/re-equipping depending on the exact order you do things in

another example: https://explorer.lu-dev.net/objects/13582 Mole Whacker (via subitem 13934 Molewhacker Left Hand Proxy) https://explorer.lu-dev.net/objects/5995 Speedy Cap both use skill 335 Speed Boost and conflict with each other in the same way

image

90% sure this is a server quirk rather than a client limitation given these are all vanilla items, but lu works in mysterious ways

Reproduction Steps

equip 12601 Padded Toque of Healing and 12742 Medic Shield at the same time, look at your skills

Expected Behavior

you have skill 1006 Healing Pulse in both slots 2 and 3 at the same time and things also behave properly when unequipping and re-equipping the items in various orders and combinations

Environment

floor

oh and this is in fact untested on mainline dlu cause i cant rn and its 3 am and im not jumping through hoops to verify that at this hour lol goodnight

Terrev commented 9 months ago

emo-san forgive me but im just gonna slap this here cuz i gotta go somewhere asap but this may be relevant to the same systems. might as well look into both?

in vanilla there are npc items that have, for example, an itemType of head but actually dont attach to the same bone as standard headgear. or, likewise, itemType "neck" items that actually attach to the hips bone or head bone on the minifig

the client allows you to equip these items simultaneously - i.e. a standard "neck" item that attaches to the standard "clavicle" bone (equipLocation column), and another "neck" item (rusty's belt) that actually attaches to the "root" bone

however when removing skills during an item unequip, the server appears to judge which skills to remove based on itemType...? so if you equip shoulder gear with a skill (i.e. engineer rank 3 armor) and rusty's belt at the same time, then unequip rusty's belt, it removes the skill from the engineer armor because their itemType is both "neck"

these items were given out at the end of live and i can say with 99.99999% confidence that this did not happen then. not a big deal for the vanilla game, mostly relevant to us modders who are making more use of non-standard equipLocations for cosmetics

https://explorer.squareville.org/objects/8286/11 - rusty's belt, itemType neck, but attaches to root (hip) bone

https://explorer.squareville.org/objects/12304/11 - npc skeleton head small 1, itemType hat, but attaches to head bone (actual hats/headgear attach to hair bone)

https://explorer.squareville.org/objects/12305/11 - another npc skeleton head, this one is itemType neck but attaches to head bone. note the client allows you to wear these two skeleton heads with both neck and hat items, but NOT with each other, since they share the same equipLocation

jadebenn commented 9 months ago

I can try and take a look at this over the next week

Terrev commented 4 months ago

update - this is also the root cause of the problem with the plunger gun

https://explorer.lu-dev.net/objects/14378/11

in vanilla, it has an itemType of "right hand" but equips to special_l (left hand on the minifigure nif). the server should be basing what slot its skill should go into based on - quite unintuitively - the equipLocation of special_l rather than the itemType

equipLocation to skill slot mapping on the actionbar should be as follows:

special_r = slot 1 (primary skill) hair = slot 2 (headgear skill) special_l = slot 3 (offhand skill) clavicle = slot 4 (neck/shoulder gear skill)

the reason for this weird design choice comes down to a redesign to the actionbar system in beta, fairly late in development, and this was simply the best backwards-compatible choice they could have made to achieve the desired design

if an item specifies a castable skill such as an attack but does not have one of those equipLocations, the skill most likely should simply not be given to the player (we unfortunately have no way of knowing what live servers would have done in this case)