Love Interest Selection
Village module for choosing your character's romantic interest from configurable NPC list. Three access points: village "Search Your Soul" (main), inn "Daydream About Someone", gardens "Reflect on Romance". Select from available NPCs (default: `&Taylor, `1Bill, `%Fleur) to set chosen_partner preference used by romantic activities, gift purchases, and partner interactions. Gender-based defaults (female → bard/Bill, male → barmaid/Fleur, other → server/Taylor). Married players completely blocked (all paths show devotion messages to spouse, can't select anyone else). Flavor text changes by location (soul-searching vs daydreaming vs reflecting). Where you officially designate which NPC your character has a crush on so the game knows who you're thinking about when you buy flowers or engage in romantic roleplay.
Access Points
1. Village: "Search Your Soul":
- Hook: village (only in configured location)
- Navigation category: Tavernnav (village activities)
- Link: "Search Your Soul" → runmodule.php?module=loveinterest
- Page title: "Matters of the Heart"
- Flavor: Contemplative, serious tone
2. Inn: "Daydream About Someone":
- Hook: inn
- Navigation category: "Things to do"
- Link: "Daydream About Someone" → runmodule.php?module=loveinterest&op=daydream
- Page title: "Daydreaming"
- Flavor: Sitting quietly, mind wandering
3. Gardens: "Reflect on Romance":
- Hook: gardens
- Navigation category: "Explore"
- Link: "Reflect on Romance" → runmodule.php?module=loveinterest&op=reflect
- Page title: "Garden Reflections"
- Flavor: Peaceful setting, flowers and breeze
Default Partners (No Choice Made)
Gender-Based Defaults:
- Female characters (SEX_FEMALE):
- Default: getsetting("bard", "`1Bill")
- Bill Weasley (canon: male bard NPC)
- Male characters (SEX_MALE):
- Default: getsetting("barmaid", "`%Fleur")
- Fleur Delacour (canon: female barmaid NPC)
- Other/non-binary characters:
- Default: getsetting("server", "`&Taylor")
- Taylor (neutral server NPC)
Messaging (No Choice Yet):
- Village: "Currently, your heart seems drawn to `&%s`7, though you wonder if this is truly your choice or merely circumstance."
- Inn: "You find yourself thinking about `&%s`7, though you wonder if there might be someone else who catches your eye."
- Gardens: "As you gaze at a particularly beautiful flower, you're reminded of `&%s`7. But perhaps there's someone else who makes your heart flutter?"
Choosing a Partner
Available NPCs:
- Admin setting: "npc_options" (comma-separated with color codes)
- Default: "`&Taylor,`1Bill,`%Fleur"
- Displayed with colors (green Taylor, blue Bill, yellow Fleur)
- Customizable (admin can add/remove NPCs)
Selection Interface:
- Village: "Choose %s" buttons for each NPC
- Inn: "Think about %s" buttons
- Gardens: "Dream of %s" buttons
- Click to select → runmodule.php?module=loveinterest&op=choose&npc=[name]&return=[location]
Confirmation Messages:
- Village: "You have decided that `&%s`7 is the one who holds your affection. From now on, they will be the one you think about when buying gifts or engaging in romantic activities."
- Inn: "As you sit in the comfortable surroundings of the inn, you realize that `&%s`7 is the one who truly holds your affection. Your heart feels lighter now that you've acknowledged your feelings."
- Gardens: "The peaceful garden setting has helped you realize that your heart belongs to `&%s`7. The flowers seem to bloom more vibrantly now that you've acknowledged your true feelings."
Preference Set:
- Module pref: "chosen_partner" = [NPC name with color codes]
- Stored permanently (until changed)
- Used by other modules (gift-buying, partner interactions, etc.)
Changing Partner
If Already Chosen:
- Village: "Currently, your heart belongs to `&%s`7. But the heart is a fickle thing, and perhaps your feelings have changed?"
- Inn: "Your thoughts drift to `&%s`7, and a smile crosses your face. However, you wonder if perhaps your heart might belong elsewhere."
- Gardens: "You find a quiet bench and close your eyes, thinking of `&%s`7. Is this truly where your heart lies, or might someone else be in your thoughts?"
Can Re-Select:
- No restrictions (can change freely)
- Same interface as first selection
- chosen_partner pref overwritten
- Heart is fickle (roleplay justification)
Marriage Protection
Married Player Check:
- Query: marriedto > 0 AND marriedto != INT_MAX
- If married to another player (not NPC): Blocked from all paths
- Fetch spouse name from accounts table
Married Messages (Village):
- "As you contemplate matters of the heart, you can only think of your beloved spouse, `&%s`7."
- "Your marriage is a sacred bond, and your heart belongs completely to your partner. There's no room for anyone else in your affections."
- "With a warm feeling in your heart, you realize how fortunate you are to have found true love."
Married Messages (Inn):
- "As you sit quietly, your thoughts immediately turn to your beloved spouse, `&%s`7."
- "Your heart is filled with love and devotion. No one else could possibly compare to the one you've pledged your life to."
- "With a smile, you realize there's no need to daydream about anyone else when you have such a wonderful partner in your life."
Married Messages (Gardens):
- "As you walk through the beautiful gardens, you can't help but think of your wonderful spouse, `&%s`7."
- "The beauty around you only reminds you of the beauty of your marriage. Every flower, every gentle breeze seems to whisper your beloved's name."
- "You smile to yourself, knowing that your heart is already spoken for, and you wouldn't have it any other way."
No Selection Allowed:
- Married players can't choose NPCs (completely blocked)
- All paths show devotion to spouse instead
- NPC list never displays for married characters
- Attempt to choose redirects to devotion message
How Other Modules Use This
Partner Integration:
- require_once("lib/partner.php") in other modules
- get_module_pref("chosen_partner") retrieves selection
- Used for:
- Gift-buying NPCs (who receives gifts?)
- Romantic dialogue (who appears in scenes?)
- Valentine's events (who is your valentine?)
- Partner-specific quests or interactions
Fallback Logic:
- If chosen_partner empty: Use gender-based default
- Ensures romantic content always has a target
- Seamless integration (works with or without selection)
Admin Configuration
Settings:
- location: Where does the Love Interest Selection appear? (location, default: villagename)
- npc_options: Available NPCs as love interests (text, comma-separated with colors, default: "`&Taylor,`1Bill,`%Fleur")
Customization:
- Can add more NPCs: "`&Taylor,`1Bill,`%Fleur,`@Hermione,`#Ron"
- Can remove NPCs: "`1Bill,`%Fleur" (Taylor removed)
- Color codes preserved (displays with proper formatting)
- Must be comma-separated (no spaces required, trimmed automatically)
Location Setting:
- Village link only appears in configured location
- Default: Main village (LOCATION_FIELDS)
- Can restrict to specific race cities or custom locations
- Inn and gardens links appear globally (no location check)
Use Cases
Roleplay Purposes:
- Define character's romantic interest for consistency
- Personalize romantic encounters (your chosen NPC appears)
- Make gift-giving feel meaningful (gifts go to your love interest)
- Clarify who your character is attracted to
Mechanical Benefits:
- Ensures romantic modules use correct NPC name
- Prevents awkward mismatches (buying gift for wrong person)
- Allows player control over romantic narrative
- Respects player preferences (LGBTQ+ friendly, any gender can choose any NPC)
Marriage Respect:
- Married players blocked from selecting NPCs (faithful to spouse)
- All romantic thoughts redirect to spouse (wholesome)
- Prevents awkward situation of married character crushing on NPC
- Honors player marriage commitment
Strategy
When to Choose:
- Before engaging in romantic content (gift-buying, dates, etc.)
- When your character's romantic interest is clear
- Early game to establish consistent roleplay
When to Change:
- Character development (heart changes)
- Trying different romantic storylines
- Experimenting with different NPC interactions
- No penalty for changing (freely switchable)
Default vs Custom:
- Default works fine (gender-appropriate NPC)
- Choosing manually gives more control
- Can select any NPC regardless of gender (inclusive)
Limitations
- NPCs Only: Can't choose another player (only preconfigured NPCs)
- Single Choice: Can only have one love interest at a time (no polyamory)
- Marriage Blocks NPCs: Married players can't select NPCs at all (forced spouse devotion)
- No Custom NPCs: Player can't add their own NPC (must choose from admin list)
- Cosmetic Only: Doesn't change game mechanics (just which NPC name appears)
- Requires Partner.php: Other modules must integrate with lib/partner.php (not automatic)
- No Relationship Progression: Choosing doesn't start dating or change NPC behavior (just sets preference)
Love Interest Selection: where you can visit three different locations (village "Search Your Soul", inn "Daydream About Someone", or gardens "Reflect on Romance") to formally declare which NPC from a configurable comma-separated list (default `&Taylor, `1Bill, `%Fleur) occupies your character's romantic thoughts, which sets a module preference called "chosen_partner" that gets used by other romantic modules for gift-buying and partner interactions, with gender-based defaults where female characters default to thinking about Bill the bard while male characters default to Fleur the barmaid and non-binary characters default to Taylor the server, but if you're married to another player character the module completely blocks you from all selection paths and instead shows devotion messages like "your heart belongs completely to your partner and there's no room for anyone else in your affections" or "with a smile you realize there's no need to daydream about anyone else when you have such a wonderful partner" because apparently marrying another player means you're not allowed to even casually think about NPCs anymore, while unmarried players can freely choose and re-choose their love interest as many times as they want because "the heart is a fickle thing" and the module provides different flavor text for each location like contemplative soul-searching in the village versus quiet daydreaming in the inn versus romantic reflection among flowers in the gardens, all so your character can have a consistent romantic interest for roleplay purposes even though mechanically all it does is change which NPC name appears when you buy them flowers.