Aller au contenu

Photo

Is their a way to level Items?


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

#1
Baishi7

Baishi7
  • Members
  • 23 messages
I saw on an MMO that they had this item called Aetheria. And as long as the pc wore the item, it gained xp and leveled.

It had like 3 levels and each level added spell protections and more hp.

Each level took something like 25,000 xp to get the benefits from the first level. Another 25,000 for the next etc. etc.

Anyone know how to do this?

#2
Genisys

Genisys
  • Members
  • 525 messages
Sure, but it would be an extensive ammount of scripting, there was actually a weapon in the main campaign that leveled up when you did, it's not a bad system, but if you specifically want a weapon that levels up on it's own, it would requilre a significant amount of coding.



Not something a lot of people would be willing to take on, unless they got nothing else to do, I myself am working on a custom CEP 2.2 Crafting & Treasure System with a Forge, which will be done shortly. There really is no need for an item like you described, when crafting & forges allow you to customize your items the way you want in game, so why make something so intricate when there are countless systems out there that permit extensively powerful items with custom tailoring.



Just a thought.

#3
Shadooow

Shadooow
  • Members
  • 4 465 messages
I did similar script for server Arkhalia. They however wanted to be use for lvl 40 characters, so item had unique power which if PC had desired number of XP above level created new version of that item and destroyed the old.



Sure they could be better approachs but this is very simple with one script and two variables on the item...

#4
QNecron

QNecron
  • Members
  • 24 messages
Oddly enough I'll be starting on item leveling very soon for deity weapons/items in our module. Though they might be be exactly what you had in mind I could post everything for you (should you want to edit it to your liking). The same system will be flexible enough for something like Weapons of Legacy which we plan on putting in as well.

#5
TSMDude

TSMDude
  • Members
  • 865 messages
There is one on the Vaults as well I think...a familiar dagger or staff or something of the sorts...

#6
Baishi7

Baishi7
  • Members
  • 23 messages
Yes, Qnecron, I would like that alot. Thanks.

#7
QNecron

QNecron
  • Members
  • 24 messages
Will do, probably wont be completed by this weeks end but the basis should be there (I hope). If its in working order I'll go ahead and post it.

#8
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
There are a couple ways this can be done. The Questions to answer are when do you give the item XP; and how and when do you level the item.

The first thing that comes to mind for giving the item Xp is to modify the ondeath scripts to check for the item and give it xp at the same time it is given to the PC. With this method you could level the item as soon as it has enough XP.


I my self would however opt for a different option. I would use TagBase scripting to handle most of it.
in the OnEquip event For the Item I would log how much xp the PC currently has. In the UnEquip Event I would apply the Amount of xp the PC has gained since the onEquip. Now if the Item was to level I would still most likely still apply a delay before the changes took effect. To keep players from always having to equip/unequip the items I would also add something to the PlayerRest event To apply the xp and Check if the item could level. I would also throw out some propaganda in the game world about the energy taking time to absorb into the item, To explain the Delays in it leveling. One thing you would need to be careful of with this method, is the fact that Items are acquired when the PC enters a module. So the equip event may fire a second time without the unequip firing in between the two.

#9
SHOVA

SHOVA
  • Members
  • 522 messages

Genisys wrote...

Sure, but it would be an extensive ammount of scripting, there was actually a weapon in the main campaign that leveled up when you did, it's not a bad system, but if you specifically want a weapon that levels up on it's own, it would requilre a significant amount of coding.

Not something a lot of people would be willing to take on, unless they got nothing else to do, I myself am working on a custom CEP 2.2 Crafting & Treasure System with a Forge, which will be done shortly. There really is no need for an item like you described, when crafting & forges allow you to customize your items the way you want in game, so why make something so intricate when there are countless systems out there that permit extensively powerful items with custom tailoring.

Just a thought.


Without giving away said item, the way it leveled was there are 3-4 versions of it, and at certain level up PC times, it upgraded it to the next one. This way is not only clunky, but also blueprint heavy, when added with custom content *CEP* down right dangerious with the 16K limit on DM client thingy.

I suggest if you want items to grow in power, allow for the Player to choose what power/ability is added and when they can add it. I use Sunjammers forge system, while it is nothing like what the OP is asking for, it does make items grow in power. http://nwn.bioware.c...469851&forum=47 

#10
ChaosInTwilight

ChaosInTwilight
  • Members
  • 89 messages
Tag based scripting can allow for some interesting stuff in this regard..

Been meaning to put a weapon example on the vault for a bit now, but in terms of Armor/weapon at least..  It's possible to use the OnHit event to do interesting things with tag based scripting.

This Erf contains what amounts to a suit of Armor that applies Shadowshield to the PC when its hit.  Given, it doesn't scale, but its easy enough to set up something that does say..  +1 AC per 2 Levels.  Will try and get it up tonight.

#11
Baishi7

Baishi7
  • Members
  • 23 messages
Hmm interesting take in this.



I was thinking as the pc gains xp a portion of it can go to the weapon or armor.

#12
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

SHOVA wrote...

 
Without giving away said item, the way it leveled was there are 3-4 versions of it, and at certain level up PC times, it upgraded it to the next one. This way is not only clunky, but also blueprint heavy, when added with custom content *CEP* down right dangerious with the 16K limit on DM client thingy.

  


Just a FYI. There are ways to remove items from the DM pallette without removeing them from the game.  The only thing it takes is placeing a Cut Down palete in the server override folder or in a HAK.  The Items do not have to be on the DM palette in order for the game to use them.  

  

#13
Genisys

Genisys
  • Members
  • 525 messages
16k DM Palette ????? um help on this one?

#14
SHOVA

SHOVA
  • Members
  • 522 messages

Baishi7 wrote...

Hmm interesting take in this.

I was thinking as the pc gains xp a portion of it can go to the weapon or armor.


Thats a good idea, if the weapon or armor had XP. they do not. You coulkd however add property to item, or increase property ie. from +1 to +2, with your mod on level script. however, you would have to use the tag based scripting to 1st make sure the pc has the right weapon/armor, then add/ change the properties, and then save it to the item.

The DM 16k limit refers to a bug/limitation, where  if you have 16,000 total resorces in your mod, and you host it, DMs will crash on enter because of the limit. Like posted there are work arounds, but the problem is still there.

#15
ChaosInTwilight

ChaosInTwilight
  • Members
  • 89 messages
Re: DM client Crashing  5 pages, but  having a link to the most recent new on it might help. While it didn't get fixed in 1.69, onc ecan tell Craig was hoping to.

Re: Item... Need a bit more polish that its not going to get at 0145 local time.  Will wrap it up with a nice little bow tomorrow night though.

#16
Baishi7

Baishi7
  • Members
  • 23 messages
How can you find your total resource count ( for the 16,000 total resorces thing )?




#17
SHOVA

SHOVA
  • Members
  • 522 messages
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.

#18
Baishi7

Baishi7
  • Members
  • 23 messages
Great tip thanks.

#19
ChaosInTwilight

ChaosInTwilight
  • Members
  • 89 messages
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.

#20
Baishi7

Baishi7
  • Members
  • 23 messages
NICE!