Game Updates: The Unshackling Update

That’s what I’m calling it — because it frees me from many memory constraints I was stuck in. This is a looOOOOooong post, so grab a snack, a drink, and sit back.

This is a gigantic under-the-hood refactoring of internal processing of the scripts. You may or may not know that for a long time I have been struggling with freeing up script memory on the core processor of the HUD. It really reared it’s ugly head here at the end of spring — where I made the smallest of changes to the code, and it just crashed in the middle of fight night.

In 2019 I had already made two significant under-the-hood updates, which allowed me to squeeze a few more nicer updates into the HUD. The gains in memory weren’t as big as I had hoped. Even then I knew that the projects I wanted to put into the HUD weren’t possible unless I made much more significant updates. One of those such updates was a re-imagining of the Dot system and processor. So I thought, if I could remove the current DoT processing, I’d free up room for other things and have that new system in place. A lot of the time when thinking about the HUD is what I had wanted to see with updated DoTs, and as such much of the pandemic time was spent thinking about that. Now, for the past few months when I wasn’t working on Northgate, I was working on actually putting together this update.

Most of of the update was just thinking about data structures, congealing thoughts into code, and migrating code where I could. Not including the old functions I’ve migrated to the new script, this update is about 400 lean lines of new code — resulting in about a half a scripts worth of memory to process this newer DoT system, and at the same time freeing up 10kb (out of 64kb) in the core processor.

Just so you understand how absolutely game changing this update has the potential to be, I am going to thoroughly explain how the old DoT system worked — and then I am going to explain what the new system is capable of.

In the old system there were 5 types of hard-coded DoT effects that only affected your health, of which only 4 were ever really used. They were Fire, Poison, Bleeding, Radiation, and Healing; the Healing was used only a handful of times ever. The amount of damage each DoT did was always the same. The total time each was active was always the same. With the most recent update the chance to naturally heal a DoT was the same. The way the DoTs compounded when you got more than one of them was the same. DoTs were in effect very static predictable things and it drove me nuts forever. I had always thought, why can’t we have small cuts, or gruesome impairment bleed effects? It’s not much of a system when you think about it, but I still have yet to see anything like it in Second Life — strange. Someone please prove me wrong by showing me another similar system in SL.

Phase One

Today’s release is going to be Phase One of the update. It is designed to emulate how the old DoT system was, by translating data from the old DoT and processing it through the newer methods. This new DoT system is more of a co-processor of stats, than just a system to process dots. It gets detailed information on what could be a DoT, and processes it accordingly. All of the code is done that’s needed for this emulation, and much of the new features are ready to go. But still some later planed features of this are actively being developed; but mostly done. I will note them in italics below.  Here are all the updates to the system:

  • DoTs can now damage any of your stats (heal health, hunger, hydration) and are planned to affect future stats not in the HUD yet. Hydration is a long dormant stat with no actual effect on the player… yet. There will be an update to food items in the near future, and food will effectively become hunger and hydration DoTs.
  • Metabolism no longer has a guaranteed chance to heal a DoT. DoTs are programmed to decide if they’re allowed to be metabolized away. If they are, they have different chances per tick to heal by whatever the DoT is programmed to have. For instance Radiation DoTs no longer can be metabolized away, but in a near future update Bleed DoTs will have a better chance to heal than most other DoTs.
  • DoTs can “tick” at vastly different intervals now. The minimum time for a DoT to tick is half a second, and the maximum is 34 real world years. Basically from here to infinity. This let’s us have seldom affecting dots, or others that could reasonably do “something” every few minutes.
  • DoTs can still do static damage, or instead they can do dice-based-math damage now. For instance every tick may be 4d6+4 points of damage — that is if you roll four six sided dice and add up the sum plus 4. This allows for random-ish damage within statistical averages.  I anticipate that some time in the future the dice will be nice to you, other days they’ll bend you over the barrel head.
  • DoTs can place a cap on any of the stats you have. If you have a supposed 50 points of health, but a cap of 25 points, you would then only have 25 points and could not heal beyond that. I’ve used this effect externally and jankily in the past, but having it internally in the HUD itself is a blessing for me.
  • When a DoT is applied but you are already suffering from it, it can do one of MANY things:
    • It can compound in the style of classic DoTs. Basically old dots lasted longer, and did more damage.
    • It can simply refresh itself with it’s base stats, and just start the counter over.
    • It can just add a duplicate of itself to the stack of current DoTs kicking your butt.
    • DoTs can remove other DoTs.
    • It can EVOLVE or DEVOLVE into another completely different DoT or set of DoTs. For instance if you were suffering from a hypothetical “Small Cut” DoT, if you got a supposed stack of (whatever number) of them, they could evolve into a “Big Cut” DoT, with more punishing stats.
    • More effects are being added as I think them up.
  • A DoT may also EVOLVE or DEVOLVE when they naturally end. This lets us have DoTs that get worse or better as they progress. For instance if you had that “Big Cut” from earlier and you endured it’s full time, it could then DEVOLVE back to a “Small Cut”.
  • DoTs may not necessarily end, they could go on forever, even surviving taking your HUD off. This sets up a base framework for diseases and addictions.
  • * DoTs may spread to those nearby. Range, chance of contagion, and the specific DoT a person recieves are all defined by the original DoT. More stuff for diseases and being on fire.
  • Items as well as player interactions may give a chance to heal (over time) or completely just heal existing DoT effects. Again, this is for diseases and addictions.  Who remembers the Giftmas ’16 Narcotics collectable?
  • If a DoT isn’t known to the system due to other future game updates, the HUD can look it up in the SL Servers and add it’s information to the HUD. This allows for a vast library of DoTs that far exceed what any script is capable of storing. That means potentially hundreds of different DoT effects and diversity.

If the sum of your DoTs total damage per tick is more than 2% of your total health, it will now refresh the combat timer. This means you’ll have to wait out most DoTs before you can safely log out. Fortunately the updated Radiation DoTs damage is so low that it doesn’t trigger this.

As I mentioned, this is Phase One of what I estimate to be three distinct phases. It’s focused on making sure things perform about the same as it was, and finishing the features above. The HUDs are going to get many updates in the coming weeks. As we go along through this update, the Classic DoTs will be getting upgrades that do same-ish overall damage, but the underlying mechanics of how they perform will drastically change.

With this update we’re going to start right out of the gate with changes to Radiation. Radiation DoTs now last 16x as long, do twice the original total damage over that time; but they no longer compound damage if you get another, and can’t be naturally healed — but a medkit CAN clear it up.

In the next few updates are what consist of Phase Two:

After that I am going to work on Fire Dots, where they will start very small and evolve to be pretty big. They’ll also use dice based damage with a wide spread. More fire DoTs make the fire EVOLVE to faster. They’ll also be increasingly contagious — so if you’re a giant ball of flame you can take someone with you. I also plan to make it so if you’re at least waist high in water they’ll go away. In addition, arena gas tiles or the healing masheen should put them out.

Bleeds will start big and DEVOLVE to get smaller, and also use the dice method. They will be buffed to naturally heal better, but the highest difficulty to naturally heal will be the start of the bleed. As they DEVOLVE they will be easier to naturally heal.

Classic Poison will become long lasting injuries that have long between ticks that hit HARD with dice based damage. They may also cause very minor dice based hunger/hydration damage.

Phase Three is a graphical HUD update:

The look of the HUD will change drastically to be more minimalistic, but also make way for “DoT Plates”. DoT Plates are counters that appear on the side of your screen with the 5 most recently applied DoTs, with their names and a countdown bar. That way you can see how long something lasts (in an abstract bar that empties), and what the DoT is called. This phase will also start introducing completely new DoTs and effects into the game.

Other Major Changes you might notice:

  • The HUD now updates twice as fast, giving you a more accurate glance at your situation.
  • The HUD has one more script for a total of 320kb of memory, and it’s idle script time has gone from 0.045 milliseconds to 0.054 milliseconds.
  • Due to several bugs on the SL Server but one in particular, visible DoTs on you and other players are purposefully disabled until this bug is fixed: https://jira.secondlife.com/browse/BUG-229301 . I need to make significant changes to the emitter, and attaching updated emitters will always make your script memory go up, even after they detach — you will still have “ghost memory” on your avatar until you change regions or log out. As such the HUD could disable due to using too much memory on your avatar.  Blood splatters and heal icons will still rez.
  • HUD Indicators for DoT effects now only appear when they’re actually doing damage. This results in a flashing effect that gets them noticed more. This change is temporary until Phase 3 where they will be obsoleted.
  • Metabolism has been adjusted ever so slightly. I did mention I might do this in the last major update, so I am making very small changes and watching the results. Without giving exact numbers, your hunger bar will deplete a very tiny bit faster overall; you may not even notice. However you can metabolize and heal a very small fraction of what you could while running, instead of nothing at all.
  • How hunger affects your chance to naturally heal DoTs has changed. Previously you could not naturally heal a DoT if you were hungry at all. Now you can heal a DoT at any hunger level. But the hungrier you are, the harder it is to succeed at naturally healing. Recently using a Medkit still doubles your chance to heal.
  • Fall damage can now apply more bleed DoTs than before, depending on how far you fall. A fall into the Fissure WILL kill you, but not before you suffer a lot at the bottom.
  • Depending on region lag, the previous scripts did not always process DoTs well.  Since the new script is a co-processor to the main script that operates with a different mechanism, you will receive the full bane or boon of the DoTs.  They may appear to be stronger, but they’re just operating as intended — before uplift.

Please report bugs or issues you may encounter!

Let me know if anything seems wrong or broken with the HUDs.  I will be power patching them as I work on the additional phases, and would like to prioritize any bugs that come out of these updates.  I do thoroughly test things, but sometimes do not see everything the players see.

Thanks for everything everyone, and have fun!