News:

Forum changes: Editing of posts has been turned off until further notice.

Main Menu

Javascript Character Sheets?

Started by Daniel Solis, August 17, 2003, 05:47:18 PM

Previous topic - Next topic

Daniel Solis

I have PUNK currently set up as an html site. I'll be making a PDF as well, but the webpage will be a sort of sister site for more up-to-date information. One of the features I'd like to include on this site is a step-by-step character creation process, that all leads up to a completed printer-friendly character sheet.

I've been researching some information on this little project and it seems Javascript is the best way to go about this, however, not to seem lazy or anything, I'm not really interested in learning the ins-and-outs of programming.

I wonder if anyone here can suggest some useful tutorials or one of those "make your own feature" sites that can help me out? If there are ways I can do this through Macromedia Dreamweaver, that would be just fabulous.
¡El Luchacabra Vive!
-----------------------
Meatbot Massacre
Giant robot combat. No carbs.

DevP

You will just need a real programming language - I don't know if Flash would do it, but I also don't trust it so much... I would personally recommend Perl, which could use LaTeX to render a character sheet in PDF form.

Jonathan Walton

I disagree that you necessarily need a real programming language, but you're going to be passing a large number of variables in the process of character creation, and JavaScript isn't the best scripting language for things like that.  You really need a language that's specifically made for generating HTML pages on the fly, like PHP.  If you wander around the Forge and keep watch on the "address" bar, you can see how the Forge's PHP is constantly passing variables (thread number, mode, things like that).  If you wanted to custom generate a character sheet, you'd accumulate a list of variables (representing various character traits) and then write some code that would assemble them into a finished sheet.  So that would be my suggestion.  Online PHP tutorials should be fairly easy to find.  Also check out books by Peachpit Press, which are generally good for beginners.

Daniel Solis

Aw nuts, I wish I hadn't set up a page with a form already.

This is essentially what I had in mind. The user would fill in all the details, click "generate character sheet" and have a simple little html page. Can PHP do that?
¡El Luchacabra Vive!
-----------------------
Meatbot Massacre
Giant robot combat. No carbs.

iago

Quote from: gobiAw nuts, I wish I hadn't set up a page with a form already.

This is essentially what I had in mind. The user would fill in all the details, click "generate character sheet" and have a simple little html page. Can PHP do that?

Honestly, for the very specific thing you're trying to do, you're probably just fine.  PHP can do it, but Javascript stuff is (as I understand it) capable of handling form submission stuff, writing out to the "document", etc, so if you're just looking for a dirt-simple character sheet in HTML thing, I dunno that you need to look elsewhere.  That said I got nothin' for you as regards how-to's on Javascript.

For fulfilling the character design/development concept in Fate, I wrote a character developer using perl and cgi on http://www.faterpg.com/ -- but if you're not much into the programming gig, or if you don't have access to a server where you can do that sort of thing, javascript at least doesn't require that you get anything installed on your side of things.

Matt Machell

http://www.w3schools.com/ has some pretty good basic tutorials on Javascript stuff. Might help you on your way.

Since all you want to do is use JS to create a new page that looks like  a character sheet based on form values. It shouldn't be too tough.

If you want to do it via Dreamweaver, have a mooch about the Macromedia Exchange for behaviors, somebody's probably made a suitable one. DMXZone might have something useful too, and has a library of tutorials both free and pay-for-download (inluding stuff by yours truly).

HTH

-Matt

HinterWelt

I used JSP/Javascript/HTML/XML with a MySql backend for my character generator http://www.hinterwelt.com/chargen/ but i think CHRGen is different from what you have in mind. My CHARGen stores the info serverside.

If you are interested in JS validation email me and I have some automated form field validation that is pretty slick.

Good Luck,
Bill
HinterWelt Enterprises
The Next Level in RPGs
William E. Corrie III
http://www.hinterwelt.com   
http://insetto.hinterwelt.com/chargen/