Visual Novel Planner Generator

Visual Novel Planner Generator

Structure narrative paths, manage assets, and track character requirements.

Project & Story Overview

Character Definition (Main)

No assets defined.

'; } else { const groupedAssets = assets.reduce((acc, a) => { if (!acc[a.type]) acc[a.type] = []; acc[a.type].push(a); return acc; }, {}); let assetHtml = '
    '; Object.keys(groupedAssets).forEach(type => { assetHtml += `
  • ${type} (${groupedAssets[type].length} items):
  • `; groupedAssets[type].forEach(a => { assetHtml += `
    - ${escapeHtml(a.desc)}
    `; }); }); assetHtml += '
'; assetSummaryDiv.innerHTML = assetHtml; } }; // --- PDF Download --- window.vnpgDownloadPDF = function() { // Ensure preview is up to date vnpgUpdatePreview(); const element = document.getElementById('vnpg-print-area'); const titleForFile = document.getElementById('vnpg-title').value || "Visual_Novel_Brief"; document.body.classList.add('vnpg-generating-pdf'); const opt = { margin: [0.75, 0.75], filename: `${titleForFile.replace(/\s+/g, '_')}_ProjectBrief.pdf`, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; html2pdf().set(opt).from(element).save().then(() => { document.body.classList.remove('vnpg-generating-pdf'); }); }; // Utility: HTML Escape function escapeHtml(text) { if (!text) return ''; return text.replace(/[&<>"']/g, function(m) { switch (m) { case '&': return '&'; case '<': return '<'; case '>': return '>'; case '"': return '"'; case "'": return '''; default: return m; } }); }
Scroll to Top