Too much code...
Page 1 of 1
Too much code...
Yesterday I started updating a bunch of scripts to speed up database reading/writing. I could do a simple find/replace of code through all the scripts I use, but I figured it'd be nice if I didn't mess up everyone's characters while I did it (so I have to be able to still pull from the older database files, then transfer the information into the newer system)...which means manually going through every script that might read or write from the database to do the updates.
Why? After 3 1/2 years, the database files are getting huge (which means there's some minor slowing of scripts that have to access those files). The ones just for keeping track of teleport/summon ally data is a combined 12 MB. The "general purpose database" files are currently stand at 997 MB. The newer method (NBDE, for those wondering) will cut down on that, while keeping the data and making database-accessing script run faster.
So far, I'm done up through the scripts that start with the letter D.
And I think I'm fixing a couple of bugs along the way.
Why? After 3 1/2 years, the database files are getting huge (which means there's some minor slowing of scripts that have to access those files). The ones just for keeping track of teleport/summon ally data is a combined 12 MB. The "general purpose database" files are currently stand at 997 MB. The newer method (NBDE, for those wondering) will cut down on that, while keeping the data and making database-accessing script run faster.
So far, I'm done up through the scripts that start with the letter D.

And I think I'm fixing a couple of bugs along the way.

_________________
.
------------------------------------- The Amethyst Dragon -------------------------------------
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Re: Too much code...
Hail
... ... was wondering the item storage device I created uses the bioware database functions to store what it can "across different modules" (should include PW server resets, but that is untested).. ... what is the newer [ NBDE ] method for databasing that you speak of above, and how is it faster ?....
Maybe a link for me to look into it myself ? .... ...

Maybe a link for me to look into it myself ? .... ...
RustyDios- High Epic Level
-
Number of posts : 2271
Age : 36
Location : England // Getting lost in Aenea
Main Character : Jay Braysin, The Wandering Shadow, Protector of Nektaria, Talon's Eternal Foe
Other Character : Shouri Braysin, The Shimmerstar's Moonlight Sorceress
Other Character. : Grace Fularras, Walking Library , Cleric of Mystara
Other Character.. : See my sig ... And here too ...
NWN Username : RustyDios
Time Zone : GMT (England, DST)
. :
Registration date : 2008-07-28
Re: Too much code...
[NBDE] Natural Bioware Database Extension v1.0
It works by saving data as local variables (integers, strings, etc.) to a "database item" in a container in a hidden area of the module. Every once in a while (I've got it set to go every two minutes), it writes all the data to the database files by saving the "database item" itself...since this saves all the variables at the same time, it's actually very fast and easy (and cuts down on the size of database files that are created). The database info resides in memory, so the "read/write" done when scripts run is faster than reading/writing to the hard drive every time.
I can also tell it to write to the hard disk at any time if I really want information saved right away (like I do when subrace is set at character creation).
Seems to work just fine when I tested a small-scale use of this in-game, so hopefully I won't mess anything up badly when I move the module to the live server.
It works by saving data as local variables (integers, strings, etc.) to a "database item" in a container in a hidden area of the module. Every once in a while (I've got it set to go every two minutes), it writes all the data to the database files by saving the "database item" itself...since this saves all the variables at the same time, it's actually very fast and easy (and cuts down on the size of database files that are created). The database info resides in memory, so the "read/write" done when scripts run is faster than reading/writing to the hard drive every time.
I can also tell it to write to the hard disk at any time if I really want information saved right away (like I do when subrace is set at character creation).
Seems to work just fine when I tested a small-scale use of this in-game, so hopefully I won't mess anything up badly when I move the module to the live server.
_________________
.
------------------------------------- The Amethyst Dragon -------------------------------------
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Re: Too much code...
Cool... super fast response time from ye
... looking into this now, and seeing how to put it into the item storage device... hopefully make it quicker and less space consuming... not 100% sure it will work with what I'd done... but lets see... what if....

RustyDios- High Epic Level
-
Number of posts : 2271
Age : 36
Location : England // Getting lost in Aenea
Main Character : Jay Braysin, The Wandering Shadow, Protector of Nektaria, Talon's Eternal Foe
Other Character : Shouri Braysin, The Shimmerstar's Moonlight Sorceress
Other Character. : Grace Fularras, Walking Library , Cleric of Mystara
Other Character.. : See my sig ... And here too ...
NWN Username : RustyDios
Time Zone : GMT (England, DST)
. :
Registration date : 2008-07-28
Re: Too much code...
The Amethyst Dragon wrote:
And I think I'm fixing a couple of bugs along the way.
Hoping for the best on this, and that it doesnt go the way of some of my
own 'improvement projects' on various things..... where I thought I was
making it better and..... well...... Kaboom.
"Yeah, dude.... when I transfer my old hard drive with win 2000 into
my new computer, its gonna be soooo much faster than the old
computer...."
Curse the hardware abstraction layer, I say.... curse it to death.
daveyeisley- Ludicrous Level
- . :
Number of posts : 6926
Age : 43
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Too much code...
3 1/2 years of aenea being on-line... I don't know the state of things on
's end but I'll bet that there are hundreds of scripts and "things" that he could look at now and think "why did I go that long way round to do this...." and completely re-code for faster, better, cleaner, easier to manage and edit files.... I know just in myself that I've looked back over some of the things I created when I first started with the toolset and just "re-done in better ways".... .... and in comparison to Aenea and all it's goodies.. I haven't even scratched the surface of what CAN be done...
Still I'm with you dave, lets sit back and wait for that inevitable "Kaboom"... after all ... if it's not broke, why take it apart to fix it... And we all know that despite best intentions and triple checking of everything, something will likely go wrong.... NOT that I'm doubting
's abilities or anything (he is a NWN god in my book!) it's just the inevitable nature of the world... if something can go wrong, it will ...... ...... .....

Still I'm with you dave, lets sit back and wait for that inevitable "Kaboom"... after all ... if it's not broke, why take it apart to fix it... And we all know that despite best intentions and triple checking of everything, something will likely go wrong.... NOT that I'm doubting

RustyDios- High Epic Level
-
Number of posts : 2271
Age : 36
Location : England // Getting lost in Aenea
Main Character : Jay Braysin, The Wandering Shadow, Protector of Nektaria, Talon's Eternal Foe
Other Character : Shouri Braysin, The Shimmerstar's Moonlight Sorceress
Other Character. : Grace Fularras, Walking Library , Cleric of Mystara
Other Character.. : See my sig ... And here too ...
NWN Username : RustyDios
Time Zone : GMT (England, DST)
. :
Registration date : 2008-07-28
Re: Too much code...
Yeah thats basically what I mean... I know darn well
is gonna be very careful as always to try and make things seemless and transparent to us.... I remember the changeover from teleport gloves to teleport slots.... and i was so worried about losing some of my stored locations... and all of that anxiety was for nothing.... I ran the conversion command and boom... everything was where it should have been.
If it can be done without a hitch,
can and will do it..... but sometimes, that just aint possible... I just hope it is a case of the former.... and if it has to be the latter, that nothing major blows up.
In the end, when things get sorted, it will all be for the best regardless.

If it can be done without a hitch,

In the end, when things get sorted, it will all be for the best regardless.
daveyeisley- Ludicrous Level
- . :
Number of posts : 6926
Age : 43
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Too much code...
That's why I have more than one backup of the module (and the database), which I'll do again just before I move the updated module to the server. 
Although with the database, the old will still be there with all it's data if I need it.

Although with the database, the old will still be there with all it's data if I need it.
_________________
.
------------------------------------- The Amethyst Dragon -------------------------------------
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Re: Too much code...
I've noticed that I've recently started getting exploration XP all over again for all areas with all my characters... this have anything to do with that? Found it kinda strange seeing new exploration for the inn and conjunction on everyone lol
MannyJabrielle- Ludicrous Level
- . :
Number of posts : 5927
Main Character : See the "A-Team" thread in the Biographies forum.
DM Name : Dungeon-Master Gaelen
Time Zone : GMT -5:00(EST)
Registration date : 2008-07-05
Re: Too much code...
I noticed that too. Not that I mind though 

evilkittenofdoom- Epic Level
-
Number of posts : 1217
Age : 121
Location : Ready to Pounce at the Least Suspected Moment...
Main Character : Aseph, the NOT old sorcerer
Other Character : Analo, professional Dracolich (and other undead) hunter
Other Character. : Sivoran, the PC Demilich
Other Character.. : Imyna, Drow Priestess of Sorgath
NWN Username : evilkittenofdoom
Time Zone : EST (GMT-5)
Registration date : 2009-02-26
Re: Too much code...
Yes, this is due to the new database (I started with that one, the simplest database info (and one sucking up vast amounts of database space) as my test case). When I switch, it'll also be taking out current quest journal entries and states, so all those quests (even that one with the prophesy about a great evil in a city of steel) will open up again for another run for everyone.MannyJabrielle wrote:I've noticed that I've recently started getting exploration XP all over again for all areas with all my characters... this have anything to do with that? Found it kinda strange seeing new exploration for the inn and conjunction on everyone lol
_________________
.
------------------------------------- The Amethyst Dragon -------------------------------------
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Creator of Aenea | Custom Content Maker | Dungeon Master | Builder | Scripter | Writer | Player | Sleepless
Re: Too much code...
The Amethyst Dragon wrote: When I switch, it'll also be taking out current quest journal entries and states, so all those quests (even that one with the prophesy about a great evil in a city of steel) will open up again for another run for everyone.
... the hotness.

daveyeisley- Ludicrous Level
- . :
Number of posts : 6926
Age : 43
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03
Re: Too much code...
EPIC WIN!
MannyJabrielle- Ludicrous Level
- . :
Number of posts : 5927
Main Character : See the "A-Team" thread in the Biographies forum.
DM Name : Dungeon-Master Gaelen
Time Zone : GMT -5:00(EST)
Registration date : 2008-07-05
Re: Too much code...
I guess I better get on doing that quest for the first time while I have the chance to redo it 

evilkittenofdoom- Epic Level
-
Number of posts : 1217
Age : 121
Location : Ready to Pounce at the Least Suspected Moment...
Main Character : Aseph, the NOT old sorcerer
Other Character : Analo, professional Dracolich (and other undead) hunter
Other Character. : Sivoran, the PC Demilich
Other Character.. : Imyna, Drow Priestess of Sorgath
NWN Username : evilkittenofdoom
Time Zone : EST (GMT-5)
Registration date : 2009-02-26
Re: Too much code...
The Amethyst Dragon wrote:Yes, this is due to the new database (I started with that one, the simplest database info (and one sucking up vast amounts of database space) as my test case). When I switch, it'll also be taking out current quest journal entries and states, so all those quests (even that one with the prophesy about a great evil in a city of steel) will open up again for another run for everyone.
When I first read this I thought it was brilliant.... then I remembered the tedious amount of click-dragging required for the food for a feast quest .... .... 5 PC's x ?? foodstuffs = bleeding fingers and sore wrist.... ...


Below is a spolier question about (that quest) ...
- Spoiler:
- Does this mean that you could also potentially get TWO Blades of Hope, if you currently hold one and do the item gathering again ?... Two blades vs. Gron... I wonder how that would work out for a duel-longsword weilder ...
RustyDios- High Epic Level
-
Number of posts : 2271
Age : 36
Location : England // Getting lost in Aenea
Main Character : Jay Braysin, The Wandering Shadow, Protector of Nektaria, Talon's Eternal Foe
Other Character : Shouri Braysin, The Shimmerstar's Moonlight Sorceress
Other Character. : Grace Fularras, Walking Library , Cleric of Mystara
Other Character.. : See my sig ... And here too ...
NWN Username : RustyDios
Time Zone : GMT (England, DST)
. :
Registration date : 2008-07-28
Re: Too much code...
Don't think so... The special place only makes one, and won't make a second if you have one in your inventory already.
MannyJabrielle- Ludicrous Level
- . :
Number of posts : 5927
Main Character : See the "A-Team" thread in the Biographies forum.
DM Name : Dungeon-Master Gaelen
Time Zone : GMT -5:00(EST)
Registration date : 2008-07-05
Re: Too much code...
Oooh, and a thought with the quest journals...
For the portals, any chance when they're redone, that a "update" could be added for when you successfully activate a code?
Most of the portal codes are pretty straight forward in their "clue", but a couple like the birthstone one... I gotta write that one down cuz I can't remember what stone goes to what month, making the journal entry itself is useless to me in-game.
For the portals, any chance when they're redone, that a "update" could be added for when you successfully activate a code?
Most of the portal codes are pretty straight forward in their "clue", but a couple like the birthstone one... I gotta write that one down cuz I can't remember what stone goes to what month, making the journal entry itself is useless to me in-game.
MannyJabrielle- Ludicrous Level
- . :
Number of posts : 5927
Main Character : See the "A-Team" thread in the Biographies forum.
DM Name : Dungeon-Master Gaelen
Time Zone : GMT -5:00(EST)
Registration date : 2008-07-05
Re: Too much code...
MannyJabrielle wrote:Oooh, and a thought with the quest journals...
For the portals, any chance when they're redone, that a "update" could be added for when you successfully activate a code?
Most of the portal codes are pretty straight forward in their "clue", but a couple like the birthstone one... I gotta write that one down cuz I can't remember what stone goes to what month, making the journal entry itself is useless to me in-game.
This would be awesome.
daveyeisley- Ludicrous Level
- . :
Number of posts : 6926
Age : 43
Location : Watching Aenea from my Inner Sanctum on the surface of Sharlo, Aenea's Silver Moon
Main Character : Dave's List of PCs
NWN Username : Dave Yeisley
DM Name : Dungeon Master Mythgar
Time Zone : GMT - 5:00
. :
Registration date : 2008-06-03

» Emoticon Code from Neopets!
» JOIN THE MOST BEASTLY DOJO WITH THE CODE: AFAEAHGE
» New Cheerleading Move Code
» Animal ID code not working?
» First Code from Ds game Welcome to Hugsville
» JOIN THE MOST BEASTLY DOJO WITH THE CODE: AFAEAHGE
» New Cheerleading Move Code
» Animal ID code not working?
» First Code from Ds game Welcome to Hugsville
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|