help Tay Ferret add to Pokémon-Amie!

on my own, I can't add a lot of Pokémon to this game. but if I have help from talented Blender-users/Poké-lovers, then together we can build a decently-sized Pokédex of sexy Pokémon for everyone to touch!

below are instructions for everything you need to do to add a sexified Pokémon of your own: from modeling and animation in Blender, to scripting its actions in the game.

or, if you don't want to do all of that, you can just give me a model and some animations and I'll do my best to finish the rest. the animation is by far the hardest and most time-consuming part for me!

if you finish a character entirely, I prefer that you send it to me instead of releasing your own version of the game. I'll merge it into the official game, and you can link to my website for other people to download. you can release your own pictures and videos though; just give me some credit!

Pokémon-Amie modding tools

this contains the full game plus all the source models, animations, and everything else you need if you want mod Tay Ferret's Pokémon-Amie yourself.

download

Windows (32-bit or 64-bit)

you'll also need:

Blender tutorials

here are some helpful tutorials (not made by me) on how to use Blender. you'll need to use Blender for modeling and animation and a few other things.


general Blender stuff

BornCG's Blender 2.7 Tutorial Series
Oliver Villar / Blendtuts

modeling

Modeling A Velociraptor in Blender
Topology Basics
5 Common Pitfalls of Beginning Modelers

rigging

Humane Rigging

animation

Blender training DVD 3: Learn Character Animation Using Blender

Pokémon-Amie modding tutorial

if you can use Blender and are decent at 3d animation, you can add your own Pokémon to the game! this tutorial will go through all the steps for you to do everything on your own, but you can do as much or as little of them as you like and I'll do the rest. (but please at least do most or all of the animation.)


if you finish something neat, show it to me and I'll merge it into the official game!


this tutorial won't cover how to use Blender in general; just the specifics you need to know for modding this game. if you aren't familiar with Blender, you can find lots of tutorials on Youtube.


Blender hotkeys are highlighted like this.


setup and installation

download all the modding tools above

Python, Blender, and the game source stuff.


install Python and Blender

install Python, then install Blender.


now you need to edit your "Path" environment variable. this seems like something the Python and Blender installers should do automatically, but for some reason they don't, so you have to do it instead!

these instructions are for Windows 7, but it's very similar in other versions of Windows:


verify that Python and Blender are installed correctly


enable scripts in Blender

the build stcript won't work without this:


unzip the mod tools .zip file

the folder structure will look something like:

you'll only ever need to use the folders in bold, unless you're curious about how the rest of it works.


be careful not to mix up the /build and /built folders! they kind of look the same sometimes.


build the game

it's time to build the game for the first time! this takes all the source files (Blender files and such) and compiles them into the final game.


don't ever change any of the files in the /built folder. they're just compiled versions or copies of files outside of the /built folder, and they can get overwritten whenever you build the game again.


workflow overview

the main steps you'll need to do to add a Pokémon are: build a model (or modify an existing one), texture it, rig it for animation, animate it, and make a script/config file that tells it which animations and sounds to play depending on how the player touches the character.

after you finish the model and rigging, I suggest starting out with one simple looping animation and a simple config file that has just one pose and no transitions or extra fancy stuff. then you've got something working quickly, and you can add to it little by little and see your changes immediately in the game!

later you can add the fancy stuff like collision spheres (to tell where the player is touching), vertex swap groups (to make textured-on animated eyes, mouths, etc.), additive animations, and additional poses.


modeling

you can create a model from scratch, or you can modify an existing one. you can get models ripped from official Pokémon games here.


characters should face down the y-axis, with the x-axis facing to their right, and the z-axis facing up.


the whole model needs to be in one object with one set of UVs.


clean up ripped models (if you're using one)


add vertex colors

you have to add vertex colors, even if you just leave them at their default value.

just select the mesh object and switch to vertex paint mode. it'll automatically add default vertex colors.


scale the model to its correct size

you can do this in the character's model/animation file, or in its scene file. whichever you prefer.


if you want exact measurements for a Pokémon's height, they're all on Bulbapedia.

1 Blender Unit = 1 meter.



texturing

make texture dimensions a power of 2 (256, 512, ...).


all Pokémon need one diffuse map and one specular map.


file naming convention:


when you add a texture to a model in Blender, it needs to be marked with as the correct type in the Texture tab, Influence section:


rigging

the model needs to be rigged with bones for animation. you can rig it however you want. look at Mew or Zebstrika for examples of how I did it. I put all the deform bones on the first (top left) armature layer, and the animation control/IK bones on other layers. (sometimes deform bones are on multiple layers since I often use them for animation control too.)

deform bones are ones that are weighted to the model and have the deform box checked on the bone settings tab.

the game loads only the root deform bone and all its children (until it reaches one that isn't set to deform).


you need to set a custom property to tell the game which bone is the root bone:


vertex swapping/fading

vertex swapping is how you animate the textured-on features of a character.

for example, you can make them blink by swapping from vertices textured with open eyes to vertices textured with closed eyes. or you can make them blush by fading in vertices textured with a red blush image.


here are all of Zebstrika's states for the "eyes" group:

Zebstrika model in Blender

each state is an island of vertices that exactly matches the topology of the base mesh.

in the game, each swap group can have one active state at a time.

normally you put each state in the same place on top of the mesh, but I spread them out just for the purposes of demonstration in the tutorial.


in Blender you need to put each state in its own vertex group, following the naming convention: swap:[group_name]:[state_name]

so for eyes you could have vertex groups called swap:eyes:open, swap:eyes:shut_sleep, swap:eyes:shut_happy, ...


it's easiest to wait until you're done with rigging and vertex weight painting before you create any of the states.

then, to make each state:


the XML config file lets you control which states are active in each pose of the game.


collision spheres

the game determines which part of the Pokémon the player is touching based on which collision sphere is nearest to the mouse cursor.

spheres aren't always the best shape to match the shape of the mesh, but it doesn't need to be very exact. and you can always use more spheres if a single sphere doesn't fit a shape well enough.

if you want an example, look at Mew, Zebstrika, or Flareon. (their collision spheres will be on their own separate object layer.)


to attach a collision sphere to the character:


animating

there's not much to say about animation. just animate your character like normal, using Blender Actions.


and there's one thing you need to do for each looping animation to get them to loop perfectly in the game:


building

whenever you change a file you'll need to run the build script, PokemonAmie/build/buildMod.bat, before it'll appear in the game.

after you run the build script, restart the game or press F5 in the game to reload the current scene.


if the game isn't working, you can check for errors in a few places:


adding the character to a scene

create a new scene

save a new .blend file to:
PokemonAmie/blend/scn/[Pokémon_name]Scn.blend .

you can delete the default cube and the default light. leave the default camera though.

the scene's filename will be used to link it to a button on the character select screen.


link to the background

the background is shared for all characters, so every scene links to the same shared .blend file, which is PokemonAmie/blend/scn/backgroundScn.blend . to link to it, do this inside your new Blender scene:


test it

before adding the character, you might want to test the scene in the game. skip to the "adding Pokémon selection menu button" section to add this new scene to the game if you want.


prepare the character for linking

(you'll need to do this part after your character is attached to an armature, and before you link the character into a scene.)


go to the character's .blend file (PokemonAmie/blend/obj/[Pokémon_name].blend).


apply transforms:


put the character into a group:


link to the character

go back to the scene file (PokemonAmie/blend/scn/[Pokémon_name]Scn.blend) and do this:

don't change any of the transform values on the group object. only change them on the proxy object.


cameras

you should have one camera in each scene file (PokemonAmie/blend/scn/[Pokémon_name]Scn.blend) .

you can add multiple animations to it so the camera can be different in each pose in the game.


each camera Action needs at least two keys. the game will blend between them depending on whether the player is touching the character or not. the camera will go to the first key when the player isn't touching, and to the last key when the player is touching.

you can use this to move the camera toward the character when touching.


all of the Blender Actions for the camera need to be named starting with the camera object's name: if the camera is named "Cam", name all its animations "Cam:[anim_name]".


to make the Blender camera's aspect ratio match the game's:


adding Pokémon selection menu button

create the button

open PokemonAmie/blend/scn/pkmnSelScn.blend

duplicate any existing button object. (shift + d)

move it wherever you want it (on the x and z axes only).

edit the name of the scene that will be loaded when the button is clicked in-game:


make a custom image

for testing purposes, you can just use the existing image for the new button. but here's how to add a new, custom image if you want:


config file

overview

the XML config files are how the game is scripted. they describe how to use all of a character's animations and sounds and stuff in the game.

there's one file per Pokémon, and they're all in PokemonAmie/pkmn_config/ .


in the game, the character goes through a sequence of poses. each pose is a looping animation, plus you can add other animations on top of it (like moving the character's head when the player pets him, sheath sliding up and down when the player rubs, knot growing bigger, etc.).

you can transition from one pose to another based on triggers. like: if the player rubs a certain spot for a certain amount of time, transition from the idle pose to the aroused pose.


examples

here's a simple example config file that just plays a looping animation for Zebstrika (or any character with an animation called "idle" and a camera animation called "idle"):

<config>

    <first_pose>idle</first_pose>

    <pose>
        <name>idle</name>
        <anim>idle</anim>
        <anim_dur>2.0</anim_dur>

        <camera_anim>idle</camera_anim>
    </pose>
    
</config>
			

and here's a more complicated example for Zebstrika that switches between two poses and uses additive animations when you pet his head:

<config>

    <!-- touch -->
    
    <touch>
        <name>head</name>
        <!--
            this matches these collision spheres:
            col_head, col_neck1, col_ear.R, col_ear.L, col_muzz
        -->
        <sub_strings>head,neck1,ear,muzz</sub_strings>
    </touch>


    <!-- additive animations -->

    <additive_anim>
        <name>head_rub_x</name>
        <anim>head_right_left</anim>
        <blend_mode>add</blend_mode>
        <type>rub_horizontal</type>

        <touch>head</touch>
        <center>0.6</center>
        <max_speed>10.0</max_speed>
        <multiplier>0.75</multiplier>
        <smooth>0.95</smooth>
    </additive_anim>
    <additive_anim>
        <name>head_rub_y</name>
        <anim>head_down_up</anim>
        <blend_mode>add</blend_mode>
        <type>rub_vertical</type>

        <touch>head</touch>
        <center>0.3</center>
        <max_speed>10.0</max_speed>
        <multiplier>0.5</multiplier>
        <smooth>0.95</smooth>
    </additive_anim>
    
    
    <!-- poses -->

    <first_pose>idle</first_pose>

    <pose>
        <name>idle</name>
        <anim>idle</anim>
        <anim_dur>2.0</anim_dur>

        <camera_anim>idle</camera_anim>
        
        <add_anim>head_rub_x</add_anim>
        <add_anim>head_rub_y</add_anim>

        <!-- transition to another pose after petting for about 2 seconds -->
        <transition>
            <trigger>
                <type>touch</type>
                <!-- special touch keyword that matches any
                    collision sphere on the character -->
                <touch_name>any</touch_name>
                <touch_dur>2</touch_dur>
            </trigger>
            <new_pose>idle_happy</new_pose>
        </transition>
    </pose>

    <pose>
        <name>idle_happy</name>
        <anim>idle_happy</anim>
        <anim_dur>1.5</anim_dur>

        <camera_anim>idle</camera_anim>

        <!-- transition back to the first pose after one animation loop -->
        <transition>
            <trigger>
                <type>anim_loop</type>
                <loop_count>1</loop_count>
            </trigger>
            <new_pose>idle</new_pose>
        </transition>
    </pose>

</config>
			

full documentation

here's the complete documentation for all of the things you can put in the config files:

XML config documentation


Mew, Zebstrika, and Flareon together use almost all of the features in the documentation, so you can use them as examples of something finished (not Lucario or Dratini; they're using an out-of-date system).


in-game hotkeys

(I'll write this section if requested.)