ID:265284
 
Alright

Say you have a battle of 10,000 troops vs. 10,000 troops.

one is using swords, which is 1/2 affective against the other guys troops because of their armor, and they get to attack first.

the attacker has 70% offensive ability, and the defender has 30% defensive ability.

what would be some good things to consider for a good adequate formulae for a battle like this to make it realistic? Should there be chances to miss an attack entirely?

I wanted to make it so 1 troop against 1 troop there's a 50% chance the attacker will succeed, then half that for if the armor type is protective against slashing weapons.
I don't think this is possible anymore however...
Because that means half the enemies army could be wiped out in one blow...
which wouldn't mean much if it took you awhile to develop this 10k army and it gets wiped out in 2 attacks.
Especially if it took you up to 5-10 minutes to develop it...

this isn't even considering I want to make it so if an army is attacked from behind then the attacker gets an attack bonus...
One way is to consider the case of an individual soldier from one army, and another individual soldier from another army. Assuming the entire army is made of of those same soldiers, and working out the effectiveness of one soldier versus the other, you can get a probability that soldier #1 will win. Test that probability; if #1 wins, subtract one soldier from army #1. If #2 wins, subtract one soldier from army #2. Lather, rinse, repeat until battle finished.

This is pretty unrealistic though, because you're essentially marching each army at the other in single file. =P But it's pretty simple and probably won't seem too skewed; especially if you include army size in the effectiveness factor.
The basic forumala the civilization games use works decenlty. Pretty much each unit of troops takes rounds attacking or defending from another unit. The winner of the round causes a certain amount of damage to the defender and each side is reduced by a set number of troops. This keeps going until one side is obliterated. The formula for getting the probability that the attacker wins the round is.

attack - The net attack value the attacker has
defend - The net defense value the defender has

probability of attacker winning the round - attack/(attack + defense) * 100

Then for determining the attack and defend values you just take the units base value and multiply it by all the circumstantial bonuses.

If the basic case where you have a signle person vs another person both with equal attack and defense which is 1 for simplicity sake you would end up with the following.
1/(1+1) * 100
1/2 * 100
or 50% which is what you want.

Now for a bit more complicated setup. Lets say you have a group of 1000 swordsman attacking the flank of 500 vetern pikemen. The swordsman have an attack rating of 2 and the pikemen have a defense rating of 3. The flanking gives a 50% bonus to attack. And the pikemens veterency gives them a 75% bonus to their defend(and attack but in this scenario it's irrelevant).

The total attack rating for the swordsman would be
1000 * 2 * 1.5 = 3000
(Number of troops) * (base attack value of unit) * (flank bonus)

The total defend rating for the pikemen would be
500 * 3 * 1.75 = 2625
(Number of troops) * (nase defend value of unit) * (veteran bonus)

So the odds of the attacker winning the round would be
3000/(3000+2625) * 100 = 53.3%

Then whoever lost would lose some amount of their troops and you would further reduce the number of troops on both sides to account for mutual losses. If either side remains repeat the process with the new numbers until someone retreats or one side is annialated. If you want to add any new bonuses all you have to do is factor it into the final attack or defend value of the units involved.
In response to Crispy
Well, first off, that's a *lot* of random rolls. Two armies of 20,000 squaring off would result in 20,000 random rolls -- quite likely several seconds of freeze time as the CPU calculates the results.

And secondly, at that rate, the individual random rolls will boil down to negligibility: if there is a 30% chance that soldier 1 will win, then it is guaranteed that army 2 will lose almost exactly 30% of its numbers: standard distribution is so shallow as to render the randomness pointless. This tendency becomes less exacting as fewer combatants are involved, but if mass combat is the norm, it might as well be deterministic.
In response to Theodis
I Like this idea.

Here's a few problems though -

In civilization, they had it so a unit was say 2/3, 2 attack, 3 defense.

Well as you got higher technologies you got higher units... in my game this is not the case.

You get an army, which is customizable.

For instance, you have an army that is unequiped. 10,000 unequiped soldiers. Their basis is 1 attack, 1 defense.

Now I'm guessing the logical solution would be to give that unit a weapon, lets just say they have swords now.

It's a level 3 sword, so they get +3 attack, so now it's a 4/1 army.

You then give it a piece of armor that is level 3, so the defense is now 4.

Well this gets rather... unstrategic, it's just rushing to see who can get the higher level weapons and armor :P

So this is what I was thinking -

We take the training abilities. You can station an army in a barracks, from where it'll train in combat.

You can choose, defensive capabilities or offensive.

as you mentioned, an army has 75% offensive capability (out of 100) and thus you times it by 1.75...

ok that's fine, that adds some more strategic depth...

But here's the doosy, where do we go from here?

I'm assuming we're going to go with multitudes of armor suggestions like one armor is weak to piercing while another is weak to slashing weapons?

What about the speed of a weapons attack? Naturally a dagger cannot do as much damage... thus speed has to be a factor, so then what would we do, give dagger army's an extra roll?

Maybe we could give procedures to the weapons themselves!

Like poisoned blades, or fire blades... adding a chance that the weapon upon attack will explode and damage near by enemies, or do a damage over time to the army unit killing off soldiers slowly...

hmm

but wait, if you have 1,000 troops against 1,000 and you kill 300 per say in the initial attack then the poison DoT's the unit for say 10-20 people per tic then that wouldn't make much sense so we'd have to create a "wounded" variable and conclude how many people get wounded during the battle.


any suggestions on how to make it more strategic? Or a good way to go around the ideas above?
In response to Spuzzum
yes this has convinced me to not go with this hehe :) Too laggy of a game already and I use event procedures...
In response to Jon Snow
any suggestions on how to make it more strategic? Or a good way to go around the ideas above?

For most the stuff you suggested you could just add these to the attack/defense bonuses.

For instance if you have a group of troops with armor piercing ammo against heavily armored foes give them a 50% extra bonus to attack.

If you want to get detailed into a this weapon vs that weapon you could just build yourself a large table and apply a different bonus for the attack/defender based on what they are attacking with against certain weapons/armor.

The basic formula still works for solving odds :P.
In response to Spuzzum
True. I didn't consider the fact that he had so many soldiers per unit. =)
In response to Theodis
well the thing is is what is a good adequate amount to lose?

500 out of a 10000 on a normal win?

I mean this is really hard to decide because you don't want everyone to just lose their armies after one battle, and you don't wanna make it take forever to fight an army and kill it so what's an adequate amount of time?

if each army were equally matched, would it take 1 successful charge to take it down or 20?

If say the army was 10,000 vs 10,000.... please post opinions since this is really up to the players on how quick is too quick and how slow is too slow... I'd like to hear the opinions ;)

Another issue is that once armies bring eachother down to about 100 troops each, it'll be a slow and long process with the 50% thing because it'll basically be brought down to 1 on 1...
In response to Jon Snow
Well it depends on how long you want combat to be. For decent length just make each side lose 10% of the larger side number of troops.
In response to Theodis
And for those of you who like spice with your life, you might try a modification of that amount. Say 10% +/- 5%. RTS games like the one he's describing are dull if it's purely deterministic. It becomes a matter of "he has more/better troops, no sense in fighting". Or, "He has 100 troops, I have 500. I'll lose 50 troops per successful attack from him and he'll lose 10 . . . but I outnumber him so I'll hit him 50% more than he will hit me. Net win for me". There's no feeling of risk involved.

It becomes a little better if terrain and positioning affect matters. Then it becomes more like a huge game of chess.

NOTE:

Yes, I know that one could argue on the grand scale that several small armies can whittle down one large one. I still say that a little (not a lot, mind you) randomness can spice up a battle. Not knowing if it'll be 25 troops you loose, or 75 troops can make the battle interesting.
In response to sapphiremagus
And for those of you who like spice with your life, you might try a modification of that amount. Say 10% +/- 5%. RTS games like the one he's describing are dull if it's purely deterministic.

Uh there already is the random factor of whether they hit or not which is already more than enough. The more random odds you shove in with more range the less it's about talent and understanding the system and the more it's just about plain luck.

It becomes a matter of "he has more/better troops, no sense in fighting".

See that's when you employ tactics! Rather than charging head on you make conditions more favorable by doing things like luring them into a trap or attacking their flank. It shouldn't be about "oh well I got a bad roll I guess I better just reload and try again".

Or, "He has 100 troops, I have 500. I'll lose 50 troops per successful attack from him and he'll lose 10 . . . but

Well I said each side lost 10% of the amount of troops of the largest army. So each side would lose 50 because the larger army has 500. This probably could get a bit extreme at high numbers so it's probably best to cap the number of troops per unit. Since regardless of the skill of your troops if you're heavily outnumbered they'll wittle you down regardless if you're still taking out more of them than they are of you.

I outnumber him so I'll hit him 50% more than he will hit me. Net win for me". There's no feeling of risk involved.

Risk just means you win more or less because of dumb luck rather than talent. This isn't fun and generally just leads to constant reloading in a single player game until you get favorable odds since the "tough" fight is only tough because you only have a 30% chance to win so you have to reload roughly 3 times to win the fight. And in a multiplayer game it just leads to players losing more only because they did get bad luck rather than losing due to lack of skill.

It becomes a little better if terrain and positioning affect matters. Then it becomes more like a huge game of chess.

No it becomes a lot better when you actually have a game that is more than exchanging blows! Which is why Chess is much more intersting than the card game War. If you make a game about stratagy and learning to play effectivly with the rules at hand rather than just replaying until you get a good roll then it'll be much more fun.

Yes, I know that one could argue on the grand scale that several small armies can whittle down one large one.

Well anyone with any game design sense would be considering is this fun rather than is this realistic. Realism is always cool if it adds more gameplay depth without frusteration, but if all it does is make a game more frusterating, boring, or extremely unbalanced you shouldn't bother with it :P.

Not knowing if it'll be 25 troops you loose, or 75 troops can make the battle interesting.

Not really. If stuff like this were the underdog gets lucky too frequently or the larger force gets unlucky too often then the gameplay is broke and there is little stratagy involved. If it's a game about stratagy then it's extra broke since you killed it with the roll of the die. If you make it infrequent enough not to have a big impact on the stratagy of the game then generally you won't find it much of a "risk".

Random odds are a bane to games especially competative ones. If a game really needs this something extra random odds bring then the gameplay itself is probably already way too boring and simple as it is.
In response to Theodis
It would probably also be a good idea to keep in mind that it won't always be exactly 10,000 on 10,000, and therefore combat won't always work out that way.

Just thought it might be important. >_>
~Chance
In response to Chance777
It would probably also be a good idea to keep in mind that it won't always be exactly 10,000 on 10,000, and therefore combat won't always work out that way.

Uh yeah my formula takes that into account :P.
In response to Theodis
Theodis wrote:
For decent length just make each side lose 10% of the larger side number of troops.

Perhaps that could be 10% of the average of the number of troops on each side. That might balance it a little away from the larger side crushing all opposition underfoot. So if one side has 1000 troops and the other has 3000, the troop loss per round would be 200 rather than 300.

Just a thought. I admit it doesn't make much difference. =)
In response to sapphiremagus
Ok, to make a list of ideas...

Flying units could add some strategic elements...
Ambush's and mines could add some strategic depth to the world, also long distance attackers could be pretty interesting...

Simultaneous attacking could be an option, position all your armies around one unit... and combine them all to have 3 armies put into "one attack" which would be difficult to implement...

About different landscapes posing different possibilities of defense... I am head of ya on that one :)



The multi-attack is going to be a bit tuff to implement as it now stands I do a lot of the commanding through a "general" type unit that you are, and you click the units and tell them where to go...

The only ways I can see of implementing this is if you drag-boxed them and then were able to click on a unit and they could all go there...
Not sure if this exactly doable in byond :) I will look into it...


Other options include clicking each unit and telling them to attack a unit and then not calculating any attacks done in the turn til everyone has done their turn (everyone does their turn at the same time). That way I could just check to see if 3 army's are attacking the same unit and see if they're from the same alliance...


Great ideas so far, got anymore to throw at me? :)
In response to Theodis
Well I have a few ways I am going to get around dealing with the boredom and the risk factors...

I want this game to take a new approach that Civilization, Masters of Orion 2 and nameless other strategy games never took...

That is the alliance focus of my game (the newer version I've been working on).

The way it works is rather cool, You pick one of several categories which are spell lines, and these spell lines grant "kingdom spells".

For instance, Your army of 1,000 troops is trying to run from a 3,000 troop army.
You back into the mountains where you have barely enough time to fortify. Your troops were 1 attack/ 1 defense, but now that you're fortified your unit is 1/3. The bonus given by the mountains protection is 1 more to defense, you're now a 1/4. Your attacker is a 2/3 so attacking him is not an option you would lose more then you would kill, but the only way through the land is to get past you since the mountains are the only way across unless their troops have transports. He begins to attack you because you're the only way through and obviously you're enemies.

You whittle eachother down 1/3, your army is now at around 600 and his is around 2,000. You don't wanna lose those 600 troops so one of your allies casts a spell around that army unit that puts all units in a certain radius in a stasis, where they can't move or do anything for 2 turns, just enough time for your allies army to reach that destination to help out and attack their flank.

The spell takes approximately 15 turns to refresh, however the 2 turns are up and the enemy can attack if he so pleases. To weaken your enemy's attack so that your troop loss will be less you pinpoint his exact x,y coordinates with the cost of one of your spies... Then you shoot a ice bomb from one of your ships, a small very ineffective weapon but it does the trick to knock off a few points from that army.

You then lastly to end your turn play your trump card, you have the spell line that allows you to increase all units in your alliance by 1 defense. The recycle cast time is high, but you see battles taking place on other boarders as well so you play it anyways to help your allies out.

Just sort of a general idea of how I sort of want things to play out as a strategy of my game.
In response to Theodis
I think we're just going to have to agree to disagree. I think pure determinism is just as bad as too much randomness. I'm a chewy center kind of guy.

That aside, I wrote a small program to test out a few things and came up with some interesting statistics (over 100 battles).

Army A
Size: 5000
Att: 1
Def: 1

Army B
Size: 1000
Att: 3
Def: 3

Army A won 88 battles (88%)
Army B won 12 battles (12%)
Army A avg size after battle = 1789.37
Army B avg size after battle = 25.41
Average time to win = 18.65 turns
Longest battle = 87 turns
Shortest battle = 2 turns


The underdog on average wins 10 battles out of 100.
The "avg size after battle" is to show how close it usually was for a given army. As you can see, it hurts to take on the teeth. Just about 64% loss on average has to mean something :P As for the underdog, a positive showing when 90 /100 values are 0 (loss) is pretty good.

I do have to yield that modifying the damage output would have been a bad idea. The battles take too long as it is (avg of 19 turns!!!).

The simulations are run using the afore-mentioned method of:
Chance to hit: attacker.att/(attacker.att+defender.def)
Damage: 10% of largest unit.

Keep in mind that the 10% is of the largest unit at the time. I assumed that battles would not maintain the starting values for reference. Perhaps if they did, the battles would go faster (although I think this does a good job of simulating dropping morale and effectiveness as you get chewed up as a unit).
In response to sapphiremagus
That aside, I wrote a small program to test out a few things and came up with some interesting statistics (over 100 battles).

That's just it the more fights you do the closer the result will be to the deterministic ones. Randomness only serves to screw people over in the short term and not because they did something wrong but rather because the game decided to randomly screw them over. Just think of what would happen to chess if you had to roll a four sided die to determine the results of an attack 1 being the defender won and 2-4 attacker wins. It would completely trash any stratagy which relies on a set pattern of moves since if one of the links in the chain fails most or all of it does. Which of course leaves more emphisis on small stratagies that don't rely on actuall confrontation. Randomness only serves to wreak havok on stratagy which is the whole freakin point of a stratagy game.
In response to Theodis
You know, you're not going to convince me that pure determinism is best any more than I'm going to convince you that a little randomness is not bad thing. Why keep beating a dead horse?

Personally, I'm a little affronted that you completely ignored the whole point of the post (two points, actually) and instead chose to single out a sentence and use it out of context to push your own propaganda down my throat yet again. The first part of the post says "We should agree to disagree". I have recognized that we are both equally immovable in our opinions; therefore it makes no sense to keep arguing or pushing to make one's opinion win. Are you really that intolerant of someone's opinion on what makes a game enjoyable? Is your idea of a good game the only/best one? If that is your thought process then I wish you luck in your endeavours.

Now, instead of renewing the zealous attack on the "horrors" of randomness and what it's done to gaming (I get a real "kids these days, don't know what they want" feel from it), why not respond to the rest of the post?

It was intended to give a good indication of how the mechanics would work in the long run. Overall, the larger force of untrained rabble-rousers wins the day (with heavy losses). The well trained but hopelessly outnumbered unit generally loses, but exacts a terrible toll on it's attacker. Every so often (about 1 in ever 10 battles), the veteran unit wins.

Hopefully, someone will comment about how long the battles usually took. Were they too long, too short? How about the longest battle. That took quite a few turns. Should an attempt be made to keep battles from going that long? All of this is useful info for the game maker.

Finally, should I run the sim with other values? Units closer in size? More varied attributes (ATT and DEF)? Would the game maker be interested in the fully detailed log file of those battles for perusing?
Page: 1 2