NokiMo
outsiderartisan
outsiderartisan

patreon


Combat System Deep Dive - Hex Devlog #4

I went back and forth trying to decide how best to write this post. I thought about approaching it as more of a code review, showing off the various components that together make up the combat system in Hex, but I think that would be less interesting for most people than a simple overview and description of the game systems at work here. So we're gonna look at the combat system from a player's perspective and I'll show off the mechanics and describe a bit about how it works and how I intend for it to feel.

Design Goals and Planning

Anytime you're working on anything that takes more than a few days, I think you really should have design goals and principles in place. Making combat more of a focus in Hex was something that sprung directly from my goals for this game itself and its spell and MP systems. I knew I wanted combat in Hex, but before I could commit to such a massive undertaking, I first wanted to see if I could actually put something together on a small scale.

The combat system in Succubus Stories came from this experiment. At the time I first started designing combat for SS, I was initially planning the combat to be featured in a flashback where the player would play as Rachel. Then I switched to making Priscilla the playable character. Then I got a brain blast and made it more of like a "heal slut" concept! Point is, the combat in SS was an experiment and jumping off point. However, no code from this system was re-used in Hex.

Armed with the knowledge I gained from creating the encounter system and combat system in SS, I felt that I was skilled enough a programmer and designer to strike out and make something more unique and interesting.

My core design goals are pretty straightforward. First, I want combat to feel fast and frenetic in spite of being turn-based. Second, I want to design something with a low skill floor and a high skill ceiling. In other words, I want players who enjoy the combat system to feel like they're rewarded for playing well, while not overly punishing players who aren't that interested. While Hex will feature an easy mode, I still thought designing with this in mind was better than relying on just modifying damage values, and I think I’ve come up with some clever solutions and mechanics in response to this goal.

Let's keep these two core goals in mind as we discuss how combat works in Hex.

Spells, Auras, and Schools of Magic

While you have a basic dagger attack (and there will be a number of unique daggers you can find and equip with a variety of special effects), spells are the core abilities you will use in combat. You can equip up to two schools of magic in combat, though this will eventually increase to three. Each school has three spells and an associated aura. Auras are basically status effects, but I decided to use a different term because they don’t work how most status effects in most other games work.

Auras can be inflicted or granted by spells, but can also be converted into different auras, or consumed to enhance certain spells. Auras aren’t on timers like status effects in most RPGs, instead they are stacked up to 99. At the end of every round, every combatant loses 1 stack from each of their current auras. The number of stacks an aura has enhances its effects and enhances the effects of most spells that interact with that aura. If it helps you to envision how they work, I modeled them after the idea of “counters” in certain TCGs. And, in fact, the idea behind a lot of the spells is modeled after TCGs, too.

Your character will also have a level of expertise with each spell school, which is increased by casting spells from that school. Increasing your expertise unlocks new passive effects which are always active, and enhances the damage and crit rate while reducing the MP cost of the spells in that school. This allows for some light specialization, but also encourages you to try different schools once you’ve maxed out what you have equipped.

Spells themselves are more complex than you might expect. For example, this is the definition of the black magic spell Lance:

“Deals light magic damage. High critical hit rate. If the target has fewer than 10 wound stacks, they gain 20. If they have more than 10, they gain 3-6 wound stacks instead.”

In addition to dealing damage, spells add, convert, and even consume auras. Lance is a great opener; you inflict a number of wounds right off the bat. You could follow up with another Lance or two, or use the spell Fangs:

“Deals moderate magic damage. Inflicts 3 wounds. If the target has more than 25 wound stacks, this spell inflicts 9 wounds instead.”

The wound aura causes targets to take damage at the end of every round, the amount of damage is based on the number of stacks. While the damage per stack is very low, the additional damage is quite noticeable after a few casts of these two spells. Once you’ve got a lot of wound stacks on the target, you can follow up with Cleave to consume them for a sizeable damage bonus:

“Deals heavy magic damage. Damage is increased by the number of wound stacks on the target. Consumes all wound stacks on hit.”

And this is just one school. Black magic itself is fairly insular; it’s magic you start the game with and it’s intended to get you used to the idea of managing auras. The other spell schools feature a much greater degree of crossover.

Curse magic has a spell that lets you convert wound stacks to rot stacks. Rot stacks lower defense and can be hard to build up, so pairing these two schools can work quite well. However, lunar magic is actually also enhanced by the target’s rot stacks. Primal magic (which is basically fire magic) also burns away rot stacks, converting half of them into ember stacks which enhance elemental damage.

Combined with different daggers with their own powerful effects, and with items and other special abilities the player can learn (most of which are “succubus magic” and revolve around being lewd and seductive), the goal here is to allow players to experiment and discover crazy combos and create interesting builds.

The risk of this system is just that the spells are complicated, as are the interactions. As are the auras. As are the dagger effects, oftentimes. It does require reading and understanding your spells and their effects, the same way you’d need to carefully read and understand a card effect in a TCG. I know I keep making that comparison, but I think it is a good one. Just like those games, some spell effects get quite far into the weeds. This kind of design requires more from the player than just three fire spells in varying strengths with varying MP costs that are strong against specific enemy types, and that can be a sticking point.

Damage and Deflection

Hex’s actual damage calculation is rather complex (probably unnecessarily so), and factors in both parties’ stats, the skill or spell being used, and the damage and armor types of the attack and the character being targeted. There are also critical hits, and many auras also play a role in this calculation in one way or another.

Perhaps the biggest thing to talk about when it comes to damage is deflection. The player character in Hex can spend MP to use magic to deflect any physical attack in the game. The difficulty of this deflection is determined by how powerful the attack is, with more advanced skills being harder to deflect, and critical hits make deflection harder as well.

A perfectly timed deflection costs 5 MP and completely nullifies the attack; no damage is taken, no auras are changed, nothing. If the attack cost the enemy MP or had a cooldown, those still take effect, but no actual negative effects are felt by the player. Deflecting too early still nullifies the attack, but it costs much more MP (25). Finally, deflecting too late or choosing not to deflect at all will see the player take full damage, as you could probably guess.

If you don’t have enough MP, you can still deflect. If you score a perfect deflection, you will still completely nullify the attack, but early deflections will only partially nullify the attack, reducing its damage significantly, but aura changes and other effects will occur as normal.

When it comes to non-physical attacks, the ability to dispel magic will eventually be a thing, but it will work differently from deflection, and this is an ability you will likely gain much later in the game. Spellcasters are extremely dangerous, really any enemy with spells of any kind is. The sanction aura causes targets to lose MP, raises MP costs, and reduces spell damage, and is going to play a critical role in suppressing spellcasters to keep the upper hand. Lunar magic’s madness aura also helps mitigate damage by causing targets to miss their turns, and is also great for defensive play against enemies who can cast spells.

Flawless Victory

Because of deflections, it is possible to get through many battles in Hex without taking damage, and this is something I plan to make a major feature of the game. In addition to enhanced G and XP rewards for flawless victories, these will also have story ramifications. Defeating a powerful enemy without taking a single point of damage is something people will take note of and react to.

For example–and this isn’t an example from anything in the game currently, or anything that’s necessarily planned–imagine fighting the leader of a local group of bandits and so completely styling on his ass that the local bandits come to fear and respect you. Maybe they start leaving G or other offerings outside your home in the hopes you’ll turn a blind eye to a big heist they’re planning. Or maybe if you catch them sticking up a caravan you can ask for a percentage or even run them off without a fight.

I want flawless victory to be a reward for players who decide to invest some thought and skill into the combat system, but one that doesn’t punish players who don’t like the combat for just breezing through it as quickly as they can to get to the next sex scene.

This is where a lot of that low skill floor with a high skill ceiling stuff comes in. I think the combination of complex and multifaceted spells with the deflection and flawless victory systems allow me to reward skilled play without annoying players who don’t like combat or don’t care about it. At least, that’s what I hope for.

Usable Items and Flasks

Combat revolves around HP, MP, and aura management, and one of the best ways to manage these resources is through potions the player can use. Most potions can be used in or out of combat, but some can only be used in one situation or the other. For example, there are potions that only apply auras, and these can only be used in combat.

The main way the player character regains MP is by having sex. Orgasming yourself grants a small amount of MP, causing someone else to orgasm grants a large amount of MP. If you have flasks on hand, you can also collect various bodily fluids to consume later as potions, and this is the primary source for gaining MP restoratives.

Flasks will be available for purchase and cost a relatively small amount of G. There will also be some potions and other consumables that players will only be able to purchase, such as healing potions.

Consumables and flasks will be the main things players spend G on; there won't be rent or other recurring payments in Hex. You will primarily gain G via prostitution and combat. At this time, I have no plans to allow the player to sell items or gear.

I know many players just don't use consumables in RPGs ever, but I plan to introduce a progression system specifically tied to item use that's similar in concept to the progression of the player's schools of magic. Hopefully this will make players more likely to engage with this system, and also give players even more interesting build options.

Gear

The player will start with a single gear slot for daggers, but will eventually unlock two accessory slots as well. None of the gear in Hex will have just stats, instead, I want each piece of gear to have unique special effects. For example, the player's basic starting dagger is fairly weak but has a high crit rate. Other daggers have other effects. There is a dagger that can inflict wound stacks, one that can siphon MP, one that enhances deflections, and more.

The accessories will typically have similar special effects. There are no pieces of equipment that just grant an attack or defense bonus, and your old gear won't be made irrelevant by new gear with higher stats. Instead you'll select gear that enhances your build, or that covers your weaknesses.

Armor or clothing won’t be a factor in combat, but cosmetic outfits will be a thing at some point in the future in Hex. These will likely work similar to the way they work in Succubus Stories.

Interface and Presentation

Combat in Hex is presented in a first-person view. The enemy sprite occupies the center of the screen, flanked by sprites of Iris's hands. As you cast spells and perform other actions, their positions and items change to reflect this.

Collapsible UI windows flank the sides of the screen, one featuring your combat options, the other showing the health bars and auras of the combatants. The combat log and other text information is communicated via the game's VN-style textbox at the bottom of the screen.

The combat system features many small animated touches, such as a subtle breathing effect on Iris's hands, the gentle twinkling and pulsing of the spell in her hand, and hit effects for enemies. When the player is hit, the screen reddens in a vignette effect briefly. When the player's HP or MP reach critical levels, the meters will begin to flash, as well.

Sounds accompany most actions. Some of the sounds I even made myself from samples, including the perfect deflection sound effect. Critical hits are also accompanied by deep, bassy stings, and there are different sounds for different types of attacks, and even different sounds based on whether an attack connects or misses.

There is also a tiny bit of voice acting, but only in one situation. Iris has a small chance to cry out when taking a hit. This chance increases the lower her HP gets, with it being basically guaranteed when she reaches critical HP, or when taking a very large hit.

Background music is also, of course, included. There are a set of a few different combat tracks that can be played, and one will randomly be selected when combat starts. I know most people play with sound muted, but I think having sound effects and music enhanced Succubus Stories a lot, so I want to use it here as well!

I think the presentation of Hex's combat is pretty good. I'm not sure if it's good on its own merit or merely good for my standards as a browser-based text game dev. Now that I'm making something more in competition with Ren'py VNs and RPGM in terms of combat, maybe I've moved up a weight class in terms of the expectations I'll need to meet with the game's presentation. That said, the few Ren'py games I've seen with combat (and I reiterate that it's a small sample size) don't seem too daunting.

Progression and Leveling

The planned level cap is 50 for Iris’s “combat” level. The first 10 levels involve significant stat bonuses. Levels 11-20 have smaller stat bonuses, and levels 21-50 have minor stat bonuses. Earning combat levels is one of the ways in which you will gain something similar to trait points as well, though there will be many other ways to earn these. I will probably not call them trait points, but these will be similar to Succubus Stories’s TP, in that they’ll be used to purchase new abilities. There are two broad types of abilities you can purchase: "Succubus Spells" are usable abilities that typically cost MP, and "Succubus Powers" are passive abilities more similar to the traits in SS. You will also sometimes gain special Succubus Spells and Succubus Powers by completing quests, learning new schools of combat magic, or discovering certain secrets.

As mentioned, you will also gain mastery ranks with spell schools (and items) by using these in combat. Each rank you earn provides a new and powerful passive effect and enhances the spells associated with the school by improving their damage, accuracy, crit rate, and MP efficiency.

Because combat will be optional much of the time, it is possible to wind up in situations where you have a relatively low combat level and low mastery ranks but are fighting fairly powerful enemies. While it may be frustrating to some players, losing fights or being unable to brute force your way through certain areas and being forced to find an alternate solutions will be the “price” for not engaging in a lot of combat. Losing important fights will cause the story to progress in different ways, and while I will make most combat in the game avoidable, fighting might be the best option in many cases, so I don't necessarily recommend a pure pacifist playthrough. It may end up being possible, but it will be more of a challenge run than anything else.

Conclusion

I am quite proud of the combat in Hex so far, and I’m hoping players will enjoy it. While Hex will always be a lewd game first, it’s not really possible to create a game by just stringing together sex scene after sex scene, and most players probably wouldn't really want that anyway. 

If it helps, you can think of the combat in Hex as being similar in function to alchemy in Succubus Stories; these systems both serve as the “other half” of the gameplay loop that feeds into to sex scenes. Ideally, just like how alchemy encourages you to engage with the sexual content and vice versa, I hope the combat in Hex does the same, while providing even more excitement and unique gameplay opportunities all on its own!

I fully expect some people to not really want to engage with combat, and I did my best to build the combat system with those people in mind. I don’t expect people to play Hex just for the combat–I know players will always primarily be coming to the game for the sexy stuff, and that’s fine by me. I want to design the system in a way that encourages players to engage with it without annoying them or cockblocking them from the content they want to engage with. This is certainly a balancing act, but I think with good game design and a fun combat system I can strike the right balance and make combat always add to the game, even for players who normally wouldn’t be interested in it.

This wraps up our look at the combat system in Hex, I hope you found it interesting! Thanks a lot for reading all of this if you actually managed to get this far, I know this was a long one! The Hex alpha demo is far into development, and you’ll be able to try the game yourself very soon! I can’t wait to show you what I’ve been working on!

Combat System Deep Dive - Hex Devlog #4

Related Creators