Replies: 12 (Who?), Viewed: 797 times.
Virtual gardener
staff: administrator
Original Poster
#1 Old 26th Jan 2021 at 12:57 PM
Default Sims 3 Code Documentation
Heya everyone!

A few months back @gamefreak130 pointed out the existence of this thread: http://simswiki.info/wiki.php?title=TS3PR
Which was a thread created back in 2010. So, pretty old now! 

It's been quite a while since it was updated if you can see :p And a while back Gamefreak130 and I were actually talking about updating it, so I figured, why not do that today!

So if you'd like to contribute then you're free to do so! Here's an example of the formatting (That I assumed the original creator of the thread wanted it to look like?) but if that format is awful, just let me know too lol

Example: http://simswiki.info/wiki.php?title.../Sims3.SimIFace

What I did so far:
Updated the homepage of the docs to add Sims3StoreObjects.dll and the microsoft-but-not-so-microsoft libraries. Plus some explanation as to what the Sims3Common.dll is and how to use it if ever necessary.

http://simswiki.info/wiki.php?title=TS3PR

Also updated the SimIface/Sims3 thread: http://simswiki.info/wiki.php?title.../SimIFace/Sims3
And updated, but still neeed to finish, the SimIface.Sims3.SimIFace thread: http://simswiki.info/wiki.php?title.../Sims3.SimIFace

Feel free to edit anything that I might have read wrong or add additional information (like usage of a function/method/class/thing)

I will still be updating it bit by bit but if you want to contribute then you can too! At least I think so IIRC... else also let me know :p because then that's just a permission thing.
Advertisement
Field Researcher
#2 Old 27th Jan 2021 at 12:55 AM
Thanks for getting this started. I've cleaned up some various things around the current landing pages and added a couple more for Sims3StoreObjects: http://simswiki.info/wiki.php?title...ms3StoreObjects.

I think having a separate page for every object in a namespace (as was done here) is the way to go to keep things organized, so the next step is to go through each namespace to enumerate all the objects. I've already done it for everything in Sims3StoreObjects, but that's a very small percentage of the total amount of ground to cover.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Virtual gardener
staff: administrator
Original Poster
#3 Old 27th Jan 2021 at 12:09 PM
Quote:
Originally Posted by gamefreak130
Thanks for getting this started. I've cleaned up some various things around the current landing pages and added a couple more for Sims3StoreObjects: http://simswiki.info/wiki.php?title...ms3StoreObjects.

I think having a separate page for every object in a namespace (as was done here) is the way to go to keep things organized, so the next step is to go through each namespace to enumerate all the objects. I've already done it for everything in Sims3StoreObjects, but that's a very small percentage of the total amount of ground to cover.
Looking good! Thanks for cleaning things up a bit! personally I know I have a habit of over-explaining stuff, but that might be an English-second-language thing :p

I think indeed having an MSDN-like setup is probably the easiest to read here as well  So let's keep that approach for now! Almost feel like we need to write a program that just dumps all the namespaces and classes for us :p Especially when looking at the SimIFace stuff.

I do wonder though, some classes seem to have been used in the past by EA, but aren't currently. (I.E AnimationsUtil, which was probably used before they got rid of the GrannyRig support and went their own ways). Should we include those? I personally think the debug engine functions can still be useful as references, as they can still be used in your own scripts.
Field Researcher
#4 Old 28th Jan 2021 at 4:40 AM
Quote:
Originally Posted by Lyralei
Almost feel like we need to write a program that just dumps all the namespaces and classes for us :p


...Give me a few days

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Field Researcher
#5 Old 29th Jan 2021 at 2:57 AM
Alright, well that didn't take quite as long as I thought it would.

There should now be pages for all namespaces in the assemblies, and each page lists out the types in that namespace. I didn't know what to do with nested types (like the Definition classes in interaction objects), so I just left them out for now. I also didn't touch the two pages from SimIFace that @Lyralei had started filling in. Other than that, the scaffolding should be set up to actually fill in type information!

Oh, and if you're wondering how I did it, here's the code I wrote to generate the pages, in all its LINQ-ing glory:


"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Virtual gardener
staff: administrator
Original Poster
#6 Old 29th Jan 2021 at 10:13 AM
Quote:
Originally Posted by gamefreak130
Alright, well that didn't take quite as long as I thought it would.

There should now be pages for all namespaces in the assemblies, and each page lists out the types in that namespace. I didn't know what to do with nested types (like the Definition classes in interaction objects), so I just left them out for now. I also didn't touch the two pages from SimIFace that @Lyralei had started filling in. Other than that, the scaffolding should be set up to actually fill in type information!

Oh, and if you're wondering how I did it, here's the code I wrote to generate the pages, in all its LINQ-ing glory:

Love the code! Simple, easy, and LINQ is pretty cool to use for these types of things  Thanks for sharing! I'll use it for the SimIface when I get time to work on it for a few hours and change some of the SimIFace stuff with the format we came up with

Also, I don't think the WIki has seen this much activity in it's changes in a looooong time :p
Virtual gardener
staff: administrator
Original Poster
#7 Old 31st Jan 2021 at 10:32 AM
@gamefreak130 Am about to change the bits in the SimIface that needs their own class pages into the correct way, although I was thinking. in the case of Sims3 it only has 3 enums in it: http://simswiki.info/wiki.php?title.../SimIFace/Sims3

Do you think it would be worth splitting that into different pages or just keep them together?
Field Researcher
#8 Old 31st Jan 2021 at 3:57 PM
Quote:
Originally Posted by Lyralei
@gamefreak130 Am about to change the bits in the SimIface that needs their own class pages into the correct way, although I was thinking. in the case of Sims3 it only has 3 enums in it: http://simswiki.info/wiki.php?title.../SimIFace/Sims3

Do you think it would be worth splitting that into different pages or just keep them together?


I would say to split just for consistency. If we have a bunch of stubs that way, then we have a bunch of stubs, but I think it'll make for easier searching of relevant material.

"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt

If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
Virtual gardener
staff: administrator
Original Poster
#9 Old 1st Feb 2021 at 4:09 PM
Quote:
Originally Posted by gamefreak130
I would say to split just for consistency. If we have a bunch of stubs that way, then we have a bunch of stubs, but I think it'll make for easier searching of relevant material.
Done!

I also split the SimIface stuff and currently busy creating an easier way to see what links to what by adding sort of like a TOC to the pages, like so:

http://simswiki.info/wiki.php?title...e/BlockedStatus

Animation priority is also a great example of what happens when there is a page there that exists

http://simswiki.info/wiki.php?title...imationPriority
Virtual gardener
staff: administrator
Original Poster
#10 Old 11th Mar 2021 at 11:16 AM
I added the super helpful excel sheet with terminology to the documentation as well! 

(http://simswiki.info/wiki.php?title...r.27s_Reference) - See terminology

Thread where we're discussing the terminology: https://modthesims.info/showthread....0<br /> <br />Oh and I added a reference link in the programmer info tab, in case people are looking for other programmer info :p http://simswiki.info/wiki.php?title...oding_Tutorials

Also! Should we sticky this thread as well? I'm not sure if it's helpful at all?
Test Subject
#11 Old 11th Mar 2021 at 2:53 PM
I personally think it would be great to have it stickied.
Field Researcher
#12 Old 11th Mar 2021 at 4:17 PM
Didn't know this page existed, it is so helpful! Thank you for cleaning it up and I agree with WhacktheM0l3, making it a sticky post would be great.
Virtual gardener
staff: administrator
Original Poster
#13 Old 12th Mar 2021 at 8:12 PM
Allright! used my admin-y powers and sticked it!  

I'll try and add some more documentation wherever I can whenever I got more time  Since the idea is to explain particular concepts in the docs as well where needed  WHich Illspy doesn't necessarily help with
Back to top