Post by captainpie on Oct 18, 2020 19:51:16 GMT -5
Hi, I've been trying to create this trait for, I dunno a week or two.
I've started with using the Mod Constructor, but apparently there was just one single specific thing I wanted, really, really bad, which was unfortunately straight up impossible with the constructor; the issue lies with another mod I've been trying to test with.
I knew one modder that had accomplished the thing I wanted to do, so I asked them, but they said it was fairly complicated and should start trying to create a trait without the constructor.
So I've picked up some python tutorial which I've finished the past week, and felt fairly confident in trying something, when I tried to put it to use, however, that confidence soon crumbled. I tried to find something of a guide on creating traits from scratch with python, I found absolutely nothing. Worse, I decompiled some modding scripts (made with the constructor) with the help of the startup script I found here sims4studio.com/thread/15145/started-python-scripting, which was helpful, but honestly pretty overwhelming and confusing. When I looked at my own mod with traits I made with the constructor, I noticed nothing really coded for any of the traits, I figured it uses the corresponding tuning stuff written in the .package in xml.
God I hate xml already. There's only very long numbers that reference to all these different little things in other files, which you can't comfortably search for in S4S. Anyway, I think there's also an xml injector, which injects the thing in the other thing so you have to call it in python?
The weird thing is that my corresponding python file only references to three tuning IDs, even though I have definitely a lot more traits and aspiration tracks in it. So I guess most things are actually coded in xml instead? Great.
But maybe that's just the constructor's way.
See, I don't know how this all is supposed to be written from scratch anyway. There's nothing I can find that tells me how to, or where to find uh.. maybe a function that handles traits, inside a .py file in the sims scripting library? Idk. Most tutorials here only handle objects and CC, which I am not interested in at all. Nor do they help me, because it's mostly just changing tidbits of already existing code to move some things around, give them names, or tweak the functionality.
Is there really not something on this. Something simple like "Write this in python. There is your empty trait." or whatever?
Edit: found the traits folder, with scrips like traits.py. Interesting stuff, idk if it works if I just import those functions, but I might try. Though I don't know how many components I need for it to function properly. And even if I create something of a template, I really don't know still how to connect that with the xml package. I might look into the xml injector more tomorrow, but honestly I've limited spare time and I'm feeling like I'm grasping at air. I normally don't ask for help, but here I am :p
I've started with using the Mod Constructor, but apparently there was just one single specific thing I wanted, really, really bad, which was unfortunately straight up impossible with the constructor; the issue lies with another mod I've been trying to test with.
I knew one modder that had accomplished the thing I wanted to do, so I asked them, but they said it was fairly complicated and should start trying to create a trait without the constructor.
So I've picked up some python tutorial which I've finished the past week, and felt fairly confident in trying something, when I tried to put it to use, however, that confidence soon crumbled. I tried to find something of a guide on creating traits from scratch with python, I found absolutely nothing. Worse, I decompiled some modding scripts (made with the constructor) with the help of the startup script I found here sims4studio.com/thread/15145/started-python-scripting, which was helpful, but honestly pretty overwhelming and confusing. When I looked at my own mod with traits I made with the constructor, I noticed nothing really coded for any of the traits, I figured it uses the corresponding tuning stuff written in the .package in xml.
God I hate xml already. There's only very long numbers that reference to all these different little things in other files, which you can't comfortably search for in S4S. Anyway, I think there's also an xml injector, which injects the thing in the other thing so you have to call it in python?
The weird thing is that my corresponding python file only references to three tuning IDs, even though I have definitely a lot more traits and aspiration tracks in it. So I guess most things are actually coded in xml instead? Great.
But maybe that's just the constructor's way.
See, I don't know how this all is supposed to be written from scratch anyway. There's nothing I can find that tells me how to, or where to find uh.. maybe a function that handles traits, inside a .py file in the sims scripting library? Idk. Most tutorials here only handle objects and CC, which I am not interested in at all. Nor do they help me, because it's mostly just changing tidbits of already existing code to move some things around, give them names, or tweak the functionality.
Is there really not something on this. Something simple like "Write this in python. There is your empty trait." or whatever?
Edit: found the traits folder, with scrips like traits.py. Interesting stuff, idk if it works if I just import those functions, but I might try. Though I don't know how many components I need for it to function properly. And even if I create something of a template, I really don't know still how to connect that with the xml package. I might look into the xml injector more tomorrow, but honestly I've limited spare time and I'm feeling like I'm grasping at air. I normally don't ask for help, but here I am :p