home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
LUNAT20E.ZIP
/
STRUCTS.DOC
< prev
next >
Wrap
Text File
|
1995-05-22
|
16KB
|
309 lines
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
STRUCTS.DOC: The purpose of this file is to explain the workings of the
player files, and IGM inclusion, for 3rd Party IGM development.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This file will be modified for ease of use later. For now, all the info
you should need will be presented here. If you have any suggestions for
simplifying this document, please let me know... I know it's probably a
bit too technical, but I simplified as much as I could... :)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
To begin, here is a summary of the format of the two master player files.
NAMELIST.DAT has a line-entry format of Real Name ~Alias Name.
So when reading a person's name from the drop file, it should be compared
to the Real Name portion (Left of the ~) to match up and retrieve the
Alias Name (right of the ~). Players will have a 1-line entry in the
NAMELIST.DAT file. This is a sequential access text file, which will be
located in the MASTER LUNATIX directory.
The Alias name is then used in PLAYERS.DAT, which is a random-access file
with 240 characters per record. The 240 characters must be broken down
by the program and interpreted. This will be in the MASTER LUNATIX
directory. Here is a list of the data in each record:
COUNT MEANING NOTES
----------------------------------------------------------------------------
15 Alias$ Used to look up the person's record
8 Money$ How many Crazy Bucks are on-hand
8 Stash$ How many Crazy Bucks are in the stash
1 Sex$ M for Male and F for Female
4 CurCode$ Current Escape Code, I.E. 0110
20 NotAgain$ This will be explained below
1 Weapon$ A to L... which weapon is in hand
1 Defense$ A to L... which defense is in hand
8 Hit$ How many Hit Points a player has
8 Exp$ How many experience points a player has
2 Level 1 to 12, Player's skill level
8 LastPlay$ Date of last play, in the form MM/DD/YY
2 ClosFig$ Closet fights remaining
1 PlayFig$ Player Fights Remaining
3 PlayKill$ Count of Player Kills
10 GuardNam$ The name of the Player's guard
8 PayGuard$ How much the guard accepted as a bribe
132 Rest$ Remaining padding characters in record
----------------------------------------------------------------------------
The NotAgain$ can be broken down into its composite components also:
COUNT MEANING NOTES
----------------------------------------------------------------------------
1 Can Attempt Escape Space=Yes, Non-Space = no
1 Is player Alive Space=Yes, ^=No, #=Will be alive tomorrow
1 Can "Do something Crazy" Space=Yes, Non-Space = no
1 Has Unfair Advantage Space=Yes, Non-Space = no
1 Can Flirt with Nurse Space=Yes, Non-Space = no
1 Next Available Flirt 1 to 6
3 Times Laid Three-Digit Bedpost Notches
1 Days since Last Play 0 to 9 days since last play
1 Times Escaped How many times at level-12 (won)
1 Can Play Prank Space=Yes, Non-Space = no
1 Is "Awake" on a node Space=No, Non-Space = Yes
1 Can "Be a Nuisance" Space=Yes, Non-Space = no
1 Has looked at map Space=No, Non-Space = Yes
3 Guessed codes count How many times to guess the right passcode
1 Unused Not in use right now
1 Reserved always a "|" ending symbol
When creating an IGM, your program may read and write to these files, however
be SURE you know what you're doing, otherwise you can corrupt these files.
You may choose to create your own datafiles with variables specific to
Your module.
Your IGM will need to begin by reading three files in addition to these
player files. The LINKTO.BBS points to the drop file, and the third file
is LUNATIX.CFG for configuration info.
LINKTO.BBS is sequential access. For an example, install Lunatix as
usual, then look at the LINKTO.BBS file. It will be located in the NODE
directory, which won't necessarily be the MASTER LUNATIX directory.
The format of this file, line by line, is:
Format Meaning
----------------------------------------------------------------------------
String Full Path & Name of Door Drop file
## ## ## Line Number, Starting Character, and Length of User Name
## ## ## Line Number, Starting Char, and Length of Com Port
## ## ## -- Minutes... but an IGM will read the time from a different file
## ## ## -- Ignore this also, because if the game runs, ANSI is enabled
## ## ## Line Number, Starting Char, and Length of Baud Rate
N81 Or another modem setup string
## IRQ.... 0=Default for the port, or other number is other IRQ
# Handshake type. 0=None, 1=XON/XOFF, 2=RTS/CTS, 3=Both
# Port is Locked? 0=No, 1=Yes
Use the first line, which is the Drop File, in your own OPEN statement.
Sorry, you must read from the drop file that is given, using the data
formats that are listed in the lines under it. For example, if the top
line says C:\RENEGADE\CALLINFO.BBS, and the second line says 01 01 30, then
your will be resposible for opening Callinfo.BBS, then grabbing the player's
BBS user-name (as it will appear in NAMELIST.DAT) which will be at
line 1, column one, 30 characters long. If the third line in LINKTO.BBS says
12 03 05, then you will read the COM port from CALLINFO.BBS, starting at line
12, column (or character) 3, with a length of 5 characters. It seems
complicated, but I chose not to send this information to another file for
and IGM to read. If a programmer is willing to do this, then I hope that
the quality of the IGM will be good, also. :)
LUNATIX.CFG is Random Access, 80 characters per record (1 line). It will
be in each NODE directory, which isn't necessarily the MASTER LUNATIX
directory. It has the following Format, line (or record) by line:
Format Meaning
----------------------------------------------------------------------------
String Key line 1, Not needed for IGM
String Key line 2, also not needed for IGM
String Name of the Clinic (Imenz Aine was the default)
String Full Path and Name of Todays News file
String Full Path and Name of Yesterday's News file
## Max Closet fights allowed per day
# Max Player fights allowed per day
String Full Path to Lunatix's master node (I.E. C:\LUNATIX\)
Note: All the data in these files may be read in as strings. Just take note
if the file is sequential (read 1 whole line at a time) or random (read
record #x which is y-characters long).
Your IGM will read the Todays News file name from LUNATIX.CFG (line 4).
You may append news information to this file (it's sequential) by opening
it in append mode and adding news info. This way, your IGM can be a working
part of the whole game. :)
Your IGM may also write to the mail file. The mail files are named
MAIL.X where X is the record number of a user, as it appears in order in
PLAYERS.DAT. Whoever is Record 1 in PLAYERS.DAT has MAIL.1... whoever is
record 15 has MAIL.15, for instance. By searching for a player in the
PLAYERS.DAT and noting the record number, you may add to that player's mail.
Take note, a special line may be put in a player's mail file, which tells
the Mail Reader that the player may respond to someone. the format is:
|A####Alias Name where #### is the Record Number of the user that would be
written back to, and the Alias Name is that player's name. An Example is:
|A2 Mr. Rogers This means write back to player 2, who is Mr. Rogers.
|A42 Santa Clause This means write back to player 42, who is Santa Clause.
The "|A" will always begin the "do you wish to respond" info line, it's
important that the Alias Name begin at character 7, if you plan to write
mail that gives the option of writing back to the author. Note: Be SURE
you understand this, and that the line is a valid record number, otherwise
you might cause the game to crash when a user reads the mail!
Assume this when writing an IGM:
Lunatix is being run from a NODE directory, which may only contain
LINKTO.BBS and LUNATIX.CFG. An entry in the LUNATIX.CFG contains the path
name to the MASTER LUNATIX directory. Since a batch file is probably calling
Lunatix, it will call the LUNATIX.EXE from within the NODE directory. Since
the current directory is the NODE directory, Lunatix reads the 2 required
data files, and finds the MASTER path, which it uses for its own data files.
In this manner, Lunatix is easily multi-node, with one main copy in a MASTER
directory (Usually \LUNATIX\ directory, but not necessarily).
When your IGM gets control, the DEFAULT directory should be the NODE
directory. Your IGM will need to install any of its own NODE files into
each NODE directory... handle this in your own way. Anyway, as your IGM
starts, it should open "LINKTO.BBS" for instance, with no path specified,
to read info for the current node. It should read the MASTER path from
the node files, and access the datafiles by using the data path plus the
file name, such as: DatPath$ + "NAMELIST.DAT"
A file called TIMELEFT.DAT will also be placed into the NODE directory.
When your IGM gets control, it should read Minutes from the top line and
Seconds from the second line. When your program ends, be sure to write
back to this file with the Minutes (top line) and Seconds (second line)
remaining, so Lunatix can maintain a semi-accurate time remaining.
Your IGM should follow this general logic flow:
----------------------------------------------------------------------------
Open LINKTO.BBS
Process this file, using it to open and process the Drop File
Which is specified by the top line, retreiving COM port,
User name (User$) and so on.
Open COM
Setup of the communications parameters based on info from LINKTO and
the DropFile it references.
Open LUNATIX.CFG
Input the info from this file, including the MASTER path (DatPath$)
Open YOUR.CFG
If your IGM includes its own configuration file, open and read from it.
Open DatPath$ + NAMELIST.DAT
Look-up the Alias name for the User Name in the line format of
User$ ~Alias$
Open DatPath$ + PLAYERS.DAT
Search this random-access file, record by record, for Alias$, then
read in the information for Alias$ (user). You may also take note
of the record number, and use this when saving progress.. put #1, NUM
for instance, where NUM=Player record number.
Open TIMELEFT.DAT (in the NODE directory, no DatPath$ needed)
Input Minutes and Seconds remaining, for use in your IGM.
Game Play
Your game begins at this point, after everything is set up.
Be sure to save the player record frequently (I do at each game
prompt) so if it crashes, the player won't loose any progress.
Save TIMELEFT.DAT
Do this before your IGM releases control back to Lunatix
Exit Game
any wrap-up things should happen before the IGM ends.
Take note, that Lunatix "Shells" out to your IGM. It doesn't create a
batch file that controls the program-to-program flow, it literally drops
out to your IGM. Take note of this, because this lowers the amount of
RAM you'll have to play with, since Lunatix should still be sitting there
in Memory (I think).
Your IGM should be easy to INSTALL since it gets all its info from
existing data files. Basically, you'll need to install your own setup
file into each node that the user specifies. Your setup file should contain
the Path and Name of your .EXE file, stored in the NODE directory, so when
your IGM gets control, it uses this much like the DatPath$ to find your
path. Ideally, your IGM should not install into the MASTER directory, it
should reside by itself.
Your INSTALL program should ask for the MASTER LUNATIX directory, where it
will find all the player files, including a file called IGM.DAT. Your
Install should add 2 lines to the DatPath$ + IGM.DAT file, the top line
is your IGM name as it will appear to users, and the second line is the
executable command line. For instance, you may have these lines added:
;This is my IGM. Any line beginning with a ; will be a comment line.
`@My `0NEW `@IGM
C:\MYNEW\NEWIGM.EXE
Remember, control must remain in the NODE directory, so give the full path
to your IGM... then your IGM will be in the NODE directory still, to read
information concerning that node's setup, as explained above.
Your IGM should also include an option to UNINSTALL. Many sysops could
probably EDIT the IGM.DAT, but we don't want to assume that everyone can.
Your Install should include the option to search for your IGM in the IGM.DAT
and remove it... this is required, no IGM should be released without this
ability!
=-=-=-=-=-=-=-=-=-=-=-=-=-= SPECIAL NOTICE =-=-=-=-=-=-=-=-=-=-=-=-=-=
Your IGM must meet these requirements to be released as a Lunatix IGM:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=
1) It must be structed (reading setup) as described above
2) It must read from TIMELEFT.DAT and maintain the time remaining
3) It must write to TIMELEFT.DAT upon completion
4) It must be relatively easy to install
5) It must include an UNINSTALL option
6) If you charge for your IGM, please don't charge more than $15, which
is the cost of Lunatix itself.
7) You MUST (and this is the most important part) upload a copy of your
IGM to us (405-924-7939) BEFORE you release it, and it must be
approved by us. This is an attempt at quality control, and any IGM's
released without our prior approval will be considered Illegal IGM's.
We will try not to veto an IGM, although if it seriously sucks we might
have to suggest some changes before we okay its release.
8) It should ONLY be called from the Elevator in Lunatix, not as a
pre-play module. Anything not fitting the requirements of an IGM
should be called "Add-Ons" and also must be approved by us.
9) Your IGM must in some way give credit to me, Mike Snyder, for writing
Lunatix. However, I expect absolutely NO payment whatsoever from any
money your IGM earns. Good luck, your profit is yours.
10) Your IGM must, to some extent, be humorous. You don't have the follow
the menu-driven format that Lunatix presents, you are free to be
original. Just... try to create something that people will LIKE!
11) Your IGM must NOT bypass the built-in registration check in Lunatix,
or offer any of the unregister-blocked features. This means your IGM
may NOT allow a player to go past level 5, although it may add to his
experience. (If the game isn't registered, level 5 is the top, no matter
how much experience). Your IGM may NOT allow name changes. Also, your
IGM may NOT add interest to the stash, although you can create your own
means of earning Crazy Bucks. Sorry, this is to insure that IGM's don't
do away with the "incentive" to register Lunatix.
If your IGM meets these requirements, and we approve it, we will add it
to an IGM list which will be available with new releases of Lunatix,
Time Port, and other doors we will release.
If you have any questions, or discover that this document is incomplete,
please let me know right away. Thanks.