- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Tutorials >
- Modding - General - Tutorial: Sims 3 Pure Scripting Modding
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Tutorials >
- Modding - General - Tutorial: Sims 3 Pure Scripting Modding
#1
7th Nov 2010 at 11:32 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
![Default](/images/icons/icon1.gif)
The tutorial is located in the wiki: Sims 3 Pure Scripting Modding
Questions?
If you have questions concerning the tutorial, this thread is the place to ask them.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
6 users say thanks for this.
(Who?)
Thanks
Advertisement
#2
8th Nov 2010 at 1:47 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 9
Thanks! It works perfectly. I was just wondering how to write a mod without custom objects and then you posted this ^^
And this tutorial seems to hint at the precise reason why the game crashes with some mods that use only a custom namespace name, without nesting it in an existing EA namespace (this topic ). So if you use only your own namespace, without putting it inside, lets say, Sims3.Gameplay, and don't use a static instantiator variable and a xml file to instantiate the class, then clicking on that custom object in game in buy mode will cause a crash to desktop when the game tries to create the object, because the object wasn't initialized. Because the game didn't know it was there, since the namespace of that object was not within Sims3 namespaces! Is that a correct reasoning? And the reason why nesting your namespace within EA namespaces does fix that problem, without the need of a xml file, is because the game seems to instantiate all objects by default within the Sims3 namespace, and within all child namespaces, if the objects have static components, so also the object within your nested namespace - even without the xml file. Is that correct? I simply can't live without knowing, why exactly something crashes and why a fix works, like in that case.![:p](//static.modthesims2.com/images/smilies/tongue.gif)
Anyway, awesome, informative tutorial.
"The past tempts us, the present confuses us and the future frightens us.. and our lives slip away, moment by moment, lost in that vast, terrible in-between"
And this tutorial seems to hint at the precise reason why the game crashes with some mods that use only a custom namespace name, without nesting it in an existing EA namespace (this topic ). So if you use only your own namespace, without putting it inside, lets say, Sims3.Gameplay, and don't use a static instantiator variable and a xml file to instantiate the class, then clicking on that custom object in game in buy mode will cause a crash to desktop when the game tries to create the object, because the object wasn't initialized. Because the game didn't know it was there, since the namespace of that object was not within Sims3 namespaces! Is that a correct reasoning? And the reason why nesting your namespace within EA namespaces does fix that problem, without the need of a xml file, is because the game seems to instantiate all objects by default within the Sims3 namespace, and within all child namespaces, if the objects have static components, so also the object within your nested namespace - even without the xml file. Is that correct? I simply can't live without knowing, why exactly something crashes and why a fix works, like in that case.
![:p](http://static.modthesims2.com/images/smilies/tongue.gif)
Anyway, awesome, informative tutorial.
"The past tempts us, the present confuses us and the future frightens us.. and our lives slip away, moment by moment, lost in that vast, terrible in-between"
#3
8th Nov 2010 at 2:24 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 11,682
Thanks: 9680 in 11 Posts
I'd still like to know why it was only after LN that custom namespaces became a problem though.
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
#4
8th Nov 2010 at 4:41 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by gladosrev2
And this tutorial seems to hint at the precise reason why the game crashes with some mods that use only a custom namespace name, without nesting it in an existing EA namespace{...} |
Quote:
then clicking on that custom object in game in buy mode will cause a crash to desktop when the game tries to create the object, because the object wasn't initialized.{...} |
What is actually different for a buymode object that already existed in the town when you loaded the game and an object that the game tries to create when you click on the thumbnail in buymode? Fetching the mesh, finding the assembly, and instantiating an object aren't different. That much seems certain. The BuildBuyMode stuff is mind-meltingly massive and wide-spread. Last time I browsed that code, I couldn't even find the point where the actual object gets created.
In the thread you linked, twallan speculated that the game might use the script class as a lookup value for some store stuff. That might be the case. All we know for certain is that the exception gets thrown in the unmanaged code, and that the devs at that point
Quote:
I simply can't live without knowing, why exactly something crashes and why a fix works, like in that case. |
![Wink](http://static.modthesims2.com/images/smilies/icon_smile_wink.gif)
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#5
24th Dec 2010 at 5:12 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 28
Hi,
First off thanks for this tutorial. I'm wondering if during the first step, when you extract the game libraries, you should extract them from only the base game .packages or from the latest EP .packages?
Much thanks.
First off thanks for this tutorial. I'm wondering if during the first step, when you extract the game libraries, you should extract them from only the base game .packages or from the latest EP .packages?
Much thanks.
#6
25th Dec 2010 at 12:19 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by silent_j
I'm wondering if during the first step, when you extract the game libraries, you should extract them from only the base game .packages or from the latest EP .packages? |
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#7
18th Mar 2011 at 4:04 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
Hi Buzzler,
I just installed C# 2010 but my Reflector couldn't detect it. How do I fix it?
I just installed C# 2010 but my Reflector couldn't detect it. How do I fix it?
![](http://i.imgur.com/WOmpA.png)
#8
18th Mar 2011 at 8:58 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by Vondure
I just installed C# 2010 but my Reflector couldn't detect it. How do I fix it? |
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#9
18th Mar 2011 at 3:19 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
How do I set a project's framework version to .NET Framework 2.0?
I can't seem to find that option anywhere in the New Project window.
I thought having Reflector integrated with C# will solve that issue, but I can't seem to get that working either.
I can't seem to find that option anywhere in the New Project window.
I thought having Reflector integrated with C# will solve that issue, but I can't seem to get that working either.
#10
18th Mar 2011 at 3:53 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by Vondure
How do I set a project's framework version to .NET Framework 2.0? I can't seem to find that option anywhere in the New Project window. |
![Wink](http://static.modthesims2.com/images/smilies/icon_smile_wink.gif)
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#11
19th Mar 2011 at 6:24 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
Thank you. ![Smilie](//static.modthesims2.com/images/smilies/smile.gif)
I'm missing three .dll files, would it be alright to continue? My core libraries only contained three S3SA files each.
I don't have TestGameplay.dll, TestObject.dll and Automation.dll.
![Smilie](http://static.modthesims2.com/images/smilies/smile.gif)
I'm missing three .dll files, would it be alright to continue? My core libraries only contained three S3SA files each.
I don't have TestGameplay.dll, TestObject.dll and Automation.dll.
#12
19th Mar 2011 at 7:17 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by Vondure
I'm missing three .dll files, would it be alright to continue? My core libraries only contained three S3SA files each. I don't have TestGameplay.dll, TestObject.dll and Automation.dll. |
![Smilie](http://static.modthesims2.com/images/smilies/smile.gif)
Where did you read about these three dlls anyway? I thought all tutorials were updated now...
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#13
19th Mar 2011 at 11:39 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
At the beginning of your tutorial, there is a link leading to another page regarding game-compatible VS projects. Step 4 of this tutorial mentioned these .dll files, along with a screenshot. I also Google'd them and ended up onto another page that again mentioned them.
I have another question; I have nothing to worry about this warning, right?
I have another question; I have nothing to worry about this warning, right?
![](http://i.imgur.com/piVmw.png)
#14
19th Mar 2011 at 11:56 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Thanks for the heads up regarding Sims_3:Creating_a_game_compatible_Visual_Studio_projectwiki. I'll see about changing that.
Damn, I was kinda waiting for that one.
It's a known bug in Visual Studio that the "Do not reference mscorlib" thing does nothing. In VS2008 it at least worked most of the times, but in VS2010 it doesn't seem to do anything at all anymore.
I don't know whether projects compiled against the .NET mscorlib will work in the game; you're welcome to try.
The only other "solution" is to go back to Visual Studio 2008.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Quote:
I have another question; I have nothing to worry about this warning, right? |
![Wink](http://static.modthesims2.com/images/smilies/icon_smile_wink.gif)
I don't know whether projects compiled against the .NET mscorlib will work in the game; you're welcome to try.
![Wink](http://static.modthesims2.com/images/smilies/icon_smile_wink.gif)
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#15
19th Mar 2011 at 12:30 PM
Last edited by Vondure : 19th Mar 2011 at 12:51 PM.
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
Damn, it would be a bummer if I had to go back to VS 2008.
But I'm not yet done with the project, because it won't produce the
appropriate .dll file. Everytime I build the solution, I get these errors:
![](http://i.imgur.com/EiqBC.png)
As you can tell, I'm practically new with all of these; I felt all along that
this is somehow not really my calling. But what the heck, it's worth a shot.
How do I fix it?
But I'm not yet done with the project, because it won't produce the
appropriate .dll file. Everytime I build the solution, I get these errors:
![](http://i.imgur.com/EiqBC.png)
As you can tell, I'm practically new with all of these; I felt all along that
this is somehow not really my calling. But what the heck, it's worth a shot.
How do I fix it?
#16
19th Mar 2011 at 10:39 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by Vondure
Everytime I build the solution, I get these errors:{...} |
Code:
in your code.assembly: Tunable
Change it to
Code:
and you should be good to go.
[assembly: Tunable]
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#17
20th Mar 2011 at 6:10 AM
Last edited by Vondure : 20th Mar 2011 at 6:25 AM.
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
I have it typed in correctly. I'm sorry, I should have known better and posted screenshots of my project instead of having you blindly guess the problem.
Anyway, I found out that the cause was actually line 4 of AssemblyInfo.cs. It turns out that I simply typed in "Sims3.SimIFace;" leaving out the word 'using' before it. I guess I've gotten confused in your tutorial because the word 'using' is in a different font than "Sims3.SimIFace;". So I only copy-pasted the latter. If that makes sense. I fixed it.
![](http://i.imgur.com/h41Fk.png)
Now, I'm getting another error; I think it's referring to that class called 'object' down on page 18:
The magic page 4 holds. I broke the rule.
Anyway, I found out that the cause was actually line 4 of AssemblyInfo.cs. It turns out that I simply typed in "Sims3.SimIFace;" leaving out the word 'using' before it. I guess I've gotten confused in your tutorial because the word 'using' is in a different font than "Sims3.SimIFace;". So I only copy-pasted the latter. If that makes sense. I fixed it.
![](http://i.imgur.com/h41Fk.png)
Now, I'm getting another error; I think it's referring to that class called 'object' down on page 18:
![](http://i.imgur.com/QaeyO.png)
The magic page 4 holds. I broke the rule.
#18
20th Mar 2011 at 11:47 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by Vondure
I guess I've gotten confused in your tutorial because the word 'using' is in a different font than "Sims3.SimIFace;". |
![Smilie](http://static.modthesims2.com/images/smilies/smile.gif)
Quote:
Now, I'm getting another error; I think it's referring to that class called 'object' down on page 18:{...} |
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
#19
21st Mar 2011 at 11:16 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 703
Thanks: 942 in 1 Posts
I use vs2010 and got it to work by editing the csproj. You just need to change the path to mscorlib from the default
to wherever you put the sims3 version of mscorlib. Or, if you don't have the reference to mscorlib in the .csproj file,
just paste the below in the <ItemGroup> where all the other <Reference Include= lines are located and edit the
<HintPath> as needed.
<Reference Include="mscorlib">
<HintPath>..\..\..\..\s3mod projects\simcore\mscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
to wherever you put the sims3 version of mscorlib. Or, if you don't have the reference to mscorlib in the .csproj file,
just paste the below in the <ItemGroup> where all the other <Reference Include= lines are located and edit the
<HintPath> as needed.
<Reference Include="mscorlib">
<HintPath>..\..\..\..\s3mod projects\simcore\mscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
Test Subject
#20
21st Mar 2011 at 4:54 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
Quote: Originally posted by Buzzler
That means that VisualStudio actually did derefence mscorlib, or at least uses the /nostdlib compiler option. Try to add the mscorlib from TS3 once more or, if that doesn't work, untick the "Do not reference mscorlib" thing again. |
I unticked the, "Do not reference mscorlib" checkbox, built the project, and it worked. I thought to myself that the default mscorlib file couldn't possibly work for TS3, otherwise there wouldn't be any point as to why we're even using the TS3 version of mscorlib. But to my surprise, the mod did work in-game. Is this normal? Or are there going to be side effects? Why are we using the TS3 version when the default mscorlib works out just fine?
Quote: Originally posted by lenglel
I use vs2010 and got it to work by editing the csproj. You just need to change the path to mscorlib from the default to wherever you put the sims3 version of mscorlib. Or, if you don't have the reference to mscorlib in the .csproj file, just paste the below in the <ItemGroup> where all the other <Reference Include= lines are located and edit the <HintPath> as needed. <Reference Include="mscorlib"> <HintPath>..\..\..\..\s3mod projects\simcore\mscorlib.dll</HintPath> <Private>False</Private> </Reference> |
Even though I solved my problem, I'd still wanna know:
How do I change the reference path within the .csproj?
Where is this "<ItemGroup>" and all of those other codes?
Please forgive me for asking a lot of questions but I'm really new to VS and all of these C sharp talks, so I find it very difficult to keep up.
I just started learning as soon as I posted in this thread(3 days ago). Any new information would go a long way.
And before I forget, thank you guys for helping me with my first script mod.
![Smilie](http://static.modthesims2.com/images/smilies/smile.gif)
The magic page 4 holds. I broke the rule.
#21
21st Mar 2011 at 8:02 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Quote: Originally posted by Vondure
Why are we using the TS3 version when the default mscorlib works out just fine? |
So, yeah, it will probably work if you don't go crazy and if you ever do something the TS3 mscorlib doesn't support, the compiled library hopefully won't link and stall your game instead of causing subtle borkedness. I for one would prefer to get Visual Studio to reference the TS3 mscorlib or at least manually compile against it.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
#22
22nd Mar 2011 at 11:01 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 703
Thanks: 942 in 1 Posts
Vondure: Just use a text editor like notepad++ to open and edit the file with the .csproj
extension. It's in the first subfolder of your projects folder in the vs2010 projects directory.
You'd need to change the path to point to wherever you extracted the ts3 mscorlib.
extension. It's in the first subfolder of your projects folder in the vs2010 projects directory.
You'd need to change the path to point to wherever you extracted the ts3 mscorlib.
Test Subject
#23
22nd Mar 2011 at 12:02 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 29
Quote: Originally posted by Buzzler
The mscorlib from TS3 is not the .NET mscorlib that Visual Studio uses by default; it's an altered mscorlib from the MONO portable framework. MONO implements .NET 2.0, so a library compiled against the .NET mscorlib should work ... most of the times. I honestly don't know in which ways the MONO mscorlib might differ or what it might not implement or what the EAxian devs stripped from it (apart from direct file access). So, yeah, it will probably work if you don't go crazy and if you ever do something the TS3 mscorlib doesn't support, the compiled library hopefully won't link and stall your game instead of causing subtle borkedness. I for one would prefer to get Visual Studio to reference the TS3 mscorlib or at least manually compile against it. |
I will try to do that. I sure hope it doesn't crash my game. So far it's working alright for this particular mod, but I'll keep that in mind.
Quote: Originally posted by lenglel
Vondure: Just use a text editor like notepad++ to open and edit the file with the .csproj extension. It's in the first subfolder of your projects folder in the vs2010 projects directory. You'd need to change the path to point to wherever you extracted the ts3 mscorlib. |
Is this correct?
![](http://i.imgur.com/NnWYC.png)
The magic page 4 holds. I broke the rule.
#24
24th Mar 2011 at 1:33 AM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 703
Thanks: 942 in 1 Posts
It might be correct for your setup, but mine has a lot of stuff yours doesn't.
I've got my simcore stuff outside the vs2010 hierarchy, that's why all my
hintpaths start with "..\..\..\..\s3modprojects\simcore\
The PropertyGroup sections get set up from within vs2010 when you
select your project's properties. The first ItemGroup is the source files
and the second is the references from the using statements at the top
of the source file. That's where the reference to the sims 3 version of
mscorlib goes.
Here's what mine looks like:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9306C19F-3AA2-40AE-B7AC-A88EA19330B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LWE4</RootNamespace>
<AssemblyName>LWE4</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib">
<HintPath>..\..\..\..\s3mod projects\simcore\mscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ScriptCore">
<HintPath>..\..\..\..\s3mod projects\simcore\ScriptCore.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimIFace">
<HintPath>..\..\..\..\s3mod projects\simcore\SimIFace.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3GameplayObjects">
<HintPath>..\..\..\..\s3mod projects\simcore\Sims3GameplayObjects.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3GameplaySystems">
<HintPath>..\..\..\..\s3mod projects\simcore\Sims3GameplaySystems.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3Metadata">
<HintPath>..\..\..\..\s3mod projects\simcore\Sims3Metadata.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<HintPath>..\..\..\..\s3mod projects\simcore\System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<HintPath>..\..\..\..\s3mod projects\simcore\System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UI">
<HintPath>..\..\..\..\s3mod projects\simcore\UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
I've got my simcore stuff outside the vs2010 hierarchy, that's why all my
hintpaths start with "..\..\..\..\s3modprojects\simcore\
The PropertyGroup sections get set up from within vs2010 when you
select your project's properties. The first ItemGroup is the source files
and the second is the references from the using statements at the top
of the source file. That's where the reference to the sims 3 version of
mscorlib goes.
Here's what mine looks like:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9306C19F-3AA2-40AE-B7AC-A88EA19330B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LWE4</RootNamespace>
<AssemblyName>LWE4</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib">
<HintPath>..\..\..\..\s3mod projects\simcore\mscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ScriptCore">
<HintPath>..\..\..\..\s3mod projects\simcore\ScriptCore.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimIFace">
<HintPath>..\..\..\..\s3mod projects\simcore\SimIFace.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3GameplayObjects">
<HintPath>..\..\..\..\s3mod projects\simcore\Sims3GameplayObjects.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3GameplaySystems">
<HintPath>..\..\..\..\s3mod projects\simcore\Sims3GameplaySystems.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3Metadata">
<HintPath>..\..\..\..\s3mod projects\simcore\Sims3Metadata.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<HintPath>..\..\..\..\s3mod projects\simcore\System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<HintPath>..\..\..\..\s3mod projects\simcore\System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UI">
<HintPath>..\..\..\..\s3mod projects\simcore\UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Test Subject
#25
14th Jun 2011 at 5:34 PM
![Old](/static/images/buttons/buttons-rro/images/statusicon/post_old.gif)
Posts: 14
Quote: Originally posted by Buzzler
Damn, I was kinda waiting for that one. ![]() |
You can use Visual C# Express. You just have to manually edit the .csproj file to make it see the right one.
For me, I have extract the necessary dlls to My Documents\Visual Studio 2010\Sims3dll. After you have told it not to use mscorlib (not totally useless checkmark), you exit Visual C# 2010. Then (assuming for this your project is named MyScript) you open the My Documents\Visual Studio 2010\MyScript\MyScript\MyScript.csproj with something like Notepad or Notepad++.
You will find a section looking like this.
<ItemGroup>
<Reference Include="ScriptCore">
<HintPath>..\..\..\Sims3dll\ScriptCore.dll</HintPath>
</Reference>
<Reference Include="SimIFace">
<HintPath>..\..\..\Sims3dll\SimIFace.dll</HintPath>
</Reference>
<Reference Include="Sims3GameplayObjects">
<HintPath>..\..\..\Sims3dll\Sims3GameplayObjects.dll</HintPath>
</Reference>
<Reference Include="Sims3GameplaySystems">
<HintPath>..\..\..\Sims3dll\Sims3GameplaySystems.dll</HintPath>
</Reference>
<Reference Include="Sims3Metadata">
<HintPath>..\..\..\Sims3dll\Sims3Metadata.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="UI">
<HintPath>..\..\..\Sims3dll\UI.dll</HintPath>
</Reference>
</ItemGroup>
You need to change it to include a reference to mscorlib and change the reference for System, System.Xml, and UI. It should look similar to this:
<ItemGroup>
<Reference Include="Mscorlib">
<HintPath>..\..\..\Sims3dll\mscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ScriptCore">
<HintPath>..\..\..\Sims3dll\ScriptCore.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimIFace">
<HintPath>..\..\..\Sims3dll\SimIFace.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3GameplayObjects">
<HintPath>..\..\..\Sims3dll\Sims3GameplayObjects.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3GameplaySystems">
<HintPath>..\..\..\Sims3dll\Sims3GameplaySystems.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sims3Metadata">
<HintPath>..\..\..\Sims3dll\Sims3Metadata.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<HintPath>..\..\..\Sims3dll\System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<HintPath>..\..\..\Sims3dll\SystemXml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UI">
<HintPath>..\..\..\Sims3dll\UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
This should fix any problems with the default mscorlib and Visual C# 2010.
I realize that is what the post above was trying to say. I am just trying to make it obvious for everybody what to edit.
Who Posted
|