This page (and the future github link below) will be where I will keep updated versions of SQL queries to run against the Persistent World database.
This SQL Query is to edit the local database that comes with this plugin:
What is a SQL Query? Code you can run against a SQL database that allows for fast changes. You can either manually make changes to the database or you can use code.
HOW TO RUN: Download and install an app that can read and run SQL Lite database Queries. I use DB Browser for SQL Lite.
File>Open>Open database file: PersistentWorld.db.
Then click the "Execute SQL" tab and paste in the text in the text file in the SQL Query. Run the query. Save the database. It is recommended to backup before running queries. You can also try running by clicking the SQL file that is included. One is a text version, one is the sql file version.
![]()
AI Generated Query 1:
Part 1: Vehicle Registrations (5% expired, 1% no registration)
What it does:
First makes ALL vehicles have valid registration (expires in 1 year)
Then randomly selects 5% of vehicles and makes their registration expired at various intervals:
15 days expired (recent)
30 days expired (1 month)
60 days expired (2 months)
90 days expired (3 months)
180 days expired (6 months)
Then randomly selects 1% of vehicles and marks them as "NO REGISTRATION" (never registered)
Part 2: Vehicle Insurance (5% expired, 2% no insurance)
What it does:
First makes ALL vehicles have valid insurance (expires in 1 year)
Randomly selects 5% of vehicles and makes insurance expired at various intervals
Randomly selects 2% of vehicles and marks them as "NO INSURANCE"
Part 3: License Status (20 suspended, 20 revoked, 10 no license)
What it does:
First makes ALL people have valid licenses (expires in 4 years)
Randomly selects 20 people and marks licenses as SUSPENDED with realistic reasons:
DUI
Reckless driving
Failure to appear
Points accumulation
Randomly selects 20 people and marks licenses as REVOKED (permanent) with severe reasons:
Multiple DUIs
Vehicular manslaughter
Felony with vehicle
Randomly selects 10 people and marks as NO LICENSE (never had one)
Short Description
AI disclosure
The author has disclosed that AI tools were used in creating the following aspects of this file:
- Description
- Mod and Mod Content (Substantial)
AI helped build and create the "shell" of the SQL query. Once reading and understanding the original AI code, parts of the code can be change to create other queries. AI is a great learning tool!
Recommended Comments
Create an account or sign in to comment