Sure! Below are 6 variations of system prompt generators in plaintext syntax-like pseudocode format. Each allows user input parameters with fallback to random generation, and follows your 3-part structure separated by "|". Each variation is slightly different in flow and structure for flexibility.
Variation 1:
function generatePrompts_V1(
count = randomInt(1,3),
subjects = randomChoice(["woman","man","child","cat","robot"]),
activity = randomChoice(["reading","running","dancing","painting","sleeping"])
) {
poses = ["standing", "sitting", "jumping", "lying down", "crouching"]
shots = ["close-up", "medium shot", "wide shot", "overhead shot"]
outfits = ["casual clothes", "formal suit", "sportswear", "traditional dress", "armor"]
settings = ["park", "beach", "city street", "forest", "mountain"]
backgrounds = ["sunset", "city skyline", "snowy hill", "river", "desert"]
photoStyles = ["portrait", "landscape", "street", "macro"]
filmstocks = ["Kodak Portra 400", "Fujifilm Pro 400H", "Ilford HP5+", "AgfaPhoto Vista"]
technicals = ["bokeh effect", "high contrast", "shallow depth of field", "long exposure", "natural light"]
prompts = []
for i in 1 to count {
pose = randomChoice(poses)
shot = randomChoice(shots)
outfit = randomChoice(outfits)
setting = randomChoice(settings)
background = randomChoice(backgrounds)
style1 = randomChoice(photoStyles)
style2 = randomChoice(photoStyles.filter(s => s != style1))
film = randomChoice(filmstocks)
tech1 = randomChoice(technicals)
tech2 = randomChoice(technicals.filter(t => t != tech1))
prompt = pose + ", " + shot + ": " + subjects + ", wearing a " + outfit + ", " + activity
prompt += " | setting: " + setting + ", place: " + setting + ", background image: " + background + " in the background"
prompt += " | styles: " + style1 + ", " + style2 + ", filmstock: " + film + ", " + tech1 + ", " + tech2
prompts.append(prompt)
}
return prompts
}
Variation 2:
generatePrompts_V2(params) {
count = params.count ?? randomInt(1,3)
subjectList = params.subjects ?? ["girl", "boy", "dog", "alien"]
act = params.activity ?? randomChoice(["jumping", "drawing", "sleeping"])
poseOptions = ["leaning", "floating", "standing", "kneeling"]
shotTypes = ["extreme close-up", "medium close-up", "full body"]
outfitOptions = ["jumpsuit", "t-shirt and jeans", "evening gown", "uniform"]
settingOptions = ["warehouse", "library", "garden", "café"]
backgroundOptions = ["neon lights", "old bricks", "waterfall", "graffiti wall"]
photoStyles = ["urban", "vintage", "cinematic"]
filmstocks = ["Kodachrome", "Ektachrome", "Velvia"]
technicals = ["lens flare", "wide aperture", "high ISO"]
result = []
for i = 1 to count {
pose = randomChoice(poseOptions)
shot = randomChoice(shotTypes)
subj = randomChoice(subjectList)
outfit = randomChoice(outfitOptions)
setting = randomChoice(settingOptions)
background = randomChoice(backgroundOptions)
style1 = randomChoice(photoStyles)
style2 = randomChoice(photoStyles.filter(s => s != style1))
film = randomChoice(filmstocks)
tech1 = randomChoice(technicals)
tech2 = randomChoice(technicals.filter(t => t != tech1))
line1 = pose + " + " + shot + ": " + subj + ", wearing a " + outfit + ", " + act
line2 = setting + " + place + background image: " + background + " in the background"
line3 = style1 + " + " + style2 + " + " + film + " + " + tech1 + ", " + tech2
result.append(line1 + " | " + line2 + " | " + line3)
}
return result
}
Variation 3:
PromptGenV3(input) {
count = input.count ? input.count : randomBetween(1,2)
subs = input.subjects ? input.subjects : ["boy", "girl", "dog"]
acts = input.activity ? input.activity : "playing"
poses = ["bending", "stretching", "walking"]
shots = ["portrait", "landscape"]
outfits = ["leather jacket", "hoodie", "dress"]
settings = ["street", "cafe"]
backgrounds = ["graffiti wall", "sunny sky"]
styles = ["vintage", "modern"]
films = ["Tri-X 400", "Velvia 50"]
techs = ["soft focus", "high saturation"]
output = []
for i in 1 to count {
p = randomPick(poses)
s = randomPick(shots)
subj = randomPick(subs)
outfit = randomPick(outfits)
setting = randomPick(settings)
bg = randomPick(backgrounds)
st1 = randomPick(styles)
st2 = styles.filter(st => st != st1)[0]
film = randomPick(films)
t1 = randomPick(techs)
t2 = techs.filter(t => t != t1)[0]
promptString =
p + " + " + s + ": " + subj + ", wearing a " + outfit + ", " + acts +
" | " + setting + " + " + setting + " + " + bg + " in the background" +
" | " + st1 + " + " + st2 + " + " + film + " + " + t1 + " + " + t2
output.push(promptString)
}
return output
}
Variation 4 (flow changed - inputs first, random fallback later):
function makePromptsV4(params) {
let count = (params && params.count) || randomInt(1,4)
let subjects = (params && params.subjects) || ["child", "adult", "elder"]
let activity = (params && params.activity) || randomChoice(["reading", "swimming", "cooking"])
let poses = ["leaning", "jumping", "posing"]
let shots = ["wide angle", "close up", "medium"]
let outfits = ["tank top", "suit", "hoodie"]
let settings = ["beach", "museum", "garden"]
let backgrounds = ["mountains", "ocean", "cityscape"]
let styles = ["documentary", "fashion"]
let films = ["Fujifilm Velvia", "Kodak Tri-X"]
let technicals = ["soft light", "lens flare"]
let prompts = []
for (let i = 0; i < count; i++) {
let pose = randomChoice(poses)
let shot = randomChoice(shots)
let subj = randomChoice(subjects)
let outfit = randomChoice(outfits)
let setting = randomChoice(settings)
let bg = randomChoice(backgrounds)
let style1 = randomChoice(styles)
let style2 = styles.find(s => s !== style1)
let film = randomChoice(films)
let tech1 = randomChoice(technicals)
let tech2 = technicals.find(t => t !== tech1)
let part1 = `${pose}, ${shot}: ${subj}, wearing a ${outfit}, ${activity}`
let part2 = `setting: ${setting}, place: ${setting}, background image: ${bg} in the background`
let part3 = `styles: ${style1}, ${style2}, filmstock: ${film}, ${tech1}, ${tech2}`
prompts.push(`${part1} | ${part2} | ${part3}`)
}
return prompts
}
Variation 5 (parameters inline, emphasis on subject and activity first):
GeneratePromptsV5({
numberOfPrompts = 1,
subjectList = ["man", "woman", "child"],
activityName = "running"
}) {
poseList = ["crouching", "standing tall", "sitting cross-legged"]
shotList = ["medium close-up", "over-the-shoulder", "full body"]
outfitList = ["leather jacket", "summer dress", "tracksuit"]
settingList = ["urban plaza", "library", "deserted road"]
backgroundList = ["cloudy sky", "old building", "trees"]
styleList = ["moody", "bright"]
filmstockList = ["Kodak Ektar 100", "Fujichrome Velvia"]
photoTechList = ["depth of field", "motion blur"]
for each i in 1 to numberOfPrompts {
pose = randomElement(poseList)
shot = randomElement(shotList)
subject = randomElement(subjectList)
outfit = randomElement(outfitList)
setting = randomElement(settingList)
background = randomElement(backgroundList)
style1 = randomElement(styleList)
style2 = styleList where element ≠ style1 choose random
filmstock = randomElement(filmstockList)
tech1 = randomElement(photoTechList)
tech2 = photoTechList where element ≠ tech1 choose random
prompt = pose + " + " + shot + ": " + subject + ", wearing a " + outfit + ", " + activityName +
" | " + setting + " + place + background image: " + background + " in the background" +
" | " + style1 + " + " + style2 + " + " + filmstock + " + " + tech1 + ", " + tech2
output prompt
}
}
Variation 6 (modular approach - generate each part separately):
SystemPromptGenerator_V6(inputParams) {
count = inputParams.count ? inputParams.count : randomInt(1,3)
subjects = inputParams.subjects ? inputParams.subjects : ["cat", "dog", "robot"]
activity = inputParams.activity ? inputParams.activity : randomChoice(["playing", "sleeping", "exploring"])
poses = ["lying down", "walking", "standing"]
shots = ["extreme wide shot", "medium shot", "close-up"]
outfits = ["raincoat", "space suit", "casual wear"]
settings = ["hillside", "cafeteria", "bridge"]
backgrounds = ["dense forest", "river", "city skyline"]
photoStyles = ["documentary", "portrait", "candid"]
filmstocks = ["Ilford Delta 3200", "Kodak Gold 200"]
technicals = ["natural light", "soft shadows"]
function getRandomExcept(list, exclude) {
return randomChoice(list.filter(i => i != exclude))
}
prompts = []
for i in 1 to count {
pose = randomChoice(poses)
shot = randomChoice(shots)
subject = randomChoice(subjects)
outfit = randomChoice(outfits)
setting = randomChoice(settings)
background = randomChoice(backgrounds)
style1 = randomChoice(photoStyles)
style2 = getRandomExcept(photoStyles, style1)
film = randomChoice(filmstocks)
tech1 = randomChoice(technicals)
tech2 = getRandomExcept(technicals, tech1)
part1 = `${pose} + ${shot}: ${subject}, wearing a ${outfit}, ${activity}`
part2 = `${setting} + place + background image: ${background} in the background`
part3 = `${style1} + ${style2} + ${film} + ${tech1}, ${tech2}`
prompts.push(part1 + " | " + part2 + " | " + part3)
}
return prompts
}
Example output using Variation 1 with default parameters (random content):
1. standing, medium shot: man, wearing a sportswear, painting | setting: beach, place: beach, background image: sunset in the background | styles: portrait, street, filmstock: Kodak Portra 400, bokeh effect, high contrast
2. sitting, wide shot: woman, wearing a formal suit, running | setting: forest, place: forest, background image: river in the background | styles: landscape, macro, filmstock: Ilford HP5+, shallow depth of field, natural light
Let me know if you want me to write a specific implementation or extend it further!