Grillick Posted February 21, 2015 Share Posted February 21, 2015 I've been searching and searching, and I can't for the life of me find the post where Sheepy explained the numbers used for the battle mechanic. I know that battles (that's what I'm calling the 3 mini-contests built into the resolution of a war action) compare a random number that is based on the strength of each side's military. What I don't remember is the range for that random number. It caps at 100% of the military strength, but what's the base? I know it was 0 at one point, but it was changed because people were annoyed that they weren't getting immense triumphs against 0 ships, but I can't remember (or find) what it was changed to. Can someone be so kind as to give me a link to the relevant post, or an answer to my question? Quote "It's hard to be a team player when you're omnipotent." - Q Link to comment Share on other sites More sharing options...
Grillick Posted February 24, 2015 Author Share Posted February 24, 2015 Bump. Seriously? 56 views and nobody responds? !@#$ you guys. Sheepy at least should have the answer. 1 Quote "It's hard to be a team player when you're omnipotent." - Q Link to comment Share on other sites More sharing options...
Clarke Posted February 24, 2015 Share Posted February 24, 2015 I remember it being said in a thread back in the early summer/late spring, I think. Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted February 25, 2015 Administrators Share Posted February 25, 2015 Tonight when I get home and have all the source code handy, I'll see if I can get this for you. I'd also like to make a battle simulator at some point where players can enter in their own custom numbers and get a generated possible result. 6 Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link Link to comment Share on other sites More sharing options...
Jodo Posted February 25, 2015 Share Posted February 25, 2015 Tonight when I get home and have all the source code handy, I'll see if I can get this for you. I'd also like to make a battle simulator at some point where players can enter in their own custom numbers and get a generated possible result.God yes. Please do. Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted February 26, 2015 Administrators Share Posted February 26, 2015 Here's how a ground battle works: Attacker's Army Value = Armed Soldiers * 1.75 + Unarmed Soldiers * 1 + Tanks * 40 Defender's Army Value = Armed Soldiers * 1.75 + Unarmed Soldiers * 1 + Tanks * 40 A simulation occurs: AttSolCasRand = MAX(RANDBETWEEN((Armed Soldiers * 1.75 + Unarmed Soldiers)*.4,(Armed Soldiers * 1.75 + Unarmed Soldiers)),1) DefSolCasRand = MAX(RANDBETWEEN((Armed Soldiers * 1.75 + Unarmed Soldiers)*.4,(Armed Soldiers * 1.75 + Unarmed Soldiers)),1) AttTankCasRand = MAX(RANDBETWEEN((Tanks * 40 * .4),(Tanks * 40)),1) DefTankCasRand = MAX(RANDBETWEEN((Tanks * 40 * .4),(Tanks * 40)),1) AttRand = AttSolCasRand + AttTankCasRand DefRand = DefSolCasRand + DefTankCasRand If(AttRand > DefRand) { Victory = Victory + 1 AttTankCasualties += ((DefTankCasRand+1)/550) + ((DefSolCasRand+1)/6600) DefTankCasualties += ((AttTankCasRand+1)/530) + ((AttSolCasRand+1)/6600) } else { AttTankCasualties += ((DefTankCasRand+1)/530) + ((DefSolCasRand+1)/6600) DefTankCasualties += ((AttTankCasRand+1)/550) + ((AttSolCasRand+1)/6600) } That simulation is ran 3 times, and casualties are added up and the victory type decided from the three rolls. Then damage and cash stolen is calculated. 1 Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link Link to comment Share on other sites More sharing options...
Jodo Posted February 26, 2015 Share Posted February 26, 2015 Don't defenders also get a bonus based on population? Quote Link to comment Share on other sites More sharing options...
Princess Bubblegum Posted February 26, 2015 Share Posted February 26, 2015 Did you include soldier casualties? I think I see the formula for tank casualties at the end there, but not for soldiers. Quote Link to comment Share on other sites More sharing options...
Don Juan Posted February 26, 2015 Share Posted February 26, 2015 Did you include soldier casualties? I think I see the formula for tank casualties at the end there, but not for soldiers. That's the top two variables calculated. Quote Link to comment Share on other sites More sharing options...
Princess Bubblegum Posted February 26, 2015 Share Posted February 26, 2015 (edited) That's the top two variables calculated. You mean this?: AttSolCasRand = MAX(RANDBETWEEN((Armed Soldiers * 1.75 + Unarmed Soldiers)*.4,(Armed Soldiers * 1.75 + Unarmed Soldiers)),1)DefSolCasRand = MAX(RANDBETWEEN((Armed Soldiers * 1.75 + Unarmed Soldiers)*.4,(Armed Soldiers * 1.75 + Unarmed Soldiers)),1) So how does that work? I see it takes the soldier power and then computes a random number between 40% and 100% of its power, but I don't see how that is then applied to determining soldier casualties? Surely 40-100% aren't killed in a skirmish. I thought this part was just to calculate strength values and then randomize it a bit to determine who wins the skirmish, but not to calculate casualties. There should be variables called AttSolCasualties and DefSolCasualties, shouldn't there? Edited February 26, 2015 by Princess Bubblegum Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted February 26, 2015 Administrators Share Posted February 26, 2015 No, I just forgot to throw in soldier casualties. That's my bad. When I get home I'll update it. Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link Link to comment Share on other sites More sharing options...
Spite Posted March 7, 2015 Share Posted March 7, 2015 Can we please have all the battle formulas? It would be very helpful 3 Quote ☾☆ Priest of Dio just because the Nazis did something doesn't mean it's automatically wrong Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.