Replies: 1 comment
-
tl;dr for the below: automated enumeration or conditionals. This is why I never want to see a non-automated lua enum for every mobskill name in the game. The names are already in the sql, so if we have mod a name and we want an enum for them, we should generate off it and regenerate as needed. Its also stupid easy to let 2 very different skills share a name though and use a conditional in the script - we have already done that a ton often for NMs thats have a specific change to the skill, usually by pool ID, but we now have a way to do things by name a few newer scripts use and I wouldn't mind seeing older ones converted. If we use separate naming to use separate skill script instead of conditonal'ing the differences, we'll need to settle on some conventions. probably more than one depending one why we had to rename it, or else just appends a number e.g. Random DSP lore: Long ago we used to be able to make as many differently named duplicates as we needed even for the same ID even though that's not what retail does, but we're currently set up for 1 id = 1 skill and it just happens that SE created duplicate names when they make copies before editing a monster (fafnir/nidhog to not fly but there is unused skill IDs for flight related things in their list on retail, because they were created based off an identical entry that DOES fly. Yay dev kit limitations!) AT that time though, mob skill lists were annoyingly tied to family IDs forcing you to make an entire new family just to have a mob that didn't have the same list of skills. This is why so many mob family IDs look bonkers or skill lists look like duplicates. Coz they were. Tons of tech debt yet to be cleared away. I'd jump for joy for an update to the system that brought back allowing duplicate skill IDs tying it to some internal ID of sorts that we enum'd instead, but that's unlikely to happen I think. Lot of work for low-gain. |
Beta Was this translation helpful? Give feedback.
-
I poked Zach about this and he said to bring it here:
Currently in the codebase we hardcode triggered or scripted uses of mobskills using a numerical value which is obviously hard to tell what is being used without lookup. For example:
mob:useMobAbility(645)
This is the mob skill body - slam
We have gone through and replaced hard number values for most other things with enums and I would like to discuss doing the same thing for mobskills. (I will code it, but I don't want to move forward without agreeance.)
The only sticky situation we will run into is some mobskills having the same name - So we will have to get creative with names or add more description to the enum name.
For example: Body Slam
645 = body_slam_dragon
1171 = pl_body_slam
or the 14 instances of berserk in the mob_skills sql that we will have to figure out what to name them later on down the line.
Beta Was this translation helpful? Give feedback.
All reactions