RPG Idea Generator
Click the button below to generate a new RPG idea:
function generateIdea() { // Create arrays for different parts of the idea const settings = ["in a haunted mansion", "in a post-apocalyptic wasteland", "in a magical forest", "on a mysterious island"]; const protagonists = ["a group of knights", "a team of adventurers", "a band of rebels", "a tribe of nomads"]; const antagonists = ["an evil sorcerer", "a powerful dragon", "a horde of zombies", "a rogue AI"]; const goals = ["to find a lost artifact", "to stop an evil ritual", "to survive against all odds", "to escape a deadly maze"];
// Generate a random idea by selecting one item from each array const setting = settings[Math.floor(Math.random() * settings.length)]; const protagonist = protagonists[Math.floor(Math.random() * protagonists.length)]; const antagonist = antagonists[Math.floor(Math.random() * antagonists.length)]; const goal = goals[Math.floor(Math.random() * goals.length)];
// Display the generated idea on the page document.getElementById("idea").innerHTML = `You are ${protagonist} on a quest ${goal} ${setting}, but must first defeat ${antagonist} to succeed.`; }