Replies: 7 (Who?), Viewed: 2892 times.
Forum Resident
Original Poster
#1 Old 26th Jan 2015 at 1:55 AM
Default Vault Set - Light issue.
Good day! I've been working on retextures for all the vault set items (counters, cabinets, bar, and islands).

A piece of the cabinets and the bar suffer from lights issue, meaning that the tones don't match the rest of the set. I would like to know if someone could be so kind to explain me how to fix this myself just like the ones @plasticbox created for the basegame ones. Since when cloning with s4s, some numbers change, the mod doesn't apply my retextured ones.

I've installed notepad++ to tried to edit anything and everything appears as multiply NULL labels. Even if i did modified it i would need plasticbox permission.

Is it possible to change this light issues from the s4s warehouse? or through s4pe? Thanks in advanced.
Advertisement
Pettifogging Legalist!
retired moderator
#2 Old 26th Jan 2015 at 10:15 AM Last edited by plasticbox : 27th Jan 2015 at 12:04 PM.
The “Light Fix” mods I posted are indeed specifically for the original Maxis objects – when you clone them, you will have to change your own object yourself (unless you can figure out how to make your cloning procedure take overrides into account; I don’t know anything about that though).

Direct links to the mods (with before / after pics, so that others know what we are talking about):

BlandCo Overhaul
No-Drop cabinets / Light Fix for “Vault” / “SCargeaux” / “Vault” Bars
Harbinger Light Fix


Vault Bars – Before:




Vault Bars – After:



What I did there was changing the shader in all of the material definitions to the one that is used in counters (conveniently named “Counter”); additionally I replaced the LITE resource (or respectively, the reference to the LITE resource) for the tall cabinet in two of them – not in the Vault one though, that did not have a problem in that respect. See the attached screenshot for what happens if you use the original LITE in combination with the Counter shader ..


So that is what you’d also need to do in yours; I would strongly recommend to use a hex editor for the cabinets since it’s 10 or so models with about 40 ocurrences of that shader in each one .. in a hex editor you can just search/replace them all in one go, whereas if you edit those fields in s4pe (or in S4S/Warehouse which is basically a proprietary version of s4pe from the screenshots I’ve seen, so no big difference) you’d need to edit each field separately, 400 times o.O

  • If you compare your MODLs/MLODs to the ones in my mod, you will see that yours list “Shader: 0xFC6D8A0F (4235037199)” in some of the MATDs where mine say “Shader: 0xA4172F62 (Counters)” – this is what I changed
  • To change it in yours, export the MODL and the MLOD group 0x00000000 of each object (they are listed in the OBJD (Object Definition)) -- s4pe: select them all in the resource list, right click, Export > To File
  • Open them all in HxD or some other hex editor
  • Search for 0F 8A 6D FC (backwards!) as hex values, replace with 62 2F 17 A4 (again, backwards) (just do “Replace All”, in HxD check “Direction: All” as well)
  • Import the edited files back in, save, done.

0xFC6D8A0F is the FNV-32 hash of “cabinet”; a full list of shader names is available here (SGModSquad/Maxis): post | zip.

If you haven’t done any hex editing before, you could also do the bar first – that only has 12 or so occurences of that shader per resource, so it wouldn’t be such a big deal to change manually (I guess that might feel more comfortable since you can see directly what you are doing): when you have a MODL or MLOD selected, scroll down in the preview pane at the right to see where the “Shader: 0xFC6D8A0F (4235037199)” occurs (actually, I think the “wrong” shader was “PhongAlpha” or somesuch in the case of the bars – compare with my edited ones to see what exactly is changed), make note of which ChunkEntry it is, and then go to Grid view (hit “Grid” at the bottom) > open that ChunkEntry > RCOL and put “0xA4172F62” in the Shader field.

A more reliable way to find all occurrences (rather than scrolling) is to copy and paste the preview into Notepad++ or something, and then use the search feature in that. This is also useful to compare files (C+P the Preview from both and then use the Compare / Diff feature of your favourite text editor).

Make a backup first, and perhaps change only one colour version first to test if it works in game.


Oh and you don’t need my permission for this =). But it would be nice if, when you upload your recolours, you also link to my edits of the Maxis versions (so that people can have cabinets and bars that all work the same way, light-wise).


--

Theoretically, maybe, one could also edit the actual cabinet shader itself (replace it with the Counter one), but I don’t know where else it is used in the game, so that might have unexpected / undesired side effects. Maybe ask the SimGurus about that? They would probably know best what it is used for.

Also, I don’t know whether there’s a way to make S4S/TSRW take overrides into account when cloning. That would be the simpler way of copying stuff from overrides, rather than re-do all the edits.
Screenshots

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Forum Resident
Original Poster
#3 Old 26th Jan 2015 at 5:15 PM
ooookey! I got it all right and fixed the bar and long counter light issue!

I've tried to edit the OBJD & COBJ for the no-drop fix for the cupboards but couldn't make it work. I changed all the placement flags (i'm guessing here.. first i tried changing all the first 8 to 0.. nothing, then i changed everything.. and nothing). Changed all the placements from the OBDJ and the placement from COBJ. Is it something else that im clearly missing?

Thanks so much for all the crystal clear explanation :D
Pettifogging Legalist!
retired moderator
#4 Old 26th Jan 2015 at 5:18 PM
For the no-drop stuff, best make a new thread please, that is technically totally different from this. But good to hear you got the shader thing to work! =) I might make a small tutorial on how to do that kind of “alias” object in general, since it sounds like that’s where you’re getting stuck .. but that won’t happen today, maybe not until the week end either. In the meantime you could try comparing the OBJD/COBJ resources from my mod with the original ones, that might help you to see what the differences are exactly.

(What do you mean by “long counter issue”? Can you post a screenshot? Just in case I missed fixing some Maxis object again, like with the bars )

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Forum Resident
Original Poster
#5 Old 26th Jan 2015 at 5:36 PM Last edited by missgothika : 26th Jan 2015 at 11:45 PM.
haha no. you didn't missed anything. I meant the long type cabinet from the cupboards. it's in the previews you linked in your first reply. I compared them both, but i must be missing a difference. i'm going check and recheck. if i can't find it i'll do another thread, sorry!.

edit: scrap all that! it Works too i don't know how i missed it (wether i forgot to delete the cache or had a previous file versión of the edited file) anyway. i got everything working i'm so happy, thanks so much. of course i'm going to link every of your files and this thread too when i post the download. now i have to do some minor edits and do the swatches. thanks so much :D

edit2: arh.. i think i'm doing something wrong with the bar. i changed all the PHONG shaders to COUNTERS and when i go in game only one texture shows up repeated in the next 2. So all swatches have the same first texture. Any idea?

I changed the MLOD 00, 01 and MODL 00. From chunk 12 to 1C.
Pettifogging Legalist!
retired moderator
#6 Old 27th Jan 2015 at 12:38 AM
Can you post your package perhaps? I wouldn’t know how changing the shader would affect which texture is being used, so I guess there might be something else in your package that went haywire .. hard to tell what it could be without being able to look at it.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Forum Resident
Original Poster
#7 Old 27th Jan 2015 at 1:33 AM
Quote:
Originally Posted by plasticbox
Can you post your package perhaps? I wouldn’t know how changing the shader would affect which texture is being used, so I guess there might be something else in your package that went haywire .. hard to tell what it could be without being able to look at it.


that's exactly my reasoning. I finally fixed the file by redoing it (for the third time) this time all in s4s. I changed the shader from the warehouse and it worked. i don't the slightest idea. Do you wan't me to still send you the file?
Pettifogging Legalist!
retired moderator
#8 Old 27th Jan 2015 at 10:24 AM Last edited by plasticbox : 27th Jan 2015 at 11:05 AM.
It would stil be interesting, yes -- maybe you aren’t the last person who wants to recolour this bar or fiddle with shaders for some other reason. Also is weird because changing the Maxian bars did work for me exactly like I described above (I hex edited those files), and that was only two days ago so it’s definitely the same game version and all .. I wonder whether the problem is because your clone is different somehow, or because you broke it in some way that could be avoided in the future if I’d amend my instructions above.

If you don’t want to post your finished version here, you can send me a PM too. Maybe (if you still have that) even of the unchanged version too (i.e. where the textures were working but the shaders were still untouched). Actually, best would be if you could provide 1. your original version (working textures, worng shaders), 2. one of the broken ones, and 3. the final one. I hope I can figure out from that where it went wrong.

Thanks!


(Also, did you break it by hex editing or by changing the shader fields manually? With the former, it can happen (would be rare but not impossible) that the same four bytes are also used elsewhere and by using “Replace All” you changed more than you wanted .. )

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Back to top