- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Object Creation >
- General/Other - Removing activity lights on a cloned PC?
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Object Creation >
- General/Other - Removing activity lights on a cloned PC?
Replies: 6 (Who?), Viewed: 2430 times.
#1
16th Jan 2014 at 7:42 AM
Posts: 381
Thanks: 11375 in 44 Posts
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
#2
25th Jan 2014 at 1:40 AM
Last edited by blakegriplingph : 25th Jan 2014 at 2:08 AM.
Posts: 381
Thanks: 11375 in 44 Posts
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:
The code controlling it can be found on Sims3GameplayObjects.Electronics under the Computer sub-section:
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?
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?
#3
25th Jan 2014 at 6:13 PM
Posts: 11,682
Thanks: 9680 in 11 Posts
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)
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
#4
25th Jan 2014 at 11:17 PM
Last edited by blakegriplingph : 26th Jan 2014 at 1:03 AM.
Posts: 381
Thanks: 11375 in 44 Posts
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; } } } }
#5
26th Jan 2014 at 5:46 AM
Posts: 4,419
Thanks: 2483 in 21 Posts
might be just easier to hide the lights inside the mesh.
You can do this by editing the effect slot/joint in the RIG
You can do this by editing the effect slot/joint in the RIG
#6
26th Jan 2014 at 9:10 AM
Posts: 11,682
Thanks: 9680 in 11 Posts
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)
#7
26th Jan 2014 at 12:51 PM
Last edited by blakegriplingph : 26th Jan 2014 at 1:54 PM.
Posts: 381
Thanks: 11375 in 44 Posts
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.
Who Posted
|