Replies: 59 (Who?), Viewed: 20922 times.
Page 2 of 3
Retired Duck
retired moderator
#26 Old 30th Jan 2011 at 12:01 PM
They're templated NPCs. You can filter them out by family (Neighbor's family number == 0x7FFF), but you'll filter them all out. No maids, gardeners, firemen, they'd all get removed until they moved in with a playable family.

You can just change the values for the BHAV directly, but I just copied them out of another object which I knew had the thought bubble in it. In this case, the "Pensieve" from the Harry Potter project. Then you've just got to try adjusting numbers until the relevant values have changed to point at your sim.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#27 Old 30th Jan 2011 at 9:05 PM Last edited by Phaenoh : 1st Mar 2011 at 4:22 AM.
More progress, this is getting so close to being done, I can practically taste it! I noticed the exact animation I was looking for in the Snake DeathEater book thing in the Harry Potter Project you sent me to, a quick read through your tutorial and they settled in nicely. What happens when I direct a child to use by book but there is only the one adult animation? Do all the other ages do the adult animation, or does it skip over it, or what?

1) Is there some way I can filter out Social Bunny and Social Worker by their names, there are only a few NPC who shouldn't be in my list still. Name == Social Bunny --> false ?
2) My thought bubble is now correctly popping up when I want it too, but its got those grey vertical broken lines and a red X through it. How do I tell it to use the neighbor I just looked up instead?
Screenshots
Retired Duck
retired moderator
#28 Old 5th Feb 2011 at 8:55 AM
To filter out non-templated NPCs, you should be able to block by their GUID. Clone them, get their GUID, and run a check on that.
For the thought bubble, try changing the "icon" to "Neighbor in stack object 0x0000" (13th opcode changed to 0x18).
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#29 Old 5th Feb 2011 at 8:51 PM Last edited by Phaenoh : 6th Feb 2011 at 5:24 AM.
No dice for the thought bubble, gonna try the NPCs now.

Edit: After a very long and winding road, I have discovered which sims from the NPC family are callable and which are not. I've adjusted the filter accordingly and now the phone book only lets you look up sims you can actually call. Maids you can call, gardeners you can't. Half of the Police force is callable (not sure whats going on there), firemen are not. Pizza is, Chinese is not. I have *no* idea where the logic for all this came from, but whatevs.

Also did testing with children and got them to do the correct animation as well. The only thing left is that darn thought bubble. I've done searches on MTS, and there really doesn't seem to be any information on them at all. At each different lot I test this at, a random image seems to be chosen and then they always use that instead. Its like its not reading in the correct thing. Is there a better place I can stick it in the code to make it read in the info more clearly?
Retired Duck
retired moderator
#30 Old 7th Feb 2011 at 12:13 PM
Moving it around in the code won't help much, the problem is almost certainly that we're giving it a wrong value in one of the opcodes. Problem is, it's not one of the frequently used commands, so there's not a lot of info which makes it a bit hard to pinpoint. It'll be either the icon or the model which needs to be changed, and somehow it needs to be pointing to the neighbour currently stored in Stack Object ID, but I'm having trouble pinpointing how without an object to source it from.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#31 Old 7th Feb 2011 at 3:26 PM
Dangit. I hate it when I come up with a problem you can't immediately solve. My younger sisters are from that immediate gratification generation and sometimes it rubs off. lol

Ok, brainstorming time.... The telescope during the day manages to pop up a thought bubble of the nearest lot neighbor, how does it do that? Or when trying to use something and another sim is using it sometimes that brings up a person thought. Or when a really hott (or not) sim walks into the room others think about them, or when they are stinky. Sims dream about other sims, or they write about them in their diaries. Um...not sure what else. I think that telescope might have what we need though. /me crosses fingers
Retired Duck
retired moderator
#32 Old 8th Feb 2011 at 12:21 PM
Well it's definitely used in the telescope...

Not really sure about what the actual difference is, but try these operands?
00030B00270004D4120285040A000000
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#33 Old 9th Feb 2011 at 3:45 AM Last edited by Phaenoh : 1st Mar 2011 at 4:21 AM.
Nope, still showing that grey vertical lines picture in the thought bubble. When a sim calls into the lot and my sim answers they pop up a thought bubble with the person they are talking to, would that help?
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#34 Old 22nd Feb 2011 at 4:06 AM
I'm not making much progress on this anymore, have you Echo? I'm starting to think I need a backup plan for the thought bubble instead. I don't want to leave the object without any user notification, but I don't know how to get the sim we've looked up into a thought bubble or a notification. Maybe just use the icon for a phone call? Shouldn't it be easier to call than a variable icon?
Retired Duck
retired moderator
#35 Old 26th Feb 2011 at 11:30 AM Last edited by Echo : 26th Feb 2011 at 11:34 AM. Reason: Punctuation is for winners!
Sorry for taking so long! I'm pretty much failing at life this week!

The new, attached version works for me. Hopefully it works for you too!
Download - please read all instructions before downloading any files!
File Type: zip Phaenoh_PhoneBook12.zip (47.5 KB, 7 downloads) - View custom content
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#36 Old 26th Feb 2011 at 5:41 PM
IT WORKS!!!! I love it! Thank you so much Echo!!!! This is brilliant now.

I'm gonna try to turn down the shine on the mesh a bit and then its getting uploaded. YAY!!!! SPAZTASTIC!!!
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#37 Old 27th Feb 2011 at 3:11 AM
Uh oh, HL is reporting some issues with Basegame testing, which I expected, and with Seasons, which I did not expect.

I'm gonna do some more indepth testing and see what works and what doesn't and see if there's a pattern.
Me? Sarcastic? Never.
staff: administrator
#38 Old 27th Feb 2011 at 3:12 AM Last edited by HugeLunatic : 27th Feb 2011 at 3:38 AM.
After testing this in a base only and base+seasons AGS, both had bad gosub errors. Each one is a bit different. Attaching for someone with more brain cells than me to look at. :P

Edit: A Pets+Seasons also gives errors. :/
Download - please read all instructions before downloading any files!
File Type: rar Errors.rar (31.1 KB, 7 downloads) - View custom content
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#39 Old 27th Feb 2011 at 6:02 AM
HL said the problem BHAV is the one deciding which sims should be in the list. It specifically mentions sims from different EPs. Im thinking the basic idea is we need to have it check to see if that EP exists before asking about those types of sims. HL and Lee said that Numenor had lines of code that question the EP in his Postcard rack. I've got no idea how any of that works, but I copied some of it and I'm gonna hope it works...
Retired Duck
retired moderator
#40 Old 27th Feb 2011 at 8:18 AM
Yeah, I had those problems while I was testing it, but I just commented out the EP-specific lines. I didn't realise you were aiming for base game compatibility.

For the ones which are referencing BCONs, you can just substitute in the equivalent literal value, so something like:
[prim 0x0002] Expression (Neighbor's person data 0x00BA (Species) == Const 0x0171:0x01 ("Large Dog" Value: 0x0001))
becomes
[prim 0x0002] Expression (Neighbor's person data 0x00BA (Species) == Literal 0x0001

For things like the "Sim - Is Vacation Sim", you'll need to do an EP check first.
Doing all the things, and *mostly* not failing.
retired moderator DELETED POST
Original Poster
27th Feb 2011 at 6:07 PM
This message has been deleted by Phaenoh. Reason: seriously server, double posting?
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#41 Old 27th Feb 2011 at 6:10 PM Last edited by Phaenoh : 27th Feb 2011 at 8:25 PM.
Aim for the best! Lee said I had to try.

Thanks for the tip on the Literal value stuff. Does that mean that a Pet Value 0x0002 would become Literal 0x0002? Or am I not translating that correctly? I have a bunch of lines saying Expression (Neighbor's person data 0x009B (NPC Type) == Const 0x0132:0x08 ("Burglar" Value: 0x0004)). Does that change to Expression (Neighbor's person data 0x009B (NPC Type) == Literal 0x0008?

As for the Vacation Sim stuff, a lot of that code got put in when I was testing on a borked hood to begin with, we kept adding code but the vamps and the vacas never showed up because they didn't exist in the first place. I'll try skipping those lines and see what I get then.

I also have a couple lines of code that check for family number (NPCs and Strays), are those going to throw errors in basegame?

Later: Swapped out the code for the pets and skipped over the Townie and Vaca sims lines and there was no change in my sims list. Now it just comes down to a bunch of specific NPCs... Imma try my above guess and see what happens.

More Later: Fail. I must not be translating the constant values of the NPCs to literal values correctly. None of them showed up in my list.
Retired Duck
retired moderator
#42 Old 28th Feb 2011 at 10:16 AM
Quote:
Originally Posted by Phaenoh
Expression (Neighbor's person data 0x009B (NPC Type) == Const 0x0132:0x08 ("Burglar" Value: 0x0004)). Does that change to Expression (Neighbor's person data 0x009B (NPC Type) == Literal 0x0008?


Wrong value.

Expression (Neighbor's person data 0x009B (NPC Type) == Const 0x0132:0x08 ("Burglar" Value: 0x0004)).
changes to
Expression (Neighbor's person data 0x009B (NPC Type) == Literal 0x0004
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#43 Old 28th Feb 2011 at 3:30 PM
Ahg, thwarted by something simple. Well, at least it should be an easy fix.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#44 Old 1st Mar 2011 at 4:20 AM Last edited by Phaenoh : 2nd Mar 2011 at 5:07 AM.
I finished off the BHAVs and I think I'm ready for testing. Can I get some help testing it in basegame?

Later: I fixed all the search code for the EP sims. Upon testing in basegame it bugged out. Error: Bad gosub tree number. Then I went back and checked and changed all the 8009s to 8007s because of something I remember Pescado telling me once. That one also bugged out. Error: Search type is invalid. Types are 0: all motive, 1:mental motives, 2:physical motives. I have error logs for both and I don't know what to do to fix it.

Later: After further testing, I've found out that the current version works perfectly in every game environment except base and uni. This makes sense as uni wasn't a full fledged EP at all. How hard is it to make this basegame compatible, or should I just go ahead and have it require any EP above uni?
Download - please read all instructions before downloading any files!
File Type: rar Phaenoh_PhoneBook15.rar (82.5 KB, 11 downloads) - View custom content
File Type: rar Error Logs.rar (21.7 KB, 5 downloads) - View custom content
Retired Duck
retired moderator
#45 Old 2nd Mar 2011 at 10:20 AM
The second error (Bad gosub tree number.) is almost certainly caused by using 8009 format BHAVs in a base game (8009 type BHAVs were invented for Pets I think). You can normally fix that by re-creating the 8009 BHAVs line for line in an 8007 format. (You can try just changing the format in the drop down, but that only works some of the time).

The first error is a bit stranger though. It looks like we're using a Set To Next type in Sub - Load Sim Array, which didn't exist before a particular EP. I think you'd probably fix that one by changing it to Set To Next (Neighbor Id) and putting in a separate check on the relationship immediately after, but I can't say for sure.

Not sure why you don't think Uni was a full EP though, that's news to me!
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#46 Old 2nd Mar 2011 at 3:35 PM Last edited by Phaenoh : 3rd Mar 2011 at 3:21 AM.
It was coded as the SPs are, it didn't change game version code or something. Likewise, MG is actually an EP and not an SP in the same way. I found a thread about it long time ago, think Numenor was involved. I've seen CC that requires any EP except Uni, cuz it still uses the basegame code, they didn't fix the game to handle EPs till NL. I remember where I got that from, its from a lot compatibility stand point. You can install lots that used Uni without, and you can't install MG lots without it. CC sometimes worked that way to.

I think you have might that backwards. The first error was a bad gosub. It was using 8009s and then I changed them to 8007s and got the second error when I tested the 8007s. So, you are thinking that if I change to 8007s and then fix the Set to Next I should be ok? What type of relationship check are we talking about here?

Later: I put all the 8007s back, and switched the 'Set to Next (SO id, Neighbor with 0 relationship)' to 'Set to Next (SO id, Neighbor) and followed it up with an 'Expression (Neighbor in stack object 0x0004 (relationship score) <= Literal 0x0000)'. That didn't work out so well, I ended up with an error relating to a mailbox... o.O

Object id: 197
name: N001_User00011 - Don
Stack size: 9
Error: Person data field is out of range.
Iterations: 16
Frame 8:
Stack Object id: 1
Stack Object name: MailBox
Node: 2
Tree: id 4115 name 'Sub - Do I want this sim in the list?' version -32745
from SIMPE_PHAENOH.PHONEBOOK_CRES
Prim state: 0
Params: 1 Locals:

Can you teach me how (or link me to a resource) to read these things? I'm assuming that the first couple of frames are the important part, but I don't even know that much.

Getting kinda bummed about this silly thing now. It was so close, I have the post pictures ready already. Halps plz
Retired Duck
retired moderator
#47 Old 3rd Mar 2011 at 9:01 AM
This one:
http://modthesims.info/showthread.php?t=212101
explains how to read stack traces, under the part "How this relates to your error log"

Your stack trace says that:
in "Don"s stack of commands, there was an error. That error was that the "Person data field is out of range" for the current command, which was from a line the BHAV with the "id 4115" ( = 0x1013 ) which has the name "Sub - Do I want this sim in the list?". It was trying to run Node: 2 ( = line 0x02 ) at the time the error occurred. The Stack Object ID variable contained the value 1. If that were, in fact, an object ID, then it would be pointing to the mailbox. However, you're storing a neighbor ID in there, not an object ID, so the mailbox thing is a red herring this time round.

To see what's happened, I'll need the object. The line which is erroring is one of the lines which you changed, so I can't see it.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#48 Old 4th Mar 2011 at 2:47 AM
:wimpers: I broked it. fix?
Download - please read all instructions before downloading any files!
File Type: rar Phaenoh_PhoneBook16.rar (82.5 KB, 6 downloads) - View custom content
Retired Duck
retired moderator
#49 Old 11th Mar 2011 at 10:34 AM
Hokey dokey then! Two issues:

1. Apparently, the "Species" flag didn't exist in the base game. I have put in a check to skip those comparisons if it's a base game environment.

2. You had both the True and False targets of the "Set To Next" in "Sub - Load Sim Array" pointing to the next line. That will freeze your sim permanently.

The attached works in my base game, but you might want to give it a quick run through with one or more EPs, just to ensure that bypassing the species check in the base game hasn't affected any of the others.
Download - please read all instructions before downloading any files!
File Type: zip Phaenoh_PhoneBook16.zip (78.6 KB, 12 downloads) - View custom content
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#50 Old 11th Mar 2011 at 7:17 PM
I just tested it in my full game, works beautifully, however after finishing the thought bubble there is a tiny jump in the sim. I'm going to look into that before posting. MUST BE PERFECT!! I also want to test out some other game configs. Thanks again!
Page 2 of 3
Back to top