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!
*shrugs*
retired moderator
Original Poster
#1 Old 12th Dec 2006 at 6:54 PM Last edited by maybesomethingdunno : 13th Dec 2006 at 3:48 AM. Reason: removed old file
Default Help with Multi-state Creation
When you get to the point where you do not have any tutorials to refer to, you do not know what exactly you are doing, and you are changing values just to see what happens with not much luck, it is a good time for some help from the professionals.
Please forgive me if this should have been posted elsewhere.

I have two subsets: the shower and the water. I had to create the water because this is a special shower which lacks an appropriate water/shower effect. Thanks to Numenor, my previous errors have been corrected. The shower is multi-state; it has a "clean" texture and a "dirty" texture. The water subset is not multi-state; the water for the shower runs constantly. I believe I have successfully changed the BHAVs to prevent the shower from becoming dirty or broken naturally (when in the debugging mode via the testing cheats, the shower can become broken or dirty but the "dirty" texture does not show).

I have decided that I would like the water to be multi-state as well. This way I can use an invisible version of the water for when the shower is not in use (i.e. "Water Off") and use my original version of the water when the shower is in use (i.e. "Water On"). But, I do not know exactly what I am doing. Apparrently, I did not reference something or I did not reference something correctly. I say this for two reasons:

1) When I tried to make a BHAV function to switch textures for the water, I could only seem to get the "dirty", "clean", and my original water texture to appear in the the BHAV ([prim 0x006D] Change Material (Target Object: Stack Object ID, Material from: Me (material "##0x1C050000!msd112606-smithcshower_water_animated") Mesh from: Me (mesh group "tiles"))), I cannot get my invisible version of the water texture to appear.
2) The mesh group I think it should be using is the "water" mesh group and not "tiles" which is for the shower base. But, no matter how I change the values, I cannot get the mesh group to change.

I have only made one BHAV function (for turning the water on--turning the water off would a matter of simply cloning the BHAV function and changing a value to switch textures), but I have not done anything further with this BHAV function since there seems to be error(s) somewhere in the other parts of object.

While this post is mainly a cry for help with making the water multi-state, I would not mind if anyone whom wishes to help also made sure I correctly edited the BHAVs to make the shower free from becoming broken or dirty as part of normal usage (not through debugging options).

Thanks in advance.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Advertisement
Instructor
#2 Old 12th Dec 2006 at 9:57 PM
ChangeMaterial primitive reads material and subset names from particular STR# resources - instance 0x88 for materials (usually named 'Model - Materials'), instance 0x87 for subsets (usually named 'Model - Mesh Groups'). So, you have to list your new material and subset to those, after that you can put their numbers from STR# to ChangeMaterial - number for material to opcode 0, number for subset to opcode 3.
Good luck
The ModFather
retired moderator
#3 Old 12th Dec 2006 at 11:25 PM
Maybeetc... In part, it's my fault: when I've fixed you shower, last time, I've renamed the subset "water_default" to "water", but I didn't renamed the corresponding entry in the TextList 0x87 (because the water isn't supposed to change texture, so it was useless).
So, the first thing to do, is to edit the line 0x01 in TextList 0x87.

Then, as suggested by Jasana, you have to setup correctly the TextList 0x88: the first two lines are already correct (clean and dirty texture for the tiles); the third line is correct, too (animated water); you only need to add a fourth line for the "water off" texture. For the purpose, I suggest to write in the fourth line just "doorvalue_null" (which is a "null" material: when you apply it on a subset, the subset becomes invisible).

Lastly, you have to create the needed "ChangeMaterial" BHAVS. In order to do this, I strongly suggest to use the extremely useful wizard included in SimPE, that will let you to adjust the operands of the Change Material instructions very easily (see screenshot).
Screenshots

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
*shrugs*
retired moderator
Original Poster
#4 Old 13th Dec 2006 at 3:48 AM Last edited by maybesomethingdunno : 15th Dec 2006 at 8:01 PM.
Thank you both. This may be because I have not yet downloaded the Pets+ versions of SimPE, but my Wizard button is greyed-out for that particular BHAV. I seem to have gotten it by means of "trial and error" without the wizard though. There is a slight problem however. When I view the object from the Buy Mode screen, it would seem as though there is a recolor of the water that is completely blue that can't be deleted. Whenever the shower is used, the aforementioned flashing blue texture appears. If this flashing blue texture is selected like a recolor in Buy Mode, it remains until after the shower is used. Using the Init -Private BHAV function, I have the shower turn its water off when bought from Buy Mode. I mention this because when I use the Design tool on the shower and click on the non-blue thumbnail for the water subset (even if it already shows the green border indicating the selection has already been made), the animated water texture appears and remains until the shower is used. I do not know if this is a mistake in my BHAV editing or what. I had originally cloned the water texture and replaced the duplicate with a completely invisible texture. If I use "null" texture, this "invisible" texture would unneccessary and I assume would be safe to delete from within the package. I did figure out the "Smoothing" issue with Wings which is good (because it seems I need to adjust my mesh some more since the Sim's foot seems to be going through the shower base).

If this updated version of the package could be looked at, I'd appreciate it.
Again, thank you so much.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
The ModFather
retired moderator
#5 Old 13th Dec 2006 at 9:02 AM Last edited by Numenor : 14th Dec 2006 at 8:39 AM.
Here is what have found.

1) The water is now a multi-state subset; therefore the MMAT for the invisible water should have the "materialStateFlags" set to 0x00001 (this explains why you see two icons for the water in the catalog).

2) The TXMT "msd112606-smithcshower_water_invisible" has a bad TGI; you cloned the animated one and renamed it, but you forgot to click "Fix TGI"; as a result, the Group and Instance of the two TXMTs are the same, and the game can't distinguish between the two (this explain why the invisible water flashes blue).

3) Still in the "water_invisible" TXMT, you forgot to update the name of the texture into the "File List" tab (there is the reference to the "animated" texture)

4) Same TGI problem for the "OFF" texture: you forgot to click "Fix TGI" after cloning and renaming the TXTR file.

5) Not an error, just a suggestion: the "invisible" texture is... uhm... invisible and so, having a texture as large as the animated one is just a waste of resources. You should use a much smaller texture, whenever the texture has to be invisible or anyway has a uniform colour. In this case, since it is completely invisible, I already suggested to use a "null" TXMT, getting rid completely of the "OFF" texture and TXMT. I'm attaching two versions of the fixed package, une with the smaller texture and one with the null TXMT (choose the one that you like more). Notice the size difference: you package 1.176Kb, smallTXTR 827Kb, NullTXMT 825Kb).


PS: remember to clean up the thumbnails (by deleting the packages in the EA Games\Thumbnails folder) before starting the game.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
*shrugs*
retired moderator
Original Poster
#6 Old 14th Dec 2006 at 7:44 AM
I feel I cannot fully express my appreciation for all that you have done, Numenor. Thank you. I think the "null TXMT" version might be best. Unfortunately, I cannot help but think there is an error somewhere. I am certainly not one in a position to second-guess the Modfather and I do not mean to do so. The problem may just be in my BHAV editing.
I did some more editing (mostly using the "trial and error" method) of the "null TXMT" version, but I fear I may have reversed what you fixed (it is good that I have kept your rar file as a backup). I say this because, after I had changed something, the flashing blue texture would appear whenever the "Water On" BHAV function is called. This is the only time I see a texture change with this BHAV; normally (with your versions and mine) the Sim would just shower without the water texture appearing at all. I realize it is not the best water texture ever made, but I still want to see it when I call upon it.

For the most part, the "Water Off" BHAV function works great though. It is referenced in the init BHAV and the water texture does not appear when the shower is bought from Buy Mode (except if you intentionally click on the thumbnail for the water subset in Buy Mode catlogue or Design Tool menu in which case the water does appear, for whatever reason, until the shower is used). The flashing blue texture would disappear when the shower was not in use. I keep going back to your "null TXMT" version as a base for trying to get the textures to work correctly.

Is this an issue with my BHAVs, some minor detail elsewhere that has been overlooked, or what? I know textures are not like you and I, but I am starting to wonder if it just does not like me very much and is refusing to do what I tell it to via the BHAVs.

I'm sorry to keep pushing this. I feel I have used more of your time (I know you are very busy) and site resources than I should have, but I just do not see why the textures are not acting as they should. This is the most advanced TS2 modding I have ever done, so my lack of experience and knowledge is clear. I do not know all of the details of how things work (like when to use dashes and when to use underscores) so most of what I change is just to see what will happen and is based on educated guesses.

It is very late for me, so I will get back with this object some more after I get some sleep (lack of sleep might be part of the problem too ).
Again, thank you so much.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
The ModFather
retired moderator
#7 Old 14th Dec 2006 at 8:38 AM Last edited by Numenor : 14th Dec 2006 at 8:46 AM.
Sorry, my fault; while fixing it the first time, I changed my mind about the right name to assign to the "water_invisible" TXMT, and I forgot to update the TextList 0x88 (it still contained the old "doorvalue_null" entry).

I've fixed it, now; and I also fixed the "Take Shower - Swimsuit" BHAV, because it gave me an error (you forgot to cut away the "set broken" line, like you did with the Take Shower (naked) BHAV.


PS: since you liked the "null TXMT" method, I will take the chance to give a hint about it.
As you can see, this shower contains a "null" TXMT named "water_invisible". I had to physically include it in the package, and assign it a strictly correct name, because the subset is multi-state.

But often, you may need to just make a normal single-state subset visible or invisible: in these cases, there's no need to explicitely include a null TXMT in the package, you can just reference one of the many null TXMT existing in the game (I always use the "doorvalue_null" because it has a simple name to remember )
You can create a MMAT for that subset, and put "doorvalue_null" as Material Definition reference, and you'll get instantly an "invisible recolour" to apply to any recolourable subset.
Or you can put "doorvalue_null" in the TextList 0x88, and you can use it in a Change Material instruction, so to turn a subset on and off at will, via BHAV.
Attached files:
File Type: rar  theSmithCshower.rar (240.6 KB, 9 downloads) - View custom content

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
*shrugs*
retired moderator
Original Poster
#8 Old 15th Dec 2006 at 8:08 PM
Default It works! Hooray! :)
Thank you, Numenor. I fear my ignorance has probably needlessly complicated this project, but I am thankful that there is a site like MTS2 and people like you who can help people like me. Oh, the headaches we must get to give our Sims a shower.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Back to top