Spells and Swords
The typical “goal” of a gish is 9th-level powers or spells (usually a minimum of 17 effective levels in the manifesting or spellcasting class) and BAB +16 (full four attacks from BAB, usually a minimum of 11 full-BAB levels).
Race
Generally speaking, your priorities are:
No LA or RHD. Either means lost spellcasting for that level.
No penalty to your spellcasting ability score.
No penalty to Constitution.
No penalty to Strength (unless ranged or finesse, in which case replace this with Dexterity).
Relevant bonus feats.
Bonus to your spellcasting ability score.
Bonus to relevant caster levels.
Bonus to Constitution.
Bonus to Strength (unless ranged or finesse, then Dexterity).
Human
Well, duh. No penalties, and gives a bonus feat of your choice. That hits priorities 1-5, and almost nothing else is going to hit #5.
Consider the Azurin (Magic of Incarnum), which is a human that trades the bonus skill point for a point of Essentia. Essentia is fairly useful if you can spare feats for Shape Soulmeld and/or Open Chakra. Also, the Silverbrow Human (Dragon Magic) is a good choice if the (Dragonblood) subtype is necessary for anything you like (especially important for bards; see below).
Dwarf
Mediocre choice on its own (bonuses to Constitution and saving throws are nice, but not nearly as good as a bonus feat), but allows entry into the excellent Runesmith prestige class.
Gray Elf / Fire Elf
The gray elf or fire elf get bonuses to Intelligence from Core/SRD material, and the Races of the Wild elven generalist wizard variant is rather solid. And the elven racial weapon proficiencies are nice for entering Abjurant Champion (it requires a martial weapon proficiency), though at best they’re worth a single feat. And of course, the penalty to Constitution is a big no-no, so I don’t truly recommend it.
Strongheart Halfling
If you’re unfamiliar, these are basically Small-size humans, stat-wise.
Small size is a pretty big boon: improved attack, AC, stealth-skill modifiers.
On the other hand, it hurts your damage somewhat, and makes it somewhat harder to get reach (a single size increase won’t get you any).
Usually spellcasters greatly prefer this (to the point it’s considered a fairly cheesy option), but for you I don’t think it’s ideal.
Gnome
Bonuses to illusion spells (and illusion spells are very good for a gish), and bonus to Constitution. Solid choice, though between Small size and Strength penalty, it’s a far better choice for a ranged character than a melee one.
The forest gnome is strictly superior to the default rock gnome, by the way. Also consider the whisper gnome (Races of Destiny): a fantastic stealth race, it could be excellent if your swordsmanship is a little sneakier.
Lesser Aasimarr
Overpowered, but these are the only race that combines three nice features: LA +0, +2 Charisma, and no penalty to Constitution. In fact, they have no ability score penalties at all and they also give +2 Wisdom, because like I said, they’re overpowered. If they’re allowed, they’re kind of an obvious choice for Charisma- or Wisdom- based gishes.
Black Ethergaunt
If you are starting at ECL 20th, these monstrosities are... absurd. Perhaps not as good with a weapon as you might like (“only” BAB +12), they’re still ridiculously good, with ludicrous ability score bonuses, powerful special attacks, spell immunity, and they cast as 17th-level wizards.
In reality, don’t do this. You’re better than that.
Base Classes
Usually this will be your source of spellcasting. Martial base classes do have the nice property of being heavily front-loaded (i.e. you can get a lot in a few levels), but by definition you will not be getting spellcasting for doing so. I’ll note a couple of exceptions, however.
Wizard
Pretty much the be-all, end-all of arcane spellcasting classes. Wizards have the best spell list in the game, an inherently forgiving spellcasting mechanic (preparation allows you to change your loadout every day), and specialization allows you to get more spell slots. They also get a couple of bonus feats, which are very useful for qualifying for prestige classes.
See my other answer for suggestions about specializing; being a gish doesn’t change things much. If anything, the general suggestion of banning Enchantment and Evocation becomes that much stronger, since few Enchantments help you in melee much, and you are supposedly handling direct-damage with your sword.
Sha’ir
This very-weird class from Dragon Compendium has 0th-9th level spells, some arcane and some divine, weirdly enough. A neat trick there is that you can use Alternate Source Spell (Dragon vol. 325) to cast your arcane spells as divine spells that ignore Arcane Spell Failure. Anyway, the other reason to consider sha’ir is that it’s a charisma-based prepared-spellcasting class, which among other things means it gets each spell level after 1st a level earlier than other charisma-based spellcasters. This is very relevant if you want to use charisma-focused options like Divine Grace.
Sorcerer
The more static, Charisma-based wizard. Doesn’t really offer much that the wizard doesn’t do better, though there’s something to be said for having more spell slots for Arcane Strike purposes (but then the difference between a sorcerer and a specialist wizard in that regard are somewhat minimal), and as will become something of a theme, being Charisma-based is very, very nice for certain builds.
Avoid the battle sorcerer and stalwart sorcerer; they permanently inhibit your spellcasting for the purposes of improving your sorcerer class levels; since you’ll be aiming to take as few of those as possible, there’s just not much point. The only way it works out is if they allow you to take fewer sorcerer class levels and get into a prestige class sooner, but that’s uncommon and usually still not worth it. Battle sorcerer 20 is arguably superior to sorcerer 10/eldritch knight 10, though, so in an SRD-only game it may be the only game in town.
Wu Jen
Complete Arcane’s wu jen are very similar to wizards (spellbook-prepared, intelligence-based spellcasting from 0th-9th level), with a different spell list. Ultimately, that spell list is much weaker, though still plenty powerful, and wu jen do have a few unique spells that are worthwhile for a gish (such as giant’s size for the rare multiple-category size increase, and the various ribbon spells which require a real attack, rather than a touch attack, to land).
Psion
Intelligence-based psionic manifester, though he plays more like a sorcerer in terms of mechanics. A number of powers are quite useful here, though you may need Expanded Knowledge for some of the best of them. The psicrystal is also very useful: manifesting share pain on it and then sharing a vigor power between you effectively doubles the amount of temporary hit points that vigor gives you, and having your psicrystal handle concentrating on control body effectively allows you to use your intelligence score for your attack stats, which is very nice (and otherwise very difficult).
Erudite
Complete Psionics offers a psion variant called the erudite, with much more wizard-like mechanics. The rules are somewhat ambiguous about whether the number listed for Unique Powers per Day are for each level, or total, which makes a huge difference in how good the class is (if the former, it’s massively superior to the psion; if the latter, it’s probably a bit worse).
Mind’s Eye: Expanded Classes Part Four details, among other things, the “Spell to Power” erudite, which is phenomenally powerful (because you get access to, well, all spells ever); most DMs will ban it. It does basically eliminate the need for refluffing your psionics as spellcasting, since they are actually using spells, but it’s also ridiculously broken. In fact, if UPD is treated as per-power-level, then StP Erudite is the single most powerful class in the game.
Psychic Warrior
Probably the best “gish-in-a-can” class, psychic warriors are extremely competent. Their ability to manifest natural weapons allows them to do devastating melee damage, they have numerous defensive powers like vigor, and powerful mobility options like hustle and psionic lion’s charge are available to them. Plus expansion is the single-best size-increasing ability in the game. And they come with ¾ BAB per level, which is quite solid.
Ardent
The one good class in Complete Psionics (seriously), ardents are ¾ BAB per level, and get 9th-level powers unlike psychic warriors. Unfortunately, while they get great mobility powers like the psychic warrior, they miss out on some key stuff like expansion and vigor. Recommended only if the mantle substitution rules are allowed.
Wilder
Wilders just... don’t offer very much here. They get fewer powers than the psion, don’t get access to any specialty powers, and Wild Surge is frequently far too risky to use (and the Overchannel feat accomplishes the same thing, but better).
Bard
The bard is a very capable warrior if built right, primarily by using Snowflake Wardance (Frostburn), Song of the White Raven (Tome of Battle), and harmonizing crystal echoblades (harmonizing and crystal echoblades are both found in Magic Item Compendium). See my previous answer about bards for more on how to make the most of them.
Note that a 2-level dip in paladin works extremely well for bards because of Divine Grace, but also that the Harmonious Knight variant (Champions of Valor) can actually replace bard in certain cases. Also note the Sublime Chord (Complete Arcane) prestige class for getting your spellcasting back up to snuff.
Duskblade
A solid “gish-in-a-can”, the duskblade from Player’s Handbook II gets a very useful ability to channel touch spells through an attack. Unfortunately, their spell list is really limited (and goes only to 6th-level spells), and the really good feature (full-attack spell channeling) doesn’t come until 13th class level, which is very rough. Still, for arcane spellcasting, full BAB, and simplicity, duskblade wins by a landslide; every other option requires extensive use of prestige classes to accomplish it. They just wind up better when they do that.
You can also try three levels here for grabbing Arcane Channeling and some BAB, and then go into some other spellcasting class. Arcane Channeling works with any spell (they don’t even have to be arcane!), but ultimately the addition of weapon damage isn’t worth the lost spellcasting levels. There’s no reasonable way to get the 13th-level full-attack version and some other form of spellcasting, sadly.
Paladin
The one notable exception to focusing on spellcasting in your base classes, paladins get the very nice Divine Grace at 2nd level, which is phenomenal on Charisma-based spellcasters. The bumps to BAB and HP are also nice. Combined with sorcerer, this forms the basis of “sorcadin” builds. There is absolutely no reason to go for more than 2 levels of paladin in a gish build, however.
The Harmonious Knight paladin variant in Champions of Valor is an excellent option, by the way, giving you a single use of Inspire Courage, as the bard class feature. Can work very nicely as a replacement for bard in Charisma-to-everything builds.
Hexblade
The hexblade from Complete Warrior is, sadly, pretty weak. The author even admitted as much in hindsight; that early in 3.5’s development (Complete Warrior was the first supplement published) they over- and under-estimated quite a lot of things. As a result, the hexblade gets too little spellcasting too late; the only really nice thing they get is Arcane Resistance (Cha to saves vs. spells) and the Player’s Handbook II ACF that swaps the 4th-level Familiar for the excellent Dark Companion. Viable for a two-level dip to do a non-LG sorcadin, but otherwise pretty meh. Bear in mind that Divine Grace is vastly superior to Arcane Resistance, since Divine Grace is not only vs. spells.
Spellcasting-progression Prestige Classes
This is where you get your BAB back, from full-BAB or medium-BAB spellcasting prestige classes. I’m not going to list every option (for instance, you can technically take a single level of each of Thrall to Demogorgon and Thrall to Orcus, but that’s unlikely to go well for you), just the notable ones.
Abjurant Champion
This is the go-to; you will want all five levels in this Complete Mage class. Its full-BAB, full-spellcasting is unique, and it’s class features are all pretty solid, too.
Entry requires proficiency in a martial weapon; this is a point where elves suddenly become more desirable than usual, because they start with four. For others, though, you just need to burn a feat (and if you’re a wizard you can get them as one of your bonus feats), you can dip some martial class and lose spellcasting, or you can dip Dragonslayer, below.
Not really much else to say here, it’s just really, really good.
Jade Phoenix Mage
This prestige class from Tome of Battle combines arcane spellcasting with martial maneuvers, and is therefore excellent. It has a number of potent class features as well, though it does lose a fair amount of spellcasting in the process. It’s actually worth considering the loss of yet another level to dip crusader (also Tome of Battle) before entry, as that will cover the prerequisites more easily, you’ll have some Devoted Spirit maneuvers for the purposes of having the prereqs for the maneuvers that Jade Phoenix Mage grants, and the crusader’s recovery mechanic is excellent.
The optimal entry is spellcaster 8/crusader 1; this allows you to have Initiator Level 5 at crusader 1, netting you up to five 3rd-level maneuvers and a 3rd-level stance in one level.
Swiftblade
From this web article, the swiftblade is possibly unique in 3.5 as having been massively overhauled following player input. While it was originally a thoroughly typical and mediocre gish prestige class, it is now an excellent and unique class, trading a lot of spellcasting and actually making up for it with really potent time-based abilities. Very specialized, but strongly worth considering.
Dragonslayer
This class from Draconomicon is thoroughly mediocre, but it does give you three very useful things at 1st level: +1 BAB, +1 level of existing spellcasting class, and (most importantly), proficiency with all martial weapons. This is the only way to get that proficiency as a spellcaster without losing spellcasting. It is therefore very good, because you need that proficiency for a lot of gish prestige classes. Not worth taking more than one level of.
Runesmith
Runesmith is a dwarf-only prestige class from Races of Stone that has full spellcasting, but only the typical spellcaster ½ BAB per level. That said, at first level, it grants you the ability to waive the Somatic components from every spell you ever cast. If that doesn’t seem particularly important to you, note that Arcane Spell Failure only applies to spells with Somatic components. Runesmith is the best way to wear heavy armor while spellcasting. The remaining levels are pretty solid, too, but the poor BAB won’t help your swording.
If you are not a dwarf or otherwise do not want to use runesmith, but still want to wear real armor, see my other question about handling arcane spell failure. Note that since you want the BAB, Abjurant Champion is already a close to must-have for you, and that class obviates a lot of the advantages that armor provides.
Eldritch Knight
The Core option. You basically would rather not wind up here if you can; the class feature is fairly meh, the requirements are obnoxious (but see Dragonslayer above for a way to meet them without losing spellcasting), and you’re guaranteed to lose a spellcasting level. Unfortunately, if you want BAB +16, you are very likely to wind up here or in Knight Phantom, below, because they’re simply the largest chunks of full-BAB spellcasting in the game.
Knight Phantom
This prestige class from Five Nations has very similar requirements to the Eldritch Knight, and the same BAB/saves/spellcasting progressions, but has much, much better class features. Like the Eldritch Knight, it’s unavoidable to lose one spellcasting level before entry, but that level is very difficult to avoid in any event. Again, taking a level of Dragonslayer is preferred to a level of some martial base class if you can swing the feats.
Unseen Seer
This class is more of a skillmonkey-mage than it is a warrior-mage, but it does get ¾ BAB per level, full spellcasting, and a bunch of really nice features on top of its 6+Int skill points. Very solid in general, also ideal for getting those last few levels of decent BAB necessary to hit BAB +16 without losing a spellcasting level.
If you want to use the unseen seer’s improvement to precision damage, but don’t want to dip rogue or whatever, you can use Martial Study (assassin’s stance) at 10th-or-higher to get +2d6 Sneak Attack damage, and thus give unseen seer something to improve. This will require Martial Study in some Shadow Hand maneuver, but that also gets you Hide as always-a-class-skill, which will help.
Ultimate Magus
I mention this only because you did; I would not otherwise consider it a gish prestige class. It’s certainly a cool prestige class, but advancing duskblade spellcasting isn’t worth it simply because duskblade spellcasting isn’t all that good; it’s the Arcane Channeling that you want. If you do want to go this route, the typical pairing with wizard is beguiler (Player’s Handbook II), though the Core assassin makes an interesting entry (albeit not a particularly good one).
Prestige Classes with their own spellcasting
There are a lot of these, and several even have good BAB, but most have really poor spell lists. I’m only going to bother with two.
Suel Arcanamach
This class from Complete Arcane is pretty cool, though honestly you are way, way better off just going straight battle sorcerer (and remember, I consider battle sorcerer quite poor). Still, it’s simple, it has nice class features, and it does well out of the box.
Might be interesting on a paladin 2/duskblade 3 entry. You might even be able to finagle entry into sublime chord (see below) after that, to put your spellcasting in a better place.
Sublime Chord
This prestige class from Complete Arcane gets you 9th-level charisma-based spells off the Sor/Wiz in as many levels. As such, it is an amazing way to “catch up” if you are behind.
This one is generally for bards, though an entry that uses Harmonious Knight paladin 2 and sorcerer 6 -or- sha’ir 5 might be better, since it gets you Divine Grace.
A nice trick with sublime chord is to take classes that miss spellcasting in early levels, say Knight Phantom, before you enter sublime chord, getting the dead levels over with before they really matter. You then use the remaining levels to continue to advance Sublime Chord spellcasting, allowing you to get that full BAB on excellent spellcasting, and the lost spellcasting level of the first prestige class doesn’t come into play because it was from before you started Sublime Chord.
Manifesting Prestige Classes
Easy section because there are only two that give full BAB.
Slayer
The SRD version (rather than the one in Expanded Psionics Handbook) is much better since its features are not restricted to just illithids. Either way, though, lose a manifesting level, gain full BAB and a ton of really nice class features. Excellent class.
War Mind
This one is full BAB, and gets its own manifesting, Wis-based off the psychic warrior list. Overall, psychic warrior into slayer is better, though Sweeping Strike plus Cleave is a terrifying combo, particularly if you have a cheap and efficient way to add a lot of weak enemies to the map around you (a bag of rats is traditional).
Recommended Builds
I am listing these in order of simplest and most generic, to the highly specialized. Note that the specialized builds are more powerful; if they weren’t they wouldn’t be worth worrying about the trouble of the whole build.
Gish-in-a-can
- Duskblade 20
- Duskblade 15/Abjurant Champion 5
- Bard 5/Eldritch Knight 10/Abjurant Champion 5
- Psychic Warrior 20
- Psychic Warrior 10/Slayer 10
Simply being a duskblade (to 13th, at least), bard (potentially with full-BAB prestige classes), or a psychic warrior (to 20th, or with 10 levels of Slayer) makes you a reasonably solid gish. By far the simplest answer. Of these, the psychic warrior/slayer is best, then the bard, then the duskblade.
Sorcadin
- Paladin 2/Sorcerer 18
- Paladin 2/Sorcerer 8/Eldritch Knight 10
- Paladin 2/Sorcerer 6/Abjurant Champion 5/Knight Phantom 7
- Paladin 2/Sorcerer 3/Unseen Seer 10/Abjurant Champion 5
These are basically the standard Paladin 2/Sorcerer chassis, taken in various directions. Divine Grace is quite nice, it gets you some BAB, makes entry into Eldritch Knight and/or Knight Phantom easier.
Of these, only the first and last ones get 9th-level spells, but the BAB +12 of the first one isn’t that impressive. The last gets BAB +16, which is the magic number, and is probably the simplest build to do the 9ths/BAB +16.
Swapping in sha’ir for sorcerer allows the middle two to get 9th-level spells.
Wizard with a Sword
- Wizard 15/Abjurant Champion 5
Where “Wizard 15” probably is more like “Wizard 5, and a bunch of full-casting prestige classes.” The idea here is simple: improve your BAB, don’t lose spellcasting or have to burn too many feats. If you’re an elf, you actually don’t have to do anything but wait until you get sufficient BAB. Everyone else needs to use a feat on it, but wizards can trade Scribe Scroll or their 5th-level feat for it.
Note you can easily substitute any spellcasting class for Wizard here without any difficulties at all.
Jade Phoenix Mage
- Wizard 8/Crusader 1/Jade Phoenix Mage 10/Abjurant Champion 1
Wizard here can, again, be swapped with just about any spellcasting class, and you can easily swap levels in the base class for full-casting prestige classes.
This build has a ton to recommend it. You do (barely) manage 9th-level spells (note: a sorcerer base will not), you get BAB +16, and you get 8th-level maneuvers (you may have to delay your final level of Jade Phoenix Mage until 20th so you can actually select one).
Swiftblade
- Wizard 6/Swiftblade 9/Abjurant Champion 5
Wizard may be swapped with any spellcasting class that gets haste as a third-level spell (and gets access to it by 6th level).
This nets you BAB +17, 9th-level spells (barely; will not for sorcerers), and a ton of amazing class features, including casting-ability-mod-to-initiative, attack, damage, and movement bonuses, permanent miss chance, free Quicken applied to haste, Evasion, treat haste as Extraordinary (!), and an extra move or standard action per turn.
Swiftblade 10 is an interesting conundrum; you miss out on 9th-level spells, but get Extraordinary time stop. Words cannot describe how amazing that is. Generally speaking, 9th-level spells are better, but you’d be crazy not to at least consider giving them up for this.
Sublime Arcanamach
- Harmonious Knight Paladin 2/Duskblade 3/Eldritch Knight 1/Suel Arcanamach 4/Sublime Chord 2/Abjurant Champion 5/Eldritch Knight +3
Gets 9th-level spells, Inspire Courage, Arcane Channeling, Divine Grace, and a whopping BAB +19. Silverbrow Human is the recommended race, for Dragonfire Inspiration. Snowflake Wardance gets you Cha-to-attack on top of your Cha-to-saves. Taking Martial Study, Martial Stance, and Song of the White Raven would be really cool if you can swing the feats. Unfortunately, the Arcane Channeling is only standard action attacks, which aren’t terribly impressive. Better would be...
Twice-Sublime Phoenix of Harmony
- Harmonious Knight Paladin 2/Wizard 3/Crusader 1/Jade Phoenix Mage 4/Sublime Chord 1/Jade Phoenix Mage +6/Abjurant Champion 3
- Harmonious Knight Paladin 2/Sha’ir 3/Crusader 1/Jade Phoenix Mage 4/Sublime Chord 1/Jade Phoenix Mage +6/Abjurant Champion 3
- Harmonious Knight Paladin 2/Sorcerer 4/Crusader 1/Jade Phoenix Mage 3/Sublime Chord 1/Jade Phoenix Mage +7/Abjurant Champion 2
9th-level spells, 8th-level maneuvers, BAB +18, and Inspire Courage and Divine Grace. Leveling up to 11th level will be rough as a charisma-heavy wizard; consider sha’ir instead, or even sorcerer (note: sorcerer does mean “only” BAB +17), just so those middle levels aren’t quite so painful. Feat suggestions are the same as for Sublime Arcanamach, except you won’t need Martial Study/Stance. If BAB +17 is sufficient, consider taking two levels of sublime chord instead of the level in abjurant champion: the song you get at sublime chord 2 is very nice.