Wilf's Sims Stuff: Cloning and hacking the Version 3 Dancers
This tutorial contains information about cloning and modifying the behaviour of the Version 3 Dancers found on the Dancers page. I learn from my experiences. After I made the Version 2 Dancers available, I started getting requests for slightly modified versions: male dancers, gay dancers, and dancers that didn't strip. I hadn't really thought about making these variations in advance, so I ended up using some rather inelegant hacks that I'm not particularly proud of. For instance, I had to make a separate social interaction file for the male dancers just to get male, rather than female voices to accompany some actions - all for the sake of two sound files! So, I've built in a lot more versatility into the Version 3 dancers to make it simple for anyone to change their basic behaviour.
Files used for the dancers
The dancers need three files in order to work.
First, there's the "Dance tile" (or cage) object, eg. DanceTile_DancerV3_F01.iff. This has three purposes: to create the NPC, to mark the spot where the NPC dances, and to act as a focus for audience appreciation (yes, the crowd are grooving to the tile, not the dancer!).
Second, there's the NPC, eg.NPC_DancerV3_F01.iff. This is a fairly standard sort of NPC object which contains the routines that the NPC follows. Note that each dancer NPC is linked to a particular dance tile or cage: they will use their own, and no-one else's.
Finally, there's the social interactions file, DancerV3_SI.iff. This controls the interactions between the dancer and other sims. The dancer "calls" the social interactions file at the start of an interaction of some sort (eg giving a back rub), and the social interactions file controls the behaviour of both the dancer and the other sim until the interaction has finished. The same social interactions file is used for all the Version 3 dancers - any number of them can share it. It does not contain the GUID of any NPC or tile, and so there is no need for you to clone it, unless you plan to hack the social interactions.
Cloning the Version 3 Dancers
This is straightforward to do using the "clone/replace GUIDs" technique described in the Cloning objects with NPCs tutorial. You need to clone these files:
The hostess NPC's GUID occurs twice in the tile's (or cage's) .iff file (in the Main and Create dancer scripts), while a tile's GUID occurs three times in the NPC's .iff file (in the Go to tile and switch on, Dance nearly over and Switch off tile scripts). A cage's GUID appears only once in the NPC's .iff file (in Dance in cage).
Re-skinning the dancers (and changing sex)
You should do this by replacing the appropriate strings in String Resource #200 (for example, by using the method I describe on the Changing NPC skins with Strings Scavenger tutorial). When stripping on a dance tile, the dancer changes skins in this order:
so make your changes accordingly. While you're inside String Resource #200, you might also want to change the dancer's sex (ie change string ID #12). If you do this, the dancer will automatically use the male dance moves and voices when dancing - you don't need to alter anything else.
Stopping the dancer from stripping (tile dancers)
Each stage of the strip routine is controlled by a constant held in constant resource #4097 Behaviour flags, inside the BCON section for the dancer's .iff file. There are a few utilities you can use to edit these constants, eg. Script Station, IFF Pencil 2 and Constant Contraption, so I won't go into a step-by-step description of how to alter them.
The stripping behaviour is controlled by constants #2, #3 and #4 inside constant resource #4097:
So, to stop the sim from stripping at all, set #2, #3 and #4 to 0. To get the sim to strip to the swimsuit stage only, set #2 to 1, and #3 and #4 to 0. And so on...
Interactions with other sims
There are two groups of interactions that the dancer will partake in with other sims - I call them the "nice" interactions and the "naughty" interactions. "Nice" interactions include talking with, joking with, entertaining and giving back rubs to other sims. The dancers will perform these with all sims, regardless of sex.
The "naughty" interactions are hugging, flirting and kissing: basically anything that normally triggers jealousy in other sims. The dancer performs these according to the sex of the sim that's being interacted with, and the values of constants #0 and #1 inside BCON constant resource #4097:
So, you could make a gay male dancer by setting #0 and #1 to 1 and 0 respectively.
Obviously, you'll need to clone the cage that comes with "Adrianna" on the dancers page to make a dancer generating object. There are also a couple of settings that you should check or alter in the NPC's BCON constant resource #4097:
Altering the dancer's thumbnails
Bollocks. This no longer seems to work under Superstar.
These are the pictures that appear in your Sim's queues when a dancer is about to interact with them, and the pictures in "thought bubbles". If you simply clone a dancer, she'll be left with the thumbnails from the original dancer - the game doesn't automatically re-generate these for NPCs, as it does for ordinary sims. Unfortunately, there's only one way I've found for changing these thumbnails - so if anyone has come across a simpler method, please let me know!
The basic technique is this: you need to make a sim inside the game that has the same head mesh and bitmap as the dancer whose thumbnails you want to alter (alternatively, you could change the head of an existing sim, using something like Sim Metamorphoser). Make sure the sim is on a lot, and let the game run for a few seconds: the thumbnails you want will be created by the game, but inside the new/altered sim's .iff file.
Now you need to identify the .iff file of the sim with the thumbnail that you want. Neighbourhood sims are stored in the Userdata\Characters (neighbourhood 1) or UserdataXX\Characters (all other neighbourhoods, XX = neighbourhood number) folders. As you can see, the files are named rather cryptically, but a good way to find the appropriate file is to use Windows' File Search utility (just press F3), and search for an .iff file that contains, as text, the character's name.
Once you've got the appropriate .iff file, open it in IFF Pencil 2, and go to the BMP_ section. Select all the items inside this section (hold down the Ctrl key when clicking to make multiple selections), then choose Export from the Edit menu. In the export options dialogue box, select "Export data as well as type, id, name and flags", and also "Export all selected resources to a single file" before saving the selection.
Now open your cloned dancer's .iff file in IFF Pencil 2. Choose Import from the Edit menu, and select "Import one or more IFF file with resources" and "Automatically overwrite existing resources" from the import options dialogue box before loading the file that you exported from the first .iff file. Save the file, and your dancer should now have new thumbnails.