Only guidelines exist
A construct with an Intelligence score of at least 3 can take class levels. In fact, any creature with an Intelligence score of at least 3 can potentially take class levels (MM 7). Many don't, advancing instead by Hit Dice, but they can. Even creatures with Strength and Dexterity as nonabilities (MM 312) can take class levels, although many class features won't be particularly useful if the creature can't exert physical force because it lacks a Strength score and can't move because it lacks a Dexterity score.
That latter problem, by the way, may entirely prohibit casting spells (although not manifesting psionic powers) or even speaking generally. The Monster Manual says, "A creature with no Dexterity score can’t move" (312), so ask the DM if that means the creature can't take move actions, can't leave its space under its own power, is essentially and forevermore paralyzed, or something else.
If the construct's house ruled special ability self-propulsion functions like a psi-crystal's self-propulsion, when the special ability's active the creature will gain a Strength score of 1 and a Dexterity score of 15 if a Diminutive creature. I suggest modifying those ability scores according to the construct's size category (MM 291). For example, a typical lance, were the DM to rule that it's Medium size, when using the special ability self-propulsion would have an adjusted Strength score of 11 and Dexterity score of 9.
Some conservative house rules
Were such a creature an important figure in my campaign, I'd start with the statistics for an appropriately sized animated object (MM 13–14), but make Strength and Dexterity nonabilities. This jibes with the very rough guidelines for Intelligent Items from the Dungeon Master's Guide: "Intelligent items can actually be considered creatures because they have Intelligence, Wisdom, and Charisma scores. Treat them as constructs" (268–71). From there, the creature takes class levels, and has as its race animated object.
Other issues
There are a few additional issues to consider when introducing intelligent magic items and intelligent animated objects to a campaign.
According to Wizards of the Coast
Below are the different ways intelligent created creatures are discussed in Dungeons and Dragons 3.5 by the game's publishers.
Intelligent magic items should be inexpensive
According to pages 268–9 of the Dungeon Master's Guide "permanent magic items… can be intelligent" for a pittance (e.g. an item with Int 12, Wis 10, Cha 10 that communicates via empathy and has 30 ft. vision and hearing costs adds only 1,000 gp to an item's base price (or 2,000 gp if the DM insists it have at least the 1 lesser power bless 3/day)). Spending 500 to 1,000 gp and 20-40 XP lets any permanent magic item's creator grant the magic item sentience.
This is an incredibly small price to pay for an AI, and apparently any level 15 caster with the feat Craft Magic Arms and Armor (PH 92), Craft Rod (PH 92), Craft Wondrous Item (PH 92-3), Forge Ring (PH 94), or other item creation feat that allows the creation of permanent magic items can do this without issue. No spells required. That's weird.
Intelligent magic items should not be considered truly intelligent
Other than the Dungeon Master's Guide's vague indication that anybody powerful enough and possessing the correct feats can create intelligent magic items, the only other canonical mention of the nuts and bolts of doing so appears to be the 6th-level Sor/Wiz spell Nybor's psychic imprint [trans] (Magic Books of Faerun column "Nybor's Small Codex: Spells from a Former Zulkir"). To summarize, the spell copies the target's brain patterns (or whatever) (a la Marvel Comics's Wonder Man and the Vision) and uses those as the basis of the intelligent item's personality. Gaining experience isn't possible for an intelligent item; the item has the target creature's personality and experience at that precise moment, unchanging, frozen forever.
(Philosophically, I really don't know if that's better or worse than dirt cheap AIs. The game thinks the spell is evil, though—y'know, just like the 1st-level Clr spell deathwatch [necro] (PH 217).)
Note: Although never stated directly, I think the spell Nybor's psychic imprint was an effort to explain why intelligent magic items—which are otherwise pretty smart for constructs—don't have Hit Dice, feats, skills, and other traits and features consistent with real creatures. In Dungeons and Dragons, 3rd Edition constructs, even if they possesses an Intelligence score of 3 or higher, just couldn't have feats or skills. This changed with the 3.5 revision… while the intelligent item rules didn't.
Intelligent animated objects should be extremely expensive
The Monster Manual says that animated objects "owe their existence as creatures to spells such as animate objects or similar supernatural abilities" (13), and, indeed, the Player's Handbook permits a 14th-level caster to use the 5th-level Sor/Wiz spell permanency [univ] (PH 259-60) on the 5th-level urban druid (Dragon Compendium Volume I 57–65) spell animate objects [trans] (PH 199) by spending 3,000 XP.
That means a buyer who wants an animated candelabra to do his bidding pays 450 gp for an urban druid 9 to cast the spell animate objects and 22,000 gp for a Wiz14 to cast the spell permanency on the spell animate objects.1 The animated objects then uses the statistics from the Monster Manual (13–14).
Except such a creature has Intelligence as a nonability (MM 312). To give it an Intelligence score, the buyer pays 26,530 gp to a Wiz17 to cast the 9th-level Sor/Wiz spell awaken construct [trans] (Spell Compendium 21). That's nearly 50,000 gp for but a single (and, O, so single!) singing, dancing candlestick.
As 22,000 gp buys a nimblewright (Monster Manual II 162–3), Lumière's probably a bit overpriced.2
…And that's pretty much it
A DM should probably consider all three factors when making intelligent animated objects or magic items an important part of his campaign.3
The third-party alternative
White Wolf's Sword and Sorcery Studios's Malhavoc Press imprint originally published rules allowing intelligent magic items to gain class levels in Book of Eldritch Might III: The Nexus (2003) for Dungeons and Dragons, 3rd Edition and updated those rules to Dungeons and Dragons 3.5 in the Complete Book of Eldritch Might (2004).
Although I hesitate to suggest a third-party publisher for your needs—especially while I'm certain other third-party publishers have also made available such rules—, Monte Cook, who authored both Books, is credited with writing the Dungeon Master's Guide for Dungeons and Dragons, 3rd Edition so his résumé's pretty good. Further, his third-party material is generally high quality (but, if I may say so, fairly conservative).
In short, the system presented therein has intelligent items gain levels in the class Intelligent Item—a 20-level base class exclusive to intelligent items that grants the item class features like skill points, saving throw bonuses, bonus feat, and spell-like abilities—upon the creator or wielder spending XP equal to 1/4 the amount needed to advance a normal creature (the creator or wielder can't, however, spend XP to advance an item with an Intelligent Item class level greater than the wielder's own). The intelligent items section occupies pages 45–57 of Nexus and 62–71 of Complete; a cursory glance leads me to believe no changes were made by the compilation.
1 According to Spellcasting and Services on Table 7-8: Goods and Services, because of the high cost, a wizard who'll cast the spell permanency on the spell animate objects or who'll cast the spell awaken construct "is not generally available except by the DM's permission" (PH 129). Further, the spell permanency includes the spell animate objects in the list of "spells [that] can be cast upon objects [n.b. plural] or areas only and rendered permanent" (260), so a generous DM could allow a single casting of the spell permanency to affect all the objects animated by a single casting of the spell animate objects. Given their commonality in fiction, I probably would. Finally, while the material component for the spell awaken construct is violently unusual, but no price is listed for it and there's no M in its short description, so it's in every spell component pouch; make of that what you will.
2 I know that technically the Enchantress probably used an epic spell with the transform seed, but, seriously, what were you thinking of when I brought up animated objects?
3 I have reached the conclusion, however, that every campaign should include a cudgel that never forgets (Magic Item Compendium 49) (20,312 gp; 8 lbs.). I didn't want my favorite intelligent magic item to go unmentioned… for obvious reasons.
There are two official optional rulesets for crafting
Both are optional and require that you work with your DM as to if they're an option and how they'd work. In either place that these rules appear, they are optional variants to the base rules.
Dungeon Master's Guide
The first official optional rules released appear in the Dungeon Master's Guide in chapter 6 as part of the "Downtime Activities" section:
Crafting a Magic Item
Magic items are the DM’s purview, so you decide how they fall into the party’s possession. As an option, you can allow player characters to craft magic items.
Within these rules, there are the following requirements:
- a formula that describes the construction of the item
- the character must also be a spellcaster with spell slots and must be able to cast any spells that the item can produce (and expends the relevant spell cost each day during crafting)
- the character must meet a level minimum determined by the item’s rarity
- a required gold and time cost to craft the item during downtime (consumable cost half as much as other magic items)
\begin{array}{c|c|c}
\text{Rarity}&\text{Cost}&\text{Minimum Level}\\
\hline \text{Common}&\text{100 gp}&\text{3}\\
\text{Uncommon}&\text{500 gp}&\text{3}\\
\text{Rare}&\text{5,000 gp}&\text{6}\\
\text{Very Rare}&\text{50,000 gp}&\text{11}\\
\text{Legendary}&\text{500,000 gp}&\text{17}\\
\end{array}
Xanathar's Guide to Everything
An alternative ruleset is part of the optional variant to downtime as a whole (and one I personally think is more fleshed out) that appears in the supplement Xanathar's Guide to Everything in the "Downtime Revisited" section of chapter 2:
Crafting Magic Items. Creating a magic item requires more than just time, effort, and materials. It is a long-term process that involves one or more adventures to track down rare materials and the lore needed to create the item.
Within these rules, there are the following requirements:
- a formula for a magic item in order to create it
- an exotic material to complete it. This material can range from the skin of a yeti to a vial of water taken from a whirlpool on the Elemental Plane of Water. Finding that material should take place as part of an adventure. (the suggested challenge rating of the creature to face, though not necessarily harvest the material from, appears in the table below)
- whatever tool proficiency is appropriate, as for crafting a nonmagical object, or proficiency in the Arcana skill.
- a required gold and time cost to craft the item during downtime (consumable cost half as much as other magic items). Do note that downtime rules as a whole are revised when using the Xanathar's Guide to Everything rules
\begin{array}{c|c|c|c}
\text{Rarity}&\text{Challenge Rating}&\text{Time}&\text{Cost}\\
\hline \text{Common}&\text{1-3}&\text{1 workweek}&\text{50 gp}\\
\text{Uncommon}&\text{4-8}&\text{2 workweeks}&\text{200 gp}\\
\text{Rare}&\text{9-12}&\text{10 workweeks}&\text{2,000 gp}\\
\text{Very Rare}&\text{13-18}&\text{25 workweeks}&\text{20,000 gp}\\
\text{Legendary}&\text{19+}&\text{50 workweeks}&\text{100,000 gp}\\
\end{array}
Best Answer
Answers
Intelligent items can be randomly rolled. A DM adhering strictly to random treasure generation will find that nearly any permanent magic item can be at random an intelligent item. That is, the Dungeon Master's Guide says on page 216 that 1% of armor, 1% of shields, 5% of ranged weapons, and 15% of melee weapons that are randomly generated are intelligent items; likewise on page 229 it says 1% of rings, on page 234 1% of rods, and on page 246 1% of wondrous items that are randomly generated are intelligent items.
While that may seem like a lot of intelligent items waiting to be looted (and, depending on one's point of view, enslaved), it ends up being surprising few: the Dungeon Master's Guide's rules for random treasure generation (see Table 3–5: Treasure on 52-3) are fairly tight-fisted magic-wise. Even a CR 20 creature like a pit fiend, for example, has a 25% chance of possessing no magic items at all in its hoard. Create a few sample hoards using the DMG's rules (I suggest a good rules-bound online generator—this one's pretty good, for instance—instead of actual dice; doing so by hand gets tedious otherwise), and you'll rarely roll up an intelligent magic item.
The DMG has no special rules for creating intelligent items. Except for mandating a minimum caster level of 15 and that the ensuing intelligent item have its creator's alignment (288), if a craftsman adds the cost from Table 7–30: Item Intelligence, Wisdom, Charisma, and Capabilities (269) and maybe at least one power from the Intelligent Item Powers chart (ibid.) to a permanent magic item, the magic item's intelligent. However, keep in mind that the Dungeon Master's Guide on 268-72 focuses primarily on how the Dungeon Master should add intelligent weapons to the campaign instead of on how the PCs can. Without consulting the DMG—y'know, a book for Dungeon Masters—, PCs don't even really know the price of a +1 dagger. Although the metagame lets players know a lot of things, the PCs themselves need never learn in your campaign that crafting intelligent items is even a thing if you don't want them to.
I say this not to rain on anyone's parade but because intelligent magic items with special powers can severely disrupt the action economy. Moreover—and, perhaps, more importantly—, a DM probably doesn't want PCs crafting intelligent magic items willy-nilly because, each time a PC does, the PC adds another NPC the DM must manage. It's a little like having the feat Leadership, except every magic sword, amulet, rod, and boot a magical craftsman creates can become like a little cohort.
The DMG doesn't say where an intelligent item's sentience comes from. However, this rules gap is filled in the Forgotten Realms campaign setting by the 6th-level Sor/Wiz spell Nybor's psychic imprint [trans] (Magic Books of Faerun column "Nybor's Small Codex: Spells from a Former Zulkir"), which, metaphorically, takes photograph of a creature's personality and uploads it into a magic item. That spell or one like it is as good an answer as any.
PCs can't create artifacts and can modify them only with the DM's permission. The Epic Level Handbook says that "[m]ajor artifacts… are beyond the means of even epic characters to create" (73) and "minor artifacts are… magic items that no longer can be made by common mortal means—even by the hands of epic creators" (151). Even in the magic-saturated Forgotten Realms campaign setting, the Ars Factum chapter of the Nether Scrolls which "reputedly… taught the reader how to create artifacts" remains locked with all unable to discover the key to its powers (Lost Empires of Faerûn 156-7).
Nonetheless, a generous DM may allow a PC to upgrade an artifact to sentience in the same way that a creature can pay to have a magic item further ensorcelled with more powers. This seems unlikely and dangerous, as artifacts—especially major artifacts—are important, and messing around with their magics is liable to alert someone or, worse, irritate someone.
More information about intelligent magic items—like how they can gain class levels but also much more than that (honestly, I went a bit overboard)—is available in answer to this question.