Page 1 of 1

Raid/Attack/Farm calculator

Posted: Fri Mar 02, 2007 5:57 pm
by RobinInDaHood
Here's my proposal Jason:

Add the following at the top of the attack screen:

Code: Select all

PHP pseudo code (battlefieldE.php)

<?php
session_start();   // if session isn't already opened
session_register("recordTotalNaq", "recordTotalUU", "recordDamageGiven", "recordDamageReceived", "recordShields", "recordWeapons", "recordFleets", "recordingStatus");

?>



Code: Select all

HTML pseudo code (battlefieldE.php) {top of the presentation logic, would need some formatting to make it cleaner}

<table style="width:100%;">
  <tr>
    <td><a href="stopRecording.php">Stop</a></td>
    <td><a href="startRecording.php">Start</a></td
    <td>&nbsp;</td>
    <td>Naq Stolen</td>
    <td>UU Raided</td>
    <td>Damage Given</td>
    <td>Damage Received</td>
    <td>Shields/Weapons/Fleets</td>
  </tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>$recordTotalNaq</td>
    <td>$recordTotalUU</td>
    <td>$recordDamageGiven</td>
    <td>$recordDamageReceived</td>
    <td>$recordShields/$recordWeapons/$recordFleets</td>
  </tr>
</table>

Values shown here are from the $_SESSION global var.


Code: Select all

PHP Pseudo Code (battlelog.php)

if ($_SESSION["recordingStatus"]) {
  $recordTotalNaq += $naqStolen;
  $recordTotalUU += $uuStolen;
  ...
}



Code: Select all

PHP Pseudo Code (startRecording.php)

<?php
$recordingStatus = TRUE;
$recordTotalNaq = $recordTotalUU = $recordDamageGiven =  $recordDamageReceived = $recordShields = $recordWeapons = $recordFleets = $recordingStatus = 0;

header("Location: battlefieldE.php");
?>

PHP Pseudo Code (stopRecording.php)

<?php
$recordingStatus = FALSE;
header("Location: battlefieldE.php");
?>


Humbly submitted for your consideration. Thanks.

Posted: Fri Mar 02, 2007 9:17 pm
by timex
Nice calculator could come in very handy.

Posted: Mon Mar 05, 2007 4:37 am
by RobinInDaHood
Yes? No?

A recording calculator that would keep track of your massing or raiding totals as you go and could be reset back to 0 at any time. Would always display at the top of the attack screen.

Jason, in thinking about it, I'd make the start button NOT reset the stats and put up a separate reset link. That would allow stopping/starting the recording without losing the accumulators.

Benefits:

1. Accurately track the amount of UU you're raiding down to the unit.
2. Keep track of the massing totals of one or more targets automatically without having to go back through the attack log and manually add report totals up.
3. By being able to start and stop it at any time, you could start massing someone, get distracted by a raid target and pause your calculator, raid a bunch of UU, flip back to your massing and turn the calculator back on.

Most of the code is simple and already written. Would take a few minutes to implement. What do you think?

Posted: Mon Mar 05, 2007 7:40 am
by Kaska
that what that code is?

(lol, dont have any idea what that code means :oops: )

if that's it, i for it :D

Posted: Mon Mar 05, 2007 10:38 am
by Lord Apollo
It sounds like a good idea, but would it cause even more mess on the battlefield screen than there already is?

Posted: Mon Mar 05, 2007 11:00 am
by RobinInDaHood
Lord Apollo wrote:It sounds like a good idea, but would it cause even more mess on the battlefield screen than there already is?


Nope, a single line of totals at the top. If Jason wanted to, he could even set up a link that turned it on and off for those that want to avoid scroll at all costs.

Posted: Mon Mar 05, 2007 11:04 am
by [DDE] Bastion
I hate you robin

Oh and its a good idea :p

Love Laura

Posted: Mon Mar 05, 2007 12:29 pm
by RobinInDaHood
[DDE] Bastion wrote:I hate you robin


I know and I hate you too.

Don't be a hater just 'cause I > U. ; )

Re: Raid/Attack/Farm calculator

Posted: Mon Mar 05, 2007 1:31 pm
by Hensenshi
Looks good, I think this is the kind of suggestions we need to get. Where everything is already coded for Jason. :P There's only one problem:

RobinInDaHood wrote: <td><a href="startRecording.php">Start</a></td


You didn't close your tag. :P

Posted: Mon Mar 05, 2007 1:32 pm
by [DDE] Bastion
You're so sweet!

Thats BS... whats your ascended ID :p

Love Laura

Posted: Mon Mar 05, 2007 1:53 pm
by RobinInDaHood
I'm always sweet.

Fear my 2100 planets a day production rate.

Posted: Mon Mar 05, 2007 1:54 pm
by [DDE] Bastion
cookie?
lol... well you're hiding... panzy :p

Re: Raid/Attack/Farm calculator

Posted: Mon Mar 05, 2007 1:56 pm
by RobinInDaHood
Hensenshi wrote:There's only one problem:

You didn't close your tag. :P


If I do all the work, Jason might feel like he's not really contributing and I can't have his ego reduction on my conscience. ;)

Posted: Tue Mar 06, 2007 6:40 am
by Asclepius
sounds gd, a simple and helpful addition.. :-)