Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 1st Mar 2022 at 10:18 PM
Tutorial: Write The Sims 4 Script Mod with Python - Introduction
Tutorial: Write The Sims 4 Script Mod with Python - Introduction

The Full Tutorial is published in HERE . Please check the link for recent updates.

Link: https://medium.com/@lli-1990/tutori...on-6d49d0dcab92



What is this tutorial for?
The Sims4 script mod is a type of mod that allows creators to access and modify the game data by python script directly. For example, in the EA official cheat instruction, we can type motherlode to get 50,000 simoleons from the cheat console. A script mod could achieve this with the following process: find what is the simoleons for the current sim, add 50,000, then update it.

One of the popular script mods for The Sims4 is MC Command Center, with this module, you could expand the functionality and story progression within the game.

What you can learn from this tutorial?
I am a The Sims player, and also a software engineer. After using the MC Command Center for years, I would like to start writing some script mods myself. However, MCCC is not an open-source project, gladly, I am able to find some Sims4 mod projects on Github. This tutorial is a simplifier version of the existing projects, a beginner guide, that helps new creators to catch up quickly and start writing their own mods.

The source code is public in GitHub: TheSims4ScriptModBuilder

Many thanks for junebug12851/Sims4ScriptingBPProj, this project provides more functionalities, like debug.

Prerequisites
This tutorial requires fundamental programming knowledge. If you do not have enough background, recommend taking a quick look at some Python introduction courses. Example: https://www.programiz.com/python-pr...g/first-program
- Install Python 3.7: https://www.python.org/downloads/release/python-370/ . Recommend version 3.7 or 3.8. Because the decompile tool we are using is only supported up to 3.8. Therefore, other versions of Python might cause an unforeseeable issue. If you are using PC, might need to update some environment variables, see: https://datatofish.com/add-python-to-windows-path/
- Install Uncompyle6: https://pypi.org/project/uncompyle6/. You can run ‘pip install uncompyle6’ after Python is installed. This is the decompiler to decompile the Sims4 game source code.
- IntelliJ or other IDEs you like: https://www.jetbrains.com/idea/

During the development, the operating system I am using is macOS. If you are using Windows or Linus, some of the commands or game directory paths could be different. Please leave comments behind this article for questions.
Screenshots
1 users say thanks for this. (Who?)
Back to top