Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Spell Tracking v1.3
Author  Creslyn
Submitted / Updated  02-11-2004 / 11-22-2006
Category  Spells
Expansions  HOTU-1.61
Format  Code Only
Type  Type - Other
Includes  Custom
Description
Method of tracking spell usage and memorisation over logout/login updated for HotU, persistent over server travel/resets/crashes. Runs off the spellhook, OnPlayerRest and OnClientEnter events. Simply unzip the .erf and import the files into your module. Instructions included in the .erf. Feedback is welcome. See the text file below for details.

Files

NameTypeSizeDownloads
spelltrackv13.rarspelltrackv13.rar
Submitted: 02-11-2004 / Last Updated: 03-21-2004
rar5.89Kb571
--
SCORE OUT OF 10
7.94
6 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (51):

  1  2 Next>

Posted by Pumuki at 2012-02-06 22:55:26    Voted 8.00 on 02/06/12
A bit dificult to use for people who don´t know to write scritps. I´ve got the sensation of cast and polymorph feats got a little chance of get canceled...But good work!

Sorry for my english :(

Posted by ikkis ( 62.254.xxx.xxx ) at 2005-07-29 16:27:57    
ok it's totally messed up my comment posting here.

Check those lines in the script though - there is a short-circuit error in the if statement where there is just a nonzero value as an or condition, rather than an equality check against nID

Posted by ikkis ( 62.254.xxx.xxx ) at 2005-07-29 16:27:04    
the 324 will mean that this if always evaluates true, as it is nonzero. There should be a nID == here, the error is also on line 100

Posted by ikkis ( 62.254.xxx.xxx ) at 2005-07-29 16:25:41    
there is an error in script file st_inc

line 124 is an if conditional which starts:
if((nID >= 0 && nID = 0 && nID

Posted by Sir_Elric at 2005-06-29 17:50:39    Voted 7.00 on 06/29/05
Laggy and doesn't address swaping spells.
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by Mermut at 2005-05-17 14:35:26    Voted 8.50 on 05/17/05
The system is well done. One of the few systems that takes advantage of the spellhook system. I found it every easy to follow as well as intergrate into my existing systems.
_________________________
I am willing to suspend my disbelief,
But not hang it by the neck until dead.

Posted by Lucky Day ( 63.13.xxx.xxx ) at 2005-01-09 15:04:00    
SE what other script did you use? Was it a custom one of your own?

Posted by Lucky Day ( 63.13.xxx.xxx ) at 2005-01-09 15:04:00    
SE what other script did you use? Was it a custom one of your own?

Posted by The Incredible Hulk ( 195.204.xxx.xxx ) at 2004-12-22 02:44:00    
I know what im going to ask is what you are "fighting" to make unessesary, but does anyone have a working strip-memorized-spell-on-join script?

I just need this while im trying to figure out how to insert this other script.

Please help me out.

-Hulken

Posted by Sir_Elric at 2004-11-01 21:14:00    Voted 7.00 on 06/29/05
FYI I found this system to be quite laggy in the end and had to remove it in favour of another one.
When players were resting there was a pause at the end of resting and also when players were logged in there were severe lag spikes.City of Melnibone - PW
ausnwn2.dyndns.org:5121
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by Lucky Day ( 63.13.xxx.xxx ) at 2004-10-28 12:00:00    
gah - its these boards that can't handle my post. I posted right the first two times

in fact that is likely what happened to your code sir elric

st_inc.nss(122): ERROR: NO SEMICOLON AFTER EXPRESSION

these boards can't hadnle a properly formated "for" loop and its combining the for and the if statements together.


Posted by Anonymous ( 63.13.xxx.xxx ) at 2004-10-28 11:53:00    
man!

I can't sem to post right today

one more time :P

Sir Elric:

the whole line

for(nID=0;nID= 0 && nID = 340 && nID = 363 && nID = 387 && nID = 414 && nID = 429 && nID = 512 && nID = 636 && nID = 0 && nID = 340 && nID = 363 && nID = 387 && nID = 414 && nID = 429 && nID = 512 && nID = 636 && nID = 0 && nID = 340 && nID = 363 && nID = 387 && nID = 414 && nID = 429 && nID = 512 && nID = 636 && nID

Posted by Lucky Day ( 63.13.xxx.xxx ) at 2004-10-28 11:50:00    
sorry

the whole line

for(nID=0;nID= 0 && nID = 340 && nID = 363 && nID = 387 && nID = 414 && nID = 429 && nID = 512 && nID = 636 && nID = 0 && nID = 340 && nID = 363 && nID = 387 && nID = 414 && nID = 429 && nID = 512 && nID = 636 && nID

Posted by Lucky Day ( 63.13.xxx.xxx ) at 2004-10-28 11:40:00    
Sir E

you forgot ;nID++ in the line

for(nID=0;nID= 0 && nID = 340 && nID = 363 && nID = 387 && nID = 414 && nID = 429 && nID = 512 && nID = 636 && nID

Posted by Frang ( 151.205.xxx.xxx ) at 2004-09-10 07:20:00    
anyway you can update the file its not working.

says the spelltrackv1_3.erf header is corrupt. and wont let me unzip it

Posted by Sir_Elric at 2004-09-04 10:43:00    Voted 7.00 on 06/29/05
The fix I created for my earlier post is this for anyone that's interested.

Open st_inc and scroll down to...

// Check if a spell was memorised legally (with resting)
nLegal = st_GetInt(oCaster,"st_SpellCastLegal_"+IntToString(nID)+"_");
if(nLegal)
{
// Remove any castings of the spell already used
nCasts = st_GetInt(oCaster,"st_NumSpellCast_"+IntToString(nID)+"_");
st_LegalLoopDecrement(oCaster, nID, nCasts);
}

//Check for more of the same spell if so decrement them
if (nSpell>nLegal)
{
int iRemove = nSpell - nLegal;
st_LegalLoopDecrement(oCaster, nID, iRemove);
}

change it to...

// Check if a spell was memorised legally (with resting)
nLegal = st_GetInt(oCaster,"st_SpellCastLegal_"+IntToString(nID)+"_");
if(nLegal)
{
// Remove any castings of the spell already used
nCasts = st_GetInt(oCaster,"st_NumSpellCast_"+IntToString(nID)+"_");
st_LegalLoopDecrement(oCaster, nID, nCasts);
//Check for more of the same spell if so decrement them
if (nSpell>nLegal)
{
int iRemove = nSpell - nLegal;
st_LegalLoopDecrement(oCaster, nID, iRemove);
}
}

HTH

SECity of Melnibone - PW
ausnwn2.dyndns.org:5121
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by Sir_Elric at 2004-08-30 04:46:00    Voted 7.00 on 06/29/05
One other thing I have found is if you swap used spells for spells that you already had these will not be decremented if you log in and log out.
ie: 5th level wizard spells have 3 firebrands and 3 hold monsters cast all 6 spells replace the hold monster with 3 more firebrands log out and back and you have the 3 new firebrands ready to use :S

SECity of Melnibone - PW
ausnwn2.dyndns.org:5121
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by Sir_Elric at 2004-08-28 18:32:00    Voted 7.00 on 06/29/05
Easiest way to log spells on first log in rather than decrement them all is to use your st_OnRestCompleted(oPC); function with a delayed SetLocalInt().

#include "st_inc"

void main()
{
object oPC = GetEnteringObject();
if (!GetLocalInt(oPC, "ENTERED"))//First log in?
{
st_OnRestCompleted(oPC);//Log all current spells
}
else
{
st_HideCheck(oPC);
DelayCommand(0.8,st_SpellCheck(oPC));
}
DelayCommand(10.0, SetLocalInt(oPC, "ENTERED", TRUE));
}

Cheers

SECity of Melnibone - PW
ausnwn2.dyndns.org:5121
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by Sir_Elric at 2004-08-28 01:30:00    Voted 7.00 on 06/29/05
Excellent stuff just about to add it to my PW.

One thing I added was setting a delayed local on the player as they enter in the OnEnter script.

#include "st_inc"

void main()
{
object oPC = GetEnteringObject();
DelayCommand(10.0, SetLocalInt(oPC, "ENTERED", TRUE));
st_HideCheck(oPC);
DelayCommand(0.8,st_SpellCheck(oPC));
}


...then in the st_SpellCheck() function add...

void st_SpellCheck(object oCaster)
{
if(GetIsPC(oCaster) && !GetIsDM(oCaster) && !GetIsDMPossessed(oCaster))
{
int nID, nSpell, nLegal, nCasts;
for(nID=0;nID= 0 && nID = 340 && nID = 363 && nID = 387 && nID = 414 && nID = 429 && nID = 512 && nID = 636 && nID
_________________________
City of Melnibone
ausnwn.dyndns.org:5121

Posted by Case at 2004-08-05 03:20:05    Voted 8.25 on 08/05/04

Posted by Harkinian at 2004-06-19 05:52:57    Voted 9.00 on 06/19/04
Excellent system. Well coded and thought out. Very user friendly.

Posted by Tobur ( 212.119.xxx.xxx ) at 2004-06-14 03:20:00    
Excelent work! I used this spell tracking in persistence world. Very simple and easy use.
Bug with domain spell is common problem.

Posted by Creslyn at 2004-03-29 17:25:00    
Not domain spells, just regular spells. Someone mentioned it in passing a while back, and when I checked Endurance (mage and cleric spell) sure enough it was missing the spellhook function. No list sorry.-
Ignorance is only a curse to those who believe it isn't.

Posted by NWNFan ( ..xxx.xxx ) at 2004-03-29 17:14:00    
I'll take a look at the new version :)

If you want them to have all their spells at first log in only (after a server restart) without worrying about Hide persistance, you can run the rest completed script on them on their first enter, and set a variable on them so when they relog, this script it bypassed.

Some cleric domain spells don't include the spell hook? Damn. Do you have the list handy somewhere? Have you added in the hook in your own mod? It could be a cause of domain problems for me at least.

Posted by Creslyn at 2004-03-27 22:55:00    
Hmm...I've been told that several clerical spells do not have the spellhook checks included in their scripts, and I know that Endurance is one of them, are the X2PreSpellCast() and the x2_inc_spellhook include both added to your nw_s0_endurce.nss (sorry, know you said you added them but have to ask)? It might also have something to do with the problems NWNFan mentioned with Spontaneous healing, though I haven't been able to duplicate them so I'm not certain about that.

As far as the CEP affecting this, again I'm not certain as the worlds I play in don't use it. If it affects the spells in some way, either adding custom's or alterations to spells.2da etc, then that may well be the case.

As for a forum, afraid not, so I do appreciate the bug reports getting posted here.-
Ignorance is only a curse to those who believe it isn't.

Posted by diavlen at 2004-03-27 10:35:00    
Ahhh, ok. (on the first problem). I read that and misinterpreted it. I thought that placing the variable on the module would work while it was running, and that after a crash the player would just have all of their spells back. I see what you mean now.

On the second problem, I used to have the hard core spell installed, but have since removed all references to them. So the system has reverted back to the bioware original. The spells I have modified, I've added in the spell hook to the beginning of each of them. Also, I am using the Community Expansion Pack. Would that cause any weirdness?

On a side note:
I did find one thing that was odd in my personal testing. The character was a level 8 cleric, using normal spells. If I cast all of my spells and relog, When I log back in, I have Endurance back on my list. Everything else worked fine.

BTW, do you have a forum, or do you prefer that we report possible bugs here?
_________________________
Borgo Pass PW
Link

Posted by Creslyn at 2004-03-26 11:14:00    
The first problem I can answer straight away, and I think I mention this in the readme but perhaps I should add a more complete explanation. There are three options (in the current version - 1.3, two in 1.2 and previous) for storing the tracking variables.

1. The first, and default, method is simply using the module to hold the variables. That means they are persistent only so long as the server remains up and running, and are not stored over server crashes or reboots. Unless you have altered the value of the constants in the st_inc include this is the method you will be using in your module.

2. The second method (in 1.3 only) is to use a non-drop item common to ALL players (such as an emote ball/wand) to store the variables. This ensures that they will be persistent even over server crashes/reboots, and will solve your sorcerer player's problem.

3. The third (second and only other option in 1.2 and previous) uses a creature hide item on the player to store the variables. This also ensures persistency over server crashes/reboots, though I would only use this if you do not wish to use a non-drop item to hold the variables.

My suggested course would be to use method number two, and there are fairly clear instructions in the st_inc include on how to do this. It simply involves entering the tag of the desired object (to store the variables on) to the constant declarations, and altering the value of the other declared constant to 1.

As far as the second problem with the cleric spells, I'm not certain what the cause of that could be, as I have specifically tested one of those and had no troubles with it. Have you modified those spells at any time previously, or the spells.2da, or any other similar files? Hopefully, more details will make it simpler to track down the cause.
-
Ignorance is only a curse to those who believe it isn't.

Posted by diavlen at 2004-03-26 07:28:00    
I just installed your spell tracking system and have a few reports from the players to send your way. BTW, I'm really happy you made this system, since it's focused on the spell hook. Here is one of the reports I received:

/////////////////////////////////////////////
I have problems since spell tracking was added. Everytime a server resets you start with all spells lost? Even if you rested before the server reset and should have full spells. This is really deadly for my Sorceress since she is totally lost without spells.

My Cleric has another more strange problem. The first rest after a server reset does not give all spells back. More precisely my 2 copies of Bull's strength and my one extended bless are not returned. I need to rest twice to get those. Its highly annoying. Please look into that.
/////////////////////////////////////////////
_________________________
Borgo Pass PW
Link

Posted by Creslyn at 2004-03-21 05:08:00    
Right, managed to duplicate the TMI error, and after a few alterations to how spells are decremented it seems to be fixed. Also fiddled with the storage functions to both tidy things up and make it easier for folks to change how variables are tracked.

However I'm having trouble finding problems with spontaneous casting being incorrectly tracked, as myself and the folks I dragoon into helping me haven't come across any problems with it as yet. Can you give more details on that?

As far as domain spells go, there just isn't much I can do about that at the moment. Oddly enough, level one clerical domain spells can be tracked and decremented, but none higher.

Hope you can test this one out as well NWNFan, and provide more feedback.-
Ignorance is only a curse to those who believe it isn't.

Posted by Creslyn at 2004-03-14 16:14:00    
Hmm...thanks for finding that NWFan, I'll poke around and see if what can be done about it.-
Ignorance is only a curse to those who believe it isn't.

  1  2 Next>

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Tutorials


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters