Sims 4 Mod Placeholder Generator

Section A: Summary

Game Version: 1.0.732.20

Destination Path: C:\Users\asus\AppData\Local\anadius\placeholders

Author: User

Section B: CFG Files

WickedWhims.cfg

[ActiveMod]
Name = "WickedWhims"
Version = 10.0
Description = "Placeholder — no .package or .ts4script included."
CompatVersion = "1.0.732.20"
Status = "Enabled"
Author = "User"
Timestamp = "2023-11-01T12:00:00Z"

IA_Flirt_CFG.cfg

[ActiveMod]
Name = "IA_Flirt_CFG"
Version = 1.0
Description = "Placeholder — no .package or .ts4script included."
CompatVersion = "1.0.732.20"
Status = "Enabled"
Author = "User"
Timestamp = "2023-11-01T12:00:00Z"

Section C: PowerShell Script

# Sims 4 Mod Placeholder Generator
param (
    [string]$jsonInput,
    [string]$destinationPath = "C:\Users\asus\AppData\Local\anadius\placeholders",
    [string]$author = "User"
)

# Create directory if it doesn't exist
if (-not (Test-Path -Path $destinationPath)) {
    New-Item -ItemType Directory -Path $destinationPath | Out-Null
}

# Process mods
$mods = $jsonInput | ConvertFrom-Json
$timestamp = Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ"

foreach ($mod in $mods) {
    $safeName = ($mod.name -replace '[^a-zA-Z0-9_]', '').ToLower()
    $fileName = "$safeName`_placeholder.cfg"
    $filePath = Join-Path -Path $destinationPath -ChildPath $fileName

    # Create backup if file exists
    if (Test-Path -Path $filePath) {
        $backupName = "$fileName.bak.$timestamp"
        Copy-Item -Path $filePath -Destination (Join-Path -Path $destinationPath -ChildPath $backupName)
    }

    # Create CFG content
    $cfgContent = @"
[ActiveMod]
Name = "$($mod.name)"
Version = $($mod.version)
Description = "Placeholder — no .package or .ts4script included."
CompatVersion = "1.0.732.20"
Status = "Enabled"
Author = "$author"
Timestamp = "$timestamp"
"@

    # Write to file
    $cfgContent | Out-File -FilePath $filePath -Encoding utf8
}

# Create README
$readmeContent = @"
Sims 4 Mod Placeholder Files
---------------------------
These files were generated on $timestamp by the placeholder generator script.
They serve as dummy files to prevent game crashes from missing script mods.

To restore:
1. Delete all *_placeholder.cfg files
2. Rename any *.bak files to remove the .bak extension
"@

$readmeContent | Out-File -FilePath (Join-Path -Path $destinationPath -ChildPath "README.txt") -Encoding utf8

Write-Host "Placeholder files generated successfully in $destinationPath"

Section D: README & Test Plan

README

  1. Backup: Always backup your Mods folder before making changes
  2. Execution Policy: Run PowerShell as admin and use: Set-ExecutionPolicy RemoteSigned
  3. Verification: After placing files, clear game caches and check "Custom Content" in game settings
  4. Revert: Delete placeholder files and restore from .bak copies if needed

Test Plan

  1. Generate placeholder files using the PowerShell script
  2. Launch Sims 4 and verify the game starts without script errors
  3. Check in Game Options > Custom Content to see the placeholder mods listed