Aller au contenu

Photo

Totem Druids


  • Veuillez vous connecter pour répondre
23 réponses à ce sujet

#1
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Helo, its me once again! I've been trying for a couple days to figure out how Arelith and Arabel do this totem druid stuff. From what I've seen on Arelith, from a conversation you pick a animal to be your totem. Once that is picked, when you get wildshape all your wildshape forms will be of that animal, and will have 20 Strength, Constituion, & Dexterity in the Wildshape/Totem form. Out of form your CON, STR, and DEX are all -4 of what they were when you picked the totem. As you progress to level 7, the stats become 2 higher. Making 22 CON, STR, & DEX. What I'm trying to figure out is how to make them the appearance of their totem and set the abilities to the 20 STR, DEX, and CON. What I don't want is just ability bonus effects! I have not been able to find a function to do this, but knowing me I probably overlooked it! Thank you!

#2
Shadooow

Shadooow
  • Members
  • 4 470 messages
You need to create custom polymorphs into polymorph.2da where you can specify custom stats, AC, temp HPs etc. After you make this, you need to modify wildshape spellscript that will read a local variable on PC that reads which totem animal he chosen if any and to set your custom polymorph to use.

#3
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Oh wow, thanks! This will go server wide, correct?

#4
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Okay, I went into polymorph.2da and added a line at the bottom that had the following...






110
POLYMORPH_TYPE_BROWN_BEAR_TOTEM4
13
8
148
po_BearBrwn
NW_IT_CREWPSP026
NW_IT_CREWPSP026
NW_IT_CREWPS002
x2_it_emptyskin
****
30
30
26
6
35
****
****
****
****
****
****
1

So now that I added the line, I went into the NW_S2_WildShape script and added under line 101 (end of the badger polymorph stuff) 

   if ( GetLocalInt(oTarget, "beartotem") == 1 )
    {
    }
    else if (nSpell == 401)
    {
        nPoly = POLYMORPH_TYPE_BROWN_BEAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
        }

From here I'm not sure what to do. Here is the rest of the script! Thank you for the help.




#include "x2_inc_itemprop"
#include "x3_inc_horse"
void main()
{
    //Declare major variables
    int nSpell = GetSpellId();
    object oTarget = GetSpellTargetObject();
    effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
    effect ePoly;
    int nPoly;
    int nMetaMagic = GetMetaMagicFeat();
    int nDuration = GetLevelByclass(class_TYPE_DRUID);
    if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
    { // check to see if abort due to being mounted
        if (HorseGetIsMounted(oTarget))
        { // abort
            if (GetIsPC(oTarget)) FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
            return;
        } // abort
    } // check to see if abort due to being mounted
    //Enter Metamagic conditions
    if (nMetaMagic == METAMAGIC_EXTEND)
    {
        nDuration = nDuration *2; //Duration is +100%
    }
    //Determine Polymorph subradial type
    if(nSpell == 401)
    {
        nPoly = POLYMORPH_TYPE_BROWN_BEAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
        }
    }
    else if (nSpell == 402)
    {
        nPoly = POLYMORPH_TYPE_PANTHER;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_PANTHER;
        }
    }
    else if (nSpell == 403)
    {
        nPoly = POLYMORPH_TYPE_WOLF;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_WOLF;
        }
    }
    else if (nSpell == 404)
    {
        nPoly = POLYMORPH_TYPE_BOAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BOAR;
        }
    }
    else if (nSpell == 405)
    {
        nPoly = POLYMORPH_TYPE_BADGER;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BADGER;
        }
         if ( GetLocalInt(oTarget, "beartotem") == 1 )
    {
    }
  //////////////////////////////////////////////////////  // Else, if the local int is exactly 1.
    else if (nSpell == 401)
    {
        nPoly = POLYMORPH_TYPE_BROWN_BEAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
        }
    }
    ePoly = EffectPolymorph(nPoly);
    ePoly = ExtraordinaryEffect(ePoly);
    //Fire cast spell at event for the specified target
    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
    int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
    int bArmor  = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
    int bItems  = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
    object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
    object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
    object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
    object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
    object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
    object oCloakOld  = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
    object oBootsOld  = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
    object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
    object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
    object oShield    = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
    if (GetIsObjectValid(oShield))
    {
        if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
            GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
            GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
        {
            oShield = OBJECT_INVALID;
        }
    }
 

    //Apply the VFX impact and effects
    ClearAllActions(); // prevents an exploit
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
    object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
    object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
    if (bWeapon)
    {
            IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
    }
    if (bArmor)
    {
        IPWildShapeCopyItemProperties(oShield,oArmorNew);
        IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
        IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
    }
    if (bItems)
    {
        IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
        IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
        IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
        IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
        IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
        IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
    }
  }
}

#5
Shadooow

Shadooow
  • Members
  • 4 470 messages
depends, personally doesnt understand the point of using some totem but whatever, from the description you gave it should be something like this:

and yes, polymorph.2da is serverside

#include "x2_inc_itemprop"
#include "x3_inc_horse"
void main()
{
    //Declare major variables
    int nSpell = GetSpellId();
    object oTarget = GetSpellTargetObject();
    effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
    effect ePoly;
    int nPoly;
    int nMetaMagic = GetMetaMagicFeat();
    int nDuration = GetLevelByclass(class_TYPE_DRUID);
    if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
    { // check to see if abort due to being mounted
        if (HorseGetIsMounted(oTarget))
        { // abort
            if (GetIsPC(oTarget)) FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
            return;
        } // abort
    } // check to see if abort due to being mounted
    //Enter Metamagic conditions
    if (nMetaMagic == METAMAGIC_EXTEND)
    {
        nDuration = nDuration *2; //Duration is +100%
    }
    //Determine Polymorph subradial type
    if ( GetLocalInt(oTarget, "beartotem") == 1 )
    {
        nPoly = 110;
    }
    else if(nSpell == 401)
    {
        nPoly = POLYMORPH_TYPE_BROWN_BEAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
        }
    }
    else if (nSpell == 402)
    {
        nPoly = POLYMORPH_TYPE_PANTHER;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_PANTHER;
        }
    }
    else if (nSpell == 403)
    {
        nPoly = POLYMORPH_TYPE_WOLF;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_WOLF;
        }
    }
    else if (nSpell == 404)
    {
        nPoly = POLYMORPH_TYPE_BOAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BOAR;
        }
    }
    else if (nSpell == 405)
    {
        nPoly = POLYMORPH_TYPE_BADGER;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BADGER;
        }
         if ( GetLocalInt(oTarget, "beartotem") == 1 )
    {
    }
  //////////////////////////////////////////////////////  // Else, if the local int is exactly 1.
    else if (nSpell == 401)
    {
        nPoly = POLYMORPH_TYPE_BROWN_BEAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
        }
    }
    ePoly = EffectPolymorph(nPoly);
    ePoly = ExtraordinaryEffect(ePoly);
    //Fire cast spell at event for the specified target
    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
    int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
    int bArmor  = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
    int bItems  = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
    object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
    object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
    object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
    object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
    object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
    object oCloakOld  = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
    object oBootsOld  = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
    object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
    object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
    object oShield    = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
    if (GetIsObjectValid(oShield))
    {
        if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
            GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
            GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
        {
            oShield = OBJECT_INVALID;
        }
    }
 

    //Apply the VFX impact and effects
    ClearAllActions(); // prevents an exploit
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
    object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
    object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
    if (bWeapon)
    {
            IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
    }
    if (bArmor)
    {
        IPWildShapeCopyItemProperties(oShield,oArmorNew);
        IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
        IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
    }
    if (bItems)
    {
        IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
        IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
        IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
        IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
        IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
        IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
    }
  }
}


Modifié par ShaDoOoW, 19 juin 2012 - 08:04 .


#6
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Awesome, thanks. The point of the totem is for characters to specialize in one animal getting the bonuses from that. For example, bear would give +4 CON and STR.

#7
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Now what I can't figure out is how to get those +4 CON and STR applied out of form. I'm not trying to get them as bonuses, I'm trying to get their +4 CON and STR set 4 up from what they are. Any clues?

#8
Shadooow

Shadooow
  • Members
  • 4 470 messages

Kingdom_Of_Hearts wrote...

Now what I can't figure out is how to get those +4 CON and STR applied out of form. I'm not trying to get them as bonuses, I'm trying to get their +4 CON and STR set 4 up from what they are. Any clues?

still the +4con/str must be set via polymorph.2da

you basically copy the line of the animal you need to new line and changes numbers to desired value

#9
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
For out of the wild shape form? And the script didn't work. Not sure if it was my 2da editing that failed. Heres what I did.

For the wildshape.
#include "x2_inc_itemprop"
#include "x3_inc_horse"
void main()
{
//Declare major variables
int nSpell = GetSpellId();
object oTarget = GetSpellTargetObject();
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
effect ePoly;
int nPoly;
int nMetaMagic = GetMetaMagicFeat();
int nDuration = GetLevelByclass(class_TYPE_DRUID);
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
{ // check to see if abort due to being mounted
if (HorseGetIsMounted(oTarget))
{ // abort
if (GetIsPC(oTarget)) FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
return;
} // abort
} // check to see if abort due to being mounted
//Enter Metamagic conditions
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
//Determine Polymorph subradial type
if ( GetLocalInt(oTarget, "beartotem") == 1 )
{
nPoly = 107;
}
if ( GetLocalInt(oTarget, "beartotem") == 2 )
{
nPoly = 108;
}
if ( GetLocalInt(oTarget, "beartotem") == 3 )
{
nPoly = 109;
}
else if(nSpell == 401)
{
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
}
}
else if (nSpell == 402)
{
nPoly = POLYMORPH_TYPE_PANTHER;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_PANTHER;
}
}
else if (nSpell == 403)
{
nPoly = POLYMORPH_TYPE_WOLF;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_WOLF;
}
}
else if (nSpell == 404)
{
nPoly = POLYMORPH_TYPE_BOAR;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_BOAR;
}
}
else if (nSpell == 405)
{
nPoly = POLYMORPH_TYPE_BADGER;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_BADGER;
}
if ( GetLocalInt(oTarget, "beartotem") == 1 )
{
}
////////////////////////////////////////////////////// // Else, if the local int is exactly 1.
else if (nSpell == 401)
{
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
if (nDuration >= 12)
{
nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
}
}
ePoly = EffectPolymorph(nPoly);
ePoly = ExtraordinaryEffect(ePoly);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
int bArmor = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
int bItems = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
if (GetIsObjectValid(oShield))
{
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
{
oShield = OBJECT_INVALID;
}
}


//Apply the VFX impact and effects
ClearAllActions(); // prevents an exploit
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
if (bWeapon)
{
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
}
if (bArmor)
{
IPWildShapeCopyItemProperties(oShield,oArmorNew);
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
}
if (bItems)
{
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
}
}
}


For on levelup where it sets the variables and runs scripts..

if ( GetLevelByclass(class_TYPE_DRUID, oPC) == 7 )
{
}
else if ( GetLocalInt(oPC, "beartotem ") == 1 )
ExecuteScript("totemrun1" ,oPC);
//

}
if ( GetLevelByclass(class_TYPE_DRUID, oPC) == 7 )
{
}
else if ( GetLocalInt(oPC, "beartotem ") == 2 )
ExecuteScript("totemrunbear2" ,oPC);
//
{



And here the scripts it executes.

void main()
{
object oPC = OBJECT_SELF;

SetLocalInt(oPC, "beartotem", 2);
}

And another..

void main()
{
object oPC = OBJECT_SELF;

SetLocalInt(oPC, "beartotem", 3);
}


And the conversation for when totem is choosed onaction script..


void main()
{
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();

// Set a local integer.
SetLocalInt(oPC, "beartotem", 1);

// Set a local integer.
SetLocalInt(oPC, "totemchoosed", 1);
}

#10
Shadooow

Shadooow
  • Members
  • 4 470 messages

f ( GetLocalInt(oTarget, "beartotem") == 1 )
{
nPoly = 107;
}
if ( GetLocalInt(oTarget, "beartotem") == 2 )
{
nPoly = 108;
}
if ( GetLocalInt(oTarget, "beartotem") == 3 )
{
nPoly = 109;
}

this code is incorrect, it must be if, else if, else if

because if the beartotem == 1 or 2, then if beartotem == 3 is checked which return false and then lower checks are going to overwrite nPoly with default value

#11
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Thank you!

#12
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Gah, it still did not work. Script compiled, everything compiled but when the wildshape is casted nothing happens. Just get a message saying acquired PC Properties.

#13
Shadooow

Shadooow
  • Members
  • 4 470 messages
i cant see any other error in script yet, try to use debugger and that should reveal the issue right away

#14
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Still not able to get the problem. Hmm..

#15
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
I thik I may have found the issue. Not sure though. In the polymorph.2da, # 107 I gave it the same name as the regular bear polymorph. Would that be a problem? And if so would changing it to POLYMORPH_TYPE_BROWN_BEAR_TOTEM1 be a issue? (Currently set at just POLYMORPH_TYPE_BROWN_BEAR.

#16
Shadooow

Shadooow
  • Members
  • 4 470 messages

Kingdom_Of_Hearts wrote...

I thik I may have found the issue. Not sure though. In the polymorph.2da, # 107 I gave it the same name as the regular bear polymorph. Would that be a problem? And if so would changing it to POLYMORPH_TYPE_BROWN_BEAR_TOTEM1 be a issue? (Currently set at just POLYMORPH_TYPE_BROWN_BEAR.

nope that has no meaning, name of the line is only for human readers

i found another issue in your script, try this:

#include "x2_inc_itemprop"
#include "x3_inc_horse"
void main()
{
    //Declare major variables
    int nSpell = GetSpellId();
    object oTarget = GetSpellTargetObject();
    effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
    effect ePoly;
    int nPoly;
    int nMetaMagic = GetMetaMagicFeat();
    int nDuration = GetLevelByclass(class_TYPE_DRUID);
    if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
    { // check to see if abort due to being mounted
        if (HorseGetIsMounted(oTarget))
        { // abort
            if (GetIsPC(oTarget)) FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
            return;
        } // abort
    } // check to see if abort due to being mounted
    //Enter Metamagic conditions
    if (nMetaMagic == METAMAGIC_EXTEND)
    {
        nDuration = nDuration *2; //Duration is +100%
    }
    //Determine Polymorph subradial type
f ( GetLocalInt(oTarget, "beartotem") == 1 )
{
nPoly = 107;
}
else if ( GetLocalInt(oTarget, "beartotem") == 2 )
{
nPoly = 108;
}
else if ( GetLocalInt(oTarget, "beartotem") == 3 )
{
nPoly = 109;
}
    else if(nSpell == 401)
    {
        nPoly = POLYMORPH_TYPE_BROWN_BEAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
        }
    }
    else if (nSpell == 402)
    {
        nPoly = POLYMORPH_TYPE_PANTHER;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_PANTHER;
        }
    }
    else if (nSpell == 403)
    {
        nPoly = POLYMORPH_TYPE_WOLF;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_WOLF;
        }
    }
    else if (nSpell == 404)
    {
        nPoly = POLYMORPH_TYPE_BOAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BOAR;
        }
    }
    else if (nSpell == 405)
    {
        nPoly = POLYMORPH_TYPE_BADGER;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BADGER;
        }
    }
  //////////////////////////////////////////////////////  // Else, if the local int is exactly 1.
    else if (nSpell == 401)
    {
        nPoly = POLYMORPH_TYPE_BROWN_BEAR;
        if (nDuration >= 12)
        {
            nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
        }
    }
    ePoly = EffectPolymorph(nPoly);
    ePoly = ExtraordinaryEffect(ePoly);
    //Fire cast spell at event for the specified target
    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
    int bWeapon = StringToInt(Get2DAString("polymorph","MergeW",nPoly)) == 1;
    int bArmor  = StringToInt(Get2DAString("polymorph","MergeA",nPoly)) == 1;
    int bItems  = StringToInt(Get2DAString("polymorph","MergeI",nPoly)) == 1;
    object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
    object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
    object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
    object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
    object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
    object oCloakOld  = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
    object oBootsOld  = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
    object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
    object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
    object oShield    = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
    if (GetIsObjectValid(oShield))
    {
        if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
            GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
            GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
        {
            oShield = OBJECT_INVALID;
        }
    }
 

    //Apply the VFX impact and effects
    ClearAllActions(); // prevents an exploit
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
    object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
    object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
    if (bWeapon)
    {
            IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
    }
    if (bArmor)
    {
        IPWildShapeCopyItemProperties(oShield,oArmorNew);
        IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
        IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
    }
    if (bItems)
    {
        IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
        IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
        IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
        IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
        IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
        IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
    }
  }
}


Modifié par ShaDoOoW, 20 juin 2012 - 08:39 .


#17
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Okay, lol. I think its getting somewhere, except it turned me into the appearance I was before I polymorphed. (halfling) and didn't change any stats. Hmm..

#18
Shadooow

Shadooow
  • Members
  • 4 470 messages
that seems to be an error of wrong setup polymorph - do you have your polymorph.2da placed in your override? does your module uses any haks? do they contain polymorph.2da? If so you need to place your modified polymorph.2da into the top hak.

#19
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Its not in the override folder, its in 2da.. And no haks. Is it supposed to be in the override? -->Fail

#20
henesua

henesua
  • Members
  • 3 863 messages
As ShaDoOoW said, polymorph.2da should be placed in one of your haks. And in the topmost one. You should not place anything inside the 2da folder. Just leave that alone.

A HAK is treated with the highest priority for custom content which is why that is recommended. And the topmost HAK receives the highest priority of all. If you put a file in your override, but a file with a similar name is already in a HAK that the module is using, the HAK version will be used and the override ignored.

#21
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Haks are the last thing I want. I'll try the override.

#22
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Well, dang. Whenever I have the override in the override folder, NWN won't play the mdoule in the nwserver or when I go into the actual game to play it. Any solutions besides haks?

#23
henesua

henesua
  • Members
  • 3 863 messages
 Something seems to be wrong if it prevents the module from loading. I've got a polymorph.2da and no matter whethere I place it in the override or a hak the module loads fine.
Step one, place the polymorph.2da file in the override.
Step two, download this module from the vault (my jumping spiders demo)
Step Three, load the module (I assume that you know to put the moule in the module folder even though I skipped that step :) )

Does the module load?

If not, you did something funky to your 2da file.
If it does, then the problem is not the 2da but your module.

Modifié par henesua, 20 juin 2012 - 10:27 .


#24
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
For nwserver your worked, got to running log in at will. But for mine I instantly get a message saying that the program stopped working. All of this with the 2da.