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!
Instructor
Original Poster
#1 Old 1st May 2017 at 5:45 PM Last edited by whoward69 : 3rd May 2017 at 1:09 PM.
Default Renaming an object
Is it possible to rename an object dynamically? A bit like how you can change its texture.

Eg, one OBJD, but two (or more) CTSS entries, can I swap what the object is called somehow by changing its associated CTSS entry (I notice that memories have male/female versions so ...)

Edit: Or another option, is it possible to put two or more objects in the same private package and associate them with different CTSS entries (I know how to get two or more OBJD entries in the same package, I just can't work out what the magic association between the OBJD and CTSS entries is)

Might help if I gave more details - so you can't include strings into dialog/notification text (like you can with numbers), but you can use $NameLocal:X to include the name of an object, so if I can create an object with the name of the text I want to insert ...

But I really don't want the mod to have four package files (the master object and three sub-objects of the correct names) as that's just messy. I could have 1 object and 4 names for it, or 4 objects with their own names, but I'd like them all in the same package. If not, as the text is just the icing on the cake, I'll just have one named object in the single package.

Just call me William, definitely not Who-Ward
Advertisement
Scholar
#2 Old 2nd May 2017 at 4:02 PM
The CTSS is linked in the OBJD by it's instance value. The line in the OBJD (in Raw Data) at 0x0029 'catalogue strings id' is the one to change.
Instructor
Original Poster
#3 Old 2nd May 2017 at 10:30 PM Last edited by whoward69 : 16th May 2017 at 12:31 PM.
Oh yeah! It worked

Code:
$Me's Business Badges
(out of 1000)
  Cash Register  $NameLocal:1  $Local:0
  Cosmetology  $NameLocal:3  $Local:2
  Flower Arranging  $NameLocal:5  $Local:4
  Robotery  $NameLocal:7  $Local:6
  Sales  $NameLocal:9  $Local:8
  Stocking  $NameLocal:11  $Local:10
  Toy Making  $NameLocal:13  $Local:12


4 sub-objects (cloned from very simple tokens- OBJD + OBJf + CTSS) called "(No Badge)", "(Bronze)", "(Silver)" and "(Gold)" get created off-world and stored in attributes on the main object (removed during cleanup) and then the correct OID is put in Local 1, 3, 5 etc depending on the badge progress

Edit: I've worked out how to do this with $PrivateString:X:Y, but as that requires the Stack Object ID to be an instance of the object that contains the private string table, if I go that route I can't keep the icon of the Sim that clicked on the object

Just call me William, definitely not Who-Ward
Née whiterider
retired moderator
#4 Old 2nd May 2017 at 10:37 PM
Oooh, fancy! I'd love to do this for diplomas - so that when the diploma is generated the name is set to "$Sim's Diploma in $Major".

What I lack in decorum, I make up for with an absence of tact.
Back to top