Author Topic: Is their a way to level Items?  (Read 2333 times)

Legacy_Baishi7

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Is their a way to level Items?
« Reply #15 on: July 20, 2010, 02:34:58 pm »


               How can you find your total resource count ( for the 16,000 total resorces thing )?



               
               

               
            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Is their a way to level Items?
« Reply #16 on: July 20, 2010, 02:54:16 pm »


               open your mod in the toolset, look in your NWN mods folder, right click on the temp0 folder, click properties, look at the contains. the Files are the resourses. if it is under 16k, your good, if it is getting close or over, you have a problem.
               
               

               
            

Legacy_Baishi7

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Is their a way to level Items?
« Reply #17 on: July 20, 2010, 03:31:40 pm »


               Great tip thanks.
               
               

               
            

Legacy_ChaosInTwilight

  • Full Member
  • ***
  • Posts: 126
  • Karma: +0/-0
Is their a way to level Items?
« Reply #18 on: July 21, 2010, 01:41:16 am »


               OK, Got that example I mentioned..    Prefab download

#include "x2_inc_switches"
void main()
{
    int nEvent = GetUserDefinedItemEventNumber();    //Which event triggered this
    object oPC;                                                           //The player character using the item
    object oItem;                                                        //The item being used
    object oSpellTarget;                                              //The target of the spell

    //Set the return value for the item event script
    // * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed script is done
    // * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
    int nResult = X2_EXECUTE_SCRIPT_END;

    switch (nEvent)
    {
        case X2_ITEM_EVENT_ONHITCAST:
            // * This code runs when the item has the 'OnHitCastSpell: Unique power' property
            // * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
            // * Note that this event fires for non PC creatures as well.

            oItem  =  GetSpellCastItem();               // The item triggering this spellscript
            oPC = OBJECT_SELF;                            // The player triggering it
            oSpellTarget = GetSpellTargetObject();  // What the spell is aimed at
            if(d4(1) == 4)//25% chance.
                {
                int iDamDice = d2(GetHitDice(oPC));
                if(GetStringLowerCase(GetDeity(oPC))== "talos")
                    {iDamDice = d6(GetHitDice(oPC));}//d6 for the faithful
                int iVFX;
                switch(GetIsAreaInterior(GetArea(oPC)))
                    {//This is just fun Flavor code.
                    case TRUE: iVFX = VFX_FNF_ELECTRIC_EXPLOSION; break;//If inside Explosion.
                    case FALSE: iVFX= VFX_IMP_LIGHTNING_M; break;//If outside, Lightning bolt.
                    }
                ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(iVFX), oSpellTarget);//Apply the VFX
                ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(iDamDice, DAMAGE_TYPE_ELECTRICAL, DAMAGE_POWER_ENERGY), oSpellTarget);
                }
            break;
    }
    //Pass the return value back to the calling script
    SetExecutedScriptReturnValue(nResult);
}

Summary for mere mortals:  25% chance of 1d2 * PC level Electrical damage. (1-80 damage range)

Additionally If Inside/underground It will use the big ball of lightning VFX.  If outside, regular lightning bolt(call lightning style).

As an added bonus, for the faithful of Talos(I'm putting the prefab up with a spear) It'll try and match deity string.   "talos" with any capitalization will cause it to use d6 for damage(1 - 240 damage range).

'sProbably not what your looking for..  But it does illustrate one method of making an item scale with PC level.  Will try and throw up some decent armor tomorrow.
               
               

               
            

Legacy_Baishi7

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Is their a way to level Items?
« Reply #19 on: July 21, 2010, 11:59:39 pm »


               NICE!