New CD formula
Moderators: JettJackson, Holti, jouldax
New CD formula
Azool I have been working trying to come up with a code that work fair for all. I have two the first one Drones6 uses your new code with a few changes only if the attacker level is less then the defenders level if not then the old code is used. The next code Drones7 which I like the best and think it is the fairest, this is how the code works. If the attackers is at level 15 and the defenders is at level 16 then the random number that is generated by the last part of the old code is minus by 1. If the attackers is at level 15 and the defender is level 30 then it would be minus 15. Take a look at both pagers and run them with differant levels and tell me what you think. If you like it I can send you the code, I am sure you will have to rework it for PHP.
I got this ideal from a post that Sterling made in another post. It looked to be a good thing to try.
http://freon22.brinkster.net/Drones6.asp
http://freon22.brinkster.net/Drones7.asp
I got this ideal from a post that Sterling made in another post. It looked to be a good thing to try.
http://freon22.brinkster.net/Drones6.asp
http://freon22.brinkster.net/Drones7.asp
Last edited by Freon22 on Sun Oct 03, 2004 4:00 am, edited 3 times in total.
No if the attacker level is higher then the defenders level then its the same code that has been used for years.Rosebud wrote:if the attacker is at lvl 30 and defender is lvl 15 does it add 15%?
The last part of the old code is a random number.Rosebud wrote: also you percentage display needs to be bumped over 2 decimal places 208 which is 0.52% of 400 CDs
mt_rand($curr_attacker->level_id / 4, $curr_attacker->level_id))
so if the attacker is level 15 then the random number that can be generated is from 15 to 4 and that number is added the first part of the code which is the default.
(mt_rand(3, 54).
So what I did was if the defenders level is below the attackers level then I took the random number that is generated by the last part of the code and minus the differants between the defenders level and the attackers level. So if the random number generated by the first part "default part" is 20 and the random number generated by the last part is 8. The old code would launch 28% of your CDs that you have on your ship. So if the defenders is two levels higher then the percent that is lauched is 26% instead of 28%. When you are dealing with random numbers all that you know is what the high number could be and what the low number could be. That is why almost everything in SMR is a random.
percent attacking = ((mt_rand(10, 54) + mt_rand($curr_attacker->level_id / 4, $curr_attacker->level_id)) - (curr_defenders_level - curr_attackers_level)/5) / 100
what about that? Exact same old formula cept 10-54, but takes into account defender and attacker in BOTH adding and subtracting? attacker is 15 defender is 30 it becomes -3... attacker is 30 defender is 15 it becomes +3 that way it works both ways. Also no possibility of a negative shot while maintaining the possibility of a perfect shot.
also what I meant by your percentage being wrong is that it says .52%... its actually 52% just a disply error i thought'd i'd mention for you.
what about that? Exact same old formula cept 10-54, but takes into account defender and attacker in BOTH adding and subtracting? attacker is 15 defender is 30 it becomes -3... attacker is 30 defender is 15 it becomes +3 that way it works both ways. Also no possibility of a negative shot while maintaining the possibility of a perfect shot.
also what I meant by your percentage being wrong is that it says .52%... its actually 52% just a disply error i thought'd i'd mention for you.
Last edited by Rosebud on Thu Jul 01, 2004 6:25 pm, edited 2 times in total.
B.O.B. - Rosebud is one of craziest cool drunks I know.
That would mean you are giving a penalty from the old formula when facing a defender of higher level, without any counterbalancing benefit over the old formula when facing an opponent of lower level. Further, the reduction of 1% for every defender level higher is greater than the reduction under the current formula. Therefore, this change would greatly weaken Ikky as a whole.Freon22 wrote: No if the attacker level is higher then the defenders level then its the same code that has been used for years.
Edain
Do you think the new code that is being used now does anything for a counterbalance? The way the code is now it can add shields to the defenders ship. I think that is a counterbalance in the wrong way.Edain wrote:That would mean you are giving a penalty from the old formula when facing a defender of higher level, without any counterbalancing benefit over the old formula when facing an opponent of lower level.
I am sure that Azool can make it a 1/2% for each level if he wanted. This code uses the old code for the attacker when attacking someone of the same level or under. The hole ideal here was to find a way to put the defenders level into the code so it would be harder for low level attackers to pod high level defenders with CDs. At least that is how I understanded it because what other reason is there to change the code in the first place.Edain wrote: Further, the reduction of 1% for every defender level higher is greater than the reduction under the current formula. Therefore, this change would greatly weaken Ikky as a whole.
Yes, it is counterbalanced by the fact that when you are a higher level than your opponent, you will generally have higher accuracy than under the old formula. The negative damage problem is something that needs to be fixed quickly, certainly, but not really a convincing argument that your formula wouldn't make Ik weaker.Freon22 wrote: Do you think the new code that is being used now does anything for a counterbalance? The way the code is now it can add shields to the defenders ship. I think that is a counterbalance in the wrong way.
Actually, that wasn't the whole idea, that was about half the idea. The other half being it should be easier for higher levels to pod lower levels with CDs. That's the half which is beneficial to Ik, which your formula removes.Freon22 wrote: The hole ideal here was to find a way to put the defenders level into the code so it would be harder for low level attackers to pod high level defenders with CDs. At least that is how I understanded it because what other reason is there to change the code in the first place.
Edain
Here is your codeRosebud wrote:percent attacking = ((mt_rand(10, 54) + mt_rand($curr_attacker->level_id / 4, $curr_attacker->level_id)) - (curr_defenders_level - curr_attackers_level)/5) / 100
http://freon22.brinkster.net/Drones8.asp
I know am just playing with differant code and it is easer to .52 * 400 = 208Rosebud wrote:I meant by your percentage being wrong is that it says .52%... its actually 52% just a disply error i thought'd i'd mention for you.
Last edited by Freon22 on Sun Oct 03, 2004 4:01 am, edited 2 times in total.
Well then Edain I guess the new code is fine. At least for you! But most of the players from the poll wanted some change made to it. Only two think the new code is fine I wonder who the other one is. So I guess you should try to come up with something to help, other then to just say its fine and the neg, number needs fixing. I am just trying out ideals and runing the code to see how it works.
Last the old code already give an advantage the higher your level is.
percent attacking = (mt_rand(3, 54) + mt_rand($curr_attacker->level_id / 4, $curr_attacker->level_id)) / 100;
So it seem that the main reason was to give the low level attacker a disadvantage, thats why they would want to add the defenders level into the mix. I am sure that Azool already know how to fix the neg, number problem, and am guessing he is trying to rework he new code to make it fairer for all. I am going to back off of this and give him time to do his magic.
Last the old code already give an advantage the higher your level is.
percent attacking = (mt_rand(3, 54) + mt_rand($curr_attacker->level_id / 4, $curr_attacker->level_id)) / 100;
So it seem that the main reason was to give the low level attacker a disadvantage, thats why they would want to add the defenders level into the mix. I am sure that Azool already know how to fix the neg, number problem, and am guessing he is trying to rework he new code to make it fairer for all. I am going to back off of this and give him time to do his magic.
I have come up with an alternative. Just because you choose to ignore it, doesn't mean I haven't done it.Freon22 wrote:So I guess you should try to come up with something to help, other then to just say its fine and the neg, number needs fixing.
Yes, but they gained that bonus equally against all level opponents. Now, they get MORE of a bonus against lower level opponents. Honestly, it's not that complex.Freon22 wrote: Last the old code already give an advantage the higher your level is.
percent attacking = (mt_rand(3, 54) + mt_rand($curr_attacker->level_id / 4, $curr_attacker->level_id)) / 100;
So it seem that the main reason was to give the low level attacker a disadvantage, thats why they would want to add the defenders level into the mix.
Edain