Avatar
Welcome to Avernic!
A server that's crafted from passion, and designed to respect your time!
Internet Explorer: Internet Explorer is not supported. Please upgrade to a more modern browser.
elfinlocks Admin
There are no wall posts here yet.
Registered:
6 days ago
Last Seen:
17 hours ago
Profile Views:
6
About
This user has not added any about fields yet.
Latest Posts

Hey everyone,

It's been a little while since my last big list of changes (if you don't include the websites and it's direct ties into the Server - 11 Days on Discord), which might as well mean I've quit - but that's because I've been in the deep depths of the Server, untangling some very old, very odd, and truthfully brittle code.

 


1) NPC Architecture Rewrite - The Biggest Change So Far

When I started implementing TOB (Theatre of Blood), it became obvious that some of the earlier NPC logic I had carried over from Ancestral needed a porper overhaul before moving forward. The original prototype worked, but it was built very specific for certain NPCs, and didnt' scale well once more complex encounters came into play, for myself this was a notable limitation in writing bosses for COX, which I fell into a bad habit, and labelled it "it works for now, I can always go back and fix it".

 

A good example of this poorly ported code was for the Olm fight, as a test case.

 

How the early set-up worked:

  • The head and two claws were spawned manually
  • Each npc was stored inside the raid's Party object rather than having a natural relationship to eachother.
  • The rising/idle/death objects were also spawn manually and stored on to the Party.
  • A single script handled:
    • Which NPC belonged to with component
    • Which objected belonged to which NPC
    • The animations
    • The transitions
    • The phase setup

Put simply:

NPCs and their objects could only interact through the raid system because the the engine didn't understant that these mobs were actually related.

This worked for testing, but it was never going to hold up once multiple bosses or raids were layered on top of it.

The new approach

The NPC System has been rewritten so the engine itself understands relationships between NPCs, other NPCs and associated objects.

Now:

  • The boss spawns normally.
  • The claws are spawned using a new core minion system, so they are actual minions of the boss, rather than unrelated NPCs being tracked externally.
  • Objects for each NPC are spawned directly onto the NPC rather than onto the Party (if you didn't know, Olm's individual NPCs are invisible, and the actual claws and head are objects, the NPC's control).
  • Objects now follow the lifecycle of their NPC
    • Spawned with it
    • Removed with it
    • Updated by it

What this means during a fight

The flow now looks like:

  • Spawn Olm's head - Spawn its head objects with it and associate it to the NPC.
  • Spawn Olm's claws as minions to the Olm's head - Spawn their objects directly to each claw
  • No more large raid-level script juggling NPCs and objects
  • The fight behaves the same, but the implmentation is much cleaner, safer and easier to work with (Hueycoatl in the future anyone?)

The rewrite also opens the door to cleaner integration for future raid bosses, and any multi-part encounters, going forward, including revisiting Chamber of Xeric bosses and implementing them exactly how I imagined they would be.


2) Distance Checks, Hitboxes & Large NPC Logic

Another area that needed a major cleanup was how distance and size were being handled for large NPCs.

Originally, things like melee range, object interactions and movement checks relied on a mixture of center tiles and special-case logic. It worked, but it caused some pretty odd and wild edge cases, a classic one being you could sometimes melee a massive NPC from weird angles or distance simply because you could click it (this is the result of cobbled together legacy code from Ancestral being ported over, if you played Ancestral, you'll remember this from the Verzik fight, sometimes you could hit her, sometimes you couldn't, all because you were stood on one odd tile).

The server now uses proper Chebyshev distance checks across the board, which means:

  • Large NPCs finally have accurate hit boxes
  • Melee range is actually melee range
  • No more random exceptions in the code for specific NPCs
  • Pathing and positioning behave more consistently.

This might seem small, but fixing it now means that future mechanics that rely on spacing, reach or AOE Checks work correctly without having to fight or hackily override the engine.


3) NPC Combat improvements, Tasks & Cooldown System

With the NPC architecture fixed, it made sense to modernize how NPC behaviour itself is driven.

The old cobbled together system relied on a mix of timers and makeshift logic scattered through various controllers. It wasn't terrible, but it wasn't good nor clean either - especially once multi-phase bosses and object-driven mechanics come into the picture.

Now we have:

A new tasked system

NPCs can schedule actions cleanly:

  • Delayed attacks
  • Multi-step phases
  • Object animation triggers
  • Time-based attacks
  • Telegraphed attacks

A new cooldown system

Instead of hidden timers baked into scripts, cooldowns are handled consistently across all NPCs. This makes debugging easier and prevents bosses from doing unexpected rapid-fire behaviours.

NPCs can communicated with related NPCs and Objects

Because the engine now understands relationships (Parent NPC, minions and attached objects) scripts can do things like:

  • Check whether both claws are alive before Olm phases
  • Update objects based on NPC State
  • Trigger mechanics when a minion dies

Previously this required forcing everything through one giant raid controller.

Now the system handles it for us.


4) Text Engine Rewrite

While updating the broadcast and announcement system, I ended u prewriting the entire text engine, What started as a few QoL tweaks turned into a full hybrid engine combined behaviour from 317, 474, 508, OSRS and RS3.

This gives us full control over every character rendered on-screen.

New text engine features:

  • Multi-line chat support
  • Automatic icon aligment
  • Gradient text
  • Character-by-character color transforms.
  • Sprite interop
  • Nestable text effects
  • Adjusting effect parameters (speed, radius, intensity).
  • Animated patterns:
    • Rainbow
    • Christmas
    • Halloween
    • New Year
    • Pride
    • Custom themes
  • Support for blur, drop-shadow, neon pulses, glow, etc.

This might seem like overkill, but it's a foundation we can use for:

  • broadcasts
  • world events
  • announcements
  • skilling messages
  • anything UI-related going forward

It makes everything cleaner, and more of a game then a poor emulation.

 


5) New Broadcast System

Using the new text engine, the broadcast system is now significantly cleaner and more flexible.

Highlights:

  • OSRS-style announcements
  • Support for icons
  • Support for URLs
  • Works for:
    • Rare drops
    • Purples
    • Achievements
    • Events
    • Anything that deserves a global broadcast + message.

6) Drop System Rewrite (from prototype to Full Engine)

So quite early on into development, I wrote a drop table system that was inspired by another developer's released called DTX. it started as a prototype mainly for boxes and chests. It worked fine for that purpose, but it wasn't enough for bosses, raids or bringing back legacy features like damage thresholds or shared drops. Because of that, the entire system has now been completely rewritten, reshaped and updated into a full engine.

What the old system handled:

  • Mystery boxes
  • Chests (Crystal chest, Larran's chest, etc.)
  • Single-roll and multi-roll tables
  • Gauranteed loot
  • Nested tables

That's it. Good enough for testing, but nowhere near enough for the kind of content we're building.


What the new system supports

The rewritten drop engine now covers everything from basic NPCs to full raid rewards and it supports multiple ways of distributing loot depending o nthe encounter.

Here's a breakdown of the new behaviours and they actually work in-game:


Single Killer

Only rthe player who dealt the most damage receives a roll on the drop table. Nobody else gets anything, this is the tradition boss-drop setup.


Any Damage

As long as you've dealt at least 1 damage, you qualify for loot.

  • Each player gets their own roll.
  • Guaranteed drops go to everyone
  • One player get a rare while another gets regular loot.

Useful for open-world of event-style NPCs where multiple people are contributing.


Damage Threshold

An NPC can require a minimum amount of damage before you qualify for drops.

If you don't meet the requirement, you'll get a message telling you:

  • How much damage you dealt
  • What the threshold was
  • and that you did not qualify for loot

Good for preventing leeching and enforcing participation.


Shared loot

Anyone who deals valid damage receives their own roll of the drop table, only the MVP receives garuanteed loot.


Raids

Raids use the same new system but with additional logic for purple chances and table nesting.

  • Tables support OSRS-style nesting (Common -> Uncommon -> Rare)
  • Purple chance is influenced by:
    • Personal Points
    • Scaling
    • Difficulty

Minimum and Maximum Purple Chance

  • minimum chance ensures low-point runs still have a shot.
  • maximum chance ensures you can't manipulate the system into a garuanteed purple.

Reward Safety

Your raid reward is tied directly to your player, preventing disconnect or crashing related issues.

Broadcasts

All raids now broadcast in two stages:

  1. Upon completion - the fact a player has received a purple and from what raid.
  2. Upon claiming: the actual item is announced, no matter how many minutes, hours, days, weeks or months have passed.

Death Handling Cleanup

To ensure drops works reliably, all death-related systems were clean up for:

  • Mobs (the base class)
  • NPCs
  • Players

This fixes timing issues and ensure drops, kill credit, logs and mechanics all line up correctly.


Summary

That should bring everything up to speed. Most of the work from the last couple of weeks hasn't been the kind of thing that shows well in screenshots or short videos, but it's some of the most important work so far. A lot of early systems were still using temporary setups from when development first started, and instead of building new content on top of them and calling it a day, to deal with the consequences later, I've taken the time to rebuild those systems properly, ofcourse in the future they'll need updating as the content grows in scale, but it won't require a full rewrite.

The NPC rewrite, proper distance and hitbox handlign, the new task and cooldown system the updated combat behaviour, the text engine overhaul, the broadcast system, the fully rebuilt drop engine and the death handling cleanup all form form the backbone of the server going forward. These aren't isolated fixes - they're the foundation for most content that comes out in the future.

Now that these pieces are finally in a state they should be, development on actual content can move forward the right way. Chamber of Xeric's combat scripts will now be given a lick of paint, to match exactly how I intended them to be. Theatre of Blood development can continue without running into engine limitations, and Tombs of Amascut can be started on a clean and modern base. Meanwhile, the internal team is focusing on what feels good, what doesn't and what needs adjusting to match the vision we're building toward.

On top of all that, I've been dealing with some personal health stuff recently, so I've been more focused on development than being social or posting updates.

I know the silence may have looked like nothing was happening, and I’m sorry for that - this wasn’t the loud kind of progress. But it was the necessary kind. With these systems finally in place, the pace of visible content will pick up again, and we won’t be rewriting things every time something new is added.

More updates to come soon!

 

Enjoy some pictures & Videos:

https://www.youtube.com/watch?v=DihXonvpNos

https://www.youtube.com/watch?v=v2-xMxVWTIc

Thank's for Reading!

Elfinlocks

Reactions
Received Given
👍 0 0
👎 0 0
😐 0 0
🛠 0 0
🌈 0 0
⭐ 0 0
Reaction score: 0
Profile posts score: 0
Forum score: 0