Replies: 1 (Who?), Viewed: 155 times.
Test Subject
Original Poster
#1 Old 30th Jul 2020 at 12:18 AM
Default Help a noob learn Modding (Guidence Needed)!
Hello, I'm new to the scene of sims modding no modding in general, I'm willing to learn and have some mods ideas in mind but not actual experience in the field.

I have some experience in web dev and several programming languages "web oriented" so if needed i think i could be able to learn python if needed more efficiently and faster even if the syntax is quite different from php or js. But first i need help in basic guidance example what can i do just with xml can i example make my mod add a trait just by interaction? (also is there like a manual/ dictionary of what each xml tag does?). How can i edit basic animations or add new ones for the same, based on objects (example how can i make the sim or npc jump in the bed instead of going to sleep normally). Is python only packaged in ts4files? or also in package files?

Please give me some guidance in regard or just send me to not much outdated resources where i can understand the basic mechanics, tutorials, xml and python terms and guidelines and when use one when the other. Sorry for disturbing you and thanks for the guidance.
Advertisement
Lab Assistant
#2 Old 30th Jul 2020 at 6:36 AM
The first thing you should be aware of is that modding for Sims 4 is not well documented, especially the scripting/Python side, so you will spend a lot of your time studying files to understand how they work. We have quite a few beginner tuning tutorials for stuff like overriding EA files, but not enough tutorials on making custom mods. The links I am giving have both a beginner tutorial series that will cover overrides, as well as tutorials on making basic custom stuff like social interactions and buffs. There are a few other custom related tutorials around, but they are usually very specific, like making new recipes, and they don't cover stuff a beginner needs to know.

Second is that the Sims 4 Python files control how the game functions, and the Sims 4 XML are what the Python files read. Think of Python as your computer, and the XML as the Sims 4 game. The computer reads and controls the Sims 4 game. With that said, you can get away with making 90-99% of the same mod, in most cases, in either Python or XML, depending on what it is of course. This is because of choice and limitations rather than differences. Some people just prefer to work with Python, some people prefer to work with XML, it depends on the person and what they are comfortable with. The limitations though are that Python can't touch SimDatas, which are files that tell the client what to display on the UI: colors, text, images, categories/menus, etc. SimDatas are paired with certain tuning/XML files, so in the end even if you take the Python path you will still need to make a few XML & SimData files. Buffs are a good example of paired files, they have both a tuning file and a SimData file, along with pie menus, commodities/statistics, and a few others I can't remember atm. It's important to remember that when you make a change to the tuning file, you must go and make the same change to the SimData if it is available. If you don't you run into UI errors, weird glitches, and in some cases crashing. You also shouldn't delete anything or alter the syntax of SimDatas, except in rare cases, like adjusting it to add more states for your commodity or removing them. The limitations for XML are that the some parts of the mods must be injected to avoid conflicts. A good example is new interactions on sims, because once you make the interaction it needs to be added to the sim somehow. If you were to add it to the sim object through an override, you run the risk of conflicts, but if you instead inject it to the sim object you avoid conflicts and make it compatible with other mods. Some situations actually require injection just to get the XML mod to show up at all (though I can't think of any at this second). Thankfully, we do have injection tools for most areas, so if you prefer XML in the end you can ignore Python in most cases. If you're making something like MCCC though, that will require a lot of scripting.

Hopefully everything I've said has made sense so far. To answer the smaller questions though:
1. Yes, you can have an interaction add your trait through XML, but you still need injection for your interaction to be added to a sim or object, unless it's on a custom new object because they control their own interactions (called a Super Affordance list). Thanks to the injection tools like XML Injector and Mod Constructor though you don't actually need to learn Python for the injection part.
2. Warning you now before you get ahead of yourself, but animations are a whole new area with even less documentation than regular modding. You should start with basic mods first, then once you know your way decently around mods, do animations. Beds are difficult to add new animations to because of their postures, and there's a bunch involved just to get the bed and sim to animate at the same time when jumping in. If you keep it simple enough (don't expect EA quality though) and avoid the bed animating, you can probably get the game to use whatever jump animation you make. To edit existing animations though, you create an Override package in Sims4Studio, choose your animation, export it, edit it, import it back in. There's a tiny bit more involved than that due to certain animations, but if you ever get to that point just post a new thread about it.
3. Python is only ever in .ts4script files, tuning files and CC are only ever in .packages.

Your main modding tool will probably be Sims4Studio. Here are some other resources and tutorials:

Creator Musings is a Sims 4 modder and CC creator hangout server (though everyone is allowed) with a tutorial/resource directory, help channels, and mod/cc/sims 4 news channels!
Twitter | Tumblr | Patreon
Back to top