Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS

Reply
 
Thread Tools Display Modes
Old 03-13-2011, 08:01 PM   #41
ClayDowling
 
ClayDowling's Avatar
 
Join Date: Jul 2007
Location: Ann Arbor, MI
Default Re: Powerstone Program

Quote:
Originally Posted by jeff_wilson View Post
Can you make it work at codepad.org? It doesn't like your pow() usage for some reason.
Nope. Source has been provided, and binaries for the two most popular desktop platforms has been provided. I would advise that you need to link against the math libraries (-lm in standard usage) for pow to be found.

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
ClayDowling is offline   Reply With Quote
Old 03-13-2011, 09:29 PM   #42
jeff_wilson
Computer Scientist
 
jeff_wilson's Avatar
 
Join Date: Aug 2004
Location: Dallas, Texas
Default Re: Powerstone Program

Quote:
Originally Posted by ClayDowling View Post
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.
If the code runs at codepad.org, you can ship it with an URL, and just about anyone with a browser can use it. There's also less of a trust or security issue for whatever reason. I personally was trying it out there to see what was platform-specific, and also since I'm away from by my dev machines during the weekend.

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. :(
__________________
.
Reposed playtest leader.

The Campaigns of William Stoddard
jeff_wilson is offline   Reply With Quote
Old 03-13-2011, 10:05 PM   #43
tmedwards
 
tmedwards's Avatar
 
Join Date: Feb 2006
Location: Krotz Springs, LA US
Default 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)
tmedwards is offline   Reply With Quote
Old 03-13-2011, 10:24 PM   #44
roguebfl
Dog of Lysdexics
 
roguebfl's Avatar
 
Join Date: Oct 2004
Location: Melbourne FL, Formerly Wellington NZ
Default Re: Powerstone Program

Well this thread has inspired me to finally build my GURPS Enchantment Calculator
__________________
Rogue the Bronze Firelizard
Gerald Grenier, Jr. Hail Eris!
Rogue's Weyr
roguebfl is offline   Reply With Quote
Old 03-13-2011, 10:25 PM   #45
munin
 
Join Date: Aug 2007
Location: Vermont, USA
Default Re: Powerstone Program

Quote:
Originally Posted by munin View Post
... then bring up the answer on google.
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};
munin is offline   Reply With Quote
Old 03-13-2011, 10:32 PM   #46
roguebfl
Dog of Lysdexics
 
roguebfl's Avatar
 
Join Date: Oct 2004
Location: Melbourne FL, Formerly Wellington NZ
Default Re: Powerstone Program

Quote:
Originally Posted by munin View Post
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};
I plug that into Chrome, it produced the prompt, but not the results.
__________________
Rogue the Bronze Firelizard
Gerald Grenier, Jr. Hail Eris!
Rogue's Weyr
roguebfl is offline   Reply With Quote
Old 03-13-2011, 11:03 PM   #47
Anthony
 
Join Date: Feb 2005
Location: Berkeley, CA
Default 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.
Anthony is online now   Reply With Quote
Old 03-13-2011, 11:18 PM   #48
munin
 
Join Date: Aug 2007
Location: Vermont, USA
Default Re: Powerstone Program

Quote:
Originally Posted by roguebfl View Post
I plug that into Chrome, it produced the prompt, but not the results.
Oops. Firefox was being too nice about my bad coding. Try this:
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};
Works in Firefox, Chrome, and Safari on my mac.

Last edited by munin; 03-13-2011 at 11:25 PM.
munin is offline   Reply With Quote
Old 03-14-2011, 07:41 AM   #49
ClayDowling
 
ClayDowling's Avatar
 
Join Date: Jul 2007
Location: Ann Arbor, MI
Default Re: Powerstone Program

Quote:
Originally Posted by jeff_wilson View Post
I personally was trying it out there to see what was platform-specific, and also since I'm away from by my dev machines during the weekend.
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
ClayDowling is offline   Reply With Quote
Old 03-14-2011, 10:29 PM   #50
jeff_wilson
Computer Scientist
 
jeff_wilson's Avatar
 
Join Date: Aug 2004
Location: Dallas, Texas
Default Re: Powerstone Program

Quote:
Originally Posted by ClayDowling View Post
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.
When you wrote "windows version" earlier, I was mistaken about exactly which item it referred to.
__________________
.
Reposed playtest leader.

The Campaigns of William Stoddard
jeff_wilson is offline   Reply With Quote
Reply

Tags
generator, gurps, powerstone, powerstones, program

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:25 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.