furbyq: a unicorn saying "yeah" in a cartoony speech bubble. (Default)
[personal profile] furbyq
(Warning: Image Heavy!)

Part 02: Exporting Your Packages!
(Previous Parts)
Part 01: Getting Stuff Set Up!

Things That Are Needed for This Section.
To start off the real tutorial, you're going to need to open Bodyshop and locate the hair you want to use.

For this tutorial, I'm going to be using Newsea Color of Wind. I know I've done this hair before, but I need to do it in my new colors, so yeah. Export your hair using a descriptive name. I usually go "creatorhairname", and use abbreviations if it ends up too long, hence "nscolorofwind".

Now you're going to open your image-editing program. For me, it's Photoshop CS2, but this part of the tutorial could be done with MS Paint if need be. Navigate to the hair you just exported; usually, it's in documents > ea games > sims 2 > projects.

When you go into the folder, it'll probably look something like this. I'd recommend switching your view to "medium icon" so that you can see the images without opening them. The way this folder is right now just won't do, so you want to open one texture and one alpha.

What you want to do with these two textures is overwrite every image file in your hair's folder to be one of these two images. Basically replace every texture with this texture image and every alpha with this alpha image. Why? Because SimPE discards duplicated images; if you do not do this, you will end up with multiple images attached to your files and it will be more difficult to complete later parts of this tutorial.

(If you do a hair with more than one unique texture image, this will complicate things. For the purposes of this tutorial, I'd recommend at least starting with a hair with one unique texture image.)

When you're done overwriting, your folder should look like this, with textures and alphas repeating in a pattern.

Refresh your Bodyshop project. If everything looks alright, enter a tooltip for your hair that can be used for every recolor. If you want to add the color names later, you can, although I personally don't. Import the hair back into your game.

Your hair has to be at the top of the projects list for this to work, so make sure to sort by date.

Return your Bodyshop to the screen that has the two big rectangular buttons that say "Start New Project" and "Load Project".

Now open Sikuli IDE. You should have a tab called "untitled". If you don't, go to File > New. Minimize all windows except Bodyshop and Sikuli IDE. Now select the "click" option under "mouse actions".

Your screen will dim and this text will pop up. Don't panic. Using your mouse, click and drag from the upper left corner of the "Load Project" to the lower right corner. Here's an unhelpful visualization of the selection process.

You need to select an area similar to what the pink rectangle shows above. Sikuli IDE gets easily confused, so making sure that your selection has some of the background color in it will help it distinguish the Load Project button from the Start New Project button.

Repeat the process. Make sure Bodyshop is open in the background with Sikuli over it, hit "click", don't panic. Make sure you've actually hit the Load Project button so that you're on the project list page.

This time, select the entirety of the top thing on the list. It should be the hair you're currently working on. Make sure to select some of the top arrow and possibly scroll bar, as this helps distinguish it from the other projects.

Before the next selection, you'll have to put in a "wait" command because your computer will always hang for a moment after selecting a Bodyshop project to load. In your Sikuli project, on the third line, type "wait(5)". The word, then the number in parentheses, no spaces between them.

Now the next part is going to make me seem silly, but Sikuli is finicky and for some reason it works the best. Hit the "click" command again.

Don't capture the open button; rather, capture the middle of the folder icon. Sikuli is silly and will confuse the open and close buttons if you capture the whole button.

After you capture the folder, put in another "wait(5)" on the 5th line of the macro.

It should look like this. Click, click, wait, click, wait.

Now put in a command to click the import button. Again, capture the inside of the folder symbol or Sikuli will confuse it with the X button.

Put in another "wait(5)" on the next line.

Command it to click on the check mark, as well as the two Xs that follow it. You can select the entire buttons for these since they're the only buttons on the screen at the time.

The entire thing should now look like this. If you click run while on the Start New Project/Load Project screen, it should be able to run from start to finish without any hiccups. Take note that while a Sikuli IDE script is running, you cannot use your mouse or keyboard without interfering with it. If you make really long scripts, you need to find something else to do while they are running.

So you have a working Sikuli IDE script and it successfully imports a hair! Yay! (Or you don't, in which case, boo. Either try the tutorial again or send me a message if something is particularly confusing.) But the script only works once. And the hair you're doing needs like 30 recolors. There's two ways to handle this, depending on what your own preferences are.

You can copy and paste the script you have already written X number of times and it will make that many packages. (Basically, paste it 29 times for it to finish making 30 packages without stopping or needing your input).

Or you can do the fucking crazy way I do it. This will only work if you have a decent computer and a big monitor, because you need to run two instances of Sikuli IDE.

Save your script and close Sikuli IDE. Then open two new instances of Sikuli IDE and stack them on top of each other. Make sure that Bodyshop is also clearly visible.

At the bottom of one of the Sikulis, put another click command. This time, select the "Run" button on the other Sikuli.

Copy and paste the "click(run)" command to the bottom line of the other Sikuli so that both are completely identical. Save both of them. Now you have two instances of the same script running that will infinitely tell each other to keep going. You can do this to make an undefined number of recolor packages if you need to. To make them stop running, move your mouse during the scripts so that they don't complete one of their commands. This will cause the one that is running to stop, and interrupting that one will make it so that the second one doesn't start.

Also, another thing to take note of is the fact that Sikuli IDE takes more note of the shape of buttons rather than the text within them. Because of this, this script can be run for any hair without any changes, as long as it is at the top of your projects list in Bodyshop.

Continuing Onwards!

Part 03: Recoloring Your Texture(s)!
Part 04: TBA!
Part 05: TBA!

Part 06: TBA!
Part 07: TBA!