Updates for January 16th, 2022
Hello friends, and welcome to another big update post! Once again I'll try to keep it clean and concise, but I've got a lot to go over so grab your popcorn and dig in.
- Implemented NPC Appearance Block
- This is what handles NPC transformations, or "transmogs", allowing an NPC to change its visual identification/appearance. For example, a sheep after being sheared would be transformed into a sheep with no wool.
- Added combat and drop definitions for Rat (level 1), Ram (level 2), Chicken (level 1), Cow and Cow Calf (level 2), Giant Spider (level 2), Imp (level 2)
- All of their information was hand-written from the OSRS wiki, and I do plan to do this for most NPCs. From previous experience, dumping this information all at once lead to some weird nuances that I really don't want to worry about or go back and fix.
- Fixed various issues with 12850 spawns, such as walk radius not being set or being spawned in weird coordinates (mostly mobs such as sheep, goblins)
- Added the Crate of Hammers object plugin
- Added spawns for region 12595, which is the chicken farm just north of Lumbridge
- Got a start on the Melee Instructor plugin
- Once again, there is more dialogue than I care to admit to write out. I'll come back to this one when I've run out of "fun" things to add to Lumbridge, as I'm still sticking to the plan to emulate Lumbridge 100% before I move onto something like Draynor or Al-Kharid
- Added support for Constitution
- So I had the choice to keep the old system where hits, hitpoints are not 10x. I decided against this, I'm going for full emulation here and so I had to take on the fun task of separating hitpoints level from lifepoints. I'm happy to say that I think I got it done properly and won't need to make anymore changes. Included in this update was also support for damage also being 10x, which means I had to do some work on the way max hits are calculated. I had it at random(1.0, maxHit * 10) for awhile and realized that I would have it choosing a random number between 1, and say 550 which is too large of a range. So what I ended up doing was nextDouble(0.1, maxHit) * 10 instead, which means it's still rolling 1-100, but then multiplying the damage after the fact. With this update as well, npcs have had their lifepoints updated. Another big thing was combat experience, I took a quick peek at Matrix and I think they have the combat experience formula correct, but I'm still not 100% sure. This will require more research.
- Combat improvements
- I mentioned before that combat was going to need a lot of work, and I'm happy to report that I think I've made significant progress. There was a weird stall that would happen and animations would become out of sync with Melee combat. I'm happy to report after some testing, I think I managed to fix this. I also made various changes to delays and located the issue with diagonal combat. I think implementing Blurites pathfinder will solve the diagonal combat problem, but that's a big task I'm waiting for some more time to do. Along with Melee combat, ranged combat also got some love with the addition of support for the Rapid style, fixing some weird glitches with animations and verifying that the cycle is being done properly. All in all, it's an improvement but there is definitely still work to do. We'll be spending a lot of time with the core of combat, but I'm happy to say that it's "usable" in the sense that we can start writing specialty npcs such as Dragons. I should note that I have zero (0!) combat experience, even playing the game so bare with me as I navigate this new territory!
- Added support for the Item Box dialogue
- Now here's a fun one! I've gone ahead and converted over the Item Box (or better known as the skills dialogue) where you select items to make. I was scratching my head on how to deal with this when it turned out it was already supported in RSMod. Huh, go figure. I took the time to convert the function and then got to work on adding some skill related content...
- Added Gem Crafting, Spinning Wheel
- With the addition of the Item Box, we now have Gem Crafting and the ability to use Spinning Wheels! I took great care to ensure that this was as close to 1:1 as I could get it, right down to the way the Spinning Wheel displays the required item on the Item Box, and interpolating the chance to crush Opal, Jade or Topaz. (Thanks ChatGPT for helping me out with learning some array related code!). I reckon I could use a little bit of human insight into retrieving raw items on the Spinning Wheel but I'm happy with how it turned out for now. With a bit more work, I reckon crafting might be our first 100% skill as it's just been so fun to add these things to Tek5. I plan to also get cooking, and fletching started now that the Item Box stuff is moving along.
- Added support for the XP Orb Counter
- This also includes the ability to reset the counter
- Implemented OpHeldU Packet (or better known as Item on Item), as well as the MapAnimProj packet (or better known as Projectile)
- Added Sheep Shearing plugin
- Added a "static" flag to NPC spawns
- This flag when enabled makes it so NPCs don't face you when you speak to them, this was useful for the Herald Of Lumbridge, Doomsayer, Lumbridge Guide and the Lumbridge Musician
- Various bug fixes, including fixing death animations, IfButton1 opcodes, and more
As always, here's the juicy media! Christmas is over, so we say goodbye to our winter theme