Drama Story Idea Generator

Drama Story Idea Generator

Craft compelling narratives filled with conflict and emotion.

Who Is the Main Character?

When a ${protagonist.toLowerCase()} ${incident}, they must face ${conflict} ${setting}.

Protagonist

${protagonist}

Inciting Incident

The story begins when the protagonist ${incident}.

Central Conflict

The core of the story revolves around ${conflict}.

Setting

The narrative unfolds ${setting}.

`; document.getElementById('output-display').innerHTML = idea; formContainer.classList.add('hidden'); document.getElementById('tab-container').classList.add('hidden'); navButtons.classList.add('hidden'); outputSection.classList.remove('hidden'); } function downloadPDF() { const { jsPDF } = window.jspdf; const downloadButton = downloadBtn; if (!downloadButton) return; downloadButton.textContent = 'Generating PDF...'; downloadButton.disabled = true; try { const protagonist = document.getElementById('protagonist').value; const incident = document.getElementById('incident').value; const conflict = document.getElementById('conflict').value; const setting = document.getElementById('setting').value; const logline = `When a ${protagonist.toLowerCase()} ${incident}, they must face ${conflict} ${setting}.`; const doc = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); doc.setFont('times', 'normal'); const margin = 20; const pageWidth = doc.internal.pageSize.getWidth(); const usableWidth = pageWidth - margin * 2; let yPos = margin; // --- PDF Template: Story Synopsis --- doc.setFontSize(18); doc.setFont('times', 'bold'); doc.text('Story Synopsis', pageWidth / 2, yPos, { align: 'center' }); yPos += 15; const drawSection = (title, text) => { doc.setFont('times', 'bold'); doc.setFontSize(12); doc.text(title.toUpperCase(), margin, yPos); yPos += 7; doc.setFont('times', 'normal'); doc.setFontSize(12); const lines = doc.splitTextToSize(text, usableWidth); doc.text(lines, margin, yPos); yPos += (lines.length * 5) + 12; }; drawSection('Logline', logline); drawSection('Protagonist', protagonist); drawSection('Inciting Incident', `The story begins when the protagonist ${incident}.`); drawSection('Central Conflict', `The core of the story revolves around ${conflict}.`); drawSection('Setting', `The narrative unfolds ${setting}.`); doc.save(`Drama_Story_Synopsis.pdf`); } catch (error) { console.error("Error generating PDF:", error); alert("An error occurred while generating the PDF. Please try again."); } finally { downloadButton.textContent = 'Download Synopsis (PDF)'; downloadButton.disabled = false; } } showTab(currentTab); });
Scroll to Top