03-13-2011, 08:01 PM | #41 | |
Join Date: Jul 2007
Location: Ann Arbor, MI
|
Re: Powerstone Program
Quote:
Is there a reason that you're using codepad.org instead of one of the free compilers for your platform? I doubt that codepad.org is capable of using the code I provided. It lacks provisions for command line parameters and for libraries besides libc. It needs libm.
__________________
Online Campaign Planning |
|
03-13-2011, 09:29 PM | #42 | |
Computer Scientist
Join Date: Aug 2004
Location: Dallas, Texas
|
Re: Powerstone Program
Quote:
And codepad.org still has some new shinny left on it for me, or had before the apparent omission of some math functionality was revealed. :( |
|
03-13-2011, 10:05 PM | #43 |
Join Date: Feb 2006
Location: Krotz Springs, LA US
|
Re: Powerstone Program
Unless I've missed something at codepad.org, the inability to link against the standard libraries isn't the only problem—although, that's a doozy. Say someone did write you a version which replaced pow()—and yes, that's easy enough to do—how do you interact with the program at codepad.org? I haven't dug into every nook and cranny, but I haven't noticed any way to provide input to a program. For powerstone.c, you'd always be looking at its usage message, and that's not terribly useful.
__________________
Thomas M. EDWARDS <tmedwards@motoslave.net> GCA4 resources: GCA Repository, Phoenix (r66), GMCS (2.17), Bookish (r12) |
03-13-2011, 10:24 PM | #44 |
Dog of Lysdexics
Join Date: Oct 2004
Location: Melbourne FL, Formerly Wellington NZ
|
Re: Powerstone Program
Well this thread has inspired me to finally build my GURPS Enchantment Calculator
|
03-13-2011, 10:25 PM | #45 |
Join Date: Aug 2007
Location: Vermont, USA
|
Re: Powerstone Program
Bah. Why am I using google when I've got javascript? This version doesn't require an internet connection, just any javascript-capable browser:
Code:
javascript:c=prompt('Powerstone%20Capacity:','');if(/\d+/.test(c)){(10*c*c+40*c)*Math.pow(54/53,c)+20*c}else{null}; |
03-13-2011, 10:32 PM | #46 |
Dog of Lysdexics
Join Date: Oct 2004
Location: Melbourne FL, Formerly Wellington NZ
|
Re: Powerstone Program
I plug that into Chrome, it produced the prompt, but not the results.
|
03-13-2011, 11:03 PM | #47 |
Join Date: Feb 2005
Location: Berkeley, CA
|
Re: Powerstone Program
You can also just use a scientific calculator. Anyway, here is a google docs spreadsheet that calculates most of the stuff you want to know (you'll have to copy it; I didn't turn on edit access). Note that the price listed is per the formula in Magic, which is not quite correct, but the correct formula is messy to calculate and not different enough to really matter.
Last edited by Anthony; 03-13-2011 at 11:07 PM. |
03-13-2011, 11:18 PM | #48 | |
Join Date: Aug 2007
Location: Vermont, USA
|
Re: Powerstone Program
Quote:
Code:
javascript:c=prompt('Powerstone%20Capacity:','');if(/\d+/.test(c)){d=document.open();d.write((10*c*c+40*c)*Math.pow(54/53,c)+20*c);d.close();}else{null}; Last edited by munin; 03-13-2011 at 11:25 PM. |
|
03-14-2011, 07:41 AM | #49 |
Join Date: Jul 2007
Location: Ann Arbor, MI
|
Re: Powerstone Program
There's nothing platform specific about the source code I provided. For that matter, the windows binary I provided uses Qt, which means it can be rebuilt to provide a GUI for most common operating systems, including iPhone and Android.
__________________
Online Campaign Planning |
03-14-2011, 10:29 PM | #50 |
Computer Scientist
Join Date: Aug 2004
Location: Dallas, Texas
|
Re: Powerstone Program
When you wrote "windows version" earlier, I was mistaken about exactly which item it referred to.
|
Tags |
generator, gurps, powerstone, powerstones, program |
|
|