|
19 Apr 2006, 14:58
|
#1
|
hirr
Join Date: Nov 2000
Location: Paris, France
Posts: 187
|
PHP and user friendliness
The current XP formula reads:
XP = roids * bravery factor
bravery factor = 5*min(2,target_score/planet_score)*min(2,target_value/planet_value)
Now, I haven't played this game since round 13, and was pretty much like "HUH?" when reading up on the changes. So I went asking a couple of lemmings about the "min" part of the formula, but they basically just went "WTF?!" and "SAY WHAT?" about the whole thing.
I then addressed the entire lemming community of hirr, suggesting it had to do with MINIMUM or perhaps MINING, but everywhere I looked the response was pretty much the same (I have counted twelve HUHs, five WTFs, half a dozen DOHs and the inevitable, twenty-something immediate suicides).
Then, probably by some whimsical coincidence, one of my brave comrades claimed the answer was to be found here.
It's a freaking PHP code! You might as well have written it in Esperanto, as both, to most readers, are equally gibberish.
Or was the smartest lemming wrong?
Xeno
__________________
Cogito ergo dumb
|
|
|
19 Apr 2006, 15:46
|
#2
|
hirr
Join Date: Nov 2000
Location: Paris, France
Posts: 187
|
Re: PHP and user friendliness
Quote:
Originally Posted by idimmu
how would you write it?
|
I'ld explain what it is. Not many people will go to the lengths I did to find out what it's all about, hence you risk losing potential players.
Xeno
__________________
Cogito ergo dumb
|
|
|
19 Apr 2006, 19:00
|
#3
|
Banned
Join Date: Jul 2003
Location: ******
Posts: 2,326
|
Re: PHP and user friendliness
Quote:
Originally Posted by Xeno
It's a freaking PHP code!
|
It's pseudocode, not PHP specific. I'm with idimmu though, how would you explain it?
|
|
|
19 Apr 2006, 19:05
|
#4
|
Flash in the PAN
Join Date: Aug 2005
Location: Birmingham, Romania
Posts: 554
|
Re: PHP and user friendliness
Idd its pseudocode, but I guess its possible some wouldn't get it.
add a line that says (e.g. where min returns the smaller of the numbers in brackets, e.g. min(2, 5, 1) = 1 )
|
|
|
19 Apr 2006, 20:13
|
#5
|
Banned
Join Date: Jul 2003
Location: ******
Posts: 2,326
|
Re: PHP and user friendliness
Quote:
Originally Posted by Shyne
add a line that says (e.g. where min returns the smaller of the numbers in brackets, e.g. min(2, 5, 1) = 1 )
|
The manual used to have an explanation of that :\
|
|
|
19 Apr 2006, 21:56
|
#6
|
[Vision]
Join Date: Jul 2001
Location: The Netherlands
Posts: 897
|
Re: PHP and user friendliness
or you can simply write it all out, its a bit longer, but i suppose anyone can understand that?
XP = roids * bravery factor
bravery factor = 5 * score bravery * value bravery
score bravery = target_score/planet_score **
value bravery = target_value/planet_value **
** score and value bravery can have a maximum value of 2.
__________________
[Vision] in a lost dream, contributing to The 5th Element at present
|
|
|
19 Apr 2006, 22:18
|
#7
|
Inactive peon
Join Date: Jan 2003
Posts: 6,050
|
Re: PHP and user friendliness
Quote:
Originally Posted by Wandows
or you can simply write it all out, its a bit longer, but i suppose anyone can understand that?
XP = roids * bravery factor
bravery factor = 5 * score bravery * value bravery
score bravery = target_score/planet_score **
value bravery = target_value/planet_value **
** score and value bravery can have a maximum value of 2.
|
I like that, I now understand the XP formula (I hadn't bothered to decode it before)
|
|
|
20 Apr 2006, 00:13
|
#8
|
Flash in the PAN
Join Date: Aug 2005
Location: Birmingham, Romania
Posts: 554
|
Re: PHP and user friendliness
Quote:
Originally Posted by Wandows
or you can simply write it all out, its a bit longer, but i suppose anyone can understand that?
XP = roids * bravery factor
bravery factor = 5 * score bravery * value bravery
score bravery = target_score/planet_score **
value bravery = target_value/planet_value **
** score and value bravery can have a maximum value of 2.
|
Thats good!
Coupled with a pseudo example, I cant see anyone not understanding.
|
|
|
20 Apr 2006, 01:56
|
#9
|
Registered Awesome Person
Join Date: Jul 2002
Posts: 5,676
|
Re: PHP and user friendliness
Quote:
Originally Posted by Shyne
Thats good!
Coupled with a pseudo example, I cant see anyone not understanding.
|
Shame there isn't one at the present, eh?
__________________
Finally free!
|
|
|
20 Apr 2006, 05:39
|
#10
|
Beoyotch
Join Date: Mar 2005
Location: Ontario, Canada
Posts: 361
|
Re: PHP and user friendliness
Not sure if anyone could be bothered with this, whipped this up last night while procrastinating. Due to how much more information is need to be given to get an accurate XP calc this will work as an alias instead of a public command.
Works like this, you type:
/xp TargetValue YourValue TargetScore YourScore RoidsCaptured
Code:
xp {
set %brave.value $calc($1 / $2)
set %brave.score $calc($3 / $4)
if (%brave.value > 2) set %brave.value 2
if (%brave.score > 2) set %brave.score 2
set %bravery $calc(%brave.value * %brave.score)
set %xp $calc($5 * 5 * %bravery)
set %value $calc($5 * 200)
set %score $calc(%value + (%xp * 50))
echo -a XP Gained: %xp Score Gained: %score
}
__________________
Peekaboo!
Last edited by coffee-; 20 Apr 2006 at 07:23.
|
|
|
20 Apr 2006, 09:51
|
#11
|
hirr
Join Date: Nov 2000
Location: Paris, France
Posts: 187
|
Re: PHP and user friendliness
Quote:
Originally Posted by coffee-
/xp TargetValue YourValue TargetScore YourScore RoidsCaptured
|
Excellent! Thank you.
I added rounding, btw:
Code:
set %xp.final $round(%xp,0)
set %score.final $round(%score,0)
This way you avoid results with multiple digits.
Xeno
__________________
Cogito ergo dumb
Last edited by Xeno; 20 Apr 2006 at 10:24.
|
|
|
20 Apr 2006, 10:23
|
#12
|
||Dude||
Join Date: Oct 2004
Location: wigan, england
Posts: 119
|
Re: PHP and user friendliness
legend coffee, works really well
__________________
[APA] - The monkeys will come back eventually
|
|
|
21 Apr 2006, 00:36
|
#13
|
Old User
Join Date: Dec 2003
Posts: 81
|
Re: PHP and user friendliness
Quote:
Originally Posted by idimmu
maybe, just maybe, on the gal page by each planet put the amount of xp you'd get if you made a 100% successful hit on them. this could be done easily client side with some javascript and add pretty much no extra load to the server
|
This is something that I've just started but it does have the max gain from a completely successful hit down the side.
http://patools.thrud.co.uk
it is totally under construction at the moment so it will be changing all the time, but its there if anyone needs it. The rating is from 0 to 100, 100 being the optimum target for your current planet. I normally don't post url's to my stuff but this was appropriate to part of the convo.
Cheers Thrud
|
|
|
|
All times are GMT +1. The time now is 20:06.
| |