Re: Clothing Enchantments [message #69163 is a reply to message #69154] |
Sat, 20 July 2013 23:22 |
|
JohnDoe
Messages: 3007 Registered: October 2007
|
Retired
|
|
|
You can add a CBonusItemDef to clothes if you wish. If you do it perfectly and the game doesn't crash, I hypothesize that the best-case scenario is that the item acts like a book with a CBonusItemDef - that it's having the item that increases your health and will, not wearing the item, which is not exactly the sort of "enchanting" you want. Or, another likely possibility, nothing happens. But my favorite and always possible option, total failure resulting in crash.
As for graphical effects... it's complicated and requires editing on a number of fronts. First you need to attach a helper to something the Hero is going to wear. This means creating an animated mesh as a clothing item. This helper is where the effect will spawn when worn. We'll call our helper... HDMY_LIGHT_POINT
Your first thought might be to try the CParticleAttacherDef for linking the effect to your new helper. This is actually a good thought, unfortunately it is also wrong. What you want to do instead is edit the CHeroMorphDef and add a new entry in one of the effects sections (I'm sure that it absolutely matters which one, but I am not sure which you need to use - if it crashes or something worse happens, try the other). Throw in the names.bin offset for our helper (click the ... and look for LIGHT_POINT). And make sure the dependent stat is set to base. If you're unsure what number is base - it's 2.
Load up Fable, wear your edited/created item and watch in amazement and/or get a crash or worse. Enjoy.
This knowledge was passed down from the first age, and this was first accomplished by Keshire.
|
|
|