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!
Test Subject
Original Poster
#1 Old 15th Dec 2018 at 2:48 PM
Default Noob script writer needing some pointers
Hi,

After months of teaching myself blender and doing many recolours with Photoshop and S4S, I've decided to dabble with Python and do some simple script mods.

Despite being an ex programmer IRL (cobol, C++, Visual Basic) I'm struggling... not so much with Python itself, although I am definitely at the beginning of the learning curve - but it's understanding the format of the data structures that exist in Live mode and how to manipulate them. I've spent hours scouring various forums and there seems to be very little guidance or documentation. Most of this knowledge seems to be in the heads of a small group of expert modders (the likes of Turbodriver and Deaderpool come immediately to mind).

I decided to start by trawling through the python source of some working mods and trying to output the contents of variables to the Sims 4 cheat console. This doesn't seem to work - but then I don't know the format of the data withing those variables because I can't find any documentation. I wondered if any Python debuggers will work when the python script is running under the Sims 4 control?

Ultimately my aim is to create a few 'simple' mods that populate an outfit type and part location of a selected sim (either player controlled or NPC) with a specific CAS item. So a simple example would be to fill the current outfit hat part of a sim with a specific CAS item (a hat). So rather than making changes in the CAS edit screen you could either type a cheat code or use a custom pie menu to add a hat to that sim's current outfit. I know this is possible because Turbodriver has some similar autonomous functionality in Wicked Whims (yes I know we can't discuss that in detail on this forum, but I'm just quoting an example).

So essentially I'd need to retrieve the details of the sim that has been clicked on, using whatever unique key defines a sim then retrieve the current outfit data, assign the instance id of a CAS item to the hat slot of the current outfit. Doesn't sound overly complicated but without some guidance on how the data structures work, their formats and keys then this is very difficult to achieve.

Can anyone throw me a few clues? Maybe there's some specific coding examples along these lines that I could study and even adapt for my own purposes.

Any help would be most appreciated and if I ever get to publish my work I'll be sure to throw awesome praise your way ;-)
Advertisement
Lab Assistant
#2 Old 16th Dec 2018 at 2:53 AM
Hiya you can actually use buffs to change appearance check out the appearance_modifier in the tdescs in the buff section .
Back to top