Implementing Trinity | Patreon Weekly #296
Added 2025-02-03 15:00:14 +0000 UTCHey Patrons, in this weekly I’m going to go over some of the particulars for the implementation of the Trinity armor ability, which is hopefully releasing in the next couple of days.
Trinity Implementation Details
As explained before, Trinity is an armor ability that is entirely defined by its spells, and so ends up being a bit like 3 abilities in one. I also ended up settling on Trinity emulating the effects of items you have previously encountered in your run. What that ends up looking like is three different spells, that each work on different item categories (body: enchants/glyphs, mind: wands/thrown weapons, spirit: rings/artifacts). you assign an effect to Trinity with these spells, then trigger it with the armor ability itself.
This is very interesting and flexible, but unfortunately has also been a bit of a nightmare to design and implement, which has slowed things down considerably.
Firstly, before anything else, the game needs a way to track what items you’ve discovered in a particular run. The current catalog system is for all runs combined, so I had to add some new tracking code in BETA-2.2 that lets the game remember all the items you’ve seen that run.
Another major stoppage I encountered was a result of realizing these effects were all competing with each other too strongly. By letting Trinity only hold one effect at a time, the player is encouraged to pick one spell, max it out, then max out heroic energy, and otherwise ignore the other two options. I’ve decided to remedy that by letting Trinity hold one effect from each type, and letting the player pick one when activating the ability. These effects still all compete for charge cost, so I don’t expect this to be that big of a buff.
The process of selecting things to add to trinity also requires some new interface design. Here’s how that looks for picking a body form effect:

Then, once you’ve loaded effects into the ability, using Trinity opens up a window that lets you pick a specific effect:

Another issue comes from Artifact effects, which are all pretty variable and require me to essentially come up with case-by-case logic for each artifact and Trinity. The others are all pretty easy by comparison: rings, enchantments, and glyphs are activated for a set amount of time, and wand and thrown weapons get one zap or throw per use of Trinity. I’ve got some partial plans for each specific artifact but want to get everything else working first.
Finally, another balance consideration I have is wanting to avoid people just using the ability to get more of the things they’re already using. To counter this, I’ll likely adjust trinity so that it can’t trigger effects that you already have equipped.
Hopefully I’ll be able to nail down these particulars and get Trinity released to the beta shortly, possibly with no artifact effects initially.