http://direct.simswiki.info/index.php?title=TS3PR/Sims3Common&feed=atom&action=historyTS3PR/Sims3Common - Revision history2024-03-29T05:35:40ZRevision history for this page on the wikiMediaWiki 1.20.2http://direct.simswiki.info/index.php?title=TS3PR/Sims3Common&diff=72601&oldid=prevLyralei: /* About Sims3Common */2021-01-26T09:57:37Z<p><span dir="auto"><span class="autocomment">About Sims3Common</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 09:57, 26 January 2021</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 31:</td>
<td colspan="2" class="diff-lineno">Line 31:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController();</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController();</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 39:</td>
<td colspan="2" class="diff-lineno">Line 38:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController(ulong objId);</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController(ulong objId);</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td></tr>
</table>Lyraleihttp://direct.simswiki.info/index.php?title=TS3PR/Sims3Common&diff=72600&oldid=prevLyralei: /* About Sims3Common */2021-01-26T09:57:25Z<p><span dir="auto"><span class="autocomment">About Sims3Common</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 09:57, 26 January 2021</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 29:</td>
<td colspan="2" class="diff-lineno">Line 29:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>*4. If you find anything you'd want to use, in your C# script, import it like so:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>*4. If you find anything you'd want to use, in your C# script, import it like so:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><<del class="diffchange diffchange-inline">code</del>></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><<ins class="diffchange diffchange-inline">pre</ins>></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController();</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController();</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div></<del class="diffchange diffchange-inline">code</del>></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></<ins class="diffchange diffchange-inline">pre</ins>></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the function expects you to return a parameter, do this instead:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the function expects you to return a parameter, do this instead:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><<del class="diffchange diffchange-inline">code</del>></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><<ins class="diffchange diffchange-inline">pre</ins>></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController(ulong objId);</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController(ulong objId);</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div></<del class="diffchange diffchange-inline">code</del>></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></<ins class="diffchange diffchange-inline">pre</ins>></div></td></tr>
</table>Lyraleihttp://direct.simswiki.info/index.php?title=TS3PR/Sims3Common&diff=72599&oldid=prevLyralei: /* About Sims3Common */2021-01-26T09:56:28Z<p><span dir="auto"><span class="autocomment">About Sims3Common</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 09:56, 26 January 2021</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 31:</td>
<td colspan="2" class="diff-lineno">Line 31:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><code></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><code></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController();</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController();</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></code></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></code></div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 38:</td>
<td colspan="2" class="diff-lineno">Line 39:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><code></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><code></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[DllImport("Sims3Common.dll")]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController(ulong objId);</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>public static extern void Animation_CreateTransformController(ulong objId);</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></code></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></code></div></td></tr>
</table>Lyraleihttp://direct.simswiki.info/index.php?title=TS3PR/Sims3Common&diff=72598&oldid=prevLyralei: Created page with "This Page is currently simply a stub, if you have information to contribute on any of these classes, please create the page and add info about it to this page. ==About Sims3..."2021-01-26T09:54:26Z<p>Created page with "This Page is currently simply a stub, if you have information to contribute on any of these classes, please create the page and add info about it to this page. ==About Sims3..."</p>
<p><b>New page</b></p><div>This Page is currently simply a stub, if you have information to contribute on any of these classes, please create the page and add info about it to this page. <br />
<br />
==About Sims3Common==<br />
<br />
'''Research on the Sims3Common library'''<br />
<br />
So far, it's been discovered that sims3common is inlined inside the TS3W.exe and can't, therefore, be 'cracked open'. However, It is been discovered that CAW (Create-a-World) does contain an 'exposed' Sims3Common.dll, and will be able to be found inside the program's files where you can also find CAW.exe. This does have all the functions that we find in the [[TS3PR/ScriptCore | ScriptCore.dll]]; a library that directly communicates with the sims3Common.dll. So far, that's all the known discoveries done on it so far.<br />
<br />
<br />
'''What is the Sims3Common library exactly?'''<br />
<br />
The Sims3Common.dll is a C++ dll, as the sims 3 has been primarily been developed in C++. It's only the functionality of the game (Think: animations, Gameplay, CameraControlls, UI, etc) that is written in C#. For animations as an example, the [[TS3PR/ScriptCore | ScriptCore.dll]] Has a direct call function to the sims3Common library to say to the engine to 'stop' an animation, or even 'start' one. Or to create the bones of the sims' rig and initiates them. <br />
<br />
So the best way to think of it, is that the C# script is always the first to call and make a function ready. After that, the C# script communicates with the C++ dll to fire the function that is being called. (Unless the sims3Common function is a callback of some sorts) <br />
<br />
'''Is the Sims3Common library only being used just to communicate with the C# scripts?'''<br />
<br />
Now, it has also been found that the Sims3Common library doesn't always expose functions to be used to C#. That's mostly since some functions are simply just more important for the engine to know about and just not for the C# scripts. Or at least the nature of the C#. <br />
<br />
A big example are shaders. The Sims3Common library has a 'LoadShaderSet' function that can't be found inside the sets of functions being called in the [[TS3PR/ScriptCore | ScriptCore.dll]]. Instead, it's probably only being called inside the engine itself from the Sims3Common library. Which makes sense, since shaders can only be initiated on the startup of a 3D program, usually. Especially since shaders mostly get cached inside the CPU.<br />
<br />
'''How do we crack open the Sims3Common.dll?'''<br />
<br />
First, we do need to clear the illusion that the game ''will'' react on the Sims3Common.dll that is found in the CAW application. Unfortunately, this only seems to show changes inside CAW, not the game itself. But if for research purposes you want to see if you can call a hidden function inside your C# script, you can do the following:<br />
<br />
*1. Download either [https://derevenets.com/ Snowman] or one of these [https://www.apriorit.com/dev-blog/366-software-reverse-engineering-tools programs](Which are more about reverse engineering most of it yourself, so be aware!)<br />
*2. In the case of Snowman, Click File > Open and get it to direct to Create-a-World's Sims3Common.dll<br />
*3. This will take a while to decompile as the library is quite big. Once it's decompiled, you'll find most of the more readable functions at the bottom. Everything above is mostly helper functions for the functions with proper ASCII names.<br />
*4. If you find anything you'd want to use, in your C# script, import it like so:<br />
<br />
<code><br />
[DllImport("Sims3Common.dll")]<br />
public static extern void Animation_CreateTransformController();<br />
</code><br />
<br />
If the function expects you to return a parameter, do this instead:<br />
<br />
<code><br />
[DllImport("Sims3Common.dll")]<br />
public static extern void Animation_CreateTransformController(ulong objId);<br />
</code></div>Lyralei