By mechanics I mean experience, levelling, statistics, rewards, ... but most importantly how to keep all of this in balance.
I have very little experience in the programming of anything but the most basic of games, but I do have more experience on the playing end
![;)](http://public.gamedev.net/public/style_emoticons/<#EMO_DIR#>/wink.gif)
Generally there are several ways to deal with experience/levelling. Experience can be given per point of damage (useful with multiplayer) or per kill, as well as from quests and other rewards. The amount of experience earned for a given action tends to either diminish as you level up, or the amount of experience to get to a new level gets higher as you level up.
Statistics tend to be upgraded at level-up, some games give bonuses to statistics whose skills were used during the past level (for example in Oblivion, if you leveled up your Acrobatics Skill, the Agility Stat would get additional points if you chose to upgrade it at level-up)
Balance mainly requires planning ahead and play-testing. I would store all of the values for the skills, experience, etc earned from everything in a separate config file and tweak that until the game seems balanced.
If you are doing a single player game or co-op type game, you can also have the game dynamically scale the difficulty of the bosses. For example, the game can detect if a boss is absolutely crushing the human player, and make the boss's attacks do slightly less damage and make its armor slightly weaker. This can also be applied in reverse; if the boss is getting killed in one hit, the game can make him stronger.
Also, many (single player) RPGs tend to have a difficulty control, so people can choose how tough they want it.
I don't know, maybe a form of PID control can be used even here (PID control is basically an algorithm used in control systems to prevent jittering)