Big_Mitch_Baker Posted April 21, 2011 Share Posted April 21, 2011 I was wondering how to put individual articles of clothing into CJs wardrobe? I've figured out how to add/remove special clothing like the racing suit, but I need to know how to tell the game that the player has already purchased other items (ie Biker boots, biker jacket, vest) Keep in mind I already know how to add the clothes to the player, I need to know how to add those clothes to the wardrobe list Appreciate any help thanks Link to comment Share on other sites More sharing options...
OrionSR Posted April 21, 2011 Share Posted April 21, 2011 (edited) The standard method for adding clothing to the inventory is to use opcode 0793: save_player_shopping_items. Here's an example that includes pdescobar's alternate string for adding the Zip Blue Shorts. Player.SetClothes($PLAYER_CHAR, "timberfawn", "bask1", 3) Player.SetClothes($PLAYER_CHAR, "hoodyamerc", "hoodya", 0) Player.SetClothes($PLAYER_CHAR, "capblueover", "capovereye", 16) //Shorts crash the game because name string too long, so we have to use another method. //Player.SetClothes($PLAYER_CHAR, "cutoffchinosblue", "shorts", 2) //PDE/CG24: Finally! The Zip Blue Shorts through mission-coding. //KIALNSR has the same crc32 as CUTOFFCHINOSBLUE so this, finally, works. Player.SetClothes($PLAYER_CHAR, "KIALNSR", "shorts", 2) 0793: save_player_shopping_items If your goal is to add all clothing to the wardrobe so you don't need to go through the time consuming process of buying everything at the stores then this subroutine from the Chain Game customization mission might help you out. //RBR/CG37: ------------------ All Clothes in Wardrobe ------------------------ :CG_AllClothes // Flags for owned clothes are at mem addresses 0xa9734c to 0xa97442 - set 1 to own // These 247 flags are presumably: 249 total clothes items (without the specials) // - 3 default skins (default torso, legs, shoes) // + 1 ski mask (listed as special; not available through wardrobe) // these three lines by OrionSR surely beat my lengthy code { for [email protected] = 0xa9734c to 0xa97442 step 1 // 0001: wait 0 ms //OSR/CG37: causing lag 0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0 end } //RBR/CG37: slightly reworked for better readability //OSR/CG37: reworked to avoid waits in a for/end loop 0006: [email protected] = 0xA9734C // start of shopping clothes data :CG_AllClothes_SetFlags 00D6: if 002B: 0xA97442 >= [email protected] // end of shopping clothes data 004D: jump_if_false @CG_AllClothes_Specials 0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0 000A: [email protected] += 1 0002: jump @CG_AllClothes_SetFlags :CG_AllClothes_Specials // Make all specials available // Setting these globals seems to be enough. Ski Mask is not accessible through wardrobe. 0004: $Gimp_Suit_Available = 1 0004: $Valet_Uniform_Available = 1 0004: $Rural_Clothes_Available = 1 0004: $Croupier_Uniform_Available = 1 0004: $Cop_Uniform_Available = 1 0004: $Pimp_Suit_Available = 1 0004: $Racing_Suit_Available = 1 0004: $Medic_Uniform_Available = 1 // Make all stores selectable in wardrobe 0004: $2549 = 1 // Binco 0004: $2550 = 1 // Pro-Laps 0004: $2551 = 1 // Sub Urban 0004: $2552 = 1 // Zip 0004: $2553 = 1 // Victim 0004: $2554 = 1 // Didier Sachs //RBR/CG37: PDE's budget - keep for reference //062A: change_float_stat 14 to 108039.0 // fashion budget (approx) //062A: change_float_stat 62 to 108039.0 // total shopping budget :CG_AllClothes_End 0051: return If you want to use the memory write process to add individual items you can look up the sequence of flags under "section prices" at the beginning of shopping.dat. Edited January 28, 2022 by OrionSR Code Tags Link to comment Share on other sites More sharing options...
Big_Mitch_Baker Posted April 22, 2011 Author Share Posted April 22, 2011 Thank you good sir, got it working perfectly Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now