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!
Quick Reply
Search this Thread
Lab Assistant
Original Poster
#1 Old 3rd Jan 2017 at 4:29 AM
Default Code samples?
Hi. I'm looking to get into modding. What I'm hoping is if there's a way I could look at different types of python files that modders have created as examples of how to code different things (anything from traits or aspirations to objects and interactions... basically, whatever I can get my hands on). I looked around a little bit, but I know that by the time a modder is finished, it's going to be compiled in one way or another, so there's no way for me to go in and see how they did it in raw python.

Reason I ask is, I have a pretty solid basic knowledge of programming, but I'm very rusty in python and I don't have a very good recall memory. I feel that if I were to see some examples of mods in action, I would have a much better time piecing together how to do similar things, as opposed to trying to pore over documentation for hours. I've always learned programming through trying things. Documentation can be helpful, but it's like a history book of facts; it's too much raw fact that I have no way to tie to applied reality.

If there is some way I could see such samples, please let me know. Thanks!
Advertisement
One horse disagreer of the Apocalypse
#2 Old 3rd Jan 2017 at 8:25 AM
A lot of modders include the .py as well as the .pyc

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
Original Poster
#3 Old 3rd Jan 2017 at 10:44 PM
Quote: Originally posted by Inge Jones
A lot of modders include the .py as well as the .pyc

Where might I find cases where modders have done this? Most of the mods I've encountered are package file or ts4 script file.
Icy Spicy
#4 Old 4th Jan 2017 at 7:16 PM
Quote: Originally posted by CardTaken
Where might I find cases where modders have done this? Most of the mods I've encountered are package file or ts4 script file.


ts4script file is basically a zip file which contains the compiled ( and sometimes uncompiled python file). it can be unzipped(7z gives the most consistent results)
Lab Assistant
Original Poster
#5 Old 5th Jan 2017 at 11:28 PM
Quote: Originally posted by icemunmun
ts4script file is basically a zip file which contains the compiled ( and sometimes uncompiled python file). it can be unzipped(7z gives the most consistent results)

Hmm. I tried unzipping one. Ended up with a lot of pyo files. Tried a couple different decompiler resources I found here and both gave me sims 4 files, but in pyo form, not py.

I don't know if TheHologramMan's thing on pyo to py is outdated or if it even does what I'm looking for: http://modthesims.info/showthread.p...727#post4503727

Not really understanding how to use the file. Seems it was made for getting access to the sims 4 files at all, not for pyo --> py specifically.

EDIT: Remembering a little incorrectly. One of the Sims 4 files decompile resources I found did give me a bunch of py files, but it seems to be framework files. Nothing specific enough to give me examples of applied scripting for a specific addition to the game. It seems kind of silly to go through an elaborate decompiling process for modders' files, but I may have to do that.
Icy Spicy
#6 Old 6th Jan 2017 at 3:03 PM
A few creators who include the .py in their ts4script -

scumbumbo

Neia

weerbesu

Graycurse

There are other creators too who include .py...i havent checked them all out yet!

List of Script mods on MTS
Lab Assistant
Original Poster
#7 Old 6th Jan 2017 at 11:50 PM
Quote: Originally posted by icemunmun
A few creators who include the .py in their ts4script -

scumbumbo

Neia

weerbesu

Graycurse

There are other creators too who include .py...i havent checked them all out yet!

List of Script mods on MTS

Awesome, thank you! I will check them out.
Back to top