Game Version: 1.0.732.20
Destination Path: C:\Users\asus\AppData\Local\anadius\placeholders
Author: User
[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"
[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"
# 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"
Set-ExecutionPolicy RemoteSigned