Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
1978 gallons of pancake batter
Original Poster
#51 Old 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
Advertisement
Forum Resident
#52 Old 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.
Forum Resident
#53 Old 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 :/
1978 gallons of pancake batter
Original Poster
#54 Old 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.
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

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Forum Resident
#55 Old 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.
1978 gallons of pancake batter
Original Poster
#56 Old 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
Forum Resident
#57 Old 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:
File Type: zip  Nonamena_Treeofprosperity_code.zip (73.8 KB, 18 downloads) - View custom content
Description: cs project
File Type: zip  NonaMena_TreeofProsperity_CustomTuning.zip (2.4 KB, 17 downloads) - View custom content
Description: Ea's tuning in an xml with a different Instance ID
File Type: zip  TreeOfProsperity_DefaultTuning.zip (2.3 KB, 15 downloads) - View custom content
Description: EA's Tuning XML
File Type: zip  NonaMena_TreeOfProsperityLightShow.zip (16.3 KB, 12 downloads) - View custom content
Description: OBJK and S3SA overrides
1978 gallons of pancake batter
Original Poster
#58 Old 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
Forum Resident
#59 Old 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.
Test Subject
#60 Old 28th Apr 2012 at 12:59 PM
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.
1978 gallons of pancake batter
Original Poster
#61 Old 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.
The namespace has to start with Sims3. If it doesn't, the game will crash when you try to buy the object.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#62 Old 25th Jun 2013 at 4:11 PM
How do you clone a store object? I can't get it on my Object Cloner List!
Test Subject
#63 Old 13th Jul 2016 at 7:01 PM
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.
Virtual gardener
staff: administrator
#64 Old 13th Jul 2016 at 9:10 PM
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
Test Subject
#65 Old 22nd Jan 2017 at 12:27 PM Last edited by superstorm : 22nd Jan 2017 at 10:47 PM.
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?
Test Subject
#66 Old 3rd Feb 2024 at 2:54 PM
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.
Page 3 of 3
Back to top