r/sims2help • • 9d ago

SOLVED Custom Mr. Big & Diva/Slob Throwing AttractionScore Errors

Hello!

I am building a custom neighborhood with custom NPCs and townies. Every Sim seems to be working fine except for the special townies known as Dateable Mr. Big/Diva and Slobs.

How I made these NPC Sims is that in SimPE, I opened up the Sims' character files and replaced the Orig. GUID with the ones the Dateable Special Townies use (0xEF826029 for Divas, 0xCF7A514E for Slobs).

Whenever their special idle behavior is called (primping and being gross), they'll do these fine.

But they constantly throw these errors:

Error: Problem executing script (AttractionScore): Run-time:

(none):0: attempt to perform arithmetic on field \?' (a nil value)`

stack traceback:

(none): in function \AttractionScore'`

When I look into the error log, I'll see that they're trying to get the Attraction score of a non-Sim object?

Iterations: 1

Frame 10:

Stack Object id: 346

Stack Object name: Table - Mahjong - 1, 2 - P2 - S

Node: 15

Tree: id 1026 name 'Attraction - EP2 - Get in Temp 0 - Score' version -32715

from global

Prim state: 2

Params: 346 1 844 Locals: 0 0 0 0 0 0

Frame 9:

Stack Object id: 910

Stack Object name: N019_User00316 - N6FGTour

Node: 4

Tree: id 4107 name 'Look At - Attraction' version -32741

from Routing_LookAt

Prim state: 0

Params: 910 910 Locals: 0 0 0 458 0

...

I have two The Sims 2 games installed: a modded one and an unmodded one. They cause issues for both of the games. When testingcheats are disabled, they will constantly reset themselves and random Sims until they either do special idle animation or leave. Whenever I try to have my Sim interact with them, they'll get reset immediately.

I tried looking into SimPE what these townies have set specifically for them, but I couldn't find much, especially in the neighborhood.package file.

I'm out of ideas, so I thought I'd come ask here. Any ideas on what to do? How to make a sim created in CAS and set as a Dateable Special Townie through SimPE not ruin the gameplay experience?

1 Upvotes

7 comments sorted by

2

u/Live_Newt_930 9d ago

This error usually occurs if a sim has an invalid aspiration value in person data. If you make them selectable, do they have an aspiration icon? You can use testingcheats to reset their aspiration (though don’t do that if you gave them a secondary since that option was never updated for FT), or with mods like the sim blender.

2

u/EgonVM 8d ago

Thanks! I checked it out and they were indeed missing an aspiration!

So I went to SimPE and changed them. I checked the others I haven't seen and saw they haven't lost their aspiration yet.

I checked in the game and now they have an aspiration! No more errors!

I do wonder however... It seems like the first time the Dateable Townies are spawned in after setting them so, they immediately lose their aspiration. Divas also lose all their Nice Personality Points while Slobs lose all Neat Personality Points. How would it be possible to have the game set these the first time they're spawned in?

1

u/EgonVM 8d ago

For now, it seems like opening the character file in SimPE sets it to Nothing, so I can fix it before I encounter them.

1

u/Live_Newt_930 8d ago

Not exactly sure what causes it. I had a look at the group in SimPE that handles slobs and they are indeed functions that handle aspiration and personality for slobs when they are initiated for the first time. They always get the Pleasure aspiration and the range for neatness has a min and max value of 0 lol

How they get their aspiration looks fine to me, it’s first set to 0 and only then the Pleasure flag is set so having any other aspiration before changing them should not matter. What would mess this up would be having a secondary aspiration token, because the value stored in there would then be calculated out of the Pleasure value, leaving an invalid aspiration value behind.

1

u/EgonVM 8d ago

Yes! You're spot-on with the Secondary Aspiration token! They do have that!

1

u/Live_Newt_930 8d ago

Oh nice! It’s not a problem for them to have one if one slightly alters how their aspirations are set. Do you want them to have certain values or more like keep the secondary you have them and change their primary to fortune/pleasure? Or disable the change completely? It’s getting late here but I can try tomorrow.

2

u/EgonVM 8d ago

Thanks, but no need.

It seems like the first time you set Orig. GUID as such, it will change the personality and the aspiration once you start up the game. However, after that, if you change these, they will stick, even if you bring the neighborhood from one game to another.

So, I need to keep an extra step in mind when creating them.

But thanks for your help! You have really helped me a lot!