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  Tag-based Template
Author  The Krit
Submitted / Updated  04-03-2010 / 11-13-2010
Category  Tutorials
Expansions  HOTU-1.59
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Unique Items
Includes  BioWare Standard
Description
This is a template script to help people create their scripts for tag based items. (If your tag-based item only needs to handle item activation, you may prefer to look at my Tag-based Template, Activate Only submission.) The template includes all the necessary interface instructions (like finding the item in question and setting the executed script return value), allowing the scripter to focus on what needs to be done. The basic way to use this is to copy it to your script (named for the item's tag), then add your code to the correct places. Between the comments and the function names, I hope the details of using this are self-explanatory. For more of an overview, read on.

The design of this template breaks each event out into its own function, with relevant information (such as the item in question) passed as parameters. Events that you don't care about can be left as-is. (This is not the most efficient possible solution, but it's not terribly inefficient.) I suppose that makes this something of a tutorial, presenting a reasonable way to implement tag-based items.

The primary intended audience for this are those who are have taken a step beyond the script generator, or at least are willing to take that step. (A "step" would include just being able to adapt a generated script to work as one of these functions -- some understanding of scripting principles is required, but not necessarily the ability to write a script from scratch.)

Some more experienced scripters may find this a useful reference for tagbased design, such as what object is running each event and when exactly the OnSpellCastAt event fires within the spell hook. This is not the primary intended use, but the info is there.

I looked around and did not find something like this, so I thought I would post it in case someone might find it helpful.

Nov 13, 2010 -- renamed the "oTarget" and "lTarget" parameters for better compatibility with scripts originating with the Script Generator

Files

NameTypeSizeDownloads
NO FILES
SCORE OUT OF 10
9.93
9 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





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

Posted by Mannast at 2010-08-17 17:18:56    Voted 10.00 on 08/17/10
The clear and eye-opening setup of this script has made my life much easier. Thanks for putting this on the board.

Posted by crazedmages at 2010-07-24 09:37:06    Voted 9.50 on 07/24/10
Only reason I rank this below a 10 is if the Krit would have made this earlier then I would have not had my guys summoning naked stouts for three weeks...
_________________________
People react violently to fur rather than leather because it is easier to pick on rich chicks with bad taste than biker gangs.

Posted by Blasco-Yang at 2010-06-14 18:28:42    Voted 10.00 on 06/14/10
Frankly, RustyDios comment is nearly a duplicate for what I would have said. He was very articulate and honest.

And obviously, The Krit is a fellow who can take constructive, well meaning criticism with his head held high.

However, it is not my intention to vote on how useful I, personally, find the template.

Since I am not part of the intended audience I feel I should step back and put myself into the shoes I wore a few years ago and vote as though I were indeed a novice scripter.

As Rusty said, this template is better commented, and goes a lot further in detailing how it all comes together.

As a begining scripter, anything you can grab hold of that goes a bit further in explaining those details is worth a fortune.

If everyone working with NWN scripting currently had been at it for 3 years or more I'd probably give it a lower vote than Rusty did, but as for its worth to a fledgling scripter I give it a 10.

Like Rusty, I also mean no offense. I admire his honesty, and the fact that he seemed somewhat reluctant to even vote went a long way to convincing me of his sincerity.

Posted by Sethan at 2010-04-30 23:43:20    Voted 10.00 on 04/30/10
Nicely done.
_________________________
PW Story server Narfell - Since 2002

Posted by Greven134 at 2010-04-17 22:06:01    Voted 10.00 on 04/17/10
A useful template to help fledgling scripters. Very useful!

Posted by The_Krit at 2010-04-14 19:14:45    
Apologies not necessary. ;) From my perspective, a well-explained rating is always welcome, regardless of the number attached. I even appreciate the rating of 1.25 someone gave one of my other entries because it came with a rationale, letting me see what that person thought was important.

Not to mention that 7.00 is a pretty good rating, isn't it? I mean, 8.00 is Hall of Fame material, so being just a bit below that is not bad at all.

Posted by RustyDios at 2010-04-12 18:49:41    Voted 7.00 on 04/12/10
Yes I agree the template is useful.. it does have some functions in it that are not covered in "x2_it_example"... it is explained alot better then that template too... ... looking at it with fresher eyes, if I was a complete novice scripter (like we all were once), this is a brilliant template... and I'm guessing that it hits it's target audience perfectly... but I don't class myself a novice anymore, and have found I've been fine without this, though it could have helped.... Don't get me wrong, if I'd come across this when I started out I could see it being alot more useful..... .... however the lexicon, lilac's generator and a host of forum boards and posts(including from the Krit, who is a wellspring of quality information) have made me better. Almost to the point where I don't see the need for this, and that is why I say my vote would be (and is) "tainted", I do not consider myself part of the intended audience... As (almost) requested though I have cast my vote. This is good stuff, just not for everyone. I hate being negative on things that community members have taken the time to do and to share with us, but I suppose constructive criticism makes everything better, for everbody. I've said my piece, please don't take it the wrong way, it is not meant as flame, or aggression, or intendedly hurtful... just my point of view. Sorry.

Posted by The_Krit at 2010-04-10 15:20:15    
One other thing... if anyone thinks something is going to taint their rating, I say rate it anyway but be sure to explain the possible taint in their vote's comment. That way others looking at the ratings can decide for themselves if your concern is something that matters to them.

It's a waste of a rating system when people fall into the idea that their choices are "vote 10" or "don't vote". I can understand not voting on an entry because you are not the intended audience (and you can't tell how good it would be for the intended audience), but not voting simply because the rating would be low defeats the purpose of having ratings in the first place. (And I'll stop here before I go into how bad I think vote inflation has gotten on the Vault.)

Posted by Saduj at 2010-04-05 11:39:34    Voted 10.00 on 04/05/10
Excellent work, defiantly handy to have :)
_________________________
Carcerian/Saduj's Submissions: (169 Portrait/Soundset Unlocker) (12 NWN Fonts) (30 NWN Fonts) (Auto-Emotes) (Custom Dragon Disciples) (Dynamic Wildshape) (Keyring) (NPC Schedules) (Sacred Shields) (Spawning Undead) (Shayans Subrace Engine for 169)

Posted by The_Krit at 2010-04-05 09:32:13    
Re: Is this worth more than x2_it_example?

I'll leave it to each person to decide that. This template is a bit more comprehensive in that it covers a few more event details than the example script (e.g. getting the activation target) and it handles setting the script return value. Other differences are more subjective as to "better", "worse", or "just as good".

What I see as the big value to this entry is that people searching the Vault (or BioWare's forums, as I put a link there) have a chance to find this. The example script is not likely to be found by the beginner scripters, as the Toolset won't search standard scripts unless you open them first. (There is BioSearcher, but again, not likely for beginner scripters.)

Posted by RustyDios at 2010-04-04 15:09:01    Voted 7.00 on 04/12/10
This is useful... saved into the "scripttemplates" folder of your nwn directory can be accessed any time you happen to be in the module... the question I'm wondering is if it's worth any more then the "x2_it_example" script which can be found by clicking "all resources" when opening a new script.... ...

I'm not going to vote, because whilst I see this as useful I'm not sure it really adds anything above and beyound the script I just mentioned, and that really taint's my vote... ...

Posted by 420 at 2010-04-04 11:24:00    
Thanks for this The Krit! I'm definitely bookmarking this, I have a feeling I may need to post a link to it frequently.

Posted by jdeavila at 2010-04-03 23:07:38    Voted 10.00 on 04/03/10
good stuff..thanks!!
_________________________
Imtherealthing

CCP (The Community Creature Project)

The TRIAD

Posted by Gonzo_og at 2010-04-03 19:19:12    Voted 10.00 on 04/03/10
This looks very thorough.
_________________________
stuff

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 Gameworlds


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