Polymorphing and Items
#1
Posté 20 novembre 2011 - 12:08
#2
Posté 20 novembre 2011 - 02:20
#3
Posté 20 novembre 2011 - 03:29
#4
Posté 20 novembre 2011 - 04:38
void ForceUnequip (object oTarget, object oItem) {
if (!GetIsObjectValid(oTarget) || GetObjectType(oTarget) != OBJECT_TYPE_CREATURE)
return;
if (!GetIsObjectValid(GetArea(oTarget))) {
DelayCommand(5.0, ForceUnequip(oTarget, oItem));
return;
}
if (GetIsDead(oTarget)) {
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(GetMaxHitPoints(oTarget)), oTarget);
//if (GetIsPC(oTarget))
// AssignCommand(oTarget, ExecuteScript("fky_deathprocess", oTarget));
//swap in your custom 'on resurrection' script above, if you have one
DelayCommand(0.1, ForceUnequip(oTarget, oItem));
} else {
AssignCommand(oTarget, ClearAllActions(TRUE));
AssignCommand(oTarget, ActionUnequipItem(oItem));
AssignCommand(oTarget, ActionDoCommand(SetCommandable(TRUE)));
AssignCommand(oTarget, SetCommandable(FALSE));
}
}
In principle, it should work the same with ActionEquipItem, though I'm not sure what poly status will do to that. My experience with polymorphed critters mostly extends to shifter scripts (though those get fairly complicated what with the occasionally chaotic order of event firing).
Funky
#5
Posté 20 novembre 2011 - 05:39
FunkySwerve wrote...
In principle, it should work the same with ActionEquipItem, though I'm not sure what poly status will do to that.
That's the tough part. Polymorph weapons are in the creature weapon slot, not what a standard weapon would normally equip into. Creature weapons do have the advantage that you can set the base damage (but you can't set the damage type (beyond expanding it by an extra melee damage property) the critical multiplier or the critical threat range). What you could do is copy the weapon properties over like Bioware did for equipment merges.
#6
Posté 20 novembre 2011 - 05:58
Not quite. I haven't tried equip different item into polymorphed character as well, so I will simply assume its possible. Then:WhiZard wrote...
FunkySwerve wrote...
In principle, it should work the same with ActionEquipItem, though I'm not sure what poly status will do to that.
That's the tough part. Polymorph weapons are in the creature weapon slot, not what a standard weapon would normally equip into. Creature weapons do have the advantage that you can set the base damage (but you can't set the damage type (beyond expanding it by an extra melee damage property) the critical multiplier or the critical threat range). What you could do is copy the weapon properties over like Bioware did for equipment merges.
1) normal weapons can be by default equipped into creature slots as well (but since it can be expl0itable I made a baseitems.2da modification that prevents it, its on vault)
2) creature weapons are used only if there is no valid object in right hand in first place. You can still equip the weapon into normal slot and creature weapons will be ommited then.
Thus you dont need to copy item properties, assumed its possible to equip item on polymorphed character. Which probably isn't, the item would be then lost after unpolymorph. The Sinfair uses a custom engine hack to bypass the equipping process AFAIK.
#7
Posté 20 novembre 2011 - 06:18
ShaDoOoW wrote...
I haven't tried equip different item into polymorphed character as well, so I will simply assume its possible.
Then to get this out of the way I have tested this many times and have tested this again just to confirm. In a polymorph, the normal inventory slots are not available for ActionEquipItem() while the creature slots are. Sure you can equip an item into these, but there is no way to view the item or to disarm it.
Modifié par WhiZard, 20 novembre 2011 - 06:29 .
#8
Posté 20 novembre 2011 - 06:32
I'm still working on adapting some of the lycanthrope scripts right now, but will double back on getting weapons into the hands of wererats soon enough. (These are the Project Q wererat models)
Ah... just tested this... creature weapons don't display a model. So I'd need a complicated work around with an equipped weapon (from the polymorph equipped column), adjusting its apearance, merging properties etc... Hmm.... well I'll think about it.
Modifié par henesua, 20 novembre 2011 - 06:40 .
#9
Posté 20 novembre 2011 - 07:54
Modifié par Pstemarie, 20 novembre 2011 - 08:03 .
#10
Posté 20 novembre 2011 - 08:09
Have you thought about altering the wererat to a "large" model (vice simple) and adding in the right hand node? Large creatures *can* equip weapons (they have the hand node to attach them to). Haven't looked at the Q Wererat, but if the node is present, try altering the anim type in the appearance.2da from s (simple) to l (large)...henesua wrote...
Ah... just tested this... creature weapons don't display a model. So I'd need a complicated work around with an equipped weapon (from the polymorph equipped column), adjusting its apearance, merging properties etc... Hmm.... well I'll think about it.
Of course, I may be way off base here...
<...and sitting in a corner>
#11
Posté 20 novembre 2011 - 08:13
#12
Posté 20 novembre 2011 - 08:17
WooHOO! There you go =)
Don't try to get around the "simple" anims... use the "large" ones.
<...like a rat in a cheese store>
#13
Posté 20 novembre 2011 - 08:35
Modifié par henesua, 20 novembre 2011 - 08:53 .
#14
Posté 20 novembre 2011 - 08:46
Haven't played with Polymorph (except in game) much. Thought it just used the appearance.2da for the model & animations, which would have made the right hand slot available if the wererat model was large instead of simple. I.e., thought it was the anim type that set those slots usable/unusable... else how does polymorph to certain humanoid shapes work?
Confused now.
<...puts the dunce cap back on>
#15
Posté 20 novembre 2011 - 08:51
Modifié par Pstemarie, 20 novembre 2011 - 08:52 .
#16
Posté 20 novembre 2011 - 08:54
#17
Posté 20 novembre 2011 - 10:29
WhiZard wrote...
FunkySwerve wrote...
In principle, it should work the same with ActionEquipItem, though I'm not sure what poly status will do to that.
That's the tough part. Polymorph weapons are in the creature weapon slot, not what a standard weapon would normally equip into. Creature weapons do have the advantage that you can set the base damage (but you can't set the damage type (beyond expanding it by an extra melee damage property) the critical multiplier or the critical threat range). What you could do is copy the weapon properties over like Bioware did for equipment merges.
You can equip any weapon you like directly to those slots. We do it all the time, to hide inappropriate weapon appearances. The purpose, of course, is to achieve the desired crit range and multiplier, though we originally did it in an attempt to boost abs with WM ab, before acaos wrote an engine hack to artificially raise ab.
The question is not whether or not non-creature slots are available to polymorphed critters, but whether the slots available behave the same as with a normal-nonpoly (I suspect they do).
Funky
Modifié par FunkySwerve, 20 novembre 2011 - 10:31 .
#18
Posté 20 novembre 2011 - 11:33
FunkySwerve wrote...
The question is not whether or not non-creature slots are available to polymorphed critters, but whether the slots available behave the same as with a normal-nonpoly (I suspect they do).
Are you actually testing this on polymorphed critters? After one is fully polymorphed, nothing can be equipped into those slots (short of NWNX funcs if they can accomplish this).
#19
Posté 21 novembre 2011 - 12:25
Ok, so if I poly'd into a male drow (59), which comes equipped with a drow longsword (x2_wdrowls004), the weapon is equipped in my normal weapon slot, but I can not script a swap with another weapon? (Drow is "F" type appearance...)henesua wrote...
the problem is not the model, but the way polymorph works. My aim is for players that become wererats to use their weapon when in the wererat form. Polymorph however does not allow items to be equiped to the normal equipment slots - only creature weapons.
Frost giant, another poly target that comes equipped is "L" appearance...
If the appearance has an anim type with a hand node and the polymorph type in polymorph.2da lists an equipped item, shouldn't we be able to swap an item (the weapon stored when poly'd, perhaps) with the equipped item and have the weapon appear in hand?
(edit: what is modeltype "FT"? In the appearance.2da for wererat (170)?)
<...a handle on the idea>
Modifié par Rolo Kipp, 21 novembre 2011 - 12:38 .
#21
Posté 21 novembre 2011 - 01:06
Not precisely what we're looking for, either. But promising ;-)Ben Harrison wrote (Omnibus)...
In polymorph.2da, enter the resref of an item blueprint in the EQUIPPED column of your polymorph type, and it'll be added to a polymorphed creature's inventory, and equipped automatically.
It's a good idea to make the polymorph type's CreatureWeapon1, CreatureWeapon2, and CreatureWeapon3 columns ****, also, to prevent equipped creature weapons from interfering with attack statistics.
<...in the cellar>
#22
Posté 21 novembre 2011 - 03:07
I dodnt understand, so you responded to me its possible and now its not?WhiZard wrote...
FunkySwerve wrote...
The question is not whether or not non-creature slots are available to polymorphed critters, but whether the slots available behave the same as with a normal-nonpoly (I suspect they do).
Are you actually testing this on polymorphed critters? After one is fully polymorphed, nothing can be equipped into those slots (short of NWNX funcs if they can accomplish this).
Rolo Kipp: I think henesua knows how to work with polymorph.2da, point is that he needs the weapon to be dynamic, while 2da allows to set only one specific and direct value.
A true solution could be a NWNX plugin that can Set2DAString, I think there is one for linux - but its only a theory.
#23
Posté 21 novembre 2011 - 03:21
ShaDoOoW wrote...
I dodnt understand, so you responded to me its possible and now its not?WhiZard wrote...
FunkySwerve wrote...
The question is not whether or not non-creature slots are available to polymorphed critters, but whether the slots available behave the same as with a normal-nonpoly (I suspect they do).
Are you actually testing this on polymorphed critters? After one is fully polymorphed, nothing can be equipped into those slots (short of NWNX funcs if they can accomplish this).
I have both times described that it does not work for non-creature slots. Creature slots seem to deal damage as if there was something equipped after I used this command via script.
#24
Posté 21 novembre 2011 - 06:39
WhiZard wrote...
FunkySwerve wrote...
The
question is not whether or not non-creature slots are available to
polymorphed critters, but whether the slots available behave the same as
with a normal-nonpoly (I suspect they do).
Are you
actually testing this on polymorphed critters? After one is fully
polymorphed, nothing can be equipped into those slots (short of NWNX
funcs if they can accomplish this).
No...as I specifically said above, THAT is what I wasn't sure about. And sure enough, testing confirms it. Neither pcs nor npcs can equip a normal dagger (my test item) in either slot 4 or 14 (right hand and lclaw).
ShaDoOoW wrote...
A true solution could be a NWNX plugin that can Set2DAString, I think there is one for linux - but its only a theory.
Vman wrote one, and it works. And yeah, that's about the only option I can think of if you absolutely have to have it go on the fly, instead of editing polymorph.2da.
Funky
#25
Posté 21 novembre 2011 - 11:18





Retour en haut







