- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Tutorials >
- Modding - General - Tutorial: Sims 3 Object Modding
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Tutorials >
- Modding - General - Tutorial: Sims 3 Object Modding
#51
5th Mar 2012 at 6:17 PM
All right, you need to change the namespace. Something with your name in it, like Sims3.Nonamena. Since your namespace is currently called Sims3.Store.Objects, the compiler searches for a type named Valid in it. It's not smart enough to see that Objects is a class name in this case and IsValid() a method. You could also change the call to Sims3.SimIFace.Objects.IsValid() to make it unambiguous, but using someone else's namespace is a big no anyway.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Advertisement
#52
5th Mar 2012 at 7:23 PM
Quote: Originally posted by Buzzler
All right, you need to change the namespace. Something with your name in it, like Sims3.Nonamena. Since your namespace is currently called Sims3.Store.Objects, the compiler searches for a type named Valid in it. It's not smart enough to see that Objects is a class name in this case and IsValid() a method. You could also change the call to Sims3.SimIFace.Objects.IsValid() to make it unambiguous, but using someone else's namespace is a big no anyway. |
Oh my, it compiled. Thank you very much. I was actually trying to change the namespace before I posted, but I was doing some weird complicated things that were totally screwing everything up even more. So I just did what you said and tada. Now I just have to get it into a package and see if the pixies will spawn on their own.
#53
7th Mar 2012 at 1:48 PM
Last edited by nonamena : 7th Mar 2012 at 5:35 PM.
Not sure if this is the correct place to ask, so if it's not, sorry. Since I was so "successful" with my Tree of Prosperity script I though I'd look at the Cow Plant to find out why Vampires can't Eat Cake. Now I've noticed that the XML tuning that comes with the cow plant/tree of prosperity isn't working with the modded object. Does anyone know why that is or how I can make it work?
Update: I've tried adding [assembly: Tunable] to the assemblyinfo.cs, and I've tried changing all the tunables to public, since they were private, but none of that worked :/
Update: I've tried adding [assembly: Tunable] to the assemblyinfo.cs, and I've tried changing all the tunables to public, since they were private, but none of that worked :/
#54
7th Mar 2012 at 5:29 PM
Quote: Originally posted by nonamena
ETA: I see that in EA's version there is: [assembly: Tunable] and mine doesn't have that, but I can't figure out why. |
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
#55
7th Mar 2012 at 5:38 PM
Quote: Originally posted by Buzzler
Open AssemblyInfo.cs in Visual Studio (in the Solution Explorer under Properties) and add [assembly: Tunable] and using Sims3.SimIFace to it. You'll know where. Then compile and try again. HTH |
Oh, thank you very much for responding. I was in the middle of updating my post when you replied. I actually did find that out (it's in the scripting tutorial, *duh* me) but that didn't help, nor did changing everything to public.
I was looking at your coding for Moar Interactions though and I wish EA's was as organized.
#56
7th Mar 2012 at 6:01 PM
Changing modifiers won't do anything. Tunable fields can be private no problem. They just have to be static.
Is the EAxian package with its tuning still present in your game? Is it possible that they tangle? How exactly is the tuning not working? Are the testing values from the script being used or how do you know?
And if you want me to have a look, please attach your package.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Is the EAxian package with its tuning still present in your game? Is it possible that they tangle? How exactly is the tuning not working? Are the testing values from the script being used or how do you know?
And if you want me to have a look, please attach your package.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
#57
7th Mar 2012 at 6:43 PM
Quote: Originally posted by Buzzler
Changing modifiers won't do anything. Tunable fields can be private no problem. They just have to be static. Is the EAxian package with its tuning still present in your game? Is it possible that they tangle? How exactly is the tuning not working? Are the testing values from the script being used or how do you know? And if you want me to have a look, please attach your package. |
Thanks for that information. I was using the same XML that EA made to change energy loss form imbuing the tree, and chance of successful imbue, how often the tree changes fruit in sim hours, etc.. I believe it is using the the values in the script because none of those changes I make in the XML do anything. When I remove my package with the script and the OBJK resource, the tuning file works.
I also tried making a new XML with a new instance ID and using the same tunables but there was no difference in result. I have the of Prosperity installed via the Launcher, so the only packages I have in my game relating to the tree are the one with the OBJK and S3SA overrides and one package with the XML tuning.
I admit, I'm not sure which package you want, so here's everything. Thank you for looking.
Attached files:
Nonamena_Treeofprosperity_code.zip (73.8 KB, 18 downloads) - View custom content | ||||||||||
0 03-05-12 17:35 Nonamena_code/bin/ 0 03-05-12 17:28 Nonamena_code/bin/Debug/ 0 03-05-12 20:19 Nonamena_code/bin/Release/ 29184 03-07-12 18:16 Nonamena_code/bin/Release/StoreObjectsTreeOfProsperity.dll 50688 03-07-12 18:16 Nonamena_code/bin/Release/StoreObjectsTreeOfProsperity.pdb 0 03-05-12 17:35 Nonamena_code/obj/ 0 03-05-12 17:28 Nonamena_code/obj/Debug/ 0 03-05-12 17:28 Nonamena_code/obj/Debug/TempPE/ 0 03-07-12 18:16 Nonamena_code/obj/Release/ 33958 03-07-12 12:52 Nonamena_code/obj/Release/ResolveAssemblyReference.cache 1014 03-07-12 12:52 Nonamena_code/obj/Release/StoreObjectsTreeOfProsperity.csproj.FileListAbsolute.txt 29184 03-07-12 18:16 Nonamena_code/obj/Release/StoreObjectsTreeOfProsperity.dll 50688 03-07-12 18:16 Nonamena_code/obj/Release/StoreObjectsTreeOfProsperity.pdb 0 03-05-12 17:35 Nonamena_code/obj/Release/TempPE/ 0 03-07-12 18:13 Nonamena_code/Properties/ 914 03-07-12 18:13 Nonamena_code/Properties/AssemblyInfo.cs 0 03-05-12 17:28 Nonamena_code/Sims3.Gameplay.Interfaces/ 277 03-05-12 17:28 Nonamena_code/Sims3.Gameplay.Interfaces/IWishingWell.cs 0 03-07-12 18:16 Nonamena_code/Sims3.Store.Objects/ 44351 03-07-12 18:16 Nonamena_code/Sims3.Store.Objects/TreeOfProsperity.cs 2295 03-07-12 13:04 Nonamena_code/StoreObjectsTreeOfProsperity.csproj 229 03-07-12 13:04 Nonamena_code/StoreObjectsTreeOfProsperity.csproj.user 949 03-05-12 17:35 Nonamena_code/StoreObjectsTreeOfProsperity.sln 13312 03-07-12 19:16 Nonamena_code/StoreObjectsTreeOfProsperity.suo -------- ------- 257043 24 files |
||||||||||
Description: cs project | ||||||||||
NonaMena_TreeofProsperity_CustomTuning.zip (2.4 KB, 17 downloads) - View custom content | ||||||||||
2858 03-07-12 19:21 NonaMena_TreeofProsperity_CustomTuning.package -------- ------- 2858 1 file |
||||||||||
Description: Ea's tuning in an xml with a different Instance ID | ||||||||||
TreeOfProsperity_DefaultTuning.zip (2.3 KB, 15 downloads) - View custom content | ||||||||||
2783 03-05-12 22:13 TreeOfProsperity_DefaultTuning.package -------- ------- 2783 1 file |
||||||||||
Description: EA's Tuning XML | ||||||||||
NonaMena_TreeOfProsperityLightShow.zip (16.3 KB, 12 downloads) - View custom content | ||||||||||
19794 03-07-12 19:40 NonaMena_TreeOfProsperityLightShow.package -------- ------- 19794 1 file |
||||||||||
Description: OBJK and S3SA overrides |
#58
7th Mar 2012 at 7:11 PM
Since you've changed the namespace, the instance ID of the tuning must be different as well. Should've thought of that right away... oh, well.
The instance ID for the XML tuning of a certain class must be the FNV64 hash of the full type name of said class. The full type name of your class is Sims3.NonaMena.TreeOfProsperity, so the FNV64 hash must be 0x5DF4AA3C961E6B95. Hint: Double-click on the XML resource in S3PE, enter or paste the full type name into the name field and click on the FNV64 button.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
The instance ID for the XML tuning of a certain class must be the FNV64 hash of the full type name of said class. The full type name of your class is Sims3.NonaMena.TreeOfProsperity, so the FNV64 hash must be 0x5DF4AA3C961E6B95. Hint: Double-click on the XML resource in S3PE, enter or paste the full type name into the name field and click on the FNV64 button.
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
#59
9th Mar 2012 at 3:34 PM
Last edited by nonamena : 9th Mar 2012 at 7:59 PM.
OK, so I'm stumped again. I was able to make the XML tuning work just fine (yay, thank your for that. I didn't want to spam the thread so I used those buttons at the bottom of your post), but now I've been working on the ITUN resources so that my sims will autonomously Imbue the tree and Pick Fruit, but I can't get them to work. I found your explanation of the FNV hash for ITUNs, but obviously PickFruit_TreeOfProsperity is the same for my script and EA's. So then I tried to change the name of the interactions to NonaImbue and NonaPickFruit, but that still didn't work. Actually, I'm not that keen on letting my sims do autonomously PickFruit and Imbue, but I'd really like to make it work anyhow.
Also.. Should I maybe make my own thread about this? Now that I've asked so many questions I'm not sure. Sorry!
Update:
Nevermind. With fresh eyes and fresh search terms, I found the answer here (and I didn't have to rename the interactions). I was actually really, really close with one of my shots in the dark, heh.
Also.. Should I maybe make my own thread about this? Now that I've asked so many questions I'm not sure. Sorry!
Update:
Nevermind. With fresh eyes and fresh search terms, I found the answer here (and I didn't have to rename the interactions). I was actually really, really close with one of my shots in the dark, heh.
Test Subject
#60
28th Apr 2012 at 12:59 PM
Posts: 2
I have made this tutorial and when I try it in the game, it crashed when I try to buy it in buy mode. I don't really know what I have done wrong.
#61
29th Apr 2012 at 6:11 PM
Quote: Originally posted by sarita_22_35
I have made this tutorial and when I try it in the game, it crashed when I try to buy it in buy mode. I don't really know what I have done wrong. |
If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#62
25th Jun 2013 at 4:11 PM
Posts: 5
How do you clone a store object? I can't get it on my Object Cloner List!
Test Subject
#63
13th Jul 2016 at 7:01 PM
Posts: 1
Build Problems
So towards the end it says to hit build > build solution on the script and it will be compiled into a library in Documents\Visual Studio xxxx\Projects\{YourProjectName}\{YourProjectName}\bin\Release.Well, I hit build solution and it didn't give me any errors, just said in blue at the bottom "build succeeded", but it's not in the Release folder. I honestly have no idea where it is, actually. That's my problem is I can't even find it.
#64
13th Jul 2016 at 9:10 PM
Posts: 3,865
Thanks: 8665 in 67 Posts
I had that issue too but apparently you need to make sure that you have it sims 3 compatible: http://simswiki.info/wiki.php?title..._Studio_project
#65
22nd Jan 2017 at 12:27 PM
Last edited by superstorm : 22nd Jan 2017 at 10:47 PM.
Posts: 41
Thanks: 573 in 8 Posts
I have a question about how to use protected dictionarys for buffs. I want to compile this code
public static void Load(Buff buff, Buff.BuffData info)
{
BuffInstance instance = new BuffInstance(buff, info.mBuffGuid, info.mEffectValue, info.mTimeoutSimMinutes);
if (GenericManager<BuffNames, BuffInstance, BuffInstance>.sDictionary.ContainsKey((ulong)info.mBuffGuid))
{
GenericManager<BuffNames, BuffInstance, BuffInstance>.sDictionary[(ulong)info.mBuffGuid] = instance;
}
else
{
GenericManager<BuffNames, BuffInstance, BuffInstance>.sDictionary.Add((ulong)info.mBuffGuid, instance);
}
}
I found the source code of unprotected.exe at sourceforge.net and I made a x86 and a x64 version of it. I input Sims3GameplaySystems.dll in it and get the library unprotected. I changed it with the original one that I replaced but I got more errors when compile. I found another one by cmarny, add it as reference but with same results. How can I add an unprotected dll? I need to add both original and the unprotected as refereces? Is something different to add them as references?
public static void Load(Buff buff, Buff.BuffData info)
{
BuffInstance instance = new BuffInstance(buff, info.mBuffGuid, info.mEffectValue, info.mTimeoutSimMinutes);
if (GenericManager<BuffNames, BuffInstance, BuffInstance>.sDictionary.ContainsKey((ulong)info.mBuffGuid))
{
GenericManager<BuffNames, BuffInstance, BuffInstance>.sDictionary[(ulong)info.mBuffGuid] = instance;
}
else
{
GenericManager<BuffNames, BuffInstance, BuffInstance>.sDictionary.Add((ulong)info.mBuffGuid, instance);
}
}
I found the source code of unprotected.exe at sourceforge.net and I made a x86 and a x64 version of it. I input Sims3GameplaySystems.dll in it and get the library unprotected. I changed it with the original one that I replaced but I got more errors when compile. I found another one by cmarny, add it as reference but with same results. How can I add an unprotected dll? I need to add both original and the unprotected as refereces? Is something different to add them as references?
Test Subject
#66
3rd Feb 2024 at 2:54 PM
Posts: 1
I have a question to the round if you can help me understand my mistake. Wanted to change a buff unfortunately he still comes as he is in the game without my changes.
<BuffList>
<BuffName>HibernationSickness</BuffName>
<BuffDescription>HibernationSicknessDescription</BuffDescription>
<Category>Physical</Category>
<AxisEffected>Stressed, Uncomfortable</AxisEffected>
<EffectValue>0</EffectValue>
<TimeoutLength>0</TimeoutLength>
<SKU>Store</SKU>
<Stackable>False</Stackable>
<Hex>HibernationSickness=0x4bcf0057b51ff310</Hex>
<CustomClassName>Sims3.Store.Objects.StasisChamber+HibernationSicknessStore, StoreObjectsStasisChamber</CustomClassName>
<ThumbFilename>moodlet_hibernation_sickness</ThumbFilename>
<JazzStateSuffix>Tired</JazzStateSuffix>
<Version>0.1</Version>
</BuffList>
my goal was that the buff no longer appears or only appears very briefly. The Buff's normal timeline would be 6 hours.
<BuffList>
<BuffName>HibernationSickness</BuffName>
<BuffDescription>HibernationSicknessDescription</BuffDescription>
<Category>Physical</Category>
<AxisEffected>Stressed, Uncomfortable</AxisEffected>
<EffectValue>0</EffectValue>
<TimeoutLength>0</TimeoutLength>
<SKU>Store</SKU>
<Stackable>False</Stackable>
<Hex>HibernationSickness=0x4bcf0057b51ff310</Hex>
<CustomClassName>Sims3.Store.Objects.StasisChamber+HibernationSicknessStore, StoreObjectsStasisChamber</CustomClassName>
<ThumbFilename>moodlet_hibernation_sickness</ThumbFilename>
<JazzStateSuffix>Tired</JazzStateSuffix>
<Version>0.1</Version>
</BuffList>
my goal was that the buff no longer appears or only appears very briefly. The Buff's normal timeline would be 6 hours.
Who Posted
|