General Editing Help

Nightmare Redux Information and Download
Post Reply
User avatar
syntax
Site Admin
Posts: 462
Joined: Tue Jun 02, 2009 10:02 am

General Editing Help

Post by syntax » Wed Sep 23, 2015 3:31 pm

Contents
------------------------------------------------------------------------------------
1. Backup, Backup, Backup!
2. About the Update File
3. Editing Environments
4. Btrieve Error Codes


------------------------------------------------------------------------------------
1 . Backup, Backup, Backup! - Always make backups
------------------------------------------------------------------------------------
download and install winrar to get rar.exe - copy it to your WG folder...

Go to your WG folder and create the following:
- a WGSCLEAN.BAT file (this bat files runs at cleanup)
- a folder under WG called mudbackup

inside of wgsclean.bat:
@echo off
rar a -rr -ag-MMM-DD-YY mudbackup\wccbackup.rar wcc*.*

This creates a file that looks like "wccbackup-Feb-22-03.rar"
just remember to delete them every once in a while...

if you had a second realm going, then just add another line:

rar a -rr -ag-MMM-DD-YY mudbackup\wbbbackup.rar wbb*.*

------------------------------------------------------------------------------------
2 . About the Update File
------------------------------------------------------------------------------------
wccupda2.dat - important file

-> when the bbs first starts up, majormud runs through every record that is in the update file and writes the information that's in it to the actual dat files. the update file is important in a normal non-edited mud because it is what restocks shops, helps monster regen, and I'm sure a number of other things.

-> it doesn't update every single field of every record of every database however, just the things that don't have any user interaction. what i mean by this is things like the number of items in a shop, the number of monsters in a room, how many times a monster has dropped an item, etc are not overwritten during this process. when you install mud as an upgrade of a previously installed mud, it doesn't overwrite your .dat files. it only overwrites the mud program files, wccupda2.dat, and the *.vir files (the .vir files are the base dat files that have never been touched by playing users). if it overwrote your dat files, then all interaction your users had with the game would be lost (not the actually character data, just things like what I've already mentioned). this is why editing environment #1 (below) is the best scenario, read more on that.

-> the update file has NOT completely ran through when the audit trail says "majormud initialized." you MUST wait for it to say "Automatic Database Update Complete" to know it's finished. if you edit your realm for say 2x monster exp and load up the bbs and wonder why they are still 1x, it is probably because your update file hasn't completely been run through and/or the monsters that were in the realm before you applied the exp changes weren't taken out during the offiline recovery. this would apply for items, spells, and anything else.

(about monsters and the active monster file)
the way it works is mud pulls a monster from the wccknms2.dat (the one you edit) and writes them to the wccacms2.dat (active monsters). so if it pulls a monster and puts it into the realm before any editing changes have occured, it will still have the old data.

-> after the update file finished its run and you see that "Automatic Database Update Complete" message, it is safe to delete it if you wish to put an updated (edited) one in it's place. you can then wait for the next shutdown and startup for your edits to be applied or you can go to the sysop menu and "Apply an Update." to tell the update file to run through again.

-> just a note, the databases that are compiled into the wccupda2.dat file are: races, classes, monsters, items, spells, rooms, shops, actions, textblocks, and messages.

------------------------------------------------------------------------------------
3 . Editing Environments:
------------------------------------------------------------------------------------
There are three general scenarios you can use to go about with your editing. These are listed in order of recommendation.

#1) Copy your w*.dat files to a seperate directory and set nightmare up to edit those. When you are done making edits, compile an update file and copy it to your bbs directory. you'll need to make sure your bbs has finished it's update process (see above) before you can overwrite that file. if you want your dat files to be updated you can either; a) wait for the next shutdown and startup for it to automatically run through, b) go to the sysop menu and "apply an update", or c) restart the BBS manually.

#2) Do your edits offline with nightmare setup to edit that dats in your WG folder. This way you don't have to worry about the update file not doing it's job or deal with waiting for edits to be applied. Be sure to compile an update before you load your BBS though. If you don't, all of the edits you did will be overwritten as the update file runs though.

#3) Edit the dats in your WG folder while the BBS is running. I have only heard of one user to have success with this and I personally think it can cause a lot of corruption. if mud and you go to write to a record at the same time, OR if mud went to write a value and then you wrote over it before it went to read it again, OR if mud went to read one of the quickreferences it creates for monsters/items/spells/etc and then all of a sudden it isn't there anymore or different than how it initially read it, OR any number of other things I could sit here and write about could cause corruption and/or crashes. use this method cautiously and you'll need to wait until the update file has finished it's course before doing any edits.

(editing users)
DO NOT edit a user while the user is in the game. if you are using method #1 and wish to edit a user, just point NMR to your WG directory temporarily and do whatever edits you want and switch it back.

NOTE: any time you manually take the board down to do some edits or w/e you should always run an offline recovery (wccmmutl.exe) before starting the BBS back up.

------------------------------------------------------------------------------------
4 . BTRIEVE ERROR CODES
------------------------------------------------------------------------------------
Status 1 - Invalid Operation
Status 2 - Disk I/O Error
Status 3 - File Not Open
Status 4 - Key Value Not Found, on an UPDATE, this means the file is damaged
Status 5 - Duplicate Key Value
Status 6 - Invalid Key Number
Status 7 - Different Key Number
Status 8 - Invalid Positioning
Status 9 - End-Of-File
Status 10 - Modifiable Index Value Error
Status 11 - Invalid Location
Status 12 - File Not Found
Status 13 - Extended File Error
Status 14 - Pre-Image Open Error
Status 15 - Pre-Image I/O Error
Status 17 - Close Error
Status 18 - Disk Full
Status 19 - Unrecoverable Error
Status 20 - Record Manager Inactive
Status 21 - Index Buffer Too Short
Status 22 - Data Buffer Length
Status 23 - Position Block Length
Status 24 - Page Size Error
Status 25 - Create I/O Error
Status 26 - Number of Keys
Status 27 - Invalid Key Position
Status 28 - Invalid Record Length
Status 29 - Invalid Key Length
Status 30 - Not A Btrieve File
Status 35 - Directory Error
Status 36 - Transaction Error
Status 37 - Transaction Is Active
Status 38 - Transaction Control File I/O Error
Status 39 - End/Abort Transaction Error
Status 40 - Transaction Max Files
Status 41 - Operation Not Allowed
Status 43 - Invalid Record Access
Status 44 - Null Index Path
Status 46 - Access To File Denied
Status 51 - Invalid Owner
Status 52 - Error Writing Cache
Status 54 - Variable Page Error During a Step Direct operation
Status 55 - Autoincrement Error
Status 58 - Compression Buffer Too Short
Status 66 - Maximum Number of Open Databases Exceeded
Status 67 - Rl Could Not Open SQL Data Dictionaries
Status 68 - Rl Cascades Too Deeply
Status 69 - Rl Cascade Error
Status 71 - Rl Definitions Violation
Status 72 - Rl Referenced File Could Not Be Opnend
Status 73 - Rl Definition Out Of Sync
Status 76 - Rl Referenced File Conflict
Status 77 - Wait Error
Status 78 - Deadlock Detected
Status 79 - Programming Error
Status 80 - Conflict
Status 81 - Lock Error
Status 82 - Lost Position
Status 83 - Read Outside Transaction
Status 84 - Record In Use
Status 85 - File In Use
Status 86 - File Table Full
Status 87 - Handle Table Full
Status 88 - Incompatible Mode Error
Status 90 - Redirected Device Table Full
Status 91 - Server Error
Status 92 - Transaction Table Full
Status 93 - Incompatible Lock Type
Status 94 - Permission Error
Status 95 - Session No Longer Valid
Status 96 - Communications Environment Error
Status 97 - Data Message Too Small
Status 98 - Internal Transaction Error
Status 100 - No Cache Buffers Available
Status 101 - No OS Memory Availabl
Status 102 - Not Enough Stack space
Status 1001 - Lock Option Out Of Range
Status 1002 - Memory Allocation Error
Status 1003 - Memory Option Too Small
Status 1004 - Page Size Option Out Of Range
Status 1005 - Invalid Pre-Image Drive Option
Status 1007 - Files Option Out of Range
Status 1008 - Invalid Initialization Option
Status 1009 - Invalid Transaction File Open
Status 1011 - Compression Buffer Out Of Range
Status 1013 - Task Table Full
Status 1014 - Stop Warning
Status 1015 - Invalid Pointer
Status 1016 - Already Initialized
Status 2001 - Insufficient Memory
Status 2003 - No Local Access Allowed
Status 2006 - No Available SPX Connection
Status 2007 - Invalid Parameter


Post Reply