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  Cache by Abraxas77
Author  Abraxas77
Submitted / Updated  12-20-2006 / 12-21-2006
Category  Scripting routines
Type  Type - Arrays
Format  Code Only
Patch  1.00
Description
Cache temporary or shared data painlessly, create 2-dimensional arrays, and more!

This is a data structure built on the premise of flexibility. Cache 2da files, store shared data, create parallel (2D) arrays, or simply use it as a repository for temporary data.

The system uses a collection of waypoints to store data. Bit fields track which elements are in use and which are available.

Check out the documentation in the packaged .PDF file for usage instructions and addition information.

Files

NameTypeSizeDownloads
abx_Cache101.zipabx_Cache101.zip
Submitted: 12-20-2006 / Last Updated: 12-21-2006
zip22.97Kb123
version 1.01
SCORE OUT OF 10
9
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 (6):

Posted by Abraxas77 at 2006-12-31 20:17:37    
For the moment, yes. Convenience was what got me started. Although, I continue dreaming up ideas for more practicall implementations.

My lastest idea is to cache nwnx DB calls. A (psuedo)heartbeat system would then fire the DB calls in a time-based fashion rather than on-demand.

In other words, it could be made into a sort of "incremental backup" system: where X amount of cached data is written to the DB every Y seconds, then cleared from the cache.

Or in treasure system, the treasure could be pulled from the DB while the party crawls rather than the moment a party member opens a chest (I'm still wondering if there's any real advantage here ... the idea is to take a heafty DB call--one which would cause noticable lag--and break it into smaller pieces ... but I'm leaning toward a better solution being better SQL)... but now I digress ....

Thanks for the support, I'll continue to update as my developments progress.
_________________________
Lead Script Design The World of Palladium II
DMFI GUI Guru

Posted by edret at 2006-12-22 08:30:23    
So the real value this adds isn't faster running speed and efficiency but the convenience of being able to use arrays?

Posted by jallaix at 2006-12-22 05:28:48    Voted 9.00 on 12/22/06
Exactly what I was looking for. Thanks for sharing.
_________________________
Spellcasting Framework
Wild/Dead Magic Zone (Spellcasting Framework add-on)

Posted by Abraxas77 at 2006-12-21 13:25:02    
Just update with a second include file of convenience functions. These functions should make the system more intuitive. I also made a few performance tweaks.
_________________________
Lead Script Design The World of Palladium II
DMFI GUI Guru

Posted by Abraxas77 at 2006-12-21 11:26:48    
I ran performance tests using nwnx4's timer.
Testing with a cache of 1024 waypoints:
-Creation ran in ~460000 microseconds.
-Population TMI due to the bit field tracking. But ignoring the tracking, it populated in ~20000us (microseconds).
-Access ran in ~19000us.

A store of localstrings on a single waypoint populated in ~15000us. Access took ~13500us.

So, the cache is a bit slower. It's much closer for smaller data sets. However, I think this system is going to be worth the cost. I'm still working out implementation strategies.

What I've been so far is caching my data, then creating integer arrays that point to it. This gives you 2D array functionality: where the pointer array indexes server as your rows; and the cache variable names make up your columns.

I'm just now wrapping up some convenience functions that make such a setup a snap. I'm looking at method to save/load a cache as well.


_________________________
Lead Script Design The World of Palladium II
DMFI GUI Guru

Posted by edret at 2006-12-21 08:52:34    
So does script system this make accessing the data your caching more efficient? How do you know? I don't doubt you. I'd just like to know.

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 Visual Effects


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