Page 4 of 8
Posted: Fri Apr 21, 2006 10:20 am
by Zeon
Sleipnir wrote:Zekk wrote:dude! awsome!
btw, whats TI-83?
*novice programer*
Apparently, it's the new way of teaching math to kids these days. Ah, back in ye olden days, when we had such sophisticated tools as our heads, and pen n paper. No programmable calculators for me. If something comes up that a simple calculator or pen and paper can't fix, Matlab is my next stop.
I agree. Its crazy my TI 84 hooks into my computer and downloads software. What ever happened to 1+1+1+=4.....oh thats probibly why I need a calculator.
Posted: Fri Apr 21, 2006 12:10 pm
by bryan
hmm, the formula seem to be a little different to what i was expecting.
you have a b^2, hmmmm.
these are my formula i work out quite some time ago
Total Naq need for up number x: 15000(3x+1)
Total Naq need for up giving you x untrained per day: 5000(x-1)
Total Naq needed to get UP to number x: 7500x(x+1)
Total Naq needed to get up giving you x untrained per day: 833.33(x^2+x-2)
i suppose you are using the first one, but really, shouldnt you be using the last 1?
Posted: Fri Apr 21, 2006 12:28 pm
by agapooka
I'll just post the source again, since I recently updated it a bit (well, mostly so that the source is cleaner and easier to edit).
Code: Select all
<?php
$a = $HTTP_GET_VARS['a'];
$b = $HTTP_GET_VARS['b'];
$c = $HTTP_GET_VARS['c'];
$p = $HTTP_GET_VARS['p'];
if ($a == '') { $a = '0'; }
if ($b == '') { $b = '0'; }
if ($c == '') { $c = '0'; }
$title = "Pookie's TGW Calculator";
$fname = "up.php";
$disclaimer = "Property of Jason Lambert (Agapooka)";
$head = "<html><title>".$title."</title><head><center><h1>".$title."</h1></center></head>";
$body = "<body><center><table width=500 cellspacing=3 cellpadding=3 border=1>";
$tbl0 = "<tr><td width=100%><center><form action='".$fname."' method=get>";
$frma = "<input size=8 maxlength=8 value=".$a." name=a />";
$frmb = "<input size=8 maxlength=8 value=".$b." name=b />";
$frmc = "<input size=3 maxlength=3 value=".$c." name=c />";
$frm0 = "<input type=submit value='GO!' />";
$foot = "</form></center></td></tr></table><small>".$disclaimer."</small></center></body></html>";
if ($p == '' || $p == '0')
{
$frmp = "<select name='p'>
<option value=0 selected>Calculate:</option>
<option value=1>Unit Production Cost</option>
<option value=2>Ascended Fleet Cost</option>
<option value=3>MS Weapon Capacity Cost</option>
<option value=4>MS Shield Capacity Cost</option>
<option value=5>Spy Levels</option></select>";
echo $head,$body,$tbl0,$frmp,$frm0,$foot;
}
if ($p == '1')
{
$frmp = "<select name='p'>
<option value=0>Calculate:</option>
<option value=1 selected>Unit Production Cost</option>
<option value=2>Ascended Fleet Cost</option>
<option value=3>MS Weapon Capacity Cost</option>
<option value=4>MS Shield Capacity Cost</option>
<option value=5>Spy Levels</option></select>";
$currency = "Naquadah";
$ans = (-1*($a-$b)/3)*((15000*(($b-1)/3)+15000*(($a+2)/3))/2);
$answ = "<br />Cost: ".number_format($ans, 0, '.', ',')." ".$currency;
echo $head,$body,$tbl0,$frma,$frmb,$frmp,$frm0,$answ,$foot;
}
if ($p == '2')
{
$frmp = "<select name='p'>
<option value=0>Calculate:</option>
<option value=1>Unit Production Cost</option>
<option value=2 selected>Ascended Fleet Cost</option>
<option value=3>MS Weapon Capacity Cost</option>
<option value=4>MS Shield Capacity Cost</option>
<option value=5>Spy Levels</option></select>";
$currency = "Dark Matter Units";
$ans = (-1*($a-$b))*(((5000*($b-1)+5000*($a+4))/2));
$answ = "<br />Cost: ".number_format($ans, 0, '.', ',')." ".$currency;
echo $head,$body,$tbl0,$frma,$frmb,$frmp,$frm0,$answ,$foot;
}
if ($p == '3')
{
$frmp = "<select name='p'>
<option value=0>Calculate:</option>
<option value=1>Unit Production Cost</option>
<option value=2>Ascended Fleet Cost</option>
<option value=3 selected>MS Weapon Capacity Cost</option>
<option value=4>MS Shield Capacity Cost</option>
<option value=5>Spy Levels</option></select>";
$currency = "Naquadah";
$ans = (-1*($a-$b))*(((10000*($b-1)+10000*($a+2))/2));
$answ = "<br />Cost: ".number_format($ans, 0, '.', ',')." ".$currency;
echo $head,$body,$tbl0,$frma,$frmb,$frmp,$frm0,$answ,$foot;
}
if ($p == '4')
{
$frmp = "<select name='p'>
<option value=0>Calculate:</option>
<option value=1>Unit Production Cost</option>
<option value=2>Ascended Fleet Cost</option>
<option value=3>MS Weapon Capacity Cost</option>
<option value=4 selected>MS Shield Capacity Cost</option>
<option value=5>Spy Levels</option></select>";
$currency = "Naquadah";
$ans = (-1*($a-$b))*(((12000*($b-1)+12000*($a+(10/12)))/2));
$answ = "<br />Cost: ".number_format($ans, 0, '.', ',')." ".$currency;
echo $head,$body,$tbl0,$frma,$frmb,$frmp,$frm0,$answ,$foot;
}
if ($p == '5')
{
$frmp = "<select name='p'>
<option value=0>Calculate:</option>
<option value=1>Unit Production Cost</option>
<option value=2>Ascended Fleet Cost</option>
<option value=3>MS Weapon Capacity Cost</option>
<option value=4>MS Shield Capacity Cost</option>
<option value=5 selected>Spy Levels</option></select>";
$currency = "Naquadah";
$ans = (6000*pow(2,($c-1)));
$answ = "<br />Cost: ".number_format($ans, 0, '.', ',')." ".$currency."<br />Cost for Replicators: ".number_format(0.9*$ans, 0, '.', ',')." ".$currency;
echo $head,$body,$tbl0,$frmc,$frmp,$frm0,$answ,$foot;
}
?>
My UP formula is
-((a-b)/3)((15000((b-1)/3)+15000((a+2)/3))/2)
Bryan's last formula is good, except that it can only calculate the cost if you're starting at 0 (or 1) UP. Mine can start from wherever and end wherever.
All the formulas are in the code. They can be seen as whatever is after a $ans = thingy.
-Jason
Posted: Fri Apr 21, 2006 12:32 pm
by vinny d
{1,15000}
{ans(1)+3,ans(2)+15000}
U.P. For ti-83, though that shows all the levels, not specific amounts.
{0,6000}
{ans(1)+1,ans(2)*2}
Spy levels, none reps. For reps, just divide by 10 and times by 9.
Now, i don't know how to make these programs on my Ti-83, but if you guys know how, do it up.
Posted: Fri Apr 21, 2006 12:42 pm
by agapooka
Don't divide by 10 and then multiply by 9, just multiply by 0.9.
Anyways, the TI-83 (will work with TI-84 too, duh

) program should be (type this in the program editor, of course, the ":" does not need to be typed, it just means that it is a new line. If you have a TI-whatever, you ought to know what I'm referring to):
Code: Select all
:Disp "A=CURRENT UP"
:Disp "B=DESIRED UP"
:Prompt A,B
:Disp (-1((A-B)/3)((15000((B-1)/3)+15000((B+2)/3))/2))
Posted: Fri Apr 21, 2006 5:03 pm
by bryan
ti programming is a lot of fun, im currently attempting to build a basic intergration by parts program. it will be interesting to see if i can.
thats not my problem agapooka, my formula is easy to get from a - b, just subtract a. the problem is that your formula looks completely different, not even the constants or basic fom is the same.
Posted: Fri Apr 21, 2006 5:38 pm
by agapooka
Everything that I do in the matter of arithmetics is unorthodox.
I make my own theorems for my classes, and the teachers don't understand them, they just see that they work...
Oh well.
Posted: Fri Apr 21, 2006 6:08 pm
by vinny d
Back to the divide by 10 times by 9. I find myself doing things like that quite often. I can never go simple, complex. Grrr oh well, and i don't know how to create calculator programs. If i did know, I probably would have a lot of the games formulas programmed.
Posted: Sun Apr 23, 2006 4:54 am
by Legoless
Thanks guys, this was really helpful. Does anyone have any more formulas for actions? Strike action, def, covert, got it for MS, thanks to vinny.
Posted: Sun Apr 23, 2006 5:39 am
by agapooka
I could always make some. It shouldn't be too hard, actually.
Posted: Sun Apr 23, 2006 10:47 am
by Legoless
That would be great Agapooka.

Posted: Sun Apr 23, 2006 11:42 am
by ~mist~
not a bad calucalotro....
Posted: Wed Apr 26, 2006 10:44 am
by Legoless
I've heard those formulas were on The Deity's guide, but I cant find it anymore, can someone mail me it or pm please?
Posted: Wed Apr 26, 2006 4:23 pm
by agapooka
This isn't about Deity; besides, what formulas are you even referring to?
Posted: Wed Apr 26, 2006 9:51 pm
by WhiteyDude
The formulas for basicly everything game related were in it

. Thanks for the source Pooks - seems pretty basic once you know the numbers...
It wouldn't be too hard for the game administration to impliment into the game either...
Little popup window on the side with a php calc based on what you have ingame...
/Whitey