[IDEA/REQz] Soulgem Souls escape

Post » Sat May 28, 2011 9:38 am

http://www.gamesas.com/index.php?/topic/1083965-soul-gems-what-are-they/page__view__findpost__p__15794817 reminded me about what I've read regarding enchanting items in TESII: Daggerfall. The process is inherently dangerous; if your weapon or armor breaks, there is a chance that the soul used in the gem to enchant your weapon is released and attacks you; your weapon would lose its enchantment.

So, that gave me an idea, which I am not sure is possible with MW's engine.
1) on pre-made weapons/armor, we don't know what soul was used. It may be possible to randomly spawn a creature from lists that correspond to the enchantment charge of the weapon/armor.
2) a similar method could be done on user-made armor/weapons, although ideally:
3) it'd be best if the soul released matched the soul in the gem used to enchant the item.

Another possibility is to increase the danger by adding any souls from soulgems used to recharge an item. So, if you initially used a Bull Netch to enchant your item, then if it breaks, a Bull Netch will spawn and attack you. If you recharged your item with a Scrib, then if your item breaks, both the Scrib and Bull Netch might spawn to attack you.

Not 100% guarantee the souls will escape.

Discuss!

Also: I don't have any skills to accomplish this sort of mod. I'm just throwing the idea out here.
User avatar
Kit Marsden
 
Posts: 3467
Joined: Thu Jul 19, 2007 2:19 pm

Post » Sat May 28, 2011 5:11 am

What about making failed enchant attempts have a chance of releasing the creature whose soul was being used ( as a potential , random side effect that would occur if the players enchant level and luck were low ) ? Great idea , BTW !
User avatar
Elle H
 
Posts: 3407
Joined: Sun Aug 06, 2006 3:15 am

Post » Sat May 28, 2011 2:55 am

I recall seeing a post a while back with similar content. It'd definitely be a nice addition to the enchanting system, an interesting twist to magical weapons. You could be in battle, fighting back three enemies when suddenly... oh no! Your weapon has broken, and the Dremora's soul now seeks vengeance.

Alternatively, maybe you wish that you'd used a soul for a different purpose. Perhaps let the weapon break, and Soul Trap the soul powering that weapon again.


I think some more brainstorming is in order for the idea to go anywhere. What script fragments would be needed to accomplish this?

1) Cycling through items in the player's inventory. This is definitely possible but I am not yet familiar with the methods.
2) Detecting which items in the player's inventory are enchanted. MWSE appears to have a function xGetMaxCharge. I haven't looked yet but presumably this returns zero for unenchanted items, greater than zero for enchanted items.
3) Detecting which items in the player's inventory are broken. MWSE has xGetCondition. For each item for which xGetMaxCharge is greater than zero, we can check that the condition is also greater than zero. If equal to zero then we can do a check with some % chance that the soul will escape.
4) For items that were already in the game, we can use some sort of lookup table with xGetMaxCharge and guess a reasonable creature to spawn.

5) For items that the player enchants.... this is the tough one, at least, as far as my scripting knowledge extends. References become invalid when the game is closed, correct? So even though we can use OnPCSoulGemUse to detect when an item is enchanted, is there a reliable way that we could store an identifier to that unique object and the unique soul used despite game restarts and such?
User avatar
April D. F
 
Posts: 3346
Joined: Wed Mar 21, 2007 8:41 pm

Post » Fri May 27, 2011 8:03 pm

Hmmmm ! So goes to show how much I know of the mechanics of enchanted weapon creation . Hadn't realized that was an issue NMZmaster . So , there would be a lot of scripting involved . Unless a list of potential creatures is used ( certainly for in game purchased/looted enchanted weapons [ and armor ? ] ) that would simulate the release of the soul used . But for player enchanted weapons , I can only scratch my head . If the game doesn't store references to the soul used in the enchanting process then what would be a work-around ? Unless each type of enchantment releases a specific soul . Like an enchantment that enhances attack releases a physical attacker when the weapon is broken . Or a mage buff type releases a magic using critter . But then the weapon would also have to be replaced with a non-enchanted counterpart as well as releasing the creature . Otherwise an entirely nasty can of worms gets opened and thats loosing the weapon all together when it is soul busted . What does everyone else think ?
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Sat May 28, 2011 2:49 am

But for player enchanted weapons , I can only scratch my head . If the game doesn't store references to the soul used in the enchanting process then what would be a work-around ? Unless each type of enchantment releases a specific soul .


In Morrowind, functions can refer to object IDs -- but not references (specific instances) of an object. And I'm not sure how it handles player enchanted items -- I assume that some sort of unique ID or reference is created in the player's save game... I wonder.... maybe if the player's inventory was all known (i.e., store references and max charge of each reference) then when a soulgem was used, it could be checked to see if there are any new items with xGetMaxCharge > 0? And there is such a reference not in the known list, I think that you could use xRefID to return the ID corresponding to that reference.

If my assumption that Morrowind creates a new ID for your enchanted item and that we can figure out the ID of that item as outlined above (I think you could store an ID in a file or something whereas a reference would become invalid upon reload), then you would be able to track player created weapons. If my assumption is incorrect... I don't know, it might not be possible.

If that step was completed, then the remaining thing to do would be tracking the souls associated with the enchantment. Anyone know of some method for that?




In a few weeks, my engineering senior project will be over, and I should have some more time to mod again. Maybe, just maybe if we can continue outlining how these ideas could work in script, we might just get an actual working system.
User avatar
yermom
 
Posts: 3323
Joined: Mon Oct 15, 2007 12:56 pm

Post » Fri May 27, 2011 11:48 pm

Um , I just jumped into my game to check a player made enchanted item and check it's ID in the console . Interesting ! It was a long string of numbers perhaps translated from hexadecimal ... no just counted , 19 numbers . Ok does anyone out there know how the game stores player enchanted references ?
User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am


Return to III - Morrowind