First, you are under NO obligation to pay any royalties or other fees to me
for creating Franchise Sports IGM's and/or utilities.  It would be nice if
you did mention me somewhere though :)  and sent me a copy of your work.  I
hereby volunteer my crack staff of beta testers to put your product through
the wringer as well.  In addition, it would also be nice if you tried to
add an incentive to your product for people to play with a registered
version of Franchise Basketball... again this is only a suggestion, and not
a requirement... now on to the data files.

DROPFILE Data

Franchise Basketball creates several files when it drops to an IGM.  First
it creates a drop file, modified from the DORINFO#.DEF style.  There are
18 lines in it, and they contain the following data:

System Name
Sysop Name
BLANK
COM Address (0 based, so COM1 = 0 COM2 = 1, etc)
Baud Rate
BLANK
User Name
BLANK
User Location
User ANSI  (1=Yes 0=No)
User Security Level
User Time Limit (Important)
Coach # in FBB
Node
COM IRQ
Port
COM Method (Fossil = 1, None = 0 )
Registration (REGISTERED = FBB Registered  UNREGISTERED = FBB Unregistered)

The first 12 lines are mimicking the DORINFO#.DEF format, the last 6 are
extra items for your convenience.

The next file the game creates is the DO#.BAT (where # is the node the
current user is on).  This file basically takes information from the
MODULES.DAT file and makes a batch file to run the IGM from that
information..

Inside the MODULES.DAT file, your IGM installation program should write
three lines.  The first line is the drive and path (without a trailing
backslash) of your IGM.  The second line is the EXACT command line that
FBB should use to launch your module.  Here you may use a %1 to denote the
node number (if needed) START.BAT (the main batch file) will be started
using the node as the single parameter.  Finally, the third line is what is
displayed to the users to point to your IGM. Here, the color codes may be
used (they are discussed in the TEXTFILE Data section) as long as you
adhere to a couple of rules, #1 all text must be less that 120 characters
long, and #2 the visible text (non-color codes) must be less than 38
characters.  Otherwise your IGM may cause some serious problems :).

Most importantly, make sure you include (in your distribution archive) an
install program that may either install or uninstall the IGM quickly and
easily.  Nothing is more frustrating than trying to install difficult
programs... FBB is bad enough :)  I would try to stay away from config
files, use FBB's or create one to use with your IGM in the install program
based upon information you ask the user for.

COACH Data

Coach data and information is stored in the file called OWNERS.FBB located
in the FBB directory this file has a two byte header which is a C/C++ type
int number representing the total number of teams currently in the file.
Then each team follows that header in numerical order.

struct coach_data
{                      	
        int number;                     // Coach Number
        int unused;                     // Currently Unused
        char name[40];                  // Coach Name
        char nickname[25];              // Team Nickname
        char city[25];                  // Team City
        char stadium[40];               // Stadium Name
        int wins;                       // Number of Wins
        int losses;                     // Number of Losses
        char computer;                  // Is computer Player 1=Yes 0=No
        char password[7];               // Player Password (if used)
        unsigned char free_agent_days;  // Days until the player may sign
                                        // a free agent
        unsigned char last_played;      // How many Days ago the team was
                                        // played
        unsigned int points_for;        // Points scored by the team -Season
        unsigned int points_against;    // Points Allowed -Season
        char streak;                    // Number of games won or lost in a
                                        // row + = winning streak
                                        // - = losing streak
        unsigned char defense;          // Not used
        unsigned char key;              // Not used
        char extra[33];                 // Extra space (not used)
};

PLAYER Data

All player data is stored in one of two files.  All teams are kept in the
PLAYERS.FBB file, while all free agents are in the WAIVERS.FBB file.  Both
files have a type int header which is the total number of players in the
file.  The players in the PLAYERS.FBB file are arranged by team, so the
first 16 are team one, the second 16 will be team two, etc.

struct player_data
{
        int    team_number;   // team number of the player, players are
                              // arranged in the data file by team, so the
                              // first 16 players will belong to team #1, the
                              // next 16 are on team 2, etc...
        char   roster_number; // this variable is not used in record keeping
                              // but is used in MAINT.EXE to track items
        char   first_name[25];// players last name
        char   last_name[25]; // players first name
        char   position[3];   // players position in string format (C,
                                    // G,F,PF,SF,SG,PG)
        char   offense;       // players offensive rating
        char   defense;       // players defensive rating
        char   shoot;         // players shooting rating
        char   rebound;       // players rebounding rating
        char   fatigue;       // players fatigue rating
        char   three_ptr;     // players three point shooting rating
        char   foul;          // players foul rating
        char   injury;        // players injury rating
        char   g_shots;       // # of shots taken in the last game
        char   g_baskets;     // # of baskets made in the last game
        char   g_rebounds;    // # of rebounds in the last game
        char   g_steals;      // # of steals in the last game
        char   g_blocks;      // # of blocked shots in the last game
        char   g_points;      // # of points scored in last game
        char   g_threes;      // # of three pointers made in last game
        char   g_fouls;       // # of fouls in last game
        char   g_assists;     //  # of game assists
        char   g_ft;          //  # of free throws
        char   g_ft_made;     //  # of free throws made
        int    s_shots;       //  # of shots this season
        int    s_baskets;     //  # of baskets this season
        int    s_rebounds;    //  # of rebounds this season
        int    s_steals;      //  # of steals this season
        int    s_blocks;      //  # of blocks this season
        int    s_threes;      //  # of three pointers
        int    s_assists;     //  # of season assists
        int    s_ft;          //  # of season free throws
        int    s_ft_made;     //  # of season free throws made
        int    s_injury;      //  # games remaining on DL
        char   games_played;  //  # of games played this season
        int    height;        //  players height in inches
        int    weight;        //  players weight in pounds
        char   college[25];   //  players college
        char   age;           //  players age
        char   starter;       //  Is player a starter 1 = Yes 0 = No
        char   traded;        //  Flag for if player has been offered in
                              // a trade 1 =yes, 0 = no
        char   played_game;   //  Did the player play in the last game?
                              // 1=Yes, 0 = No
        char   game_fatigue;  //  spot used to keep track of a players game
                              // fatigue in MAINT.EXE
        char   trained_today; // did the player train today?  1=Yes 0=No
        unsigned char trained_season;// How many times has the player trained
                              // this season?  This number is compared
                              // vs. the league number for maximum 
                              // trains per season.
        int    extra5;        // Extra slot for future use
        int    extra6;        // Extra slot for future use
        unsigned int g_minutes;// the number of minutes the player played
                              // in the last game.  This number is 26 * the
                              // actual minutes played... for additional 
                              // accuracy
        unsigned int s_minutes;// the number of minutes the player has
                              // played this season.  This is the actual
                              // number, not the number * 26
        unsigned char g_three_att; // # of three point shot attempts last game
        unsigned int s_three_att; // # of three point shot attempts this season
        unsigned char g_turnovers; // # of turnovers in the last game
        unsigned int s_turnovers; // # of turnovers this season
        char   extra[15];     // Extra spaces for future use
};

LEAGUE Data

The league data is stored in a file called FBB.CFG.  This file has no header
and will only be composed of one instance of this structure.

struct league_data {
        int    conferences;   //  Total # of conferences
        int    divisions;     //  Total # of divisions
        int    teams_per_division; //  Number of Teams per division
        char   registration[11]; //  Persons Franchise Basketball registration
                                 // code
        char   conf_names[2][25];//  Conference Names array
        char   div_names[2][2][25];//  Division Names array
        int    div_filled[2][2][6];// Array of team numbers arranged by
                                    // conference and division they are in.
        char   teams_in_playoffs; // # of teams to be in playoffs (per
                                  // conference)
        char   playoff_series;// length of each playoff series (best
                              // of X) in games
        char   password_toggle;// Toggle for the use of passwords 1=Use
                               // 0 = Do not use
        char   days_to_wait; // days to wait before filling unclaimed
                             // teams
        char   current_day;  // either the number of days the game has
                             // waited (to fill unclaimed teams) or the 
                             // current day of the season (if it has started)
        char   perpetual;    // toggle for perpetual reset (1=Yes 0=No)
                             // this will only work if the game is regged
        char   season_games; // number of total games in a season
        int    start_money;  // amount of money teams start with
        unsigned char remove_unplayed;// how many days of inactivity to allow
                             // before deleting human teams.
        unsigned char perpetual_seasons;// the number of perpetual seasons
                                        // to play before a total reset is
                                        // employed, and new teams are picked
                                        // 0=No Limit
        unsigned char current_perpetual;// the current perpetual season number
        unsigned char training_allowed;// the number of times one player may
                                       // be trained in one season
        unsigned char days_between_signing;// the number of days a team must
                                           // wait between signing free agents
        char   extra[37];    // extra space for future expansion
};

SCHEDULE Data and FINAL SCORES

The GAMES.FBB file is a data file that is created after all the teams have
been filled.  It is composed of a series of two byte (type int) numbers.
Each game is represented by 4 of these numbers.  The first number is the
away teams LEAGUE number (or node number), the second is the away team's
team number.  The third number is the home team's league number, and the
final is... you guessed it, the home team's team number.  Playoff games
are simply appended to the end of this file in the same format as described.
This setup is similar to the FINALS.FBB file, which keeps a list of the final
scores, in the same order only without the league number.  So, each pair of
int's in the GAMES.FBB file has one int in the FINALS.FBB file if the game
has been played.  

FRONT OFFICE Data

The front office information is stored within a file called OFFICE.FBB.
Like the OWNERS.FBB file, it too has a one int header which should be the
same number as the OWNERS.FBB (the total number of teams).

struct office_data
{
        char   number;       //  Coach number
        long   money;        //  Coaches money on hand
        long   bank;         //  Money in the Bank
        long   attendance;   //  Paid attendance at last game
        long   max_capacity; //  Max attendance
        int    ticket_price; //  Price per ticket
        int    fame;         //  Fame of team rating (cumulative)
        char   concession;   //  concession type 1-10
        char   promotion;    //  promotion type 1-10
        char   publicity;    //  publicity type 1-10
        char   merchandise;  //  Merchandising level 1-10
        char   covert;       //  covert operations 1-10 (Not Used)...Yet :)
        char   stadium_type; //  type of stadium owned 1-10
        char   extra[50];    // Extra space for future expansion
};

TRADE Data

All trades are kept in the file called TRADES.FBB.  Once again, there is a
one int header at the top of the file which represents the total number of
trades in the file.

struct trade_data
{
        int    receive_team;   //  Team number of receiving player
        int    rt_roster[3];   //  Receiving players roster numbers
        int    propose_team;   //  Team number of proposing player
        int    pt_roster[3];   //  Proposing players roster numbers
        unsigned long rt_cash; // Amount of cash asked for by the 
                               // proposing team
        unsigned long pt_cash; // Amount of cash offered by the 
                               // proposing team
        char   extra[22];      // Extra space for expansion
};

MESSAGE Data

The messages are kept in the file called MESSAGES.FBB.  It also has a one
int header, the number of messages in the file.

struct message_data
{
        int    number;         // Number of message
        char   to;             // Team number of the coach the 
                               // message is to
        char   from;           // team number of the coach that
                               // sent the message
        char   deleted;        // should message be deleted next
                               // time maint.exe is run 1=Yes 0=No
        char   quote[ 4 ][ 75 ];// Four lines for quoted text
        char   msg[ 10 ][ 75 ];// Ten lines for the new message
};


TEXTFILE Data

These are definitely the major structures and files in Franchise Basketball,
but there are several other files of note.  First, let me point out that
FBB was programmed using a fine door programming toolkit by Brian Pirie,
called Opendoors (version was 6.00).  To fully understand many of the finer
points of Franchise Basketball, and why certain things were done certain
ways, you should take a look at the toolkit.  I would like to, however, just
go over a few files created with Opendoors color codes, and show you how
those codes work.  SCORES.FBB, STANDINGS.FBB, all of the league leaders
files, all of the help files, CONCESS.FBB, STADIUMS.FBB, MERCH.FBB, and
PUBLIC.FBB (I am probably leaving out some) are all basically souped up
text files, created with Opendoors color codes.  You may change any of these
with a text editor if it serves your purpose.  Although I have worked long
and hard to try and come up with the correct mix of prices, for some reason
you may want to change something down the line, and you will have to edit
this file to display them to the users.  The color codes are as follows:

All codes must be enclosed in reverse apostrophe's like this `bright cyan`
Stadiums.  This would print the text Stadiums in light colored cyan (or
sky blue).  The color name alone gives you the dark version of it, while
the word bright in front of it, gives the light version of the color.
Adding the words flashing on, or flashing off makes the text blink, and
adding the words `on blue` (or whatever color) changes the background
color... so the line:

	`bright cyan on blue flashing on`Franchise Basketball

should produce a light cyan text color on a blue background, flashing.  With
that, these are all valid colors:

	blue
	green
	red
	black
	cyan
	brown
	white
	magenta

	adding a bright in front of each of these should get you the lighter
        version... yellow will yield a yellow color, you do not need to use
        `bright brown`.

Finally, there are a few files with the .VAL extensions, STADIUMS.VAL,
CAPACITY.VAL, etc.  These files store the actual values the computer uses
to calculate the costs of the stadiums, etc.. I caution against changing
them, for the above reasons, but will tell you about them none the less.
Each file has a series of type long numbers representing each price (or in
the case of CAPACITY.VAL, the capacities of the stadiums).  When a new item
is to be purchased, the VAL files is read, and the data returned to the
program.  This method has proven to be an excellent way of doing the prices
and adds a nice way for others to change them.

Note: I decided to hold off release of FBB 2.00 an extra month or two, so I
      could greatly improve things... #1 it is now possible to externally
      change the free agent signing costs, the training costs, and all front
      office costs AND descriptions.  I have not written a utility at this
      time to do so, but I have made it possible.  I have not included the
      specifics here, due to time constraints, but would be happy to help
      anyone interested in either writing this utility, or any other using
      those files.  #2 The InterBBS datafiles are not included here... the
      same applies for those, I will give out the information to anyone
      who would like it.  #3 The Menu ANSI's are 100% editable.  All you have
      to do is allow for the lightbars at the center of the screen, so all
      you ANSI artists, feel free to make alternate screens.  The screens
      are stored in .ANS files... they are pretty obvious.  #3 this file
      was written before many of the FBB 2.0 changes were made, therefore,
      some options may not appear in the data listings.  This does not
      affect the size of the structures, only the content.  I will do an
      updated file when I have time.

That just about covers all of the data files and structures for Franchise
Basketball, if you have any other questions, comments or ideas, please
contact me at the following locations... Internet: aq239@detroit.freenet.org
- FIDO 1:332.129 - BBS 413-684-4266 (I should warn you that the BBS may move
in 1996 or 1997, so the number will change, but I will attempt to keep the
same FIDO address so you may contact me through that at the new number (or
just look it up and call)...

Thank you for choosing Franchise Sports... Franchise Basketball (C)1995-96
SnellaSoft
