Difference between revisions of "TS3PR"

From SimsWiki
Jump to: navigation, search
(The Main Listing)
m (Renamed Store Link)
(6 intermediate revisions by 2 users not shown)
Line 20: Line 20:
 
==The Main Listing==
 
==The Main Listing==
  
*[[TS3PR/ScriptCore|ScriptCore.dll]] - Contains all P/Invoke functions necessary for interacting with the game's EXE, functions and classes are pretty low-level.
+
The in-game libraries. To see the documentation of each, please click on the DLL names to go to their respective documentation.
*[[TS3PR/SimIFace|SimIFace.dll]] - Contains classes dealing with interfaces for various parts of the game interface, CAS, BuildBuy etc, also deals with some animation.
+
*[[TS3PR/Sims3GameplayObjects|Sims3GameplayObjects.dll]] - Contains classes for various in-game objects and some related actions.
+
*[[TS3PR/Sims3GameplaySystems|Sims3GameplaySystems.dll]] - Contains classes for making the Sim world go round; actions, interactions, events etc.
+
*[[TS3PR/Sims3Metadata|Sims3Metadata.dll]] - Contains classes dealing with textures, colours, patterns and resources.
+
*[[TS3PR/UI|UI.dll]] - deals with visuals and menus for interfaces, mostly ties in with SimIFace.dll
+
*[[TS3PR/Store|Sims3StoreObjects.dll]] - Like Sims3GameplayObjects.dll but for store items. Seemingly this dll only has older store items's actions and functionalities, anything after 2012 and onwards can be found in the store item itself.
+
  
'''EA constructed DLLs:'''
+
*[[TS3PR/ScriptCore|ScriptCore.dll]] - Contains all P/Invoke functions necessary for interacting with the game's engine. Functions and classes are pretty low-level.
The sims 3 also has DLLs that you might recognize from working on non-game C# projects. However, even though they have a familiar naming to it, EA customized these to fit the game's way of handling data. Therefore, a lot of classes are missing as well to tailor these libraries for the game and to not have redundant classes being shipped with the game. It's therefore advised to check beforehand in IlSpy or Visual studio's Object browser before using these.  
+
*[[TS3PR/SimIFace|SimIFace.dll]] - Contains interfaces and classes which provide a degree of separation between ScriptCore and the rest of the assemblies below.
 +
*[[TS3PR/Sims3GameplayObjects|Sims3GameplayObjects.dll]] - Contains classes to govern the functionality of most in-game objects. Depends on Sims3GameplaySystems, Sims3MetaData, and SimIFace.
 +
*[[TS3PR/Sims3GameplaySystems|Sims3GameplaySystems.dll]] - Contains classes for making the Sim world go round; actions, interactions, events etc. Depends on Sims3MetaData and SimIFace.
 +
*[[TS3PR/Sims3Metadata|Sims3Metadata.dll]] - Contains classes dealing with textures, colours, patterns and resources. Depends on SimIFace.
 +
*[[TS3PR/UI|UI.dll]] - Contains functionality to handle visuals, menus, and windows. Depends on Sims3MetaData and SimIFace.
 +
*[[TS3PR/Sims3StoreObjects|Sims3StoreObjects.dll]] - Contains functionality for older store items. Generally, any scripted premium content released after July 2013 (i.e. after the Business as Usual Bistro) have their functionality contained in individual DLLs packaged with the store downloads themselves.
 +
 
 +
==Misc libraries==
 +
 
 +
'''Modified .NET DLLs:'''
 +
 
 +
Aside from the libraries above, The Sims 3 also has DLLs that you might recognize from working on non-game C# projects as .NET Framework libraries. These assemblies are:
 +
 
 +
*System.dll
 +
*System.Xml.dll
 +
*mscorlib.dll
 +
 
 +
These are NOT the standard libraries of .NET Framework 2.0; rather, EA customized these assemblies to fit the needs of developing the game. For example, functionality for emitting dynamic methods and assemblies using System.Reflection.Emit has been removed, and System.Diagnostics.Stopwatch is nowhere to be found. Some of this functionality is implemented elsewhere, as in the case of Stopwatch (see ScriptCore.dll), while some of it was presumably deemed unnecessary and dropped entirely. It is therefore advised to check in IlSpy or Visual studio's Object browser before using a .NET Framework class to ensure it exists in the modified libraries.
 +
 
 +
When creating a scripting mod, your custom code MUST reference and build against these stripped-down versions of the .NET Framework.
 +
 
 +
For more information on the contents of these assemblies, please refer to [https://docs.microsoft.com/en-us/dotnet/api/system?view=netframework-2.0 Microsoft's documentation of .NET Framework 2.0]
 +
 
 +
'''Sims3Common.dll:'''
 +
 
 +
*[[TS3PR/Sims3Common|Sims3Common.dll]] - A C++ library containing all P/Invoke functions necessary for the managed Scripting Core to interact with the unmanaged game engine. ScriptCore is the only managed assembly that links to it.
  
If you are in need of researching a class or functionality of these libraries, please refer to: [[ https://docs.microsoft.com/en-us/dotnet/api/system?view=netframework-2.0 || Microsoft's documentation of Net 2.0]]
 
  
 
{{TS3AdvancedModdingHeader}}
 
{{TS3AdvancedModdingHeader}}

Revision as of 20:27, 26 January 2021

The Sims 3 Programmer's Reference

This is the top-level document for an in-progress reference to the DLLs contained within the gameplay.package and scripts.package files that exist in the Game\Bin directory of each TS3 game, SP(Stuff Pack) or EP (Expansion Pack).

It is also worth noting that existing functions can vary between editions, so if you want to contribute to this documentation, please mention which edition you are referencing.

For your reference, versioning goes in this order (oldest to newest):

  1. The Sims 3 - 1.x
  2. The Sims 3: World Adventures (EP) - 2.x
  3. The Sims 3: High-End Loft Stuff (SP) - 3.x
  4. The Sims 3: Ambitions (EP) - 4.x
  5. The Sims 3: Fast Lane Stuff (SP) - 5.x
  6. The Sims 3: Late-Night (EP) - 6.x

As you can see, whilst Stuff Packs don't tend to add anything other than objects, EA do nonetheless take them as an opportunity to update the game's code, therefore, please be sure to make a mention of which edition the method/class/member is known to definitely be correct for if you are going to provide a usage.

In terms of providing usage information, the best presentation method to follow is that of MSDN for C# functions, although by no means do you have to rigidly follow it, it's at least helpful to put parameters, overloads and the return values in their own sections.

The Main Listing

The in-game libraries. To see the documentation of each, please click on the DLL names to go to their respective documentation.

  • ScriptCore.dll - Contains all P/Invoke functions necessary for interacting with the game's engine. Functions and classes are pretty low-level.
  • SimIFace.dll - Contains interfaces and classes which provide a degree of separation between ScriptCore and the rest of the assemblies below.
  • Sims3GameplayObjects.dll - Contains classes to govern the functionality of most in-game objects. Depends on Sims3GameplaySystems, Sims3MetaData, and SimIFace.
  • Sims3GameplaySystems.dll - Contains classes for making the Sim world go round; actions, interactions, events etc. Depends on Sims3MetaData and SimIFace.
  • Sims3Metadata.dll - Contains classes dealing with textures, colours, patterns and resources. Depends on SimIFace.
  • UI.dll - Contains functionality to handle visuals, menus, and windows. Depends on Sims3MetaData and SimIFace.
  • Sims3StoreObjects.dll - Contains functionality for older store items. Generally, any scripted premium content released after July 2013 (i.e. after the Business as Usual Bistro) have their functionality contained in individual DLLs packaged with the store downloads themselves.

Misc libraries

Modified .NET DLLs:

Aside from the libraries above, The Sims 3 also has DLLs that you might recognize from working on non-game C# projects as .NET Framework libraries. These assemblies are:

  • System.dll
  • System.Xml.dll
  • mscorlib.dll

These are NOT the standard libraries of .NET Framework 2.0; rather, EA customized these assemblies to fit the needs of developing the game. For example, functionality for emitting dynamic methods and assemblies using System.Reflection.Emit has been removed, and System.Diagnostics.Stopwatch is nowhere to be found. Some of this functionality is implemented elsewhere, as in the case of Stopwatch (see ScriptCore.dll), while some of it was presumably deemed unnecessary and dropped entirely. It is therefore advised to check in IlSpy or Visual studio's Object browser before using a .NET Framework class to ensure it exists in the modified libraries.

When creating a scripting mod, your custom code MUST reference and build against these stripped-down versions of the .NET Framework.

For more information on the contents of these assemblies, please refer to Microsoft's documentation of .NET Framework 2.0

Sims3Common.dll:

  • Sims3Common.dll - A C++ library containing all P/Invoke functions necessary for the managed Scripting Core to interact with the unmanaged game engine. ScriptCore is the only managed assembly that links to it.


Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox