User Name
Password

Go Back   Planetarion Forums > Planetarion Related Forums > Planetarion Suggestions

Reply
Thread Tools Display Modes
Unread 19 Apr 2006, 14:58   #1
Xeno
hirr
 
Join Date: Nov 2000
Location: Paris, France
Posts: 187
Xeno will become famous soon enoughXeno will become famous soon enough
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
Xeno is offline   Reply With Quote
Unread 19 Apr 2006, 15:46   #2
Xeno
hirr
 
Join Date: Nov 2000
Location: Paris, France
Posts: 187
Xeno will become famous soon enoughXeno will become famous soon enough
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
Xeno is offline   Reply With Quote
Unread 19 Apr 2006, 19:00   #3
Banned
Banned
 
Banned's Avatar
 
Join Date: Jul 2003
Location: ******
Posts: 2,326
Banned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so little
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?
Banned is offline   Reply With Quote
Unread 19 Apr 2006, 19:05   #4
Shyne
Flash in the PAN
 
Join Date: Aug 2005
Location: Birmingham, Romania
Posts: 554
Shyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud of
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 )
Shyne is offline   Reply With Quote
Unread 19 Apr 2006, 20:13   #5
Banned
Banned
 
Banned's Avatar
 
Join Date: Jul 2003
Location: ******
Posts: 2,326
Banned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so little
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 :\
Banned is offline   Reply With Quote
Unread 19 Apr 2006, 21:56   #6
Wandows
[Vision]
 
Wandows's Avatar
 
Join Date: Jul 2001
Location: The Netherlands
Posts: 897
Wandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond repute
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
Wandows is offline   Reply With Quote
Unread 19 Apr 2006, 22:18   #7
Kal
Inactive peon
 
Kal's Avatar
 
Join Date: Jan 2003
Posts: 6,050
Kal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant futureKal has a brilliant future
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)
__________________
Kal

Round 6-10 NoS member-->NoS junior HC
Round 10.5 FAnG member
Round 11-15 PATeam
Round 17-30 PATeam
Round 31 ???

Check out toastmonster.com for crazy illustrations and art
Kal is offline   Reply With Quote
Unread 20 Apr 2006, 00:13   #8
Shyne
Flash in the PAN
 
Join Date: Aug 2005
Location: Birmingham, Romania
Posts: 554
Shyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud ofShyne has much to be proud of
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.
Shyne is offline   Reply With Quote
Unread 20 Apr 2006, 01:56   #9
furball
Registered Awesome Person
 
furball's Avatar
 
Join Date: Jul 2002
Posts: 5,676
furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.furball has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
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!
furball is offline   Reply With Quote
Unread 20 Apr 2006, 05:39   #10
coffee-
Beoyotch
 
coffee-'s Avatar
 
Join Date: Mar 2005
Location: Ontario, Canada
Posts: 361
coffee- is just really nicecoffee- is just really nicecoffee- is just really nicecoffee- is just really nice
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.
coffee- is offline   Reply With Quote
Unread 20 Apr 2006, 09:51   #11
Xeno
hirr
 
Join Date: Nov 2000
Location: Paris, France
Posts: 187
Xeno will become famous soon enoughXeno will become famous soon enough
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.
Xeno is offline   Reply With Quote
Unread 20 Apr 2006, 10:23   #12
higginz
||Dude||
 
higginz's Avatar
 
Join Date: Oct 2004
Location: wigan, england
Posts: 119
higginz will become famous soon enoughhigginz will become famous soon enough
Re: PHP and user friendliness

legend coffee, works really well
__________________
[APA] - The monkeys will come back eventually
higginz is offline   Reply With Quote
Unread 21 Apr 2006, 00:36   #13
Thrud
Old User
 
Thrud's Avatar
 
Join Date: Dec 2003
Posts: 81
Thrud is a splendid one to beholdThrud is a splendid one to beholdThrud is a splendid one to beholdThrud is a splendid one to beholdThrud is a splendid one to beholdThrud is a splendid one to beholdThrud is a splendid one to beholdThrud is a splendid one to behold
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
Thrud is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 07:59.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018