More Awesome Than You!
Welcome, Guest. Please login or register.
2024 November 21, 22:56:51

Login with username, password and session length
Search:     Advanced search
540287 Posts in 18067 Topics by 6545 Members
Latest Member: cincinancy
* Home Help Search Login Register
+  More Awesome Than You!
|-+  TS2: Burnination
| |-+  Peasantry
| | |-+  Attraction Trait Fix BV+
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Attraction Trait Fix BV+  (Read 14469 times)
tunaisafish
Axe Murderer
Exasperating Eyesore
*
Posts: 245



View Profile
Attraction Trait Fix BV+
« on: 2009 January 31, 22:05:47 »
THANKS THIS IS GREAT

Attraction Traits Fix (V1.00) for BV+

DESCRIPTION:

  Ever wondered why trying to fiddle with your sims turn on/off's did not always have the results you expected?
  They didn't work.  Now they will work better.

  Fixes bugs related to the attraction system.
  These bugs remain present in all games since Bon Voyage (even if you patched)

BUGS/ANNOYANCES FIXED:
  - Wearing Glasses or Jewelry no longer sets the Lycanthropy trait.
  - Jewelry now correcty sets the Jewelry trait.
  - OFB business owners no longer have the unemployed trait
  - Managers employed in the OFB ownable jobs now have the hardworker trait.
  - Robots no longer have a random hair trait.
 Minor fixes.
  - Plantsim detect code fix - Incorrect flag unset when EP not present.
  - Witch detect code fix - as above.  Same bug was cloned.


NOTES:

  Some bugs remain in the EA engine and are too deep to fix.  Some workaraounds...

    Custom Hair
    Impossible to detect as the property is never set.
    You'll notice that when you go to the mirror to change appearance.  When you choose a custom hair they
    highlighted icon will be one of the black/blond/red/brown icons.  It is the latter that is actually set
    in your sims properties.  So when choosing custom hair, you can decide which trait to exibit.

    Glasses
    Although glasses and jewelry are two different traits, wearing glasses also sets the jewelry property.
    So if you have a sim that has a turn on for glasses and a turn off for jewelry, you might want to change these.
    Wearing jewelry alone does not set the glasses property.

    Beards
    While a sim sports any facial hair, from the lightest of stubble to the bushiest of beards, the following
    properties will not be updated when you add them in the mirror; glasses, jewelry, makeup and full-face-makeup.
    As soon as you remove the facial hair the properties are set, and therefore the correct traits.
    If you then add facial hair, the properties will remain set.  The properties will unset though without the
    need to remove the facial hair.  Weird huh?


  Legacy Custom Content
  Some old CC accessories were made, and are still classed, as glasses.
  You can fix these with the Wardrobe Wrangler.
Logged

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: Attraction Trait Fix BV+
« Reply #1 on: 2009 February 01, 00:56:18 »
THANKS THIS IS GREAT

    Custom Hair
    Impossible to detect as the property is never set.
    You'll notice that when you go to the mirror to change appearance.  When you choose a custom hair they
    highlighted icon will be one of the black/blond/red/brown icons.  It is the latter that is actually set
    in your sims properties.  So when choosing custom hair, you can decide which trait to exibit.
I suspect this is actually a feature, as the Custom Hair property IS correctly set for hairs correctly binned under bin 6 (custom).

Also, right now, I'm trying to pin down exactly which line causes this hack to reset everyone in the game (very annoying!). It's somewhere in 0x446.

UPDATE:
Okay, found several issues:
1. Calls to 0x57A and 0x505 are BAD, apparently, because calling these BHAVs is what causes this hack to reset everyone in the game. Avoid this, perhaps by inlining them.
2. Calls to these aren't even really good ideas. 505 will only really work for determining the CURRENT LOT, which means the test fails if the business owner is off-lot or a visitor. Makes this attempt at reclassifying unemployment purposeless.
3. Count lots owned by sim probably does not work. For one, I'm not sure it will return false if no lots are owned, rather than returning a value of zero. Secondly, it most likely includes lots that are not business, as vacation homes are also owned lots. There is no good method of filtering that if this occurs.

As a result, I suspect that the entire "business owner" detection feature is PROBABLY unworkable.
Also, is it just me, or does it seem like your design is hellbent on being as Byzantine as possible? I am still unclear as to some of the odd things you feed back into the game as arguments. Why are you feeding Persondata 0xB4 back into the LUA that you're using to initialize it, for instance? Isn't your LUA supposed to determine what it SHOULD be, and therefore, any present data contained in it must necessarily be assumed to be gibberish and the entire point is to stomp on it and rewrite it?
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
tunaisafish
Axe Murderer
Exasperating Eyesore
*
Posts: 245



View Profile
Re: Attraction Trait Fix BV+
« Reply #2 on: 2009 February 01, 06:35:46 »
THANKS THIS IS GREAT

The custom hair will appear in the correct bin, but the properties are broken since BV I believe.
Even all the EAxis hair in that bin will get the last selected genetic colour as a trait - and those in custom also lose the 'hat' trait too.
I downloaded my first CC hair to test this too.  Even hair from modders that know about the correct flags was still broke.
However, *if* it does get set properly in any games, then the trait will still be set with my mod.

1/ The reset... darn.  Didn't notice that.  My hood gets reset all the bloody time so they were already standing by their beds before I started testing this.
Sorry people.  I've added a warning.
Is there any 'rule of thumb' logic we can use to determine whether a mod is likely to cause a reset.  Just calling a global and getting a reset seems bizarre.  I'll experiment by moving those to see if it helps.

2/ Yep, I was looking for an easier way than the 505 and 57A calls.  There doesn't seem to be one.  I wish they'd used a separate flag somewhere to make that easier.
It works mostly, but yes - A sim with only a homebusiness would get the unemployed trait when not at home.
I guess I could write that up as a feature Wink  When in town you might recognise the big-shooters that own part of the the town, but maybe overlook a sim that sells craftables from their back room.

3/ That one *does* work.  The 2nd and 3rd parameters arguments are used as filters.  Tested fine too.  Look at the telephone call guardians for EAxis examples.

The persondata passed is for the cologne trait.  It's the same way the original EA code works.  It is handled elsewhere.
The few things passed could have been read in the lua too, but with more calls.

"Byzantine"?  lol.  I'll take that as a request to see the source Wink
Not all of the versions this is intended for have the named constants, and rather than hunt around all the LUA in the game, it was quicker for me just to use the figures.
Removing my notes also cut the size down by a decent factor.
I'll post a test object with all my scribblings for you and the other dozen or so people that are as tall as your beefy arms.
Logged

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: Attraction Trait Fix BV+
« Reply #3 on: 2009 February 01, 06:58:07 »
THANKS THIS IS GREAT

Not necessary, I figured it out, it's just that your flow was thoroughly Byzantine. As for what causes the resets, at present, there seems to be no clear and obvious sign. I tried inlining the 0x57A calls, to no avail. I did, however, manage to rewrite this in a way which avoid resettage, and involves less LUA, by hijacking most of the original EAxis code, then including a postfix afterwards to correct for the lycanthropy/jewelry bug. I am testing that out now. I can confirm the bugginess involved in the witch/plantsim removal code (although in all honesty, why on EARTH would you do that, as removing expansions that are already part of your game will fuck it up pretty badly anyway). It appears that you have also explored this LUA-usage matter more than I have, and your examples have been rather instructive. Is there a specific purpose involved in the do/end blocks? They look like they represent some sort of structure, but I can see no particular reason why they exist and removing them seems not to have any adverse effects.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
tunaisafish
Axe Murderer
Exasperating Eyesore
*
Posts: 245



View Profile
Re: Attraction Trait Fix BV+
« Reply #4 on: 2009 February 01, 07:20:02 »
THANKS THIS IS GREAT

the do/end blocks limit the scope of the local's.

I reuse the 'f' variable as the current flags being processed.  So the do/end blocks are a compiler hint - it can use/reuse any of the slots it pleases if that helps optimise.

I'll post a test object later anyway.  I don't know if there's a hack already out there that allows people to view what traits are set.  doren had to do it the hard way.
It would also be useful for people to figure out if their CC is actually doing what they expect.
Although personally I'd like it built into the batbox... Some of my sims gardens look like Steptoe's yard with all the test objects laying around.
Logged

J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: Attraction Trait Fix BV+
« Reply #5 on: 2009 February 01, 07:37:22 »
THANKS THIS IS GREAT

Although personally I'd like it built into the batbox... Some of my sims gardens look like Steptoe's yard with all the test objects laying around.
Oh, it's not already there? I guess I should migrate it to the release version, then. It's been there for weeks now my personal test version.

There, it's up. You know, if you grah'ed more, these things could be discussed faster.

Now that I've started seriously looking at this, I've noticed that there seems to be no particularly clear pattern as to which sims get tagged as Facepaint, but it certainly isn't intrinsically keyed to Facepaint...I am examining this further.
« Last Edit: 2009 February 01, 08:21:52 by J. M. Pescado » Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
tunaisafish
Axe Murderer
Exasperating Eyesore
*
Posts: 245



View Profile
Re: Attraction Trait Fix BV+
« Reply #6 on: 2009 February 01, 18:40:43 »
THANKS THIS IS GREAT

I posted a version that doesn't reset (on M&G at least).
I found the same problems and had to lose the calls to the ofb career checks too.

The facepaint seems to always be set for plantsims and witches.

ETA: Fully functional version without the reset problem now available.
« Last Edit: 2009 February 03, 11:03:55 by tunaisafish » Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.066 seconds with 20 queries.