### Example Naming
Source: https://thesims4moddersreference.org/tutorials/series/miy-aspirations/miy-6-modding-basics
An example of how to format the tuning file name using the recommended convention.
```English
ilkavelle:aspirationTrack_OurNewAspirationForLearning
```
--------------------------------
### Sims 4 Installation Path Example
Source: https://thesims4moddersreference.org/tutorials/modding-on-linux
An example of the file path for The Sims 4 installation when using Steam on Linux.
```bash
/home/yourusername/local/share/Steam/steamapps/common/The Sims 4
```
--------------------------------
### File Naming Convention Example
Source: https://thesims4moddersreference.org/about/contribution-guidelines
Example of how files should be named, in lower-case with en-dashes separating words.
```text
contribution-guidelines.md
```
--------------------------------
### Formatted Onsite Tutorial Link
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
An example of a fully formatted link to an onsite tutorial.
```markdown
* [Social Bunny Tweaks](../tutorials/links-offsite-tutorials/#social-bunny-tweaks-by-jimantha), by Jimantha
```
--------------------------------
### Install WineTricks
Source: https://thesims4moddersreference.org/tutorials/modding-on-linux
Command to install the WineTricks utility.
```bash
sudo apt install winetricks
```
--------------------------------
### Formatted Offsite Tutorial Link
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
An example of a fully formatted link to an offsite tutorial.
```markdown
### [Sims 4 Debugging Tips](https://imtheproblemitsjim.neocities.org/Sims%20content/Sims%204%20Modding/ModdingDebuggingTips), by Jimantha
> It gives a glimpse on how to debug, which tools to use, and some general advice on problem-solving and when to ask for help
```
--------------------------------
### Page Header Example
Source: https://thesims4moddersreference.org/about/contribution-guidelines
Example of the required header information for each page, including title, description, last updated date, sidebar order, and badges.
```yaml
---
title: Scumbumbo's XML File Finder
description: A tutorial for using Scumbumbo XML File Finder
lastUpdated: true
sidebar:
order: 50
badge:
text: NEW
variant: tip
---
```
--------------------------------
### Example Tuning Snippet
Source: https://thesims4moddersreference.org/tutorials/creating-injector
An example of a tuning snippet used for career entitlements, specifying benefits and traits.
```xml
0x7836EE61
10138
219807
```
--------------------------------
### Add i386 architecture and install WINE prerequisites
Source: https://thesims4moddersreference.org/tutorials/modding-on-linux
Commands to add the i386 architecture, update package lists, and install necessary packages for WINE installation.
```bash
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wget gnupg2 software-properties-common
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources
sudo apt update
```
--------------------------------
### Markdown for Offsite Tutorials
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Example of how to format a link to an offsite tutorial in the links-offsite-tutorials.md file.
```markdown
### [Tutorial Name](link) by YourNameOrUsername
> Description goes here
```
--------------------------------
### Linking to Resources in the Same Folder
Source: https://thesims4moddersreference.org/about/contribution-guidelines
Example of how to create a relative link to a resource within the same folder.
```markdown
**[Scumbumbo's XML Extractor](../tutorials/scumbumbo-xml-extractor.md)**
```
--------------------------------
### Markdown for Onsite Tutorials
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Example of how to format a link to an onsite tutorial within the index.md file.
```markdown
* [Tutorial Name](../tutorials/links-offsite-tutorials/#tutorial-name-in-links-offsite-tutorials-by-YourName), by YourName
```
--------------------------------
### Example XML Snippet for Trait Entitlements
Source: https://thesims4moddersreference.org/tutorials/creating-injector
An example of how trait-based career entitlements can be structured in XML for modding.
```xml
0x7836EE61
27916
29946
```
--------------------------------
### Linking to Resources in a Different Folder
Source: https://thesims4moddersreference.org/about/contribution-guidelines
Example of how to create a relative link to a resource in a different folder.
```markdown
**[Scumbumbo's XML Extractor](../../tutorials/scumbumbo-xml-extractor.md)**
```
--------------------------------
### File Structure Example
Source: https://thesims4moddersreference.org/tutorials/creating-injector
Example file structure for a Sims 4 Python script mod, including script and compilation files.
```text
My Script Mods/
├── career_entitlement_injector/
| ├── Scripts/
| | ├── januksenkosketus_career_entitlement_injector.py
| ├── compile.py
```
--------------------------------
### Linking to External Resources
Source: https://thesims4moddersreference.org/about/contribution-guidelines
Example of how to link to resources outside of this website.
```markdown
**[TS4 World Documentation](https://github.com/Kallixer/Ts4-World-Documentation)**
```
--------------------------------
### Markdown Link Example
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Example of creating a link to a specific section of another markdown file using relative paths and anchors.
```markdown
[Contribution Guidelines](../about/contribution-guidelines#formatting)
```
--------------------------------
### Local Development Commands
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Commands to install dependencies and run the local development server for Astro.
```bash
npm install
npm run dev
```
--------------------------------
### Local Development Server Output
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Example output from the Astro development server indicating the local URL.
```text
astro v5.12.3 ready in 12 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
```
--------------------------------
### Editing Werewolf Forms
Source: https://thesims4moddersreference.org/tutorials/modifying-sim-appearances
Example of how to get all necessary Sim infos to edit only the werewolf form of Sims. It includes the werewolf form info and the current form info if the Sim is currently a werewolf.
```python
from sims.occult.occult_enums import OccultType
target_infos = []
# Make sure sim is a werewolf
if sim_info.occult_tracker.has_occult_type(OccultType.WEREWOLF):
# Always add the werewolf form info
target_infos.append(sim_info.occult_tracker.get_occult_sim_info(OccultType.WEREWOLF))
# If the sim is currently in werewolf form, also edit the current form
if sim_info.occult_tracker.get_current_occult_types() == OccultType.WEREWOLF:
target_infos.append(sim_info)
```
--------------------------------
### Remove existing WINE installations
Source: https://thesims4moddersreference.org/tutorials/modding-on-linux
Commands to remove any previously installed versions of WINE and related packages to ensure a clean installation.
```bash
sudo apt remove --purge wine
sudo apt remove --purge wine winehq-* wine-stable wine-devel wine-staging
sudo apt autoremove
```
--------------------------------
### Verify WINE installation version
Source: https://thesims4moddersreference.org/tutorials/modding-on-linux
Command to check the currently installed WINE version.
```bash
wine --version
```
--------------------------------
### Build and Preview Commands
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Commands to build the production version of the site and preview it locally.
```bash
npm run build
npm run preview
```
--------------------------------
### Tutorial File Naming Convention
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Examples of how to name markdown files for tutorials within the content directory.
```markdown
modifying-sim-appearances.md
xml-extractor.md
```
--------------------------------
### Install WINE version 10.0
Source: https://thesims4moddersreference.org/tutorials/modding-on-linux
Commands to install the specific WINE version 10.0 and its components, using backslashes for multi-line input.
```bash
sudo apt install --install-recommends \
winehq-stable=10.0.0.0~noble-1 \
wine-stable=10.0.0.0~noble-1 \
wine-stable-amd64=10.0.0.0~noble-1 \
wine-stable-i386=10.0.0.0~noble-1
```
--------------------------------
### Markdown List and Relative Link Example
Source: https://thesims4moddersreference.org/about/github-and-writing-tutorial
Demonstrates using markdown for lists and creating relative links within a website.
```markdown
*
```
--------------------------------
### Sims 4 Mods Folder Path Example
Source: https://thesims4moddersreference.org/tutorials/modding-on-linux
An example of the typical filepath for The Sims 4 mods folder on a Linux system running through WINE.
```bash
/home/yourusername/.steam/steam/steamapps/compatdata/1222670/pfx/drive_c/users/steamuser/My Documents/Electronic Arts/The Sims 4
```
--------------------------------
### Getting the Sim's Age
Source: https://thesims4moddersreference.org/tutorials/modifying-sim-appearances
This code snippet shows how to get a Sim's age and compare it to the Age enum for conditional logic.
```python
from sims.sim_info_types import Age
if sim_info.age == Age.TEEN:
# etc
```
--------------------------------
### Combined Formatting Example
Source: https://thesims4moddersreference.org/tutorials/series/miy-aspirations/miy-5-strings-other-formatting
An example demonstrating the combination of font color, size, and bold tags, along with new line characters, for complex text formatting.
```HTML
ThrifTea\nGo visit ThrifTea to hunt for your next Fashion Look. You can also talk to the owner about which Trends are hot right now.\n\nTrendi\nYou can create Fashion Looks in ThrifTea and sell them on Trendi. You can also buy other listings, Hype them and sell those too.\n\nTrends and Hype\nEvery Fashion Look belongs to a Trend. Wearing and Promoting a Fashion Look increases its Hype level, as well as making that Trend more popular.\n\nFollowers\nSuccessfully Hyping and Selling Fashion Looks will gain Followers. More Followers increases your success when selling on Trendi.\n\n
```
--------------------------------
### Create Empty Package
Source: https://thesims4moddersreference.org/tutorials/series/miy-aspirations/miy-6-modding-basics
Steps to create an empty package file in Sims 4 Studio to start a new mod.
```English
First to start creating new mod, you need to open Sims 4 Studio go to Tools and Create Empty Package:
```