PDA

View Full Version : Getting rid of the Waterfall Animation on the Majestic Grotto Hot Tub?


birdyfly
13th Nov 2011, 05:46 AM
Hi,

I am needing help getting rid of that waterfall animation on the Majestic Grotto Hot Tub. I assume that this cannot be done with TSR Workshop, so I am going to use s3oc/s3pe in hopes to get rid of this annoying animation.

If someone wouldn't mind helping me find what to get rid of to remove of animation, that will be great.

I looked at a similar thread, and figured it was in the _RIG file section, but I have had no luck getting rid of it. I removed the FX_0 (seeing as that was the only FX_ file there), but it just made the Sim skip around and the waterfall animation is still there.

I don't have the file attached since I have done nothing to modify the hot tub yet since I'm trying to remove the animation first. If it will help to go ahead and attach it though, I will be more than happy to do so. :)


http://img703.imageshack.us/img703/6016/2343955orig.jpg
Source: http://www.thesimalogue.com/ts3-hot-tubs.html


---------------

TSR Workshop related
The reason why I haven't used the small hot tub and just clone that one is due to a couple issues:
♦ I cannot duplicate the route entries to make it available on other sides of the hot tub.
♦ Whenever I expand the footprints or change the route entries, in game the Sims get a routing error. I give the route entries a new name and make the bone hash 0x00000000.

Inge Jones
13th Nov 2011, 09:44 AM
Based on my work with scripting stairs, I would think there are only a fixed number of routing slots that the script has the sim try to route to, so just adding one to the spare side wouldn't help without also making a custom script that recognises the slot as an alternative approach for the sim to use. If you are going to the trouble of making your own scriptclass, you may find you can "break into it" to comment out any lines animating the waterfall, and having done so it should be safe to delete the resources relating to the effect, including the effect slot it attaches to.

birdyfly
13th Nov 2011, 04:15 PM
I do not know anything about making my own scriptclass, but will it be safe to edit the one already there? If so, how will I go about doing that and what file do I need to edit?

Sorry about asking probably simple questions, but I am completely new with s3pe/s3oc and scripting for the Sims 3. I have, however, updated old XML mods before.

Inge Jones
13th Nov 2011, 05:28 PM
It's different per object anyway, so it would be impossible to describe here. Can the waterfall be started and stopped, or does it automatically stay on all the time? I wonder if it could be done more simply by pointing to a non-existent effect. And do we know it's actually an effect rather than just an animated texture on a shader?

Oh I forgot to say, no you can't make extra routing slots in Workshop anyway. They always get turned into container slots. You'd have to use s3pe for that.

birdyfly
13th Nov 2011, 05:40 PM
I decided to just stick with the pre existing routing entries and not make new ones. It isn't a huge deal for me. :)

The waterfall starts whenever the Sim gets into the hot tub. This is the hot tub I extracted with s3oc. I cannot find in the coding for anything about the waterfall animation. The only thing I could find is in the first MLOD which is this:

Flags: 0x00000048 (DropShadow, Pickable)
StreamOffset: 0x00000000
StartVertex: 0x00000000
StartIndex: 0x00000000


I do not know if this is the waterfall animation, but it is the only thing I could find so far.

Inge Jones
13th Nov 2011, 05:48 PM
Rumour has it that if you delete a slot the script uses, the item will disappear in use. But if the effect turns on and off it *should* be easy to locate in the script and stop it turning on, then you can simply move the location of that slot to a part where it won't show (or leave it there doing nothing)

And no, that snippet is to do with the dropshadow (the ground shadow) nothing to do with the effect.

birdyfly
13th Nov 2011, 05:59 PM
That is another problem I saw. There is no slot for the waterfall. It's strange, but I didn't see the slot in TSR Workshop nor in s3pe. I opened it up with Sims3PackageExplorer as well to see if I missed anything, but I still can't seem to find any coding to the waterfall animation or any reference to it.

Inge Jones
13th Nov 2011, 06:07 PM
I can see the effect slot in s3pe. See screenshot http://dino.drealm.info/den/exacc/effectslot.png

birdyfly
13th Nov 2011, 06:10 PM
Okay, in the RSLT, I have found an effects section in the data grid. Here is an image of it:
http://img834.imageshack.us/img834/9963/effects.jpg

Is this what I need to remove?
I am assuming that is what you were pointing to, but want to make sure. :)

Inge Jones
13th Nov 2011, 06:12 PM
You shouldn't remove it if the script is going to use it or you will simply have an erroring object. I mean by all means try, you may be lucky, but do keep a safe copy of your project to revert to if it goes wrong.

It may be worth checking the script some time, as it's possible to add extra routing slot awareness that way, along with extra routing slots.

birdyfly
13th Nov 2011, 06:45 PM
Here are the results of playing around with the effects:

Deleting the effects:
http://img202.imageshack.us/img202/2282/animationingame.jpg
It gets rid of the waterfall animation perfectly, but on the downside, it also gets rid of the actual hot tub bubbling animations and the color changing animations.

Having the positions changed to X - 0; Y - 0; Z - 0:
http://img442.imageshack.us/img442/4050/animationingame2.jpg

You mentioned I should take a look at the script, but what file contains the script? Is it just the XML file, or do I need to look at something different? I am assuming the script contains the waterfall animation.

Inge Jones
13th Nov 2011, 07:21 PM
I have looked at the script in the meantime, and it looks to me like the waterfall and the in-tub bubbling is indeed all part of the same effect. I wonder if you could borrow the effect from another tub that doesn't have a waterfall? (you'd need to copy the slot data also to ensure it all matches up)

birdyfly
13th Nov 2011, 07:32 PM
Alright, I will try that. :)

Also, I am going to try to edit the routing and container entries in s3pe to see if I have better luck. When I edit them in TSR Workshop, the sims cannot change seats nor can they interact romantically with one another. I was having the same thing with the routing error in the first post, so I am hoping if I edit them in s3pe, I will have better luck.

BloomsBase
13th Nov 2011, 08:16 PM
You can try change its scriptclass to Sims3.Gameplay.Objects.Plumbing.HotTub4Seated

birdyfly
13th Nov 2011, 09:54 PM
Thanks, Bloom, going to try that this time around. :)

I have a question for you since you use TSR Workshop as well.
I have been having a lot of problems with the routing and container entries in TSR Workshop. With the routing, I can just simply move it over a little for the larger hot tubs, but then my Sims get an error.
With the seats, my Sims cannot interact romantically, and the options like make out, kiss, cuddle, woohoo, etc do not even show up in the pie menu. Also, when my Sim goes to change seats, he just goes back to the seat he was at originally.

When I change a slot, I give it a new name and change the Bone Hash to 0x00000000. Here is an example of what I do below:

http://img249.imageshack.us/img249/2748/sloterror.jpg

I noticed that when looking at the placement flags, there is None that is checked by default and nothing else. I have never done anything with this. But, I have noticed there is a placement flag that says Sim. Am I supposed to check that? I never have since it was never checked to begin with.

http://img849.imageshack.us/img849/3811/sloterrorsim.jpg

I do the same exact steps when I edit a route entry.

Morphead
13th Nov 2011, 11:02 PM
While the name and bone of a normal container do not matter, Route, Effect, Kinematic, and Scripted Container slots DO matter. When you rename them and change the bone assignment, the game cannot find the slot the script is looking for, breaking the object. The None flag is selected because the slot has a fixed purpose as defined by the script and wants to make sure nothing interferes with that.

birdyfly
13th Nov 2011, 11:41 PM
In the images above, did I do the steps correctly, or did I do something wrong? I followed the Simsupply tutorial on youtube if that helps.

cmomoney
14th Nov 2011, 12:43 AM
The best option is to change the script class(as stated before) to a hot tub that doesn't have a waterfall. It should give you the results you want.

Inge Jones
14th Nov 2011, 09:17 AM
I have added working routing slots to an object without adding any nodes to the Rig, so although you shouldn't change the name of a routing slot that is already in use by the script, it is alright to add them. NB you have to use names that are already in the routing slot enum else the script doesn't have any easy way of referring to them without pulling in yards of extra code to override. But my only point is really the routing slots don't need to be in the Rig in order to be usable.

birdyfly
14th Nov 2011, 04:14 PM
Okay, I have managed to get rid of the waterfall animation by changing the OBJK file to the four seater hot tub. The Sims are snapping to only four areas instead of the six provided, but that is my next step to work on.

I am now going to work on the routing and slots of the seating of the Sims.

I have a question on how to approach this. Would it be better to use TSR Workshop or S3pe to fix the routing and slots? I am leaning towards s3pe right now, but worried since I never used it to fix slots/routing/ footprints.

Inge Jones
14th Nov 2011, 04:30 PM
You definitely have to make your own scriptclass if you want to add more slots for the sim to sit in. You can add as many as you like but the sim will ignore them unless the script suggests he should try them.

BloomsBase
14th Nov 2011, 07:11 PM
i was afraid of that.
When changing the scriptclass you prolly lose some interactions.....
No use if you add routes or slots if the script doesn't support them(or uses them)

I might know a way of making the waterfall not visible, got to check.

Edit,
I used to do this with sims 2 effects i didn't want(foggy windows)
I rotated them 180 degrees on 2 axisses and tried to do the same on the waterfall.
It does make the waterfall dissapear in the hottub itself but it doesn't look good on the other effects.
The smoke and bubbles are not showing and the jets are to high(you could fix the jets tho)
So that not going to work either.


Best is to still use the 4 seater script but to save you some work i would rotate your mesh 90 degrees so the seats are easier to adjust.
Or start over with the 4 seater as clone and use the grotto meshes?

birdyfly
14th Nov 2011, 07:32 PM
BloomsBase,
if you find another way, I would love to hear it since I know nothing about scripting. How would I make my own script class, if you don't mind me asking?

cmomoney
14th Nov 2011, 07:34 PM
Your own script class derived from the grotto that changes the 'JetFXName' and 'JetFXNameUpgradedName' to that of the 4-seater would work, and still keep the six seats. Don't know if you're trying to do any script work though...

BloomsBase
14th Nov 2011, 07:50 PM
i am noob also when it comes to scripts......
Tried but its just to much work.

I would settle for the 4 seater script with the use of the grotto meshes.(and rotate them 90 degrees to make it a bit easier to adjust the slots)
Use TSRW as it shows all slots(and edits on them) in the 3d view.

birdyfly
14th Nov 2011, 08:31 PM
Alright, so using TSRW when I edit or duplicate the slots for the seats, what I did above was incorrect, right? I am referring to this:

http://img249.imageshack.us/img249/2748/sloterror.jpg

If so, what do I do to duplicate/edit the slots? Do I just not edit the bone hash? Or is there a specific code I have to place in there? Also, with the New Name, is there a specific name I need to add for that?

Sorry for asking really simple questions on this.

Morphead
14th Nov 2011, 10:21 PM
If your editing the seat slots, I would keep the default name and bone hash. Otherwise, like previously mentioned, the game will get lost and it won't work.

birdyfly
14th Nov 2011, 11:27 PM
I did exactly what Morphead said and have some good/bad results.

The good results is that the sims can use the hot tub now and the seats without having any error.

The bad news is that the duplicate seats are really messed up.

First, the two sims are merging together when the seat is taken (ignore the floor cutout. I forgot to change that.)
http://oi42.tinypic.com/s5ejyb.jpg

Second, if I click on an empty seat, I sometimes get a "Seat Taken" error.
http://oi39.tinypic.com/29z93ja.jpg

I left the routing and seating completely unmodified as shown below:

Slot window:
http://oi43.tinypic.com/2ppir8y.jpg

Route window:
http://oi40.tinypic.com/n32dyg.jpg


I am assuming that for the duplicate slots that I need to change the name of it to give it a new hash but keep the bone hash unmodified. Is this correct?

Inge Jones
14th Nov 2011, 11:44 PM
No if you are making *new* slots (duplicating a slot is the same as making a new one) then they need unique bone names. What you shouldn't do is change the name of existing ones.

birdyfly
15th Nov 2011, 12:10 AM
Oh, okay, thanks Inge. Sorry about the whole mixup.

Okay, so when making unique bone names, how do I go about doing that? I am assuming the 0x00000000 name isn't what I should use for this.

When you say Bone Name, you do not mean the bone hash, correct? You mean the Bone Name area next to the bone hash?

http://oi39.tinypic.com/2ptukqe.jpg

Sorry, I just want to double check. :)

Morphead
15th Nov 2011, 03:46 AM
I think your best bet in adding new slots, without the waterfall is to make a new script. If the script is similar to other scripts it should be probably one of the easiest things for a new person to do. As it requires a number change and adding two lines :D I'll look into it though.

birdyfly
15th Nov 2011, 06:34 AM
Thank you so much, Morphead! :)

Do you mind helping me through making the script? I'm sorry for asking a lot, but I'm really hoping to get this working. :)

cmomoney
15th Nov 2011, 07:17 AM
Your own script class derived from the grotto that changes the 'JetFXName' and 'JetFXNameUpgradedName' to that of the 4-seater would work, and still keep the six seats.

This would be even easier as you would only change two words. :)

BloomsBase
15th Nov 2011, 08:49 AM
This would be even easier as you would only change two words. :)

keep in mind that the 4seater fx is much smaller.
But since you can scale special effects you might can make it fit the grotto tub.
Not sure if the waterjets then will match tho.

birdyfly
15th Nov 2011, 05:59 PM
I've been thinking about it, and I might delete the entire waterfall animation with the jets like I first did. I am trying to make an ancient bath, and the water jets don't really seem to match.

Now, with the seating. This bath is made to fit sixteen sims. I have added all sixteen slots and now need to find out how to make it so that they can use all sixteen seats. cmomoney mentioned the scripting. What exactly do I open up to change this? Is it the OBJK file and export it to look at in mono?

Inge Jones
15th Nov 2011, 06:40 PM
Oh, no you have to use Reflector or similar to dig out various bits from the game dlls. They will need exporting using s3pe. I think we have a tutorial somewhere... This is a good place to begin: http://simswiki.info/wiki.php?title=Tutorial:Sims_3_Pure_Scripting_Modding

birdyfly
15th Nov 2011, 06:56 PM
I guess I need to stop hiding from the Pure Scripting Modding tutorial. Hopefully it isn't as challenging as it seems.
Should I follow this tutorial step by step first, then try to use it to make my seats functional, or should I just follow it while correcting the seats at the same time? I have done scripting before, but not for the Sims game. What would be the best approach to do this?

cmomoney
15th Nov 2011, 07:13 PM
What you will be doing is similar to this: http://simswiki.info/wiki.php?title=Tutorial:Sims_3_Object_Modding, but instead of adding an interaction, you'll be changing the 'CreateSeatingGroup' to add more slots than the original.

Inge Jones
15th Nov 2011, 08:11 PM
Sorry Birdyfly I missed replying to one of your questions. When adding a slot, I added from this list:
public enum Slot : uint
{
ContainmentSlot_0 = 0xa820f8a6,
ContainmentSlot_1 = 0xa820f8a7,
ContainmentSlot_10 = 0x52e76ed5,
ContainmentSlot_11 = 0x52e76ed4,
ContainmentSlot_12 = 0x52e76ed7,
ContainmentSlot_13 = 0x52e76ed6,
ContainmentSlot_14 = 0x52e76ed1,
ContainmentSlot_15 = 0x52e76ed0,
ContainmentSlot_16 = 0x52e76ed3,
ContainmentSlot_17 = 0x52e76ed2,
ContainmentSlot_18 = 0x52e76edd,
ContainmentSlot_19 = 0x52e76edc,
ContainmentSlot_2 = 0xa820f8a4,
ContainmentSlot_20 = 0x4fe76a1c,
ContainmentSlot_21 = 0x4fe76a1d,
ContainmentSlot_22 = 0x4fe76a1e,
ContainmentSlot_23 = 0x4fe76a1f,
ContainmentSlot_3 = 0xa820f8a5,
ContainmentSlot_4 = 0xa820f8a2,
ContainmentSlot_41 = 0x4de76737,
ContainmentSlot_42 = 0x4de76734,
ContainmentSlot_43 = 0x4de76735,
ContainmentSlot_5 = 0xa820f8a3,
ContainmentSlot_6 = 0xa820f8a0,
ContainmentSlot_62 = 0x4be763d2,
ContainmentSlot_7 = 0xa820f8a1,
ContainmentSlot_8 = 0xa820f8ae,
ContainmentSlot_9 = 0xa820f8af,
ContainmentSlot_Sentinel = 0x4be763d3,
FXJoint_0 = 0x318a282c,
FXJoint_1 = 0x318a282d,
FXJoint_2 = 0x318a282e,
FXJoint_3 = 0x318a282f,
FXJoint_4 = 0x318a2828,
FXJoint_5 = 0x318a2829,
FXJoint_6 = 0x318a282a,
FXJoint_7 = 0x318a282b,
FXJoint_8 = 0x318a2824,
FXJoint_9 = 0x318a2825,
FXJoint_SandsOfUnderstanding = 0x5d33660a,
FXJoint_Science_0 = 0x9cec4dcb,
FXJoint_Science_1 = 0x9cec4dca,
FXJoint_Science_2 = 0x9cec4dc9,
FXJoint_Science_3 = 0x9cec4dc8,
FXJoint_Sentinel = 0x5d33660b,
IKTarget_0 = 0xa2c0a4b3,
IKTarget_1 = 0xa2c0a4b2,
IKTarget_2 = 0xa2c0a4b1,
IKTarget_3 = 0xa2c0a4b0,
IKTarget_4 = 0xa2c0a4b7,
IKTarget_5 = 0xa2c0a4b6,
IKTarget_6 = 0xa2c0a4b5,
IKTarget_7 = 0xa2c0a4b4,
IKTarget_8 = 0xa2c0a4bb,
IKTarget_9 = 0xa2c0a4ba,
IKTarget_Sentinel = 0xa2c0a4bb,
None = 0,
PlacementSlot_E = 0x5cb037aa,
PlacementSlot_N = 0x5cb037a1,
PlacementSlot_S = 0x5cb037bc,
PlacementSlot_Sentinel = 0x5cb037b9,
PlacementSlot_W = 0x5cb037b8,
RoutingSlot_0 = 0x31229a4c,
RoutingSlot_1 = 0x31229a4d,
RoutingSlot_10 = 0xa678e707,
RoutingSlot_11 = 0xa678e706,
RoutingSlot_12 = 0xa678e705,
RoutingSlot_13 = 0xa678e704,
RoutingSlot_14 = 0xa678e703,
RoutingSlot_15 = 0xa678e702,
RoutingSlot_16 = 0xa678e701,
RoutingSlot_17 = 0xa678e700,
RoutingSlot_18 = 0xa678e70f,
RoutingSlot_19 = 0xa678e70e,
RoutingSlot_2 = 0x31229a4e,
RoutingSlot_3 = 0x31229a4f,
RoutingSlot_4 = 0x31229a48,
RoutingSlot_5 = 0x31229a49,
RoutingSlot_6 = 0x31229a4a,
RoutingSlot_7 = 0x31229a4b,
RoutingSlot_8 = 0x31229a44,
RoutingSlot_9 = 0x31229a45,
RoutingSlot_Sentinel = 0xa678e70f,
TransformBone = 0xcd68f001
}

obviously avoiding any already used. Then if the script wants to use it, this is how the game tends to do it. For routing and container slots it is not necessary to match a bone in the RIG, and therefore I simply call the bonename the same as the slotname for my added entries. I have not tried adding any other type of slot - I have a feeling Effect slots do need a RIG entry.

Inge Jones
15th Nov 2011, 08:51 PM
Oh, the script tutorials are a little out of date. There is an easier way to extract the assemblies now. Where it says: "Click on Grid at the bottom of the S3PE window, and then click on the Assembly row and the little drop-down arrow on the right. Click on Export… " now you just have to right-click on the S3SA and choose Export dll. It will even save to the correct name.

Also in the tutorial "Creating a game-compatible Visual Studio project" since a couple of patches ago we can no longer make up our own complete namespace, and it has to begin with an existing namespace that is used in the game.

birdyfly
15th Nov 2011, 10:21 PM
Inge,
I feel comfortable using Mono develop over Visual Studio, and to me, they look almost identical. I have used Mono to edit Sims 3 XML mods to update them without any problems. Will I be able to use this program to make script mods as well? It supports Csharp scripts, Java scripts, and Python.

Inge Jones
15th Nov 2011, 10:53 PM
It just needs to compile into a .Net dll.

birdyfly
16th Nov 2011, 06:10 PM
I did the very first part of the script, but I want to make sure I did this correctly.

using System;

using System.Collections.Generic;

using System.Text;

using Sims3.Gameplay.Objects.Miscellaneous;

using Sims3.Gameplay.Interactions;

using Sims3.Gameplay.Actors;

using Sims3.Gameplay.Autonomy;

using Sims3.SimIFace;

using Sims3.UI;


namespace Sims3.Gameplay.Objects.Plumbing.BirdyBathHouseTub

public class SeatingSlots : HotTubGrottoCeleb



I am following this tutorial: http://simswiki.info/wiki.php?title=Tutorial:Sims_3_Object_Modding

Inge Jones
16th Nov 2011, 06:19 PM
Well I do it like this:

namespace Sims3.Gameplay.IngeJones
{
public class ijSims3Stairs_Snap : StaircaseSpiral
{

So the actual object's scriptclass is the class, rather than the namespace.

birdyfly
16th Nov 2011, 06:58 PM
Alright, I added the brackets.
using System;

using System.Collections.Generic;

using System.Text;

using Sims3.Gameplay.Objects.Miscellaneous;

using Sims3.Gameplay.Interactions;

using Sims3.Gameplay.Actors;

using Sims3.Gameplay.Autonomy;

using Sims3.SimIFace;

using Sims3.UI;

namespace Sims3.Gameplay.Objects.Plumbing.BirdyBathHouseTub

{
public class SeatingSlots : HotTubGrottoCeleb

{


Okay, I am now using reflector and am in the Sims3GameplayObjects -> Sims3GameplayObjects.dll -> Sims3.Gameplay.Objects.Plumbing

In the drop down menu, do I need the:
HotTubGrottoCeleb
or
HotTubSeat


Also, since I'm doing scripting anyways, there is something else I want to do with it. I am not sure if I should ask now since I am working on the hot tub seating first and hoping I can get that done.
I guess I'll go ahead and ask anyways and just come back to it once I get the seating right.

Since I am making a bath house tub for the ancient theme, I am wanting it to act as such. Is there a way to:
a) Increase the hygiene of the sim that uses it like an average bath tub? That way the hygiene does get filled up when the sims use it.
b) Make it so when the sims use this particular tub (not all hot tubs), they will be naked instead of in their swim suits? I know there is the skinny dipping function, but I want them to not wear their swimsuits at all with this since it is meant to be a huge bath tub.

Obviously these two are after I get the seats to hold 16 sims.

Inge Jones
16th Nov 2011, 07:08 PM
I am confused why you're not making a class for your object, which is called "BirdyBathHouseTub"

So you'd have
namespace Sims3.Gameplay.Objects.Plumbing.BirdyFly

{
public class BirdyBathHouseTub : HotTubGrottoCeleb

{

birdyfly
16th Nov 2011, 07:20 PM
Oops, sorry, Inge, I'm still a little slow when it comes to scripting. I have it changed now to have it look like this:

using System;
using System.Collections.Generic;
using System.Text;
using Sims3.Gameplay.Objects.Miscellaneous;
using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.Autonomy;
using Sims3.SimIFace;
using Sims3.UI;

namespace Sims3.Gameplay.Objects.Plumbing.BirdyFly
{
public class BirdyBathHouseTub : HotTubGrottoCeleb
{

EDIT:

Okay, I have the seats working now. The next step is what I stated above. That is the hygiene increase and the sim changing into the naked outfit instead of swimsuit.

For the hygiene, I saw this line of code:


[TunableComment("Range: Positive floats. Description: How much hygiene Sims gain per sim hour when in the HotTub posture."), Tunable]
private static float kHotTubHygieneGainPerHour = 40f;

I changed the 40f to 90f.

Now my code looks like this:


using System;

using System.Collections.Generic;

using System.Text;

using Sims3.Gameplay.Objects.Miscellaneous;

using Sims3.Gameplay.Interactions;

using Sims3.Gameplay.Actors;

using Sims3.Gameplay.Autonomy;

using Sims3.SimIFace;

using Sims3.UI;



namespace Sims3.Gameplay.Objects.Plumbing.BirdyFly



{

public class BirdyBathHouseTub : HotTubGrottoCeleb



{

// Fields

[TunableComment("Range: 0-100. Chance of Sim getting Pregnant on TryForBaby."), Tunable]

private static float kBabyMadeChance = 40f;

[Tunable, TunableComment("Weighted values for chance of baby getting these traits: None, Hydrophobic, PartyAnimal")]

private static float[] kBabyTraitChance = new float[] { 40f, 30f, 60f };

[Tunable]

private static GameObject.EnvironmentMotive kEnvironmentTuning = new GameObject.EnvironmentMotive();

[Tunable, TunableComment("Range: Positive floats. Description: Decrease in fatigue per sim hour from hottub posture.")]

private static float kFatigueLossPerHour = 60f;

[TunableComment("Range: Positive floats. Description: Normal Amount Sims gain fun (de-stress) per sim hour when in the hot tub."), Tunable]

private static float kHotTubDestressAmount = 65f;

[TunableComment("Range: Positive floats. Description: Skinny dip Amount Sims gain fun (de-stress) per sim hour when in the hot tub."), Tunable]

private static float kHotTubDestressAmountIfSkinnyDipping = 85f;

[TunableComment("Range: Positive floats. Description: How much hygiene Sims gain per sim hour when in the HotTub posture."), Tunable]

private static float kHotTubHygieneGainPerHour = 90f;

[TunableComment("Range: Positive int. Description: How many sim minutes it takes to remove the sore buff."), Tunable]

private static int kNumMinsToRemoveSoreBuff = 60;

[Tunable, TunableComment("Range: 0-? Description: Number of Puddles to make when hot tub is broken.")]

private static int kNumPuddlesToMakeWhenBroken = 5;

[Tunable]

private static RepairableComponent.Tuning kRepairableTuning = new RepairableComponent.Tuning();



// Properties

public override float BabyMadeChance

{

get

{

return kBabyMadeChance;

}

}



public override float[] BabyTraitChance

{

get

{

return kBabyTraitChance;

}

}



public override string BrokenFXName

{

get

{

return "ep3HotTubGrottoCelebBroken";

}

}



public override GameObject.EnvironmentMotive EnvironmentTuning

{

get

{

return kEnvironmentTuning;

}

}



public override float FatigueLossPerHour

{

get

{

return kFatigueLossPerHour;

}

}



public override float HotTubDestressAmount

{

get

{

return kHotTubDestressAmount;

}

}



public override float HotTubDestressAmountIfSkinnyDipping

{

get

{

return kHotTubDestressAmountIfSkinnyDipping;

}

}



public override float HotTubHygieneGainPerHour

{

get

{

return kHotTubHygieneGainPerHour;

}

}



public override string JetFXName

{

get

{

return "ep3HotTubGrottoCelebJets";

}

}



public override string JetFXUpgradedName

{

get

{

return "ep3HotTubGrottoCelebJetsUpgraded";

}

}



public override int NumMinsToRemoveSoreBuff

{

get

{

return kNumMinsToRemoveSoreBuff;

}

}

public override int NumPuddlesToMakeWhenBroken

{

get

{

return kNumPuddlesToMakeWhenBroken;

}

}



public override RepairableComponent.Tuning RepairableTuning

{

get

{

return kRepairableTuning;

}

}

}


Did I do this line of code correctly? If so, then how do I add the outfit changer?
In the HotTubSeat in the .NET Reflector has this line of code:

public override bool SitDown(Sim s, Slot slot, Sim invitedBy, bool isAutonomous)
{
Sim.SwitchOutfitHelper switchOutfitHelper = null;
bool isSkinnyDipping = invitedBy.IsSkinnyDipping();
if (isSkinnyDipping)
{
switchOutfitHelper = new Sim.SwitchOutfitHelper(s, 3, 1, false);
}
else
{
switchOutfitHelper = new Sim.SwitchOutfitHelper(s, 3);
}
switchOutfitHelper.Start();
HotTubBase container = base.Container as HotTubBase;
base.get_Host().AddToUseList(s);
if (container.SitDown(s, slot, this, switchOutfitHelper, isSkinnyDipping, invitedBy, isAutonomous))
{
if (s.HasExitReason(0x800))
{
InteractionInstance cancelTransition = s.get_Posture().GetCancelTransition();
s.get_InteractionQueue().PushAsContinuation(cancelTransition, true);
return false;
}
return true;
}
base.get_Host().RemoveFromUseList(s);
return false;
}


Is this is code I need? If so, how do I implement it into the script I already have? Do I just add it to the end of the script? And do I need all of this line, or just part of it?

birdyfly
19th Nov 2011, 01:04 AM
Alright, I tried testing the code after adding the public bool statement, and it didn't do anything outfit wise.
Here is the final script:
using System;
using System.Collections.Generic;
using System.Text;
using Sims3.Gameplay.Objects.Miscellaneous;
using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.Autonomy;
using Sims3.SimIFace;
using Sims3.UI;

namespace Sims3.Gameplay.Objects.Plumbing.BirdyFly



{

public class BirdyBathHouseTub : HotTubGrottoCeleb



{

// Fields

[TunableComment("Range: 0-100. Chance of Sim getting Pregnant on TryForBaby."), Tunable]

private static float kBabyMadeChance = 40f;

[Tunable, TunableComment("Weighted values for chance of baby getting these traits: None, Hydrophobic, PartyAnimal")]

private static float[] kBabyTraitChance = new float[] { 40f, 30f, 60f };

[Tunable]

private static GameObject.EnvironmentMotive kEnvironmentTuning = new GameObject.EnvironmentMotive();

[Tunable, TunableComment("Range: Positive floats. Description: Decrease in fatigue per sim hour from hottub posture.")]

private static float kFatigueLossPerHour = 60f;

[TunableComment("Range: Positive floats. Description: Normal Amount Sims gain fun (de-stress) per sim hour when in the hot tub."), Tunable]

private static float kHotTubDestressAmount = 65f;

[TunableComment("Range: Positive floats. Description: Skinny dip Amount Sims gain fun (de-stress) per sim hour when in the hot tub."), Tunable]

private static float kHotTubDestressAmountIfSkinnyDipping = 85f;

[TunableComment("Range: Positive floats. Description: How much hygiene Sims gain per sim hour when in the HotTub posture."), Tunable]

private static float kHotTubHygieneGainPerHour = 90f;

[TunableComment("Range: Positive int. Description: How many sim minutes it takes to remove the sore buff."), Tunable]

private static int kNumMinsToRemoveSoreBuff = 60;

[Tunable, TunableComment("Range: 0-? Description: Number of Puddles to make when hot tub is broken.")]

private static int kNumPuddlesToMakeWhenBroken = 5;

[Tunable]

private static RepairableComponent.Tuning kRepairableTuning = new RepairableComponent.Tuning();



public override bool SitDown(Sim s, Slot slot, Sim invitedBy, bool isAutonomous)

{

Sim.SwitchOutfitHelper switchOutfitHelper = null;

bool isSkinnyDipping = invitedBy.IsSkinnyDipping();

if (isSkinnyDipping)

{

switchOutfitHelper = new Sim.SwitchOutfitHelper(s, 3, 1, false);

}

else

{

switchOutfitHelper = new Sim.SwitchOutfitHelper(s, 3);

}

switchOutfitHelper.Start();

HotTubBase container = base.Container as HotTubBase;

base.get_Host().AddToUseList(s);

if (container.SitDown(s, slot, this, switchOutfitHelper, isSkinnyDipping, invitedBy, isAutonomous))

{

if (s.HasExitReason(0x800))

{

InteractionInstance cancelTransition = s.get_Posture().GetCancelTransition();

s.get_InteractionQueue().PushAsContinuation(cancelTransition, true);

return false;

}

return true;

}

base.get_Host().RemoveFromUseList(s);

return false;

}



// Properties

public override float BabyMadeChance

{

get

{

return kBabyMadeChance;

}

}



public override float[] BabyTraitChance

{

get

{

return kBabyTraitChance;

}

}



public override string BrokenFXName

{

get

{

return "ep3HotTubGrottoCelebBroken";

}

}



public override GameObject.EnvironmentMotive EnvironmentTuning

{

get

{

return kEnvironmentTuning;

}

}



public override float FatigueLossPerHour

{

get

{

return kFatigueLossPerHour;

}

}



public override float HotTubDestressAmount

{

get

{

return kHotTubDestressAmount;

}

}



public override float HotTubDestressAmountIfSkinnyDipping

{

get

{

return kHotTubDestressAmountIfSkinnyDipping;

}

}



public override float HotTubHygieneGainPerHour

{

get

{

return kHotTubHygieneGainPerHour;

}

}



public override string JetFXName

{

get

{

return "ep3HotTubGrottoCelebJets";

}

}



public override string JetFXUpgradedName

{

get

{

return "ep3HotTubGrottoCelebJetsUpgraded";

}

}



public override int NumMinsToRemoveSoreBuff

{

get

{

return kNumMinsToRemoveSoreBuff;

}

}



public override int NumPuddlesToMakeWhenBroken

{

get

{

return kNumPuddlesToMakeWhenBroken;

}

}



public override RepairableComponent.Tuning RepairableTuning

{

get

{

return kRepairableTuning;

}
}

}


I am not sure what I did wrong. Was that the wrong line of code that I added?