Replies: 6 (Who?), Viewed: 3074 times.
Lab Assistant
Original Poster
#1 Old 28th Feb 2019 at 1:28 PM
Default 3 questions
I've got several projects going at the same time, and they're all rather stumped. So the questions are:

1. Can a neighbourhood become a stack object?
I'm looking to read String 0 of the CTSS, the sub-neighbourhood's name. It seemed that while it does read Global - Current Neighborhood ID into my variable, it then looks for the object with that id on the lot. Ended up with a string saying "Portal - something something".
Failing this, and finding out about $PrimaryNeighborhood, i've tried $CurrentNeighborhood, $Neighborhood (which recognises $Neighbor and then adds "hood" to whichever nID it's working with), $University, $SubNeighborhood. Now i'm wondering, if i do find that magic word, how can i assign its value to a variable/an attribute? If the attribute itself is $MagicWord, won't it be changing all the time, according to the Sim's residence?

2. Is there a TTAB cache?
Particular situation: my spell text replacement mod has been out of the game for a while, then back in with mixed results:
- leaf pile, puddle, fire and ground tile -- all ok;
- time-turner menu on self-click (that's the Tempus Interruptus/Resumo taken out of Cast spell) -- ok;
- anything under Sim/other Sim menu of Cast spell.../ -- not ok, they've reverted to the original.
Haven't added any CC that modifies a Sim's pie menu, and at any rate there's no conflict detected by the utility. I've checked a few households to see if there's any action queued from that menu, without success. Should i keep looking, is this a likely cause?

3. Has anyone worked with the Personal Wealth Token? (GUID 0x2CEB51AC)
I would like to add a value display to the Bonsai of Wisdom, so that i'm aware when the Sim has earned 500k and 1m, to manually add custom memories. Getting Nth property seems to land me with what's under 1k, and trying to look at other properties resulted in a jump bug.

I'd be grateful for any ideas anyone might have. Thanks.

saint_diana, true Ravenclaw, perpetually amused that Galadriel is Arwen's granny
#2 Old 28th Feb 2019 at 1:44 PM Last edited by Chris Hatch : 28th Feb 2019 at 2:13 PM.
1) No. Neighbourhood ID is not and can not be treated as an object id, you can assign a local to the required neighbourhood and use $NeighborhoodLocal: in a text string.

2) Check the test op-code in the menu item, it probably uses an action string which overrides the menu string

3) Owing to the limits of the hex values once a value becomes too high it becomes a negative value, 32,767 (0x7FFF) is the highest before it becomes negative.
Lab Assistant
Original Poster
#3 Old 28th Feb 2019 at 2:11 PM Last edited by st_d : 28th Feb 2019 at 4:53 PM.
That was quick, thank you for taking the time.
1. Sneaky i'll try that in a minute, i think coffee is required.
2. I'll go check, however i'm failing to see how something that worked initially has now reverted, when i haven't made any changes to it.
3. There's definitely an original memory for earning 100k, how did they accomplish that then? Is there another property that stores how many times the flip was made? But why 1k though? The test family for this has Mama $5 from a painting, Kid $250 from good grades, both displaying correctly, and Papa over $5k (memory achieved) but showing 62.
Progress report:
Judging by how the error log says i'm referencing a parameter when there is none, i'll guess that assigning that magic word to a STR# line and from there to an attribute doesn't just stamp the value over, but uses the whole $ and Local:5. Going to keep digging.

saint_diana, true Ravenclaw, perpetually amused that Galadriel is Arwen's granny
#4 Old 1st Mar 2019 at 2:37 PM
Neighbourhood IDs are difficult to work with, there is no 'Set to Next' for them so going through them or counting them is difficult.
I suggest you take a look at the code in (31.4 kB) which displays the neighbourhood name frequently. Note the op-code 'Get in Temp 0 - ID - Next Neighbourhood' which returns the next sub-hood Id in Temp 0 and it's type in Temp 1.
Lab Assistant
Original Poster
#5 Old 1st Mar 2019 at 5:01 PM
Thank you for that, i'll have a detailed look.
The problem, however, remains. I have been able to use $NeighborhoodLocal:5 in an immediate notification (thank you for that too, the wiki's String Substitution page didn't/doesn't have it), while the Sim still lives in that neighbourhood, but what i do need is its name added to an object's attribute to call upon later. Even a century later. It won't help to cycle through neighbourhoods then, because there won't be any record of which might be the right one. I guess what i need is for the referenced string to become just a string instead of a reference, copied ad literam.

saint_diana, true Ravenclaw, perpetually amused that Galadriel is Arwen's granny
#6 Old 2nd Mar 2019 at 3:06 AM
Simply store the Neighbourhood id number in the attribute for later recall, it can be converted to string using $NeighborhoodLocal: when needed. There is probably no other way.
Lab Assistant
Original Poster
#7 Old 2nd Mar 2019 at 5:37 PM Last edited by st_d : 5th Mar 2019 at 2:20 PM.
I'd been trying to account for the possibility of the NH not existing anymore at the time of reading, that's why i wanted the string, but i'll turn that into a warning for users. So... it worked!! Finding a default setting for the old instances of objects (without this new attribute) took a fair few tries, but it's ready! I'll nitpick some more and upload later tonight. Thank you very much.

Now. I got my Ravenclaw head on straight and generated a log for the bonsai too, found out the Wealth token has only 2 properties, now to test a bit and see if it's k-s and change, or they need to be multiplied.

And the spells will have to wait.
edit to add: Result is: k-s and change :D. Somehow i thought that if the properties are called 0 and 1 that's what i should reference, when instead it's 1 and 2. And also, it seemed to be throwing fit after fit for returning error instead of false, that took a while to understand ("Undefined transition", that is). If someone wants a look, click below.


saint_diana, true Ravenclaw, perpetually amused that Galadriel is Arwen's granny
Back to top