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!
Field Researcher
Original Poster
#1 Old 16th Jan 2014 at 7:42 AM
Default Removing activity lights on a cloned PC?
Well, I could just pass it off and ignore it, as what Esmeralda did with her Alienware conversion, but is it possible to get rid of, or at least hide, the power and disk activity lights on the Landgraab flatscreen computer? I used it as a basis for my iMac mod, and I find it a little annoying to notice those two LEDs glowing even if they're not supposed to be there.

I'm thinking that this might be an entity controlled via a gameplay script, but I'm not sure as to where exactly is it.

Here's a screenshot of the LEDs in question:
Advertisement
Field Researcher
Original Poster
#2 Old 25th Jan 2014 at 1:40 AM Last edited by blakegriplingph : 25th Jan 2014 at 2:08 AM.
Sorry for the double-post bump, but I just found out that the lights are an effect sprite which can be spawned via the Fog Emitter:
Code:
computerLightsFlatscreen


The code controlling it can be found on Sims3GameplayObjects.Electronics under the Computer sub-section:

Code:
public virtual void TurnOnLightEffect()
{
	if (this.mPowerLightEffect == null)
	{
		string effectName;
		if (this is ComputerExpensive)
		{
			effectName = "computerLightsFlatscreen";
		}
		else
		{
			if (!(this is ComputerCheap))
			{
				return;
			}
			effectName = "computerLights";
		}
		this.mPowerLightEffect = VisualEffect.Create(effectName);
		this.mPowerLightEffect.ParentTo(this, Slot.FXJoint_0);
		this.mPowerLightEffect.Start();
	}
}


I had a talk with Inge Jones about this, but while the problem's more or less clear, if I opt for a core script solution to removing the LED lights (the other one would involve moving the FXJoint as what Inge suggested as well), I'm not sure as to how to do it as I don't have any much experience with C#. Besides the fact that every single object cloned from the flatscreen PC will be affected.

Now I'm thinking about an alternate method besides hiding the effect, i.e. something as drastic as removing the effect slot, but would that cause any screw-ups?
One horse disagreer of the Apocalypse
#3 Old 25th Jan 2014 at 6:13 PM
It wouldn't be a core mod. Maybe I confused you with the word "override"? What I mean was you make a new class derived from the scriptclass of the computer you cloned, and then in that new class write your own version of TurnOnLightEffect(). The method declaration would look like "public override void TurnOnLightEffect()" and then it only needs one line "return;"

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
Original Poster
#4 Old 25th Jan 2014 at 11:17 PM Last edited by blakegriplingph : 26th Jan 2014 at 1:03 AM.
Quote: Originally posted by Inge Jones
It wouldn't be a core mod. Maybe I confused you with the word "override"? What I mean was you make a new class derived from the scriptclass of the computer you cloned, and then in that new class write your own version of TurnOnLightEffect(). The method declaration would look like "public override void TurnOnLightEffect()" and then it only needs one line "return;"


OK, noted. I did read a bit about derived object classes before, so I think that wouldn't be too much of a drag to do.

EDIT: Is this code good enough?

Code:
using Sims3.Gameplay.Abstracts;
using Sims3.Gameplay.ObjectComponents;
using Sims3.SimIFace;
using System;
namespace Sims3.Gameplay.Objects.Electronics
{
	public class ComputerImac : ComputerExpensive
	{
		public override void TurnOnLightEffect()
		{
            {
                return;
            }
		}
	}
}
Sockpuppet
#5 Old 26th Jan 2014 at 5:46 AM
might be just easier to hide the lights inside the mesh.
You can do this by editing the effect slot/joint in the RIG
One horse disagreer of the Apocalypse
#6 Old 26th Jan 2014 at 9:10 AM
Quote: Originally posted by blakegriplingph
OK, noted. I did read a bit about derived object classes before, so I think that wouldn't be too much of a drag to do.

EDIT: Is this code good enough?

Code:
using Sims3.Gameplay.Abstracts;
using Sims3.Gameplay.ObjectComponents;
using Sims3.SimIFace;
using System;
namespace Sims3.Gameplay.Objects.Electronics
{
	public class ComputerImac : ComputerExpensive
	{
		public override void TurnOnLightEffect()
		{
            {
                return;
            }
		}
	}
}


change your namespace to make it personal - eg:
namespace Sims3.Gameplay.Objects.BlakeGripling

Then compile. If you don't get compile errors it's ready to test in game. If the lights are gone in game, it's ready to use share

If you get any runtime erroring like the sim jumps when turning off the PC, it's possible you may need to also override the turning off lights effect in the same way. I am not sure if asking an effect to turn off when it isn't on creates an error. I think it probably does not.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
Original Poster
#7 Old 26th Jan 2014 at 12:51 PM Last edited by blakegriplingph : 26th Jan 2014 at 1:54 PM.
Quote: Originally posted by BloomsBase
might be just easier to hide the lights inside the mesh.
You can do this by editing the effect slot/joint in the RIG


Tried it once, but it ended up looking a tad wonky whenever a Sim overclocks or repairs the object.

The namespace I used works, but thanks for the suggestion.
Back to top