Hi everyone,
I am writing a tutorial about how to write script mod for Sims4. This is a beginner guide, including how to decompile the game content, write your first cheat command, and publish it. Would like to hear your opinions and learn further more about script mod
Full article is in:
https://medium.com/@lli-1990/tutorial-write-the-sims-4-script-mod-with-python-part-1-introduction-6d49d0dcab92Tutorial: Write The Sims 4 Script Mod with Python — Part 1: Introduction
What is this tutorial for?
The Sims4 script mod is a type of mod to allow creators 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 cheat console by pressing “Ctrl + Shift + C”. A script mod is able to do the same thing, find what is the simoleons for current sim, add 50,000, then update it.
One of the popular script mod 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 my own script mod. However, the code of MCCC is not open source, I am glad to find some Sims4 mod projects in github. This tutorial is a simplifier version of the existing projects, a beginner guide, help new creators to catch up quickly, and start write their own mods.
The source code is public in github: LuquanLi/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 take a quick look some Python introduction course. Example:
https://www.programiz.com/python-programming/first-programInstall 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 support up to 3.8. Therefore, other versions of Python might cause unforeseeable issue.
Install Uncompyle6:
https://pypi.org/project/uncompyle6/. You can run ‘pip install uncompyle6’ after Python installed. This is the decompiler to decompile the Sims4 game source code.
IntelliJ or other IDEs you like:
https://www.jetbrains.com/idea/The development I am using is macOS. If you are using Windows or Linus, some of the command of game directory path could be different. Please leave comments behind this article for questions.