Problem with sustainable ability
#1
Posté 22 juin 2010 - 09:49
I can see similar stuff is done with some header scripts such as combat_h or core_h, but I don't want to mess with those.
Alternative approach would be to get currently equipped weapon when the talent is activated with something like this:
object oWeapon = GetItemInEquipSlot(INVENTORY_SLOT_MAIN, stEvent.oCaster);
and then apply a chance of paralysis on it, but I don't know if there's a function for that.
#2
Posté 23 juin 2010 - 04:27
(Your ID#) Paralysis (INTERNAL) (Your Name StrId) 2 8 0 0
0 0 0 Paralysis 0 0 0.1 0 0 0
8 is EffectParalyse in effects.xls
#3
Posté 23 juin 2010 - 09:39
Also, increasing power only seems to increase duration, and not the chance of paralysis - which is what I would rather have instead.
Modifié par ZeRux, 23 juin 2010 - 09:46 .
#4
Posté 23 juin 2010 - 11:26
#5
Posté 24 juin 2010 - 12:35
Also, I don't know values of Shale-specific animations since its talents aren't in 2DAs but I have set values of 0 for conjureanim and 149 for castanim (same as threaten, which Shale can use).
Shale can summon the ability properly, its icon appers in the quickbar along with the proper tooltip string, but it just seems immune to all weapon-enchanting effects somehow. When I give the ability to another party member through the console and activate it, "chance of paralysis" is shown in their weapon's list of effects, but not for Shale.
#6
Posté 24 juin 2010 - 02:40
I believe Shale uses a different inventory slot - one of INVENTORY_SLOT_SHALE_CHEST, INVENTORY_SLOT_SHALE_LEFTARM, INVENTORY_SLOT_SHALE_RIGHTARM, INVENTORY_SLOT_SHALE_SHOULDERS.
Perhaps you need to add your own code to apply the effect to Shale - sorry, can't be of more help but the lack of source files related to Shale makes this a little difficult.
Another alternative you could try and do is to use AddItemProperty and RemoveItemProperty to add/remove the paralysis property (you can extend itemprps for this but again, without Shale's sources, I am not sure what the format will be) when the ability is activated/deactivated.
Using AddItemProperty allows you to specify the POWER_LEVEL of the property so you can use some logic to derive the power level based on Shale's level.
#7
Posté 24 juin 2010 - 05:54
TimelordDC wrote...
Since Shale can't use weapons, that might be the reason. A quick look through the effect_enchantment script indicates some of the effect handlers don't work unless the item is of ITEM_TYPE_WEAPON_MELEE and/or item is in INVENTORY_SLOT_MAIN or INVENTORY_SLOT_OFFHAND.
I believe Shale uses a different inventory slot - one of INVENTORY_SLOT_SHALE_CHEST, INVENTORY_SLOT_SHALE_LEFTARM, INVENTORY_SLOT_SHALE_RIGHTARM, INVENTORY_SLOT_SHALE_SHOULDERS.
Thanks alot, I didn't thought of looking in effect_enchantment!
TimelordDC wrote...
Another alternative you could try and do is to use AddItemProperty and RemoveItemProperty to add/remove the paralysis property (you can extend itemprps for this but again, without Shale's sources, I am not sure what the format will be) when the ability is activated/deactivated.
AddItemProperty/RemoveItemProperty works fine, once I replace INVENTORY_SLOT_MAIN with INVENTORY_SLOT_SHALE_RIGHTARM. Not sure if chance of paralysis is applied correctly since it isn't displayed, but when I replace it with something else like cold damage, it's correcly proportional to Shale's level.
Thanks alot again, you're the man!
#8
Posté 24 juin 2010 - 09:26
I created another two sustainables which should increase Shale's damage against undead and darkspawn, respectively, however itemprps.xls says those bonuses are unimplemented (IDs 1511 and 1513) and I couldn't notice any difference in-game, even though damage bonus is shown on Shale's small crystal.
Can anyone confirm if those two properties even work at all?
#9
Posté 29 juin 2010 - 06:30
case EVENT_TYPE_UNEQUIP:
{
struct EventUnequipStruct stEvent = Events_GetEventUnequipParameters(ev);
object oWeapon = GetItemInEquipSlot(INVENTORY_SLOT_SHALE_RIGHTARM, stEvent.oCaster);
int i = 0;
for (i=0; i<=20; i++)
{
if (_HasItemProperty(oWeapon, PRP_SHL_PARALYSIS + i))
RemoveItemProperty(oWeapon, PRP_SHL_PARALYSIS + i);
}
}
but it doesn't work (fails at the first line with struct EventUnequipStruct stEvent). The toolset won't even let me go to definitions for other structures, such as EventSpellScriptDeactivateStruct to see if EventUnequipStruct and Events_GetEventUnequipParameters even exist.
Alternative way would be to browse through entire inventory when the talent is deactivated, but it doesn't seem as correct (read: optimized) way of doing things. Any hints?





Retour en haut






