Author Topic: Autocannons need a boost  (Read 4951 times)

Offline Kjara

  • Hero Member Mark II
  • *****
  • Posts: 822
Re: Autocannons need a boost
« Reply #15 on: November 17, 2009, 10:41:31 pm »
Any thoughts on the fact that autocannon boost actually falls at higher levels x?(of course its multiplying a larger number, but still makes the higher levels of them less worthwhile in some ways).  At the very least I think that the mark IV one's need some sort of boost.


Some math:

IV damage output (88*.02+1)*88*32 = 7 772.16
III damage output (237*.02+1)*237*16 = 21 766.08
II damage output  (305*.02+1)*305*8 = 17 324
I damage output  (340*.02+1)*340*4 = 10 608

I to II seems fine imo, II to III is a little weak but ok, but IV is pretty darn weak imo.

With my first suggested mod:

IV damage output (88*.04+1)*88*32 = 12 728.32  --Cruisers at 4000/8.5*42 = 19 764.7059
III damage output (237*.03+1)*237*16 = 30 753.12 --  Cruisers at 3000/10*118= 35 400
II damage output  (305*.02+1)*305*8 = 17 324  -- Cruisers at 2000/15*152 = 20 266.6667
I damage output  (340*.01+1)*340*4 = 5 984  -- Cruisers at ~8.5k

With just a boost to the Mk IV's

(88*.04+1)*88*32 = 12 728.32
(88*.06+1)*88*32 = 17 684.48
(88*.08+1)*88*32 = 22 640.64

.08 seems a bit high for the mk IV's, but I don't think somewhere between .4 and .6 would be broken.(the other option of course is to just boost their base damage--but boosting the boost seems more in theme in some ways).

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Re: Autocannons need a boost
« Reply #16 on: November 17, 2009, 10:45:09 pm »
Something seems wrong with your math.  You don't add 1 to the multiplier (base attack is *1, kinda hard to explain but the math is wrong your way), and you also don't seem to take into account that Autocannons boost cross-mark level (i think...)
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Autocannons need a boost
« Reply #17 on: November 17, 2009, 10:50:19 pm »
This is a good point!  I think I'd prefer to leave Mark I as they currently are, though.  Here's what I'm going to try as numbers (thanks for the handy pre-typed formulas, those were quick to enter into excel to play with, by the way):

IV = 25118.72 (0.09)
III = 35246.64 (0.035)
II = 21045 (0.025)
I = 10608 (0.02)

IVs have a much higher bonus rate, but their overall damage output is still less even than the IIIs when all are gathered in bulk.  Look good, or other thoughts?
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Autocannons need a boost
« Reply #18 on: November 17, 2009, 10:50:58 pm »
Also:  Autocannons don't boost cross-mark level.  Same as sentinel frigates and electric bombers don't penalize cross mark (as of a couple of releases ago).
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Re: Autocannons need a boost
« Reply #19 on: November 17, 2009, 10:54:24 pm »
Ok sounds good. Then if you don't mind my asking, why is there a cap? Ships will never hit it...

I figured out why adding one to (340*0.02) is wrong: If you add one you are assming a base multiplier of 2. Which means that you're going to get a calculated multiplier of 7.8, which is wrong.
« Last Edit: November 17, 2009, 10:55:57 pm by RCIX »
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Autocannons need a boost
« Reply #20 on: November 17, 2009, 10:55:17 pm »
Ok sounds good. Then if you don't mind my asking, why is there a cap? Ships will never hit it...

For when you have multiple command stations, and thus an increased ship cap.  Prevents these from becoming absolutely godlike in those sorts of games!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Re: Autocannons need a boost
« Reply #21 on: November 17, 2009, 10:56:19 pm »
Ok sounds good. Then if you don't mind my asking, why is there a cap? Ships will never hit it...

For when you have multiple command stations, and thus an increased ship cap.  Prevents these from becoming absolutely godlike in those sorts of games!

I forgot about that -- good point!
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline Kjara

  • Hero Member Mark II
  • *****
  • Posts: 822
Re: Autocannons need a boost
« Reply #22 on: November 17, 2009, 10:59:24 pm »
@ RCIX: (#*boost +1)*#*dps = full damage dealt, not the damage boost(if you don't include the 1 it just gives the extra damage from the boost)  Its just where you add that bit of damage in.

As I understand it they don't boost cross level, if they did that would be insane :).


@x
Yeah I typed them out that way since I can copy and paste and then throw them into google to have it do my math for me :)

 Those numbers look good in proportion to each other, more testing will be required to see if they need to be shifted up or down a bit to balance it with other ship classes. -- The higher numbers at full numbers will be partially balanced by the fact that the autocannon group will lose damage faster than other ship types as they start to lose autocannons.

Most ship types damage falls down to about equal to mk II at the mk IV level, so that seems reasonable.


Actually depending on how the math works, I might be off by .02 on each(does having 88 autocannons give a boost of (1+87*.02) to each or (1+88*.02) --aka does it boost itself?).
« Last Edit: November 17, 2009, 11:01:04 pm by kjara »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Autocannons need a boost
« Reply #23 on: November 17, 2009, 11:00:04 pm »
RCIX -- you're right, the math is wrong.  If someone has time to fix and post a revised formula, that would be appreciated.  I'd do it, but I'm involved in a bunch of capturables logic at the moment...

If it helps, here's my code version of that formula for quick reference:

Code: [Select]
int otherShipCount = 0;
if ( currentRollup.ShipTypeCounts.ContainsKey( AttackingUnit.Type ) )
      otherShipCount = currentRollup.ShipTypeCounts[AttackingUnit.Type] - 1;

if ( otherShipCount > 0 )
{
       FInt attackBonus = 1 + ( AttackingUnit.UnitType.ClusterAttackBonus * otherShipCount );
       if ( attackBonus > AttackingUnit.UnitType.ClusterAttackBonusCap )
              attackBonus = AttackingUnit.UnitType.ClusterAttackBonusCap;
       attackPower = ( attackPower * attackBonus ).IntValue;
}

EDIT:  One thing that makes the above equations wrong is that it should be at least (237*(0.035+1))*237*16 instead of (237*0.035+1)*237*16 for example, for it to give the right result in Excel.  But if you look at the code logic I have there, it may be increasing the value a bit too much in general -- each ship only counts every OTHER ship for bonuses, not itself.  And, kjara, thanks again for dong that!
« Last Edit: November 17, 2009, 11:02:08 pm by x4000 »
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Kjara

  • Hero Member Mark II
  • *****
  • Posts: 822
Re: Autocannons need a boost
« Reply #24 on: November 17, 2009, 11:04:51 pm »
No, I think ((339*0.02) +1) * 4 = the damage that one autocannon will do given that there are 340 autocannons on the planet.

Take for example the case where there are 2 autocannons:

Each will do 1.02*4 or ((1*.02)+1)*4
or ((1*.02)+1)*4*2 damage from the group.

I'll admit I got lazy with ()'s, but autogrouping in excel should work.

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Re: Autocannons need a boost
« Reply #25 on: November 17, 2009, 11:05:16 pm »
No wait, that math is right. If you do the calculations yourself it comes ot about right.
And you really shoudn't be doing it they way you say in your edit because if you do then you'll get like 1.035 * 339 which comes out to over 340 attack multiplier, which doesn't sound right to me.....
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Autocannons need a boost
« Reply #26 on: November 17, 2009, 11:07:07 pm »
Yeah, okay -- kjara basically used some reordering of operations so that they aren't grouped the way that I was thinking of, and in my quick look at it that looked wrong.  But, you're right -- the math seems solid, so we're all good and happy. It's what I get for trying to do two things at once! :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Re: Autocannons need a boost
« Reply #27 on: November 17, 2009, 11:08:30 pm »
Except, of course, when you can do two things at once right? ;)
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline Kjara

  • Hero Member Mark II
  • *****
  • Posts: 822
Re: Autocannons need a boost
« Reply #28 on: November 17, 2009, 11:10:08 pm »
There are two ways to handle it actually, the way you are handling it which is additive boost, or a multiplicative boost where its 1.02^# ships(which grows much faster but needs the 1 inside the parenthesis).  I think you were combining the two mentally.

Are the negative boosts from the other two new ships that use this multiplicative or additive?

Edit: do 3 ele bombers each do ((1-.05)^2)*8k or does it do (1-(.05*2))*8k

Edit: I'll note that it the tooltip suggests to me it should be the first, but the way you are handling autocannons suggests the 2nd :).
« Last Edit: November 17, 2009, 11:16:43 pm by kjara »

Offline Revenantus

  • Arcen Games Staff
  • Hero Member Mark III
  • *****
  • Posts: 1,063
Re: Autocannons need a boost
« Reply #29 on: November 17, 2009, 11:28:50 pm »
The code looks good to me.

It's handled additively, which is fine. Autocannons would reach maximum strength when there were 351 on the same planet. For autocannons to become exponentially more powerful the code would be;

Code: [Select]
      FInt attackBonus = (1 + AttackingUnit.UnitType.ClusterAttackBonus)^otherShipCount;

If this were the case, the maximum attack bonus would be achieved when (1.02)^n>=8.

log( 8 )/log(1.02)=105.008 so this would occur when there were 107 autocannons on the planet.

EDIT: Exponential strength increase is much cooler conceptually, if more CPU intensive. If the code were changed to the exponential version, and the autocannons had a cluster bonus of 0.00596, they would again reach maximum strength when there were 351 on the same planet, but you would have to have a lot before you really started noticing the effect of the cluster bonus.

EDIT2: Just occurred to me that the exponential cluster bonus should be 0.00596, not 1.00596, which is the total inside the parentheses after adding the 1. Editing for the sake of clarity.
« Last Edit: November 18, 2009, 03:49:30 am by Revenantus »