Add-ons for the total beginner
There is something you should take care of before we talk about how to make things work: Have an idea.
All things exist first as visions. Everything in the world around you - a chair, a knife, a fork - first existed as an idea in someone's head. Then they imprinted that vision onto reality, possibly adjusted for feedback. So the process is idea -> acquire skills -> implementation.
Making things just because you can or because they are easy to make, if you are new to making things, is not exactly a guarantee of quality. Work on committing the vision to paper (or notepad) before you open up an editor and start writing code. That way it should be clearer if you simply lack the ability to implement your idea (frustrating, but common to all creative types - writers, painters, poets included!) or if you actually lack clarity with the very concept you are trying to implement (in which case, other people in the coding forum cannot help you!)
Basically the theory of writing your own races/classes is that you call variables into local variables and reference those local variables, then order results. This accords generally with good coding practice, but is a good reminder for non-coders. Also remember that if some way to do a thing already exists, try to respect the existing structure, for uniformity across the game (and to enable correct behavior with future versions!) This means that, for instance, if you write a bonus for Spellpower, and all the existing Spellpower references rescale to give diminishing returns, yours should not be the only thing out there immune to diminishing returns! You should write your code either in such a way that it arrives at the rescaling mechanic in the end, or if need be, outright duplicate that rescaling mechanic.
Finding Your Addon Directory
Note that the advice on the te4 website to search for certain files will not help in the current version, where those files are hidden by default and won't appear on search. This is some specific advice for Mac Users on finding the addon directory: 
There is an official guide to Lua online, so I will not bother to duplicate anything here.
At a very basic level, learning to make mods is like science: you first dissect things, and figure out how they work, and then you apply what you gained from dissection yourself. What you want to do is take an add-on you are familiar with and have played, and open it up to look at it.
- Rename .teaa file to .zip and unzip it
- You should note a bunch of files and folders in the resulting folder. Start by looking at talents.lua
- You can also take the TOME engine itself and unzip it so you can look at the source code. This is especially helpful when writing other subraces of existing races.
You will usually want to use something like
- local lev = self:getTalentLevelRaw(t)
- local levs = self:getTalentLevel(t)
to call the talent (or raw talent) level of racials when writing races.
List of things that you will want to know:
- self.STAT_CON, self.STAT_STR, etc. are the variables referencing player character's stats.
- Don't forget to write behavior for what happens when you un-upgrade as well! (And if you're writing variable level behavior instead of uniform upgrades, remember to reference the PREVIOUS level it was upgraded to!)
- Callback is a very helpful page.
Good design practices
- If you want something special to happen when you cap a racial talent, try handling it with more local variables (i.e. mastery = false/true) as this handles upgrades/reverse upgrades more gracefully!
- Communicate with the user! Display visible game log messages about what happens when you use specials, if procs fire and miss, etc. That way you (and your users) will know with certainty that your talents are working (and interacting with other details) correctly.
- Format your log messages with color!
A color page already exists; however, it does not list what those colors are natively used for in TOME. Colors include:
- #1133F3# cold
- #STEEL_BLUE# ice
- #LIGHT_STEEL_BLUE# temporal
- #GREY# darkness
- #PURPLE# arcane
- #YELLOW# mind
- #LIGHT_GREEN# slow status
- #aaaaaa#0 physical
Vampire Mage Guide
This is a guide to using astralInferno's playable Vampire race add-on and playing a mage. Current Vampire add-on is version 1.3 and current game is version 1.4.9, soon to be 1.5.
Archmage - this is perhaps the most thematic way to play a mage: you'll have the spell power boosts from Archmage and access to basic necromantic trees from Vampire. You can easily do a tri-elemental build for levels 1-30, only instead of fire/lightning/arcane you'll probably want arcane/darkness/cold to take advantage of your inborn spell penetration. Pick up Shivgoroth Form early for emergency stun immunity and cold healing, then follow up with Frostdusk for sustained damage boosts and a second elemental affinity. With access to Grave, you might want to skip Ice - Chill of the Tomb is basically Fireflash, Cold Edition (and Fireflash is so good for corner sniping that it is considered a staple of many builds that don't even specialize in fire/wildfire). Rigor Mortis + Circle of Death + Ice Storm give you plenty of options for crowd control and staying alive. Consider Meta for the ability to dispel enemy shields.
Necromancer - this is redundant. Not bad if you basically want to play a Necromancer+, but it doesn't add much beyond a stat bump, some category masteries, and a very situational melee attack in exchange for a 40% experience penalty. As undead, you can't go lich (and liches get hefty bonuses in 1.5.) You have most of the immunities of one, of course, but not disease/blight. This becomes extremely relevant in certain zones that specialize in blight damage. On the other hand, you can save the 5 points and the 2 category unlocks that are mandatory for the 1.5 lich (who needs an effective level of 7) and put them elsewhere.
Alchemist - easy mode, ON. Between being more durable than the typical mage, having Flash Freeze as an instant to correct small positioning mistakes, and having the ability to switch places with your golem to get out of trouble, you should never die. Alchemist also gives you tremendous gold income, making the early levels easy and making purchasing randarts late game simple. The elemental forms you get aren't quite as good as the archmage's (they mostly grant high resistance rather than affinity, which means you can stand in a fire/icestorm etc. but it won't heal you.)
Vampire race notes
A word to the wise: you can only count on getting Nightfall and Necrotic Minions unlocked as a matter of course. Improving the Vampire racial tree with your first unlock will grant knowledge of advanced necrotic minions, but that's it. It does not grant automatic unlock for that as well. It is far from the bonanza that players like myself were expecting (vague comments in the forum implied that a lot of necromancy would unlock, making this a great payoff for focusing all your points here, but that is sadly not the case.) Ice, Grave, and Shade will be locked no matter what and those are the categories with real potential to synergize with other classes. Getting the 1.2 mastery doesn't add more stat points from Vampire, it doesn't improve the Vampiric Bite, and it doesn't unlock anything that wouldn't already have been unlocked. It ONLY adds one category, locked, meaning basically you're paying for the privilege of being able to pay ANOTHER category point later on to get a tree that most necromancer players already find dubious due to intense resource management for limited gains. For such a heavy investment of General points this is rather underwhelming.
What you want to invest in as a mage is probably 5/1/5/5. The second category, Mockery of Life, grants no additional spell knowledge and is a melee attack. The capstone just makes your Cloak of Undeath removable, but you can do that at the Sher'tul Fortress anyway.
That's not to say playing a Vampire is bad - it's a very smooth and rewarding start. A quick 5 points for +5 to all stats ensures you can steamroll the early game, especially those pesky adventuring parties and Zig patrols. Suffocation won't be an issue. Fear immunity, though far from core to any build, will occasionally save you from a war cry or intimidation, and you don't have to look for bleed resistance or immunity on items. The raw stat boosts make you tanky enough to risk closing to melee range with early bosses after wounding them, so you can eat them for the relevant achievement.
But with limited unlock points, you'll have to cherry-pick your build. Be a thrifty spender. Decide whether you want that 5th rune slot (probably not, as you have so many categories to unlock!) Decide whether you want to emphasize Forgery of Haze clones, or minions, or play a blaster. I do not recommend running minions unless you are a pure Necromancer, as without Animus to expand your battery of souls you are really in an awkward place for resource management.
As an undead you are animated by arcane energies, so you will obviously not be betraying people to Zigur. You also must take the extra step of corrupting the Sandworm Queen Heart before eating it, somewhat delaying your power spike, but this is compensated by vampires having an early power spike in general.
Most desired escorts:
Anorithil (Bathe in Light) - This is amazing for dealing with DOTs, since you don't have access to infusions and you are saving your Heat Beam for purging Stun/Daze/Blind. As a mage, you don't have that many hit points, so even a level 1 BiL keeps you topped up on health. In a pinch, you can also use the brilliance effect of this to reveal assassins creeping up on you. It will heal and shield them, but if you can't punch through that you aren't trying.
Sun Paladin (Chant of Fortress) - Get 2 ranks if you can, but don't bother to unlock the category, as that just causes you to have to waste a point to qualify for this chant.
Warrior (Unflinching Resolve) - More useful the more ranks you have; while you aren't going to get it to 5 from escort quests, getting 2 ranks is not unreasonable to shoot for and can clear blindness as well as stun. We want this because Heat Beam doesn't always clear the right debuff and Shivgoroth Form only lasts 10-12 turns. The odds of this triggering are about 20% with 30 con and 2 ranks; obviously you aren't going to be banking on this, but it can save you if you miscalculate or roll badly on Heat Beam's status purge. Vitality is less useful given that your base hit points aren't that high (as a mage, you depend on shields) and you are immune to bleeding and poison status effects anyway. The last two talents in the tree are useless to mages, so grabbing the actual category unlock is questionable.
Thief (Charm Mastery): More item use? Yes please.
Temporal Explorer (Foresight): Defense is a questionable thing to build for at higher difficulties, but if you're an archmage you might be stacking this via Blurred Sight just to avoid dying to trash mobs with jump abilities (Rush etc.) The chance to shrug off crits is low but extremely valuable to mages. Paired with other sources, it could save you from being assassinated.
Seer (Premonition): An occasional 15% damage reduction for one component of an enemy's damage. Practically speaking, that'll amount to maybe 4% of overall damage. As a mage, you can afford to float the 120 mana sustain cost.
Low synergy escorts:
Loremaster: Just get Magic points, really, unless you get this super early and are pumping Willpower to go with Distortion Shield or something.
Tinker: While Steamtech is normally a nice thing to add on to a character and play with, as a Vampire you are super strapped for category unlocks. Pass. Consider Last Engineer Standing for critical hit mitigation.
Alchemist: See Tinker, above. Normally a great escort to get for Stone Alchemy, but you really can't spare category unlocks as a vampire mage. Consider Stone Touch: it doesn't grant any additional cold resistance, so shattering should be easier for you than most.
You have to ask? Cauterize. Cauterize, cauterize, cauterize. Because you are still a squishy mage and as long as you aren't one-shot you have a great kit for dealing with most problems.
Aside from that, it depends heavily on your build. Swift Hands is OK, though you probably won't have the Dex for it (and it's getting nerfed in 1.5.)
Armour of Shadows, Bloodspring, Spine of the World are all thematic and helpful.
Blighted Summons is, as ever, an option for minion necromancy, as is Hidden Resources.
Temporal Form is not bad but not what it used to be.
Elemental Surge is OK, not great. Endless Woes is probably to be avoided as you only deal Darkness and it's a 1 in 5 chance to blind.