For those of you whom use the Empire via console, on a *nix system, you shoud
have an application called `bc` - derived from `dc`, which stands for "Desktop
Calculator". bc is more user friendly and has an easy to use, BASIC like
scripting interface.
I started transferring my Excel formulas to bc - one of the first ones I did
was to calculate how much *actual* tech you will produce at the update. It will
be posted below between #START and #END tags - but first, a quick tutorial.
I'll also post one to calculate how many mill your `e` sector will produce...
You'll have to save script to a file, lets say we call it bctech. Then, in the
directory the file is in, type:
bc -lq bctech
the -l is required to use bc's extended math library, and the q prevents a
bunch of banner hooey from showing
You'll then see something like this:
Empire Tech Calculator
by Scott C. Zielinski aka Gemini
(c) 2009 by Scott C. Zielinski
v1.3
ASSSUMING:
ETU : 60
Nation Decay Rt : .01
Nation Decay ETU: 96
Tech Log Base : 2
Easy Tech : 1
Ok? (1)=Yes;(0)=No
I set the defaults to what I thought were standard for an EASY_TECH game -
likely the Log base and Easy Tech could change - this info for you game can be
displayed via the `version` command.
if it is not correct, typing 1 and then pressing enter will continue on - if
not, use 0 to change. You can also modify the script variables if you find the
defaults don't work.
Once your base numbers are entered, you get the following:
Using EDU of : 0
Using Tech Level: 0
Tech Products :
Enter 0 to exit, -1 for new EDU/TECH)
Here is where you enter the actual number of "Tech Products" - should be a
number equal to the amount of dust you're using.
However, it should be noted that we're currently using an EDU and tech level of
'0'. The reason these two variables are separate from the rest is that you have
the opportunity to change these two numbers at each calculation - this allows
for testing different strategies. In this case, we want to change those
numbers, so, we enter -1. We get:
Enter Current EDU : 33.26
Enter Current Tech: 97.14
Using EDU of : 33.26
Using Tech Level: 97.14
Tech Products :
Enter 0 to exit, -1 for new EDU/TECH)
I have entered 33.26 and 97.14 - we are now prompted to enter "Tech Products"
again. Lets say I decide on 22 to produce:
I get:
######### RESULTS #########
Breakthroughs : 16.2492
Tech Delta : 5.0225
Tech Decay : .6071
Tech after Update: 101.5554
###########################
Using EDU of : 33.26
Using Tech Level: 97.14
Tech Products :
Enter 0 to exit, -1 for new EDU/TECH)
This tells me I would have 16 breakthrough for a tech delta of 5.02 - (the
delta is what you actually increase your tech level by) - bc subtracts decay,
and adds to you "current tech" that you entered for "Using tech Level:" for a
net result of 101.56.
You're then prompted for tech products again. You think, ok, what if I max
production?
You enter '38' for tech products:
######### RESULTS #########
Breakthroughs : 28.0668
Tech Delta : 5.8109
Tech Decay : .6071
Tech after Update: 102.3438
###########################
Using EDU of : 33.26
Using Tech Level: 97.14
Tech Products :
Enter 0 to exit, -1 for new EDU/TECH)
WOW! All those extra resources - and only an increase of .8
Is the .8 worth the extra 16 dust, 80 oil and 160 lcms? Could be - maybe not.
I would certaily pay it ifm on the next update, that .8 made the difference of
a new unit or not - you decide.
You could then go on and change you EDU Tech level numbers as if you were in
the next update to help you plan future updates, etc, etc.
Post or email with questions or even if something like these `bc` formulas
would even be used by the community.
#STARTBCSCRIPT
# Must be used with option -l for mathlib
# add q to -l option to "quiet" banner display
# Empire Tech Calculator
# by Scott C. Zielinski aka Gemini
# (c) 2009 by Scott C. Zielinski
# v1.3
scale = 4
tb = 2
et = 1
tp = 1
etus = 60
ndec = .01
decetu = 96
ed = 0
tlev = 0
define tech(prod,edu){
edud=(edu-5)/(edu+5)
return prod*edud
}
define newtech(breaks,t,et){
tdiff=et-1
breaks=breaks-tdiff
return log(breaks,t)+1
}
define log(value,base) {
return (l(value)/l(base))
}
define decay(techlevel,decayrate,etu,every){
return (techlevel*decayrate*etu)/every
}
print "\nEmpire Tech Calculator"
print "\nby Scott C. Zielinski aka Gemini"
print "\n(c) 2009 by Scott C. Zielinski"
print "\nv1.3"
print "\n"
print "ASSSUMING:\n"
print "ETU : ";etus
print "Nation Decay Rt : ";ndec
print "Nation Decay ETU: ";decetu
print "Tech Log Base : ";tb
print "Easy Tech : ";et
print "Ok? (1)=Yes;(0)=No ";yn=read()
if(yn!=1) {
print "Enter ETUs : ";etus=read()
print "Enter Nat Decay : ";ndec=read()
print "Enter Nat Dec ETUs: ";decetu=read()
print "Enter Tech Base : ";tb=read()
print "Enter Easy Tech : ";et=read()
print "\n"
}
#print "Enter Current EDU : ";ed=read()
#print "Enter Current Tech: ";tlev=read()
while (1) {
print "\nUsing EDU of : ";ed
print "Using Tech Level: ";tlev
print "\nTech Products :"
print "\nEnter 0 to exit, -1 for new EDU/TECH)"
print "\n";tp=read()
if (tp==0) break;
if (tp==-1){
print "Enter Current EDU : ";ed=read()
print "Enter Current Tech: ";tlev=read()
}else{
breakt=tech(tp,ed)
print "\n######### RESULTS #########\n"
print "Breakthroughs : ";breakt
td=newtech(breakt,tb,et)
print "Tech Delta : ";td
tdecay=decay(tlev,ndec,etus,decetu)
print "Tech Decay : ";tdecay
print "Tech after Update: ";tlev+td-tdecay
print "###########################\n"
}
}
quit
#ENDBCSCRIPT
Scott C. Zielinski
Gemini