Wish had specific rules for magic item creation only in 3.0/3.5e
So far as I can tell the only editions in which the use of wish to create magical items is well-defined are 3.0e and 3.5e.
1e/2e AD&D rules contain the wish and limited wish spells, but don't describe how these spells could be used to create magical items. Limited wish explicitly cannot do so, as described in the 1e PHB:
The use of a limited wish will not [...] bring wealth or experience merely by asking. [...] The limited wish can possibly give a minor clue to some treasure or magic item. Greedy desires will usually end in disaster for the wisher.
The best a limited wish can do here is give you information that might help you acquire a certain magical item, but it certainly can't create one for you; and the DM is encouraged to ensure that "greedy" desires end in disaster regardless.
The full-fat unlimited wish doesn't have the same restrictions, but it also doesn't describe how it might create magical items. The best we can determine is that such an application would come under the "other forms of wishes" described by the spell (as it's neither healing, resurrection, or transportation) and so the caster would be subject to some exhaustion from the casting. Ultimately these rules leave game balance in the hands of the DM/referee and so it's up to them how to interpret a wish used to create or acquire a magical item.
Other forms of wishes, however, will cause the spell caster to be weak (-3 on strength) and require 2 to 8 days of bed rest due to the stresses the wish places upon time, space, and his or her body. Regardless of what is wished for, the exact terminology of the wish spell is likely to be carried through. (This discretionary power of the referee is necessary in order to maintain game balance. [...])
The 2e versions of these spells have largely the same text and work in the same way.
As with the editions before it 3e has limited wish and wish spells available to cast. Limited wish still can't create magical items - its use is restricted to replicating other spell effects of up to 6th level, undoing certain other harmful spells, or freeform effects "whose power level is in line with" those other uses, which definitely doesn't include creating permanent magical items. The unlimited wish, however, absolutely can create magical items, as one of its uses is:
- Create a valuable item, even a magic item, of up to 15,000 gp in value.
As the spell text notes, wish can be used to attempt greater feats than those described, though at risk of perverting the intent of the wish or achieving only partial fulfilment; this text introduces the example of wishing for a staff of the magi that was subsequently re-used in 5e:
For example, wishing for a staff of the magi might get you instantly transported to the presence of the staff’s current owner.
At any rate it's considered safe to use a wish to create a magical item so long as that item is worth no more than 15,000gp. The cost of casting is measured in XP; casting wish for any purpose drains 5,000XP from the caster. This edition frequently used XP as a cost for certain very powerful spells, and in the normal magical item creation process, where a creator would normally have to pay 1XP per 25gp of the item's base price - 5,000XP would thus equate to 125,000gp worth of magical item if crafted the normal way, so you pay a very expensive premium if you instead use that XP to cast wish (but you do get the item instantly, and without the mundane material costs.)
The 3.5 revision made some changes to how wish works, especially with respect to using it create items. In contrast to the 3e version, a 3.5e wish can:
- Create a nonmagical item of up to 25,000 gp in value.
- Create a magic item, or add to the powers of an existing magic item.
This introduces the specific ability to create arbitrary nonmagical items of up to 25kgp value, which was retained in 5e's wish, but also has the ability to create magical items, and it does so seemingly without restriction. A nonmagical item can't cost more than 25kgp, but no price cap is given for a magical item! However, there is actually a limit to what can be created using this wish - it's implemented as an XP cost:
When a wish creates or improves a magic item, you must pay twice the normal XP cost for crafting or improving the item, plus an additional 5,000 XP.
Thus the limitation on this use of wish is how much XP the caster has available to spend upon it. 3.5e has the same XP costs for creating magic items as 3e did, so for example to create a magical item worth 25kgp would cost 7,000XP (5,000XP for the base cost of wish plus 2,000XP to cover what would normally have been a 1,000XP cost for the item).
This mechanic puts a hard limit on how valuable an item a caster of any given level could afford to produce, since the maximum free XP they could possibly have to cast on spells is 1 XP less than their current level times 1000 - if they had any more XP than that they would have levelled up, and they can't spend any more XP than that since the rules don't allow spending so much XP that you would lose a level. A 17th level wizard who was just 1XP away from levelling up to 18th would have 16,999XP and could thus create an item worth at most 149,975gp, presuming they were were willing to sacrifice all their progress to the next level. (This mechanic does interact badly with certain creatures who have access to wish as a spell-like ability rather than as a spell and therefore ignore its XP costs, as they could then conceivably create any arbitrarily valuable magical item.)
For both 3.0 and 3.5e there is another possible application for limited wish and wish spells in the domain of magic item crafting; the normal crafting rules usually require an item's creator to have the ability to cast a certain spell or spells as appropriate to the item's nature, though have exceptions for the ability to provide the same spell effect through some other means such as a cooperating friend or another magic item that already duplicates the spell. Since the wish spells can be used to duplicate other spell effects, it seems reasonable to extrapolate that they can be used to meet the spell-based prerequisites of crafting magical items normally (as in this question).
In 4th edition there is no wish spell available, so there's no possibility to use one to create magical items.