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.
PREAMBLE 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."
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!
COMBAT FLOW 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.
DAMAGE/EFFECT RESOLUTION 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.SetupAdd 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."Playing"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" buttonEnd 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.
Gnilbert
PS. As a final thought, anyone have an idea how to get Frogboy's attention in this thread?
I really like it Gnilbert.
Simple enough to deal with on the scale we see in Elemental (though it would get a bit boggy with 12 units/stacks on each side) but complex enough to give combat some actual meat.
Gnilbert, any way i could see the code for this?
This is great, I really hope the stardock peeps see this.
looks sweet, bump for face time
This is a lot like a lot of the ideas in the combat thread. Keep up the good work, G.
You could send a PM to Frogboy and explain a little (simple summary) of this post and link to it. That should help.
Best regards,Steven.
very interesting i have to say. definitely keeping an eye on this thread.
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. (I've also copied this into the original post!)SetupAdd 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."Playing"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" buttonEnd 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.Gnilbert
very impressive work Gnilbert... are you a .Net developer by trade?
Very impressive!
Hi Gnilbert,
What you have done, so far, is truly awesome. I have played simulations, FRP, etc, for over 30 years - I'm old, i guess, anyway, SPI (Simulations Publications, Inc.) had a wonderful series of 'pre 17th century' tac games - all integrated, that sim'd combat from hoplites to agincourt. Might you incorporate facing, etc iontom your awesome combat sim? Also, fog of war, and digging in (fortifiying) for units (not indivuduals)? This would add to the mundale asopects of battle. Juts my 2 cents worth to add to your gold mine of a project!
oh snap, frogboy stamp of approval
Sorry if I sound rude, if it is so be aware that this is not my intention, but is there any chance something similar will be implemented or at least taken in conisideration? I ask this because, even if I'm totally unskilled in any form of coding, it seems incredibly sleek, powerful and "usable" by an AI...
Very nice !
There's two ways to look at this.
First, let me say that in Elemental: War of Magic, the game mechanics of v1.1 are pretty much the set game mechanics for the game. The reason is that Elemental: War of Magic needs to rise or fall based on its basic design.
That said, my general reaction at this point is that after v1.1 we move to Elemental: Expansion 1 (which will be free to all Elemental players) where we can start making some changes, particularly to the combat system which is what Gnilbert's concept focuses on.
The combat system is core to a given game like this. The simplistic combat system of Elemental: War of Magic is one of the reasons why the magic system has spells that aren't that interesting.
Thus, as we think of a new combat system for an Elemental expansion, we should be thinking about what kinds of magical spells we would want to create as well. In other words, both need to be considered at the same time.
Then, the system has to be made in such a way that it can be exported to Python so that modders can expand and extend it as they see fit.
This is very good, simple and interesting model! But, imho, battle time have increased dramatically.
I think, reaction must be automatic (strongest reaction). If the reaction have some consequences (like wizards decreasing mana) - then let the player choise.
Thank you for your reply! That looks good to me, I never ever wanted to include such a radical change in 1.1. I truly like the idea of the comabt system being exposed to python!
I think that is a mistake, because with a simplistic combat and spell casting system researching different weapons, armors and spells is pointless and customizing your units with different equipment is pointless, too.
Please wait with the release until you have improved all important systems, because Elemental is currently simplistic in all areas (combat, magic, city building and diplomacy) and it would be sad if a game with such a great potential fails again, because the basic design is too simplistic.
yeah i totally understand what brad is trying to do by releasing the separate expansions. because there are certain mechanics that are going to be vastly different from what we have now. there are going to be people that like the way the game works as is. if they want to keep playing this version they can, while everyone else can move on to expansion 2, then the pattern repeats with expansion 3.
I've posted an updated version that loads the units from an XML file I've included in the download. Feel free to change the file around. I will say it's not particularly forgiving of "input errors," so you probably want to copy the xml structure of existing things as closely as possible.Gnilbert
Nice work!
Debate? I could hardly devise such a system, let alone code it!!! I had a chance to test your demo, and I actually think it's even "fun" to play (realtively)!
There are many great features available to you once you register, including:
Sign in or Create Account