@@ -224,7 +224,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
const enabledStats = trackerConfig?.userStats?.customStats?.filter(s => s?.enabled && s?.name) || [];
|
const enabledStats = trackerConfig?.userStats?.customStats?.filter(s => s?.enabled && s?.name) || [];
|
||||||
if (enabledStats.length > 0) {
|
if (enabledStats.length > 0) {
|
||||||
let statsJson = ' "stats": {\n';
|
let statsJson = ' "stats": {\n';
|
||||||
statsJson += enabledStats.map(s => ` "${s.name}": X`).join(',\n');
|
statsJson += enabledStats.map(s => ` "${s.name}": 75`).join(',\n');
|
||||||
statsJson += '\n }';
|
statsJson += '\n }';
|
||||||
sections.push(statsJson);
|
sections.push(statsJson);
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
let statusJson = ' "status": {\n';
|
let statusJson = ' "status": {\n';
|
||||||
const statusParts = [];
|
const statusParts = [];
|
||||||
if (statusConfig.showMoodEmoji) {
|
if (statusConfig.showMoodEmoji) {
|
||||||
statusParts.push(' "mood": "[Mood Emoji]"');
|
statusParts.push(' "mood": "😊"');
|
||||||
}
|
}
|
||||||
const customFields = statusConfig.customFields || [];
|
const customFields = statusConfig.customFields || [];
|
||||||
if (customFields.length > 0) {
|
if (customFields.length > 0) {
|
||||||
@@ -250,7 +250,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
// Skills section
|
// Skills section
|
||||||
const skillsSectionEnabled = trackerConfig?.userStats?.skillsSection?.enabled || false;
|
const skillsSectionEnabled = trackerConfig?.userStats?.skillsSection?.enabled || false;
|
||||||
if (skillsSectionEnabled && !extensionSettings.showSkills) {
|
if (skillsSectionEnabled && !extensionSettings.showSkills) {
|
||||||
sections.push(` "skills": "[Skills]"`);
|
sections.push(` "skills": "Skill1, Skill2, Skill3"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,15 +290,15 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
if (showInfoBox) {
|
if (showInfoBox) {
|
||||||
const widgets = trackerConfig?.infoBox?.widgets || {};
|
const widgets = trackerConfig?.infoBox?.widgets || {};
|
||||||
const infoParts = [];
|
const infoParts = [];
|
||||||
if (widgets.date?.enabled) infoParts.push(' "date": "[Day, Month, Year]"');
|
if (widgets.date?.enabled) infoParts.push(' "date": "Monday, March 15, 1242"');
|
||||||
if (widgets.time?.enabled) infoParts.push(' "time": "[Time Start → Time End]"');
|
if (widgets.time?.enabled) infoParts.push(' "time": "14:00 → 15:30"');
|
||||||
if (widgets.weather?.enabled) infoParts.push(' "weather": "[Weather Emoji, Weather]"');
|
if (widgets.weather?.enabled) infoParts.push(' "weather": "☀️ Sunny"');
|
||||||
if (widgets.temperature?.enabled) {
|
if (widgets.temperature?.enabled) {
|
||||||
const unit = widgets.temperature.unit === 'F' ? '°F' : '°C';
|
const unit = widgets.temperature.unit === 'F' ? '°F' : '°C';
|
||||||
infoParts.push(` "temperature": "X${unit}"`);
|
infoParts.push(` "temperature": "22${unit}"`);
|
||||||
}
|
}
|
||||||
if (widgets.location?.enabled) infoParts.push(' "location": "[Location]"');
|
if (widgets.location?.enabled) infoParts.push(' "location": "Forest Clearing"');
|
||||||
if (widgets.recentEvents?.enabled) infoParts.push(' "recentEvents": "[Events]"');
|
if (widgets.recentEvents?.enabled) infoParts.push(' "recentEvents": ["Event 1", "Event 2"]');
|
||||||
|
|
||||||
if (infoParts.length > 0) {
|
if (infoParts.length > 0) {
|
||||||
sections.push(' "infoBox": {\n' + infoParts.join(',\n') + '\n }');
|
sections.push(' "infoBox": {\n' + infoParts.join(',\n') + '\n }');
|
||||||
@@ -308,12 +308,12 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
// Characters section
|
// Characters section
|
||||||
if (showCharacters) {
|
if (showCharacters) {
|
||||||
const charConfig = trackerConfig?.presentCharacters || {};
|
const charConfig = trackerConfig?.presentCharacters || {};
|
||||||
let charExample = ' {\n "name": "Character Name",\n "emoji": "[Character Emoji]"';
|
let charExample = ' {\n "name": "Character Name",\n "emoji": "🧑"';
|
||||||
|
|
||||||
if (charConfig.relationshipFields?.length > 0) {
|
if (charConfig.relationshipFields?.length > 0) {
|
||||||
// Show allowed relationship values as explanation
|
// Show allowed relationship values as explanation
|
||||||
const allowedRelationships = charConfig.relationshipFields.join(' | ');
|
const allowedRelationships = charConfig.relationshipFields.join(' | ');
|
||||||
charExample += `,\n "relationship": "[${allowedRelationships}]"`;
|
charExample += `,\n "relationship": "(${allowedRelationships})"`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const enabledFields = charConfig.customFields?.filter(f => f.enabled) || [];
|
const enabledFields = charConfig.customFields?.filter(f => f.enabled) || [];
|
||||||
@@ -326,7 +326,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
const charStatsConfig = charConfig.characterStats;
|
const charStatsConfig = charConfig.characterStats;
|
||||||
const enabledCharStats = charStatsConfig?.enabled && charStatsConfig?.customStats?.filter(s => s?.enabled && s?.name) || [];
|
const enabledCharStats = charStatsConfig?.enabled && charStatsConfig?.customStats?.filter(s => s?.enabled && s?.name) || [];
|
||||||
if (enabledCharStats.length > 0) {
|
if (enabledCharStats.length > 0) {
|
||||||
const statsJson = enabledCharStats.map(s => ` "${s.name}": X`).join(',\n');
|
const statsJson = enabledCharStats.map(s => ` "${s.name}": 75`).join(',\n');
|
||||||
charExample += `,\n "stats": {\n${statsJson}\n }`;
|
charExample += `,\n "stats": {\n${statsJson}\n }`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,20 +344,20 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
|
|
||||||
if (extensionSettings.useSimplifiedInventory) {
|
if (extensionSettings.useSimplifiedInventory) {
|
||||||
// Simplified: single list
|
// Simplified: single list
|
||||||
let itemExample = '{ "name": "Item Name", "description": "[What It Is]" }';
|
let itemExample = '{ "name": "Item Name", "description": "What it is" }';
|
||||||
if (enableItemSkillLinks) {
|
if (enableItemSkillLinks) {
|
||||||
itemExample = '{ "name": "Iron Sword", "description": "[What It Is]", "grantsSkill": "[Skill]" }';
|
itemExample = '{ "name": "Iron Sword", "description": "A sturdy blade", "grantsSkill": "Sword Fighting" }';
|
||||||
}
|
}
|
||||||
invSection += ` "items": [${itemExample}]\n`;
|
invSection += ` "items": [${itemExample}]\n`;
|
||||||
} else {
|
} else {
|
||||||
// Full categorized inventory
|
// Full categorized inventory
|
||||||
let itemExample = '{ "name": "Item", "description": "Description" }';
|
let itemExample = '{ "name": "Item", "description": "Description" }';
|
||||||
if (enableItemSkillLinks) {
|
if (enableItemSkillLinks) {
|
||||||
itemExample = '{ "name": "Iron Sword", "description": "[What It Is]", "grantsSkill": "[Skill]" }';
|
itemExample = '{ "name": "Iron Sword", "description": "A sturdy blade", "grantsSkill": "Sword Fighting" }';
|
||||||
}
|
}
|
||||||
invSection += ` "onPerson": [${itemExample}],\n`;
|
invSection += ` "onPerson": [${itemExample}],\n`;
|
||||||
invSection += ' "stored": { "Location Name": [{ "name": "Stored Item", "description": "[What It Is]" }] },\n';
|
invSection += ' "stored": { "Location Name": [{ "name": "Stored Item", "description": "Description" }] },\n';
|
||||||
invSection += ' "assets": [{ "name": "[Property/Vehicle]", "description": "[What It Is]" }]\n';
|
invSection += ' "assets": [{ "name": "Property/Vehicle", "description": "Description" }]\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
invSection += ' }';
|
invSection += ' }';
|
||||||
@@ -374,9 +374,9 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
let skillsSection = ' "skills": {\n';
|
let skillsSection = ' "skills": {\n';
|
||||||
const categoryExamples = enabledCategories.map(cat => {
|
const categoryExamples = enabledCategories.map(cat => {
|
||||||
const catName = cat.name;
|
const catName = cat.name;
|
||||||
let skillExample = '{ "name": "Ability Name", "description": "[What This Ability Does]" }';
|
let skillExample = '{ "name": "Ability Name", "description": "What this ability does" }';
|
||||||
if (enableItemSkillLinks) {
|
if (enableItemSkillLinks) {
|
||||||
skillExample = '{ "name": "Ability", "description": "[Description]", "grantedBy": "[Item Name]" }';
|
skillExample = '{ "name": "Ability", "description": "Description", "grantedBy": "Item Name" }';
|
||||||
}
|
}
|
||||||
return ` "${catName}": [${skillExample}]`;
|
return ` "${catName}": [${skillExample}]`;
|
||||||
});
|
});
|
||||||
@@ -389,8 +389,8 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
|
|||||||
// Quests section
|
// Quests section
|
||||||
if (showQuests) {
|
if (showQuests) {
|
||||||
let questsSection = ' "quests": {\n';
|
let questsSection = ' "quests": {\n';
|
||||||
questsSection += ' "main": { "name": "Main Quest Title", "description": "[Primary objective]" },\n';
|
questsSection += ' "main": { "name": "Main Quest Title", "description": "Primary objective" },\n';
|
||||||
questsSection += ' "optional": [{ "name": "Side Quest", "description": "[Optional objective]" }]\n';
|
questsSection += ' "optional": [{ "name": "Side Quest", "description": "Optional objective" }]\n';
|
||||||
questsSection += ' }';
|
questsSection += ' }';
|
||||||
sections.push(questsSection);
|
sections.push(questsSection);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user