Author: Matthias Kurzke (mawende@gmx.net) -- send me your comments... Contents: z228ego.diff -- a 'diff -ru' against the Zangband 2.2.8 source z228ego.txt -- this file again e_info.txt -- an e_info.txt that emulates the old Zangband ego-items e_info_new.txt -- an e_info.txt with some new ideas of mine Also including 'documentation'. notes.txt -- some random notes for source hackers and others ;-) Rationale: In ZAngband, customization by use of the *_info.txt files is easy. Monster properties can be changed, artifact properties can be changed, and in a free slot, a new monster, object or artifact can be added. The things that can not be changed by use of *_info.txt files are the hardcoded activations of the artifacts and most of the properties of the ego-items. It is currently impossible to add an ego-item without recompiling because the ego-item generation (the "choice" of which ego-item to generate is a hardcoded switch(randint()). For this reason, I have patched the source of Z 2.2.8 so ego-item generation is no longer hardcoded, but works on the lines of the level/rarity concept of the object and monster generation code. In fact, I more or less cloned that code. This code is much more powerful than my respective patch for Vanilla, because Z's ego-items are much more 'colorful' and complicated, but have more possibilities (essentially because of o_ptr->art_flags1-3). The advantages of this patch are: - It is easy to add new ego-items and give them interesting properties. - It is possible to restrict an ego-item to certain tval's/sval's. You might add ego-items that can occur on all kinds of armor heavier than Soft Leather Armors, or you might add Ego DSM's easily. Robes of Permanence are also no longer a "hack". You have three fields of (tval, min_sval, max_sval) that you can use. It is thus possible to create rather specific ego-items (only for heavy weapons, only for whips, only for Daggers, Short Swords and Lances...) The usefulness of this depends a bit on the sorting of the sval's. - The additional properties of Zangband ego-items are now soft-coded. You can give all boots (not only Levitation) a high resist if you like. - With the introduction of the "level" concept to the ego-item list, the distribution of ego-items can vary from level to level. - You can customize the additional random properties in a way that is rather flexible. In fact, I have added lots of new random properties, like "Give this item a random stat bonus, 1 in 5" is possible now. - With my adapted e_info.txt file, the ego-items are exactly the same as before, although some rarities have *slightly* changed, notably Crowns and Helms of Seeing get Telepathy 1 in 5 both instead of 1 in 3 / 1 in 7. I won't say my design is flawless, so here are my second thoughts: The disadvantages of my code are: - It probably takes a bit more memory (e_info is bigger now, and I've added an allocation table for the ego items) but not much. - When you add a single ego-item type for a certain tval/sval, it is certain to be generated if you generate a "great item" of that tval/sval. If you want to rebalance your newly-added item, you might have to add another item or change its "depth". - When you add an ego-item, be careful with setting its rarity. Look at the rarities of the other ego-items first, because sometimes the most common item doesn't have a rarity of one (to better emulate the old distribution) - You need my new "e_info.txt" file ;-) - Ego-item creation is nearly as arcane-looking as object creation now. Once you understand it, that is no problem any longer ;) At least it is in total control of the user now. - The processing of "good" and "cursed" ego-items in the same way meant the creation of a hack to preserve the rarities of Weapons of Morgul. The "level boost" for out-of-depth ego items is calculated differently for cursed and for good items, essentially making very deep good items very hard, while cursed ego-items might rather easily be generated even 50 levels OOD. Weapons of Morgul are level 127 items now, thus preserving their old rarity. The same with Ammo of Backbiting, BTW. (But I believe cursed ego-items are not a very important issue :)