Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

Creator Theme: Space! - posted on 8th Jul 2018 at 6:02 PM
Replies: 15 (Who?), Viewed: 4514 times.
Top Secret Researcher
Original Poster
#1 Old 7th Aug 2017 at 5:32 PM
Default Changing Textures via Pie Menu
I have multiple objects and it's extremely fiddly to change their texture one by one with the design tool. So I created a stand alone "design block" object with pie menu functions to change the textures on everthing at once instead of one by one. It seemed easy enough and I thought it worked - all of the textures change on the lot just like I want them to - but the changes don't save. This is what I'm using:

Can anyone help me with a bhav that changes the textures on different objects by GUID (like this one does) but makes those changes stick when you save and exit the lot?
Lab Assistant
#2 Old 7th Aug 2017 at 7:56 PM
I can't say much but throw the theory out there, but could it be that the objects themselves need to have the required info for state/material changes? You could look at lamps and their "Turn on/off... All" function.

I'm http://crispsandkerosene.tumblr.com/ on tumblr, admittedly not very active on MTS.
Top Secret Researcher
Original Poster
#3 Old 7th Aug 2017 at 11:39 PM
Thanks, Azelanne. I've looked at lights, snowmen, shrubs, counters and tubs to see if there was something I could use. The snowman seemed like it would be the most promising since the textures are changed via pie menu but if the answer is there in any of those objects I don't see it.
Lab Assistant
#4 Old 8th Aug 2017 at 4:43 PM
Aww, sorry for stating the obvious :x

So, after looking into actual SimPE stuff I may have found a few more leads:
- Random objects with material changing functions added (I used my ice cream cones as a tester) seem to retain the right ones upon reloading. This makes me think the issue lies with having an object change another's material. Maybe having the block directly handle the other objects' texture change doesn't allow them to properly retain the info?
- I looked into the Lamp globals and their "Interaction - Turn ON - Room/Lot" functions. In order to 'affect' the other lamps in the room, it sets one as the stack object then calls/pushes "Interaction - Turn ON". This function exists for every lamp, which then handle the state change within themselves. I imagine you'd need a similar setup for your objects and their design block, with a BHAV with the same name and instance in every package + the needed lists.
- Lamps also have the "Function - Design Mode" called on load in the Object Function thingy. Since this seems to handle the Lit/Unlit state, it's probably not relevant here.

Anyways, I hope you can figure it out and create one of your usually awesome bits of CC :3

I'm http://crispsandkerosene.tumblr.com/ on tumblr, admittedly not very active on MTS.
just a girl
#5 Old 9th Aug 2017 at 8:18 PM
I'm guessing, there might be something else that changes textures. For example, an instruction to check an attribute and set material according to that attribute (objects sometimes do that on load or as part of other routine). First, I'd look for it in Load, Main, Start Live mode and other object functions.
It is possible to change material of object A through object B. I've done that.
Top Secret Researcher
Original Poster
#6 Old 12th Aug 2017 at 3:44 PM
I was hoping the solution would be something simple and obvious that I was missing (my understanding of bhavs is limited) but at least I have a new place to start which I appreciate. Thank you both for the ideas!
just a girl
#7 Old 12th Aug 2017 at 4:51 PM
As for your bhav:
1) if line 6 fails it goes to line 8, so basically you're performing "clear hidden flag 1" on ALL things on lot that are not persons, which I don't think is your intention.
2) you save stack object's room number in local 0, but you don't use it after. You go through whole lot, instead of one room. Is that what you want?
3) line 0 doesn't seem to do anything useful, it just confirms that 1=1.
Top Secret Researcher
Original Poster
#8 Old 12th Aug 2017 at 6:56 PM
lol You're giving me too much credit in regards to intentions, Lamare, but thank you. Could these things be the reason the material changes don't save?

I don't know what the clear hidden flag 1 does or even why it's there but it was the first thing I removed when I realized the materials were changing but not saving. When I removed it the textures wouldn't change at all so I put it back... Also, I want to change the textures of every object on the lot with those GUIDs so I'd think I do want to go through the whole lot? And line 0 isn't doing anything useful - I just took it out and everything worked exactly the same.
just a girl
#9 Old 12th Aug 2017 at 7:27 PM
Originally Posted by Honeywell
Could these things be the reason the material changes don't save?

I don't think so, but anyway, if line 6 (second test of object type) fails, it should point to line 3 (set to next). You don't want to mess with flags of everything on the lot, except for particular objects.

I looked the hidden flag 1 up - it's "Hide Model(s)". If you don't know why it's there, I guess, someone else put it there?

I may be able to help better if I looked at the objects myself in SimPE - the one that changes textures and the ones whose textures are changed. If you'd like to keep them in secret, post contents of those objects' Load and Main functions, for a start.
Top Secret Researcher
Original Poster
#10 Old 12th Aug 2017 at 8:26 PM
I would love for you to take a look, thank you! If it's something simple - like I thought it was going to be to do this - that would be great. But please don't put yourself out, my project doesn't depend on this at all. This is just a small quality of life mod (with very limited use) that would be nice to have but I don't need it.

(A bit convoluted but I've included the stand alone master object, 2 of the fascia board meshes slaved to the master, the white recolors and the design block.)

ETA: The bhav is one julsef let me use years ago for my chair/loveseat omsps.
Download - please read all instructions before downloading any files!
File Type: zip bespokeBuildSet.zip (948.8 KB, 11 downloads) - View custom content
just a girl
#11 Old 13th Aug 2017 at 11:23 AM
I'm sorry, I couldn't even figure out how to use objects in game to test them. Those from architecture tub are invisible. Even though you wrote instructions in description, I failed. I didn't see anything obvious in packages either, so I'm puzzled to death.
Top Secret Researcher
Original Poster
#12 Old 13th Aug 2017 at 4:25 PM
lol I am so sorry! I've been using these for so long now I forgot they're new and not self explanatory. Those two meshes are roof deco positioned to work as fascia board around a porch - there's a good chance that Seasons or later is required for them to work properly (I haven't tested any of that stuff yet) but they should still show up as long as they're not placed on the ground. Here's a pic:
Attached Images
Née whiterider
staff: administrator
#13 Old 13th Aug 2017 at 5:14 PM
You've attached the thumbnail instead of the fullsize pic there, Honeywell

What I lack in decorum, I make up for with an absence of tact.
Top Secret Researcher
Original Poster
#14 Old 14th Aug 2017 at 1:42 PM
Thanks, Nysha. It is small but, no, that's the full size. I think it's enough to show how these are used?
Field Researcher
#15 Old 14th Aug 2017 at 3:46 PM
This is not going to work the way you hope, when you select a colour for an item in the catalogue the game uses and stores the material override for the item. Changing the texture via an op-code just changes the material definition not the material override so the game 'fixes' it to it's material override when it next loads.
What you can do is use an attribute to store your new chosen colour and add a 'load function' to change the material to the value of that attribute if the attribute is a non zero value. Your 'change colour tool' will need to also set that attribute when it sets the colour.
I have several 'Paintable' vehicles that use that method to 'save' the colour that sims paint their car.
just a girl
#16 Old 14th Aug 2017 at 8:48 PM
Ah, I changed materials on a non-recolorable parts, so maybe that's why it worked in my cases.
Sorry, Honeywell.
Back to top