NoCode-NoLife / Melia

Open-Source MMORPG Server Emulator
GNU General Public License v3.0
267 stars 93 forks source link

Adding Red Orb Pets #292

Closed Terotrous closed 3 months ago

Terotrous commented 3 months ago

Increases the Orb Pet system to allow you to turn Red Orbs into a second type of pet, and also enhances Blue Orbs. The idea is that Blue Orb monsters give you a passive buff, while Red Orb monsters can use an additional active skill, and you can have one of each. There are a lot of new customization options related to this functionality, including one that lets you scale the orb pets to the player's level, so they don't become uselessly weak once you level up a bit.

In the future, the data relating to what buff or what active skill these monsters have would be stored in its own database. There's really nothing stopping that from being done now beyond the fact that I want to get this approved before I add hundreds of entries.

One thing to note is that this PR also fixes a pre-existing bug where monster stat overrides would prevent buffs from being applied, which is bad because monster stats are always overridden by spawners.

Terotrous commented 3 months ago

I made the changes you requested, but I do see your point about this potentially being too far "out there" for the main branch. I mainly put this together as a proof of concept to look for various issues related to minion handling and mob skill usage and such. The idea of turning this into a custom package is an interesting one, but I definitely have no idea how to do that. If you wanted to use this code as the basis for a test of custom packages or something, please go right ahead.

exectails commented 3 months ago

It's unlikely that I will pick up this specific PR to turn it into a custom package. It would be interesting for me to see you attempt this, because I feel like this type of customization is up your alley and we didn't have any contributors make heavy use of the customization aspects yet, but I'm not personally invested enough in this specific feature to spend a lot of time on it.

Terotrous commented 3 months ago

Well, I would consider doing it, but without an example of how to make a custom package I'd have no idea where to start.

exectails commented 3 months ago

The first step might be to take control over the monster creation, as that's vital to modifying their behavior. To do this, all you would do is copy the existing scriptable functions, copy them to a new script in the custom script folder, and modify them to your liking. Afterwards, make the server load that script (scripts_custom.txt) and the functions should automatically get used.

Terotrous commented 3 months ago

We'll try converting this into a custom package instead.