|
Post by FunkySwerve on Jul 20, 2007 22:42:45 GMT
Ok, so it isn't ILR deequipping the item. That means it's very likely you aren't level 50. What exactly do you mean by this: Your script did check to see if I met the level requirement that was put in the variable of the item, but it still did not let me equip it if I met that variable. ? The LL system stores your legendary level in the Lootable field, and that's what the script above checks. This leads me to suspect that when you say you 'met that variable' you set a local on yourself, rather than tried it with a character of the proper level. Is this the case, or did you level them with the leveler and check to confirm that you did indeed get the character edits you selected from the leveler? Funky
|
|
bogo
Neophyte
Posts: 11
|
Post by bogo on Jul 30, 2007 22:35:54 GMT
I leveled them with a leveler and then tried to equip the item needed. The leveler gave them enough XP to meet the level requirements for the legendary level.
I set the variable on the item so that the script checks the item and compares it with the level of the character.
What I did not do was check the character's bic file after I leveled it. I'll check the lootable field and report back the findings.
EDIT: Ok, in the experience field there is enough XP to meet the level, but in the lootable field it says 40. I think I figured it out. I'm going to take a guess that I didn't use the Legendary Leveler after I gave the character the XP. I'll try that and then let you know how that works.
|
|
|
Post by FunkySwerve on Jul 30, 2007 22:56:45 GMT
Yeah, just as with normal levels you don't have the level until you take it, just the xp. Funky
|
|
bogo
Neophyte
Posts: 11
|
Post by bogo on Jul 31, 2007 0:27:24 GMT
That's what I did...or didn't do, to be more precise. Thanks for sticking with me on this. Your script works perfect and makes building with Legendary Levels even better. Thanks again! ;D
Long Live Funky!
|
|
bane
Peasant
Posts: 6
|
Post by bane on Jan 6, 2009 16:50:13 GMT
What we done was create a local varible to put on items we wish to restrict to Legendary levels , for example Leg_Lev int 43 this will restrict any one under lvl 43 to equip the item. this has worked great for us.
|
|
|
Post by mdf on Sept 22, 2009 19:11:08 GMT
Legendary levels aren't real levels, they don't enable you to use items above level 40, only npcs do that, unless you make 2da edits. We use a 2da edit that raises the value cap of level 40 items by a ton, and then script our own ILR above that. You might also be able to use a value based system above 40, with further 2da edits, but it doesn't sound like that is what you want. The 2da edit is serverside, no hak or player download required. If you aren't useing ILR at all though, this wont be an issue. So, you cannot use GetHitDice, that caps at 40 on pcs. You need to use this function, from hgll_func_inc: int CheckLegendaryLevel(object oPC) { int nLevel = GetLootable(oPC); if (nLevel<41) { return GetHitDice(oPC); } else { return nLevel; } } It returns Hit Dice if the character has no legendary levels. Otherwise it returns their 'level' including legendary levels, which is stored as their Lootable. Funky Just wanted to say thanks for posting this. Lead me to EXACTLY what I was looking for in my own mod. * EDIT * One 'thanks' is NOT enough! Thanks AGAIN! This has really enabled me to do a LOT with spells, gear scripts, loot and even more to extend features into the LLs. It is a fast and easy check. Brilliant!
|
|
jam
Peasant
Posts: 4
|
Post by jam on Aug 6, 2011 13:35:29 GMT
This sounds like it could help me also. I'm trying to modify my spells and am not a scripter. As I understand it a level 50 PC with 21 levels of mage must be a 31st level mage. Simple math to determine caster level over 40.
Get legendary level. Get caster level If legendary level over 41 and caster level over 20 then add caster level to legendary level minus 40 for caster level. If legendary level less than 41 or caster level less than 20 then use caster level.
Anyone willing to help put this into a script format and where to put it to make it work. Or how to add it to a Magic missile spell or a fireball spell. I have already edited most of my spells to remove caps. Just don't know how to make them call legendary levels.
Any help is appreciated.
|
|
|
Post by FunkySwerve on Aug 6, 2011 16:22:15 GMT
To make them check legendary levels, just add legendary levels to casterlevel, with your requirement of 20 casterlevels. The only part of this code that is unique to the leveling system is the use of the Lootable field to store the character's level. If they've taken 15 legendary levels, they are level 55, and that's what Lootable will show. The function pasted just above will return the character's total level. If you just want to get the number of legendary levels, just check lootable. If it's less than 41, legendary levels = 0, otherwise legendary levels = lootable - 40. Like so:
int GetLegendaryLevels(object oPC) { int nLootable = GetLootable(oPC); if (nLootable < 41) return 0;
return (nLootable - 40); }
Using that function, you can easily modify the casterlevel in the spell. After it's determined initially, just add legendary levels to it if it's already greater to or equal to 20, per your requirement (we require only control class).
HTH Funky
|
|
jam
Peasant
Posts: 4
|
Post by jam on Aug 7, 2011 12:29:14 GMT
Thanks. But that's way over my head. Like I said. I'm not a scripter. What would really make my day is to edit this spell script to account for legendary levels. I can then figure out how to change the rest of the spells that I have modified.
I'd also like to add Legendary Levels to go over 60 levels. I found the hgll_const_inc script and it seems simple. Are there any other scripts that need to be changed?
Again. Any help is appreciated.
//:://///////////////////////////////////////////// //:: Magic Missile //:: NW_S0_MagMiss //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* // A missile of magical energy darts forth from your // fingertip and unerringly strikes its target. The // missile deals 1d4+1 points of damage. // // For every two extra levels of experience past 1st, you // gain an additional missile. */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: April 10, 2001 //::////////////////////////////////////////////// //:: Last Updated By: Preston Watamaniuk, On: May 8, 2001
#include "NW_I0_SPELLS" #include "x2_inc_spellhook"
void main() {
/* Spellcast Hook Code Added 2003-06-23 by GeorgZ If you want to make changes to all spells, check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode()) { // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell return; }
// End of Spell Cast Hook
//Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) object oTarget = GetSpellTargetObject(); int nCasterLvl = GetCasterLevel(OBJECT_SELF); int nDamage = 0; int nMetaMagic = GetMetaMagicFeat(); int nCnt; effect eMissile = EffectVisualEffect(VFX_IMP_MIRV); effect eVis = EffectVisualEffect(VFX_IMP_MAGBLUE); int nMissiles = (nCasterLvl + 1)/1; float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); float fDelay = fDist/(3.0 * log(fDist) + 2.0); float fDelay2, fTime; if(!GetIsReactionTypeFriendly(oTarget)) { //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MAGIC_MISSILE)); //Limit missiles to five if (nMissiles > 60) { nMissiles = 60; } //Make SR Check if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) { //Apply a single damage hit for each missile instead of as a single mass for (nCnt = 1; nCnt <= nMissiles; nCnt++) { //Roll damage int nDam = d4(2) + 2; //Enter Metamagic conditions if (nMetaMagic == METAMAGIC_MAXIMIZE) { nDam = 10;//Damage is at max } if (nMetaMagic == METAMAGIC_EMPOWER) { nDam = nDam + nDam/2; //Damage/Healing is +50% } fTime = fDelay; fDelay2 += 0.1; fTime += fDelay2;
//Set damage effect effect eDam = EffectDamage(nDam, DAMAGE_TYPE_MAGICAL); //Apply the MIRV and damage effect DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget)); DelayCommand(fDelay2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget)); } } else { for (nCnt = 1; nCnt <= nMissiles; nCnt++) { ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget); } } } }
|
|
|
Post by FunkySwerve on Aug 7, 2011 18:48:16 GMT
//:://///////////////////////////////////////////// //:: Magic Missile //:: NW_S0_MagMiss //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* // A missile of magical energy darts forth from your // fingertip and unerringly strikes its target. The // missile deals 1d4+1 points of damage. // // For every two extra levels of experience past 1st, you // gain an additional missile. */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: April 10, 2001 //::////////////////////////////////////////////// //:: Last Updated By: Preston Watamaniuk, On: May 8, 2001
#include "NW_I0_SPELLS" #include "x2_inc_spellhook"
int GetLegendaryLevels(object oPC) { int nLootable = GetLootable(oPC); if (nLootable < 41) return 0;
return (nLootable - 40); }
void main() {
/* Spellcast Hook Code Added 2003-06-23 by GeorgZ If you want to make changes to all spells, check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode()) { // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell return; }
// End of Spell Cast Hook
//Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) object oTarget = GetSpellTargetObject(); int nCasterLvl = GetCasterLevel(OBJECT_SELF); //add legendary levels to casterlevel if casterlevel 20 or more if (GetIsPC(OBJECT_SELF && nCasterLvl > 19) nCasterLvl += GetLegendaryLevels(OBJECT_SELF);
int nDamage = 0; int nMetaMagic = GetMetaMagicFeat(); int nCnt; effect eMissile = EffectVisualEffect(VFX_IMP_MIRV); effect eVis = EffectVisualEffect(VFX_IMP_MAGBLUE); int nMissiles = (nCasterLvl + 1)/1; float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); float fDelay = fDist/(3.0 * log(fDist) + 2.0); float fDelay2, fTime; if(!GetIsReactionTypeFriendly(oTarget)) { //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MAGIC_MISSILE)); //Limit missiles to five if (nMissiles > 60) { nMissiles = 60; } //Make SR Check if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) { //Apply a single damage hit for each missile instead of as a single mass for (nCnt = 1; nCnt <= nMissiles; nCnt++) { //Roll damage int nDam = d4(2) + 2; //Enter Metamagic conditions if (nMetaMagic == METAMAGIC_MAXIMIZE) { nDam = 10;//Damage is at max } if (nMetaMagic == METAMAGIC_EMPOWER) { nDam = nDam + nDam/2; //Damage/Healing is +50% } fTime = fDelay; fDelay2 += 0.1; fTime += fDelay2;
//Set damage effect effect eDam = EffectDamage(nDam, DAMAGE_TYPE_MAGICAL); //Apply the MIRV and damage effect DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget)); DelayCommand(fDelay2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget)); } } else { for (nCnt = 1; nCnt <= nMissiles; nCnt++) { ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget); } } } }
As for expanding past 60, yes, more changes need to be made. Not something you should be tinkering with if you're not a scripter, and beyond the scope of this forum, which is for support for the original system, and not script requests like the above. For that, I would suggest the bioboards.
Best, Funky
|
|
jam
Peasant
Posts: 4
|
Post by jam on Aug 7, 2011 20:13:58 GMT
Thanks for the script. However, it didn't compile.
LINE (57)ERROR: NO RIGHT BRACKET ON EXPRESSION
55 //add legendary levels to casterlevel if casterlevel 20 or more 56 if (GetIsPC(OBJECT_SELF && nCasterLvl > 19) 57 nCasterLvl += GetLegendaryLevels(OBJECT_SELF);
Again, thanks for your help. I'll take your advice and leave the levels over 60 alone. I'm far enough over my head with these spell scripts.
|
|
|
Post by FunkySwerve on Aug 7, 2011 21:02:57 GMT
Change that line to:
if (GetIsPC(OBJECT_SELF) && nCasterLvl > 19)
Funky
|
|
jam
Peasant
Posts: 4
|
Post by jam on Aug 9, 2011 15:24:16 GMT
Thank you for your help. It works perfect now. I have been able to use this to start re-editing my spell scripts. All is well in my imaginary world.
|
|