Quantcast

Jump to content

» «
Photo

[SA] girlfriend globals / bitmasks

5 replies to this topic
rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#1

Posted 15 July 2009 - 07:54 AM

I was wondering about the global variables related to Dating Girlfriends in GTA SA, namely:
CODE
$371 - $376  Girl_Bitmask1
$377 - $382  Girl_Bitmask2
$383 - $388  Girl_Bitmask3
$390         seems to be some bitmask too
$406         Girls_Gifts_bitmask
Does anybody know if details about these bitmasks are documented and if so could you please point me there?

OrionSR
  • OrionSR

    Chain Game Development Team

  • Members
  • Joined: 23 May 2007
  • None

#2

Posted 18 August 2009 - 08:03 AM Edited by OrionSR, 26 August 2009 - 05:23 PM.

Girl_Bitmask2

$377($GIRLFRIEND,6i) bit 21 - Drive-By Date

Can the girlfriends be set like Denise so that 4 star dating is possible? Yes, but not without modifications.

CODE
:GFDATE_1913
if and
  Player.WantedLevel($PLAYER_CHAR) > 2
88B4:   not test $377($GIRLFRIEND,6i) bit 21
88B7:   not test 3@ bit 7
jf @GFDATE_1972
08BD: set 3@ bit 7
1@ = 5
2@ = 0
return


Denise is the only girlfriend with $377[0-5] bit 21 set. Setting this bit for other girlfriends prevents the date from automatically failing when the wanted level is above 2 stars. However, most of the dates (food, dancing) will immediately be successful. Driving dates will progress (normally?) with the wanted level. Michelle will still drive the car on her special date. Having an active wanted level did not appear to be a factor in the quick success of the dates.
(Testing was limited to Michelle, and a few tests with Katie.)

I was finally able to get a Drive-By Date working for Michelle. The quick success of the non-driving dates was eliminated when I altered her creation in GFAGNT to provide her with a Micro-SMG with ammo. Changing the decision makers as well triggered her attacks on gang peds. When the ammo runs out (usually 60 rounds) the Drive-By date is successful. Changes to GFAGNT required a new game start.


Girl_Bitmask3

$383($GIRLFRIEND,6i) bits 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22 - Girlfriend is Away From Home for 2 Hours

These bits appear to control the hours when an active girlfriend is at home. The girlfriend will be away from home for 2 hours if the bit is set; bit 0 for 00:00 until 01:59, bit 2 for 02:00 until 03:59, etc.

$383($GIRLFRIEND,6i) bits 23 through 29, 31 - Weekday flags used by :GFAGNT

It looks like :GFAGNT will clear and set all bits as required. I suspect any adjustments to these bits may get overwritten. Bit 23 is day 1, bit 29 is day 7, and I think bit 31 is a flag that reports the weekday has been set. :GFMEET also uses these flags in a similar manner. I suspect these flags are used to make a girlfriend unavailable for a day after a date. Confirmed: but the GF will also be unavailable several weeks later if it is still the same weekday and CJ hasn't been in the area.

$383($GIRLFRIEND,6i) bits 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 30 - unused

OrionSR
  • OrionSR

    Chain Game Development Team

  • Members
  • Joined: 23 May 2007
  • None

#3

Posted 18 August 2009 - 08:25 PM Edited by OrionSR, 27 August 2009 - 05:08 PM.

Girl_Bitmask2

$377($GIRLFRIEND,6i) bit 0 // unused

$377($GIRLFRIEND,6i) bit 1 // likes Fast Food (Denise)
$377($GIRLFRIEND,6i) bit 2 // likes Diners (Barbara, Katie)
$377($GIRLFRIEND,6i) bit 3 // likes Bar Food (Denise, Michelle, Millie)
$377($GIRLFRIEND,6i) bit 4 // unused
$377($GIRLFRIEND,6i) bit 5 // likes Restaurants (Helena, Millie)

$377($GIRLFRIEND,6i) bit 6 // unused
$377($GIRLFRIEND,6i) bit 7 // unused
$377($GIRLFRIEND,6i) bit 8 // unused
$377($GIRLFRIEND,6i) bit 9 // unused
$377($GIRLFRIEND,6i) bit 10 // unused

$377($GIRLFRIEND,6i) bit 11 // Stunt Jump bonuses are fun (Denise, Michelle) // tiny bonus
$377($GIRLFRIEND,6i) bit 12 // fast car speed > 22.0 is fun (Michelle)
$377($GIRLFRIEND,6i) bit 13 // slow car speed between 8.0 and 20.0 is fun (Helena, Barbara, Katie, Millie)
$377($GIRLFRIEND,6i) bit 14 // sunrise and sunset are fun (Helena, Millie) broken

$377($GIRLFRIEND,6i) bit 15 // enjoys business, residential rich, residential rich secluded (Helena, Millie)
$377($GIRLFRIEND,6i) bit 16 // enjoys gangland (Denise, Michelle)
$377($GIRLFRIEND,6i) bit 17 // enjoys beach, park, golf club (Denise, Michelle, Katie)
$377($GIRLFRIEND,6i) bit 18 // enjoys desert, countryside (Helena, Barbara)
$377($GIRLFRIEND,6i) bit 19 // enjoys shopping, shopping busy, shopping posh (Katie, Millie)
$377($GIRLFRIEND,6i) bit 20 // enjoys entertainment, entertainment busy (Denise, Michelle, Barbara, Katie, Millie)

$377($GIRLFRIEND,6i) bit 21 // enable Drive-By Date - stars okay (Denise's special date) GF needs a Micro-SMG with ammo
$377($GIRLFRIEND,6i) bit 22 // enable She Drives Date (Michelle's special date)
$377($GIRLFRIEND,6i) bit 23 // enable Gimp Suit Date (Millie's special date)

$377($GIRLFRIEND,6i) bit 24 // car crashes are fun (Katie) // tiny bonus
$377($GIRLFRIEND,6i) bit 25 // unused
$377($GIRLFRIEND,6i) bit 26 // unused
$377($GIRLFRIEND,6i) bit 27 // +1 progress for kissing (Denise, Michelle, Millie) censored
$377($GIRLFRIEND,6i) bit 28 // another +1 progress for kissing if bit 27 is also set (Helena) censored
$377($GIRLFRIEND,6i) bit 29 // unused
$377($GIRLFRIEND,6i) bit 30 // unused
$377($GIRLFRIEND,6i) bit 31 // unused

// Bits 12 and 13 both off = no speed preference (Denise)
// Bits 12 and 13 both on = can't satisfy both requirements
// Katie's driving comments make more sense if she is set for fast driving instead of slow

*Note that Helena and Barbara's cars are reversed. Barbara's car shows when Helena is home, and Helena's car doesn't show when Barbara is away. Wrong; the GF index numbers were switched when the cars were created, so everything should be in order.

$377($GIRLFRIEND,6i) bit 27 and 28 also have an influence on activities that are skipped unless the censor flag is disabled. If bit 28 is set a girlfriend will engage in censored activities while in a parked car even if pedestrians are within 20 meters. If bit 27 and bit 28 are set a girlfriend will engage in censored activities after kissing even if peds are near.

Tiny Bonus: the +1.5 to fun of regular stunt jumps or damage from other vehicles was difficult to detect. I modified the scripts to provide a bonus of 10.5 so it would be more obvious when they were triggered.

Residential average, residential poor, industry, airport, out of town factory, and airport runway appear to be neutral. No comment appeared for or against the area.

Bit 14 is broken and will not work without editing the game scripts. If it did work, the girlfriend with this flag would have lots of fun when parked at a Park or in the Countryside within 30 minutes of 06:00 and 20:00. To repair the script make the changes below.
CODE
00C1: 26@ = get_minutes_left_to_time_hours 6 time_minutes 0  
00D6: if or
//002B:   30 >= 25@
//0029:   25@ >= 1380
002B:   30 >= 26@
0029:   26@ >= 1380
CODE
00C1: 26@ = get_minutes_left_to_time_hours 20 time_minutes 0
00D6: if or
//002B:   30 >= 25@
//0029:   25@ >= 1380
002B:   30 >= 26@
0029:   26@ >= 1380


$Girls_Gifts_Bitmask($406)

$Girls_Gifts_Bitmask bits 0 through 5 are used to enable the girlfriends.

$Girls_Gifts_Bitmask bit 0 Denise
$Girls_Gifts_Bitmask bit 1 Michelle
$Girls_Gifts_Bitmask bit 2 Helena
$Girls_Gifts_Bitmask bit 3 Barbara
$Girls_Gifts_Bitmask bit 4 Katie
$Girls_Gifts_Bitmask bit 5 Millie

$Girls_Gifts_Bitmask bits 6 through 20 appear to be unused

$Girls_Gifts_Bitmask bit 21 flags Michelle's garage as an active PnS
$Girls_Gifts_Bitmask bit 22 flags that Helena's weapons have been created
$Girls_Gifts_Bitmask bit 23 flags that Barbara lets CJ keep his weapons when busted
$Girls_Gifts_Bitmask bit 24 flags that Katie lets CJ keep his weapons when wasted

$Girls_Gifts_Bitmask bit 25 - CJ has Denise's car keys message displayed
$Girls_Gifts_Bitmask bit 26 - CJ has Michelle's car keys message displayed
$Girls_Gifts_Bitmask bit 27 - CJ has Helena's car keys message displayed
$Girls_Gifts_Bitmask bit 28 - CJ has Barbara's car keys message displayed
$Girls_Gifts_Bitmask bit 29 - CJ has Katie's car keys message displayed
$Girls_Gifts_Bitmask bit 30 - CJ has Millie's car keys message displayed

$Girls_Gifts_Bitmask bit 31 appears to be a debug flag used to trigger the various dates (see below).


$390 - not too sure about these

Appears to be related to flow control for the dates. The variable is set to 0 in several lines.

$390 bit 2 - Successful (food) date
$390 bit 10 - Phone Call Date
$390 bit 11 - Food Date
$390 bit 12 - Driving Date
$390 bit 13 - Dancing Date
$390 bit 14 - Gimp Suit Date
$390 bit 15 - She Drives Date

$390 bit 20 - unknown GF Meeting
$390 bit 25 - unknown Two Timing Date
$391 bit 26 - Girlfriend's car is displayed

Set $GIRLS_GIFTS_BITMASK bit 31 and
$390 bit 22 - to set Two Timing Date ($1236 = 0)
$390 bit 27 - to set Food Date
$390 bit 28 - to set Driving Date
$390 bit 29 - to set Dancing Date
$390 bit 30 - to set Gimp Suit Date
$390 bit 31 - to set She Drives Date

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#4

Posted 23 August 2009 - 08:12 AM

Thanks OrionSR - that's a lot of work you've done here. icon14.gif

OrionSR
  • OrionSR

    Chain Game Development Team

  • Members
  • Joined: 23 May 2007
  • None

#5

Posted 23 August 2009 - 07:53 PM Edited by OrionSR, 05 September 2009 - 09:11 PM.

Everything is still a bit sketchy at the moment. I'm not always confident of these initial findings. Often I'm posting clues I've gathered from the scripts but haven't found time or a method to test things in game.

Better keep an eye on $1210, as in:
08BB: set $1210 bit $GIRLFRIEND, or
08C1: clear $1210 bit $GIRLFRIEND, and found near
03E5: show_text_box 'GF_0048' // Your girlfriend is not at home right now. Try again later.

Girl_Bitmask1 $371($GIRLFRIEND,6i) bits 1, 2, and 3

Associated with scripts that adjust the (appearance) value that is compared to $GIRL_DESIRED_SEXAPPEAL($GIRLFRIEND,6i).

According to the GF FAQs, Denise and Millie have no appearance preference, but perhaps these preferences are hidden by no meeting place or low desired sex appeal.

Bit 1 - Katie and Millie (high muscle) // What does she mean by, 'not fit'? What ever happened to 'a good sense of humor'?
Bit 2 - Michelle and Barbara (high fat) // You've got to eat more to impress this lady, skinny boy!
Bit 3 - Denise and Helena (low muscle) // You have put on too much muscle! What did you have for breakfast, steroids?

CJ receives an appearance bonus of +25 for wearing Rural Clothes (COUNTRYTR) when dating Helena, or Cop Clothes (POLICETR) when dating Barbara.


Unavailable Girlfriends

$GIRLS_GIFTS_BITMASK is used to enable Denise and Millie during Buring Desire or Key to Her Heart.
Helena is prevented from spawning at her meeting spot until $LS_FINAL_TOTAL_PASSED_MISSIONS = 2, Green Sabre is complete.

"IGF_TT_STATUS" $1236

Status variable for Two-Timing dates. As far as I can tell, if $1236 is set to -1 then two-timing dates are disabled forever. $1236 is set to -1 if CJ goes on a date and only has 1 active girlfriend, successfully evades a jealous girlfriend during a two-timing date, or the 50% chance of a two-timing date evaluates as not true.

Seemann
  • Seemann

    Ruhe

  • Members
  • Joined: 03 Sep 2004
  • Russia

#6

Posted 25 August 2009 - 08:01 AM

Good work, OrionSR icon14.gif After years, the girlfriend control variables still remain mysterious. Your research shed some light on this, keep it up.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users