Welcome to
Mod The Sims
Online: 1135
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 15 (Who?), Viewed: 3651 times.
Search this Thread
Old 7th Aug 2017, 5:32 PM DefaultChanging Textures via Pie Menu #1
Honeywell
Original Poster

Top Secret Researcher

Join Date: Jul 2008
Posts: 1,677
Thanks: 52992 in 76 Posts
30 Achievements

View My Journal


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?
Screenshots
Click image for larger version

Name:  changeMaterial.JPG
Views: 0
Size:  161.8 KB  
Old 7th Aug 2017, 7:56 PM #2
Azelanne
Lab Assistant

Join Date: May 2008
Posts: 92
Thanks: 202 in 13 Posts
6 Achievements


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.
Old 7th Aug 2017, 11:39 PM #3
Honeywell
Original Poster

Top Secret Researcher

Join Date: Jul 2008
Posts: 1,677
Thanks: 52992 in 76 Posts
30 Achievements

View My Journal


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.
Old 8th Aug 2017, 4:43 PM #4
Azelanne
Lab Assistant

Join Date: May 2008
Posts: 92
Thanks: 202 in 13 Posts
6 Achievements


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.
Old 9th Aug 2017, 8:18 PM #5
Lamare
just a girl

Join Date: Jan 2014
Posts: 650
Thanks: 3351 in 26 Posts
16 Achievements


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.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Old 12th Aug 2017, 3:44 PM #6
Honeywell
Original Poster

Top Secret Researcher

Join Date: Jul 2008
Posts: 1,677
Thanks: 52992 in 76 Posts
30 Achievements

View My Journal


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!
Old 12th Aug 2017, 4:51 PM #7
Lamare
just a girl

Join Date: Jan 2014
Posts: 650
Thanks: 3351 in 26 Posts
16 Achievements


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.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Old 12th Aug 2017, 6:56 PM #8
Honeywell
Original Poster

Top Secret Researcher

Join Date: Jul 2008
Posts: 1,677
Thanks: 52992 in 76 Posts
30 Achievements

View My Journal


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.
Old 12th Aug 2017, 7:27 PM #9
Lamare
just a girl

Join Date: Jan 2014
Posts: 650
Thanks: 3351 in 26 Posts
16 Achievements


Quote:
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.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Old 12th Aug 2017, 8:26 PM #10
Honeywell
Original Poster

Top Secret Researcher

Join Date: Jul 2008
Posts: 1,677
Thanks: 52992 in 76 Posts
30 Achievements

View My Journal


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, 9 downloads) - View custom content
Old 13th Aug 2017, 11:23 AM #11
Lamare
just a girl

Join Date: Jan 2014
Posts: 650
Thanks: 3351 in 26 Posts
16 Achievements


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.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Old 13th Aug 2017, 4:25 PM #12
Honeywell
Original Poster

Top Secret Researcher

Join Date: Jul 2008
Posts: 1,677
Thanks: 52992 in 76 Posts
30 Achievements

View My Journal


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
 
Old 13th Aug 2017, 5:14 PM #13
Nysha
Née whiterider



Join Date: Jul 2005
Posts: 19,685
Thanks: 42617 in 92 Posts
36 Achievements

View My Journal


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.
Old 14th Aug 2017, 1:42 PM #14
Honeywell
Original Poster

Top Secret Researcher

Join Date: Jul 2008
Posts: 1,677
Thanks: 52992 in 76 Posts
30 Achievements

View My Journal


Thanks, Nysha. It is small but, no, that's the full size. I think it's enough to show how these are used?
Old 14th Aug 2017, 3:46 PM #15
Chris Hatch
Lab Assistant

Join Date: Dec 2005
Posts: 201


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.
Old 14th Aug 2017, 8:48 PM #16
Lamare
just a girl

Join Date: Jan 2014
Posts: 650
Thanks: 3351 in 26 Posts
16 Achievements


Ah, I changed materials on a non-recolorable parts, so maybe that's why it worked in my cases.
Sorry, Honeywell.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.