You can download version 1.5 of this file HERE.
UPDATE: I've included XML definitions for the units in the download. Feel free to add/remove units and change their settings. You may want to make a backup of the XML file first - the app itself is... unforgiving with unexpected inputs.
You can download this file HERE.
This is a result of earlier posts I made around combat mechanics and flow. I originally described how I think the statistics might change HERE and HERE, and then went on to describe how the combat flow should change HERE. There are parts of the demo below that will be better understood if you've read the earlier posts, especially around things like "splash."
After working on my demo app for a few days, I've refined my original ideas about the combat mechanics, and I'd like to share those along with the demo itself. But first up, the disclaimers:
*** DISCLAIMERS ***
I. You must have .Net 3.5 installed. You can download it from microsoft, or through your automatic updates.
II. This is not a fully functional game demo. It is intended to demonstrate a concept only. As such:
i. The "starting armies" for each side are not balanced against each other.
ii. I've left out Mana costs for now, so channeler spells are... potent.
iii. I didn't enable unit/ability/effect creation/editing in the UI, though all those exist in the "engine"
iv. There are no fancy graphics
v. There is no computer opponent - you play both sides.
vi. Unless you check the "automate" checkbox, you need to actually "pick" the reaction, even if there's only one available.
vii. THERE WILL BE BUGS.
Finally, THIS IS THE FIRST VERSION. I'll probably post a few updates to clean things up and turn on the editors once I put some serialization in, but I'm not intending to actually support this as a real product.
As always, I'll gladly share my model, code, etc. with Stardock.
Originally, I had taken the same route as a lot of other posters and proposed "Attack, Defense, Damage and Armor." It seems obvious, right? The problem is, where do you put things like "spellcasting," "counterspelling," "you're great with a bow but terrible in melee," "+5 fire damage" and "weakness to lightning?" In new statistics, of course. But I don't like that. I like things to be simple (you may not believe that if you continue reading). I wanted something that will cover everything from magic to melee to your singing skill, with as little hard-coded fuss as possible. To help with this, let's talk about "tags."
In D&D, they're "types," and in Magic, they're "keywords." Essentially, they're adjectives that you stick on weapons, units, spells, abilities, effects, ability bonuses or just about anything else. So that might give me a Fireball spell that I've tagged "spell" and "fire." I might have a unit of skeletons that I've tagged "undead."
The important part here is: These aren't predefined. There is a core set that I'm using, but you can really put any word as a tag (a multi-word tag just looks messy, but I allow them).
A GENERALIZED FOUR STAT MODEL
To make the system as flexible as possible, I now have the following four core statistics (apart from health, mana, unit size, etc):
OFFENSE: this is a measure of how effectively you "connect" with offensive abilities.
DEFENSE: this is how effectively you prevent other's from connecting with offensive abilities.
POWER: this determines the maximum effect (like damage) from your abilities that "hit" the target.
RESIST: this determines the maximum "POWER" you can ignore from an offensive ability that "hits" you.
Notice how it still pretty much sounds like Attack, Defense, etc? That's because, on the surface, it still is. But here's where it gets more interesting (aka complicated): Everything that gives you a bonus to one of your four abilities (weapons, armor, spells, training, etc) has tags that describe when it comes into play. For example, the archers here have +2 Offense when they're using "melee" abilities, and +5 when they're using "ranged" abilities. They have +2 to their Power when they're using abilities tagged "physical" AND "melee" (but not abilities tagged only one of those).
The power here is just incredible. You can flexibly define things like "-5 Resist: fire | life" to create a penalty to resisting effects tagged "fire" or "life" - which is perfect for the undead. These bonuses can be described as Additive or Percentages - you sum the additive ones first, then apply the summed percentage bonus (or penalty) at the end.
Additionally, this gives us casting/counterspelling. Casting is +X Offense: spell, Counterspelling is +X Defense: spell. Magical damage? +X Power: magic. Magical shielding? +X Resist: magic. What if you're particularly adept at counterspelling water spells? +X Defense: spell & water. What if you're particularly damaging with fire magic? +X Power: magic & fire. What if it's only the "buff" spells? +X Power: magic & buff.
As an aside, in my model, the "requirements" on a tag are kept in conjunctive normal form, and negation of a tag is allowed with !tag or ~tag, so things like: +X Defense: (fire | earth | air | water) & ~magic are perfectly legal to describe "a bonus to avoid getting hit with non-magical, elemental abilities." For the current demo, I've avoided including abilities that are that complicated, but I hope you can imagine the wild possibilities that a system like this opens for modders!
1. Player 1 (the active player) starts his turn. Player 2 is the reactive player.
2. The active player selects a unit (with moves/actions remaining) and moves it or declares an "Action" on/against a target unit.
3. The reactive player chooses a "Reaction" from among those available (these are determined by the provoking Action, the unit that is performing it, the target, the distance to those, etc).
4. The Action/Reaction are resolved in order of their speed (Instant, Fast, Normal, Slow) - which may be simultaneous. There is no "react to a reaction" mechanic.
5. If the active player has no units remaining to move, the players switch roles, and we go back to 2.
* the best way to get a feel for this is to read the little Game Log I write out. It's messy, but the info you need is there.
How is damage calculated? Oddly, I'm not telling (I'll say it uses a fun-enhanced binomial distribution method). But really, this isn't what I want the focus on right now, so you'll have to take my word that it cleverly (correctly) applies damage/armor based on the tags. Instead, I'd really like to emphasize the combat flow and the ability of the tags to succinctly describe a wide variety of combat effects.
UPDATE 1: USING THE DEMO
Wow - how bad is it that I forgot to post details on how to actually use the darned thing? Well, here goes: When you start up the application, the battle grid is the top half of the screen and the setup controls are below. There is a player 1 (left/blue) and player 2 (right/red) who start with a few automatically selected units.
Add Units to a player to selecting a unit from the lower left "unit list" and then pressing the "Add" button in the red or blue player's color bar.
Remove Units by left clicking a unit on the battle grid and then pressing the "Remove" button in that player's color bar.
Browse Unit abilities by selecting a unit on the battle grid or in the unit list in the lower left. Then select the unit's abilities to see a more detailed view (to the right). ACTION abilities have a blue marker, and REACTION abilities have a red marker.
Rearrange units by left clicking to select and then right clicking the tile you want to move them to. If there's another unit there, they'll swap places.
Start a game with the "Start Game" button. You can end it at any time, add/delete units, and then start it back up again.
Select a unit by left clicking. Units' cards have "Action" and/or "Move" below them, indicating if this unit can still act and/or move during this turn. All troops move one square (the grid is small), but they can use their action as a move as well.
Move a unit by left clicking on an empty, adjacent tile.
Use an ability by right clicking on a potential target. If there are legal abilities for that target, a pop-up will appear.
Choose who will react. When the active player chooses an action, a red "React" button will appear under all units that can react. Pressing the react button pulls up a menu to select the ability you want to react with. Right now, if there is at least one valid reaction on one of your units, you have to select a reaction - you can't "pass." There's a checkbox that will enable auto-react when only one reaction is available.
Skip Unit. You can "clear" the move/action of a unit for this round by pressing the spacebar with that unit selected or by pressing the "Skip turn" button.
End turn You can end the current player's turn by pressing the "End Turn" button
End Game. This button takes you back to the setup controls, leaving all the units where they are on the map. You can still restart the game with your current units.
I'll undoubtedly post a slew of things I've forgotten to mention over the next day or two, but for now, I'll let you poke around with my current version.
PS. As a final thought, anyone have an idea how to get Frogboy's attention in this thread?