Is their a way to level Items?
#1
Posté 19 juillet 2010 - 04:44
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
Posté 19 juillet 2010 - 04:58
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
Posté 19 juillet 2010 - 06:15
Sure they could be better approachs but this is very simple with one script and two variables on the item...
#4
Posté 19 juillet 2010 - 06:15
#5
Posté 19 juillet 2010 - 06:33
#6
Posté 19 juillet 2010 - 07:19
#7
Posté 19 juillet 2010 - 07:31
#8
Posté 19 juillet 2010 - 09:20
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
Posté 19 juillet 2010 - 09:44
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
Posté 19 juillet 2010 - 09:59
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
Posté 19 juillet 2010 - 10:00
I was thinking as the pc gains xp a portion of it can go to the weapon or armor.
#12
Posté 19 juillet 2010 - 10:03
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
Posté 19 juillet 2010 - 10:18
#14
Posté 19 juillet 2010 - 10:33
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
Posté 20 juillet 2010 - 05:48
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
Posté 20 juillet 2010 - 01:34
#17
Posté 20 juillet 2010 - 01:54
#18
Posté 20 juillet 2010 - 02:31
#19
Posté 21 juillet 2010 - 12:41
#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
Posté 21 juillet 2010 - 10:59





Retour en haut






