- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Code samples?
- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Code samples?
Replies: 6 (Who?), Viewed: 2797 times.
#1
3rd Jan 2017 at 4:29 AM
Posts: 78
Thanks: 4947 in 15 Posts
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
#2
3rd Jan 2017 at 8:25 AM
Posts: 11,682
Thanks: 9680 in 11 Posts
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)
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
#3
3rd Jan 2017 at 10:44 PM
Posts: 78
Thanks: 4947 in 15 Posts
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.
#4
4th Jan 2017 at 7:16 PM
Posts: 1,408
Thanks: 110590 in 109 Posts
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)
#5
5th Jan 2017 at 11:28 PM
Posts: 78
Thanks: 4947 in 15 Posts
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.
#6
6th Jan 2017 at 3:03 PM
Posts: 1,408
Thanks: 110590 in 109 Posts
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
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
#7
6th Jan 2017 at 11:50 PM
Posts: 78
Thanks: 4947 in 15 Posts
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.
Who Posted
|