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  



NWN2 SCRIPTS

- Jump to comments -
Name  Subscripting Design Pattern
Author  Yaballa
Submitted / Updated  08-24-2007 / 08-25-2007
Category  Scripting routines
Type  Type - General
Format  Module and Code
Patch  1.00
Description
Subscripting is a NWN1 and NWN2 scripting design pattern that improves performance, streamlines module design and keeps things more organized.

It works with one main "Script Base" file whose "Nodes" are referenced by smaller scripts. Try out the demo and see source code for more information. Don't hesitate to contact me for help.

Files

NameTypeSizeDownloads
subscripting.rarsubscripting.rar
Submitted: 08-24-2007 / Last Updated: 08-24-2007
rar711.72Kb110
Subscripting demonstration module
SCORE OUT OF 10
8
1 votes
View Stats
Cast Your Vote!
Voting FAQ

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 (3):

Posted by jallaix at 2007-09-07 10:46:37    Voted 8.00 on 09/07/07
8 because now I know why it improves performance !

In fact since you've submitted your pattern, I've written an include file that contains many functions to call scripts :
* Add arguments for script calling (int, float, string, object, location, itemproperty)
* Script execution (simple or with a subscript, that I called the fork system)
* Return value (int, float, string, object, location, itemproperty)

I've integrated it in my Spellcasting Framework (in fact it will be in the next version) as it permits to make something I really miss in the nwn scripting language : function overrides.
In fact, as it may interest other people, I think I'll submit it on the vault today. Just have a look and tell me what you think about it.
_________________________
Spellcasting Framework
Wild/Dead Magic Zone (Spellcasting Framework add-on)

Posted by Yaballa at 2007-08-30 08:33:07    
Thanks for interest, jallaix

The pattern improves perfomance because the module's filesize is smaller since you're not including libraries across multiple scripts but only in script base file.

SUBSCRIPT_EVENT_ONCE_VAR is a leftover from a subscript function tied to one of my modules, it was an event trigger function. Just ignore it, I'll remove it in the update.

I plan on adding support for other types of returned values and there will be a more user-friendly demo module.

If you're interested, you're free to collaborate


Posted by jallaix at 2007-08-26 03:32:06    Voted 8.00 on 09/07/07
Good attempt to standardize calls to ExecuteScript().

But could you explain why this pattern should improve performance ?

You also defined a SUBSCRIPT_EVENT_ONCE_VAR variable in inc_subscripts.nss, but it's never used. Do you intend to improve the pattern later ?
If yes do you intend to add more types of returned value (like string, object, etc.) as returning TRUE or FALSE as an integer is quite limitative.

And could you provide a more user-friendly demo module ? (I didn't understand what it should demonstrate when I tried it...)
_________________________
Spellcasting Framework
Wild/Dead Magic Zone (Spellcasting Framework add-on)

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

10 - A Masterpiece, Genuinely Groundbreaking
9 - Outstanding, a Must Have
8 - Excellent, Recommended to Anyone
7 - Very Good, Deserves a Look
6 - Good, Qualified Recommendation
5 - Fair, Solid yet Unremarkable
4 - Some Merit, Requires Improvements
3 - Poor Execution, Potential Unrealized
2 - Very Little Appeal
1 - Not Recommended to Anyone

 
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 Original Hakpaks


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