Replies: 18 (Who?), Viewed: 3845 times.
Lab Assistant
Original Poster
#1 Old 16th Mar 2019 at 8:03 AM Last edited by whiteman-Dara : 16th Mar 2019 at 11:51 AM.
Default where is visual override in code.
Hi everyone, where visual override is processed in the code and is it possible to add new visual override, such as glowing skin, as of ghosts?
Advertisement
Puffin McMuffin
staff: administrator
#2 Old 17th Mar 2019 at 3:02 PM
Hi there!

They are actually riiiight within either the Fullbuild packages or the deltabuild packages. however, I noticed they were uncompressed dds files (probably because it gives the best result that way). So to edit those and edit the actual uncompressed version of it, you can check out this tut I wrote not too long ago: http://modthesims.info/showthread.php?t=623819

Let me know if that helped!
Lab Assistant
Original Poster
#3 Old 19th Mar 2019 at 7:16 PM
Quote:
Originally Posted by Lyralei
Hi there!

They are actually riiiight within either the Fullbuild packages or the deltabuild packages. however, I noticed they were uncompressed dds files (probably because it gives the best result that way). So to edit those and edit the actual uncompressed version of it, you can check out this tut I wrote not too long ago: http://modthesims.info/showthread.php?t=623819

Let me know if that helped!


fullbuild was not updated at all, did not find anything in deltabuild0 either, deltabuild1 in audio resources, in the deltabuild2 found a resource ep7tigereye.img but when delete it does not removed the visual overrides. I suppose there is some kind of xml resource in which written something this is:
Code:
<?xml version="1.0"?>
<ObjectsGhostState>
<GhostShaders>
<Name></Name>
<Hex></Hex>
<ColorHair></ColorHair>
<ColorBody></ColorBody>
</GhostShaders>
<GhostShaders>
<Name>OldAge</Name>
<Hex>OldAge</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>134,134,134</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Drown</Name>
<Hex>Drown</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>56,96,121</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Starvation</Name>
<Hex>Starvation</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>107,95,189</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Electrocution</Name>
<Hex>Electrocution</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>180,187,113</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Fire</Name>
<Hex>Fire</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>193,93,31</ColorBody>
</GhostShaders>
</ObjectsGhostState>
Puffin McMuffin
staff: administrator
#4 Old 21st Mar 2019 at 11:13 PM
Okay, so when seeing these things it\'s always good to focus on what it's saying. For example this:

Code:
<GhostShaders>

  <Name>Fire</Name>

  <Hex>Fire</Hex>

  <ColorHair>223,223,223</ColorHair>

  <ColorBody>193,93,31</ColorBody>

 </GhostShaders>


What we see is, "change the colour body to these colours. As well as the hair." But that doesn't actually define the shader. As we know, shaders are what makes a material different. Sometimes shiny, in this case, transparent and all the whiteness turns super bright. I do want to tell you that most things in-game, especially shader related, are never defined in the code that we have access to.

I did actually find a lot of images that do define the shader animation, if not, colours in the fullbuild. The reason I added the tutorial was because I know lots of them are uncompressed files for reasons of: better quality in textures, sometimes shaders just expect uncompressed textures, etc. Here are a few:

Code:

(GhostNoise_Electrocuted) 0x00B2D882-0x00000000-0x73C81CE7AE82FB40
(GhostNoise_Drowned) 0x00B2D882-0x00000000-0xDA169FAFF42318D0
(GhostNoise_Starved) 0x00B2D882-0x00000000-0x72D9CE506851FED0
(GhostNoise_Immolated) 0x00B2D882-0x00000000-0xA1949BBAA3EB91B3
(GhostNoise_oldAge) 0x00B2D882-0x00000000-0x394502743D1F991F
(GhostNoise_Causality) 0x00B2D882-0x00000000-0x4DB83620BC45A168
(GhostNoise_Hologram) 0x00B2D882-0x00000000-0x554F431FCEAA1BC2
(GhostNoise_JetPack) 0x00B2D882-0x00000000-0x74AE065B03FD69E3
(GhostNoise_Robot) 0x00B2D882-0x00000000-0x67BB755457A30BB9
Lab Assistant
Original Poster
#5 Old 22nd Mar 2019 at 8:44 PM
Lyralei, Then why if you swap these place textures, shaders do not change. Img is not worked by the glow effect. I found in the code what it looks, as ghost shader - electrocution.
Code:
// Sims3.Gameplay.Objects.Urnstone
private void TurnOnGhostElectrocutionEffects(Sim ghost)
{
this.mElectrocutionLeftBellyBack = VisualEffect.Create("L_backBellyTarget_ghost");
this.mElectrocutionLeftBellyBack.ParentTo(ghost, Sim.FXJoints.LeftBellyBack);
this.mElectrocutionLeftBellyBack.Start();
this.mElectrocutionLeftBack = VisualEffect.Create("L_BackTarget_ghost");
this.mElectrocutionLeftBack.ParentTo(ghost, Sim.FXJoints.LeftBack);
this.mElectrocutionLeftBack.Start();
this.mElectrocutionLeftBreast = VisualEffect.Create("L_breastTarget_ghost");
this.mElectrocutionLeftBreast.ParentTo(ghost, Sim.FXJoints.LeftBreast);
this.mElectrocutionLeftBreast.Start();
this.mElectrocutionLeftBellyFront = VisualEffect.Create("L_frontBellyTarget_ghost");
this.mElectrocutionLeftBellyFront.ParentTo(ghost, Sim.FXJoints.LeftBellyFront);
this.mElectrocutionLeftBellyFront.Start();
this.mElectrocutionLeftBelly = VisualEffect.Create("L_BellyTarget_ghost");
this.mElectrocutionLeftBelly.ParentTo(ghost, Sim.FXJoints.LeftBelly);
this.mElectrocutionLeftBelly.Start();
this.mElectrocutionLeftBackLower = VisualEffect.Create("L_lowBackTarget_ghost");
this.mElectrocutionLeftBackLower.ParentTo(ghost, Sim.FXJoints.LeftBackLower);
this.mElectrocutionLeftBackLower.Start();
this.mElectrocutionLeftTorsoSideBack = VisualEffect.Create("L_sideBackTorsoTarget_ghost");
this.mElectrocutionLeftTorsoSideBack.ParentTo(ghost, Sim.FXJoints.LeftTorsoSideBack);
this.mElectrocutionLeftTorsoSideBack.Start();
this.mElectrocutionRightBellyBack = VisualEffect.Create("R_backBellyTarget_ghost");
this.mElectrocutionRightBellyBack.ParentTo(ghost, Sim.FXJoints.RightBellyBack);
this.mElectrocutionRightBellyBack.Start();
this.mElectrocutionRightBack = VisualEffect.Create("R_BackTarget_ghost");
this.mElectrocutionRightBack.ParentTo(ghost, Sim.FXJoints.RightBack);
this.mElectrocutionRightBack.Start();
this.mElectrocutionRightBreast = VisualEffect.Create("R_breastTarget_ghost");
this.mElectrocutionRightBreast.ParentTo(ghost, Sim.FXJoints.RightBreast);
this.mElectrocutionRightBreast.Start();
this.mElectrocutionRightBellyFront = VisualEffect.Create("R_frontBellyTarget_ghost");
this.mElectrocutionRightBellyFront.ParentTo(ghost, Sim.FXJoints.RightBellyFront);
this.mElectrocutionRightBellyFront.Start();
this.mElectrocutionRightBelly = VisualEffect.Create("R_BellyTarget_ghost");
this.mElectrocutionRightBelly.ParentTo(ghost, Sim.FXJoints.RightBelly);
this.mElectrocutionRightBelly.Start();
this.mElectrocutionRightBackLower = VisualEffect.Create("R_lowBackTarget_ghost");
this.mElectrocutionRightBackLower.ParentTo(ghost, Sim.FXJoints.RightBackLower);
this.mElectrocutionRightBackLower.Start();
this.mElectrocutionRightTorsoSideBack = VisualEffect.Create("R_sideBackTorsoTarget_ghost");
this.mElectrocutionRightTorsoSideBack.ParentTo(ghost, Sim.FXJoints.RightTorsoSideBack);
this.mElectrocutionRightTorsoSideBack.Start();
}
Lab Assistant
Original Poster
#6 Old 23rd Mar 2019 at 11:52 PM
Lyralei, You are right about these images, but what adds color to shaders? img - death type:
Code:
(GhostNoise_Immolated) 0x00B2D882-0x00000000-0xA1949BBAA3EB91B3 - death type Burn to fire, death type meteor, death type invisible sim, death type human statue.
(GhostNoise_OldAge) 0x00B2D882-0x00000000-0x394502743D1F991F - death type old age, death type mummy curse, death type haunting curse, death type jelly bean death.
(GhostNoise_Drowned) 0x00B2D882-0x00000000-0xDA169FAFF42318D0 - death type drown, death tyle trist, death type watery grave, death type transmuted.
(GhostNoise_Starved) 0x00B2D882-0x00000000-0x72D9CE506851FED0 - death type starve.
(GhostNoise_Electrocuted) 0x00B2D882-0x00000000-0x73C81CE7AE82FB40 - death type electrocition
Puffin McMuffin
staff: administrator
#7 Old 26th Mar 2019 at 9:22 PM
Images are the animated bits (So for electrocuted ghosts that would be the lighting bits)

The XML stuff you linked are the colours of the sim but I'm not sure per se if that changes the shader's colour. Wouldn't surprise me though! So the best thing you could do here is trying. That's a way of finding things out

And, again, the code actually doesn't hold the shader bits. The code you copied only applies the shader and the potential visual effects that the ghost has. So that has nothing to do with the settings of the shaders that you're trying to find. Best thing to do in your case is to check out any xml file or image file or any file that has nothing to do with C# code to change the shaders.
Lab Assistant
Original Poster
#8 Old 27th Mar 2019 at 7:06 PM
Lyralei, Ofther people could not find color of shader, so I think it's somewhere in the code written.
Puffin McMuffin
staff: administrator
#9 Old 29th Mar 2019 at 8:37 PM
So I went out of my way, checking the in-game code. the XML file you added actually was indeed what is connected to the code (but again, the code only APPLIES the visual effects of a ghost shader or 'material' as they call it so it doesn't say "add this colour for this ghost shader", instead it says "Okay, if this sim is this specific death type, get this specific visual effect for it. Then, apply it to the, say, torso bone and then let's start the visual effect")

But... I actually wasn't able to find that XML file myself, do you happen to have the Resource details for me? or the package file you found it it? That way I could check a few things out for you.
Lab Assistant
Original Poster
#10 Old 30th Mar 2019 at 6:52 AM Last edited by whiteman-Dara : 30th Mar 2019 at 7:29 AM.
Lyralei, This is not an xml code, you need a resource? it is written in code, you can view the entire medot or class if it helps you, the full path: // Sims3.Gameplay.Objects.Urnstone: TurnToGhostElectrocutionEffects there is also a method you should see GhostSetup.
Puffin McMuffin
staff: administrator
#11 Old 30th Mar 2019 at 3:00 PM
Oh nono I was referring to this:

Code:
<?xml version="1.0"?>
<ObjectsGhostState>
<GhostShaders>
<Name></Name>
<Hex></Hex>
<ColorHair></ColorHair>
<ColorBody></ColorBody>
</GhostShaders>
<GhostShaders>
<Name>OldAge</Name>
<Hex>OldAge</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>134,134,134</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Drown</Name>
<Hex>Drown</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>56,96,121</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Starvation</Name>
<Hex>Starvation</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>107,95,189</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Electrocution</Name>
<Hex>Electrocution</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>180,187,113</ColorBody>
</GhostShaders>
<GhostShaders>
<Name>Fire</Name>
<Hex>Fire</Hex>
<ColorHair>223,223,223</ColorHair>
<ColorBody>193,93,31</ColorBody>
</GhostShaders>
</ObjectsGhostState>


The information I gave on my previous post was actually from the urnstone script Which, again, only applies it and you can't alter shaders from there because that's not how shaders work.
Lab Assistant
Original Poster
#12 Old 31st Mar 2019 at 5:47 PM Last edited by whiteman-Dara : 31st Mar 2019 at 6:58 PM.
Lyralei, As I understand it, the ghosts turn out like this: to a sim who is a ghost through some file is made transparent: skin, clothes, hair, eyes, the next step is to color each death type, then glow and visual effects. more on this thread: http://www.modthesims.info/showthread.php?t=395236
Puffin McMuffin
staff: administrator
#13 Old 4th Apr 2019 at 9:10 AM
This file is actually called a ‘shader’ or ‘material’ hence for the colours why i was wondering where you found that xml file that i copy pasted in my last post. The reason i keep asking is because it could be 2 things:

1. The actual colours applied to the shader for specific death types
2. Or it could be the colour they sometimes turn sims into when they’re dead. But i suspect that being not the case.

The reason i ask is because the ghostsetup function has something that i believe is getting info from that exact xml file but the only way to find out for me is to know where you got this xml file
Lab Assistant
Original Poster
#14 Old 7th Apr 2019 at 9:06 PM
Lyralei, I haven't found him yet, I just assumed that he could be.
Lab Assistant
Original Poster
#15 Old 15th Apr 2019 at 5:18 PM
Lyralei, We went to the trick and we did not find in the code "GhostNoise _..." , we believe that it is in some kind of file that comes after the code, maybe is there will be colors.
Lab Assistant
Original Poster
#16 Old 28th Apr 2019 at 3:51 PM Last edited by whiteman-Dara : 28th Apr 2019 at 4:23 PM.
In fact, visual overrides and death types are logically processed into: Gameplay.CAS / CasSim: SetVisualOverride next enumeration step through: ObjectSetGhostState, and the enum DeathTypes, and the ObjectSetVisualOverride, and the enum eVisualOverrideTypes.
When you choose any death type, for example burn to fire, through ObjectSetGhostState, because shaders are tied to enumerations, logic saying, if this sim is a ghost - burn to fire, get an, glow orange body, some incomprehensible yellow hair, and white eyes.
another example when you create a werewolf in CAS this it already goes through ObjectSetVisualOverride, logic saying this sim is a werewolf, get this turn on the light in the eyes.
Puffin McMuffin
staff: administrator
#17 Old 4th May 2019 at 8:31 PM
Aha that's indeed how it works, but the script is always an "on/off" so to speak. It never applies it onto the mesh. it just says "This sim just became a ghost! set this shader to true". This is being defined in the SIME file by the way, inside the SIME is the enum hash of the deathtype and that's basically how it knows what is connected.

In other news, I did find the piece of code that got me to dig a bit deeper inside what is going on with the 'ghost' shader. And it's actually hardcoded inside the shader_precomp file. Most things aren't but it seems for this specific case it is. Now you could go off and change some bytes around, but it's not exactly the recommended way of doing it I'll say. Because it can easily lead to game corruption. If you wanna know a bit more about the shader_precomp then this is a great thread to look at: http://modthesims.info/showthread.p...561#post5497561
Lab Assistant
Original Poster
#18 Old 19th Jun 2019 at 1:13 AM
Lyralei, What I found really surprised me I never would have thought that the ghost shaders would be there, and not in the shader_precomp file, I had the following question: how do you open SIME? S3PE writes "Fallback preview: data may be incomplete". Sorry for the late reply.
Puffin McMuffin
staff: administrator
#19 Old 19th Jun 2019 at 7:05 PM
The only real way would be by checking it with a hex editor. I tried looking into making a program or something out of it too that could open these but for now, that's not possible.

On the other hand, I DO know what's stored inside the SIME which is, simply, just the death type. (coming back to that importcontent thing we talked about before) In this thread you'll see the entire XML file that holds everything that's inside the SIME (or well, the sim description table, the rest of the file is irrelevant really.): http://modthesims.info/showthread.p...787#post5536787

You can also read more about SIME files here: http://wiki.modthesims.info/wiki.ph...ms_3:0x04F88964

I still do think it's in the Shader_precomp file but that's just my theory
Back to top