Online Character Development Guide

Online Character Development Guide

Flesh out your characters by following this step-by-step guide.

Primary Goal:
${data.goal}

Core Motivation:
${data.motivation}

Greatest Fear:
${data.fear}

Personality & Traits

Strengths:

${data.strengths}

Flaws:

${data.flaws}

Quirks/Mannerisms:

${data.quirks}

Physical & Historical Details

Appearance & Style:
${data.appearance}

Key History:
${data.history}

`; pdfContentArea.style.display = 'block'; pdfContentArea.style.position = 'absolute'; pdfContentArea.style.left = '-9999px'; pdfContentArea.style.width = '800px'; try { const canvas = await html2canvas(pdfContentArea, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'portrait', unit: 'px', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const imgHeight = canvas.height * pdfWidth / canvas.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, imgHeight); const filename = `Character-Sheet-${data.name.replace(/[^a-z0-9]/gi, '-') || 'Character'}.pdf`; pdf.save(filename); } catch (error) { console.error("Failed to generate PDF:", error); alert("Sorry, there was an error creating the PDF file."); } finally { pdfContentArea.style.display = 'none'; pdfContentArea.innerHTML = ''; } } // --- Event Listeners --- tabButtons.forEach((button, index) => { button.addEventListener('click', () => setActiveTab(index)); }); prevBtn.addEventListener('click', () => { if (currentTabIndex > 0) setActiveTab(currentTabIndex - 1); }); nextBtn.addEventListener('click', () => { if (currentTabIndex < tabButtons.length - 1) setActiveTab(currentTabIndex + 1); }); downloadPdfBtn.addEventListener('click', generatePdf); // --- Initial State --- setActiveTab(0); // Pre-populate with US-relevant sample data if(inputs.name) inputs.name.value = "Samantha 'Sam' Jones"; if(inputs.archetype) inputs.archetype.value = "The Idealistic Rookie"; if(inputs.logline) inputs.logline.value = "A fresh-faced journalist from Ohio must navigate the cutthroat world of New York City politics to expose a corrupt senator."; });
Scroll to Top