home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / footb121.zip / IGMWRITE.DOC < prev    next >
Text File  |  1996-05-18  |  21KB  |  391 lines

  1.                  Franchise Football IGM Author Documentation
  2.                                by Scott Snella
  3.                      Internet: aq239@detroit.freenet.org
  4.                            or: bg229@scn.org
  5.  
  6. Table of Contents:
  7.  
  8.         [1] What Franchise Football Creates
  9.         [2] The Data Structures and File Formats
  10.         [3] Linking your IGM to Franchise Football
  11.         [4] Additional Information
  12.  
  13. [1] What Franchise Football Creates
  14.  
  15.         Franchise Football creates two files on exit of the game VIA
  16.         IGM execution.  The first file is a custom dropfile called
  17.         IGMINFO.#, where the # is the node which the user is currently
  18.         operating under.  This files format is as follows.
  19.  
  20.                 IGMINFO.# format:
  21.  
  22.                         System Name
  23.                         Sysop Name
  24.                         (Blank)
  25.                         COM Address
  26.                         Baud
  27.                         (Blank)
  28.                         Username
  29.                         (Blank)
  30.                         User Location
  31.                         User ANSI
  32.                         User Security
  33.                         User Timelimit
  34.                         Coach Number
  35.                         Node
  36.                         COM IRQ
  37.                         Port
  38.                         COM Method
  39.                         REGISTERED/UNREGISTERED
  40.  
  41.         The blank lines that are included are for compatibility purposes.
  42.         The first 12 lines follow the DORINFO#.DEF format, so if you have a
  43.         routine that reads that format, it may be possible to extract that
  44.         information from the IGMINFO.# file.  The last 6 lines are added for
  45.         your convenience, included in them are the Coach Number that is
  46.         currently dropping to the IGM, what node they are using, and the
  47.         very last option, if Franchise Football is registered.  I ask that
  48.         if the Game is not registered, either disable options in your IGM,
  49.         or add some sort of notice that encourages users to register.  I am
  50.         not disabling the IGM section in unregistered versions, and therefore
  51.         ask that you do this.
  52.  
  53.         NOTE:  The IGMINFO.# dropfile is a strait text file and all lines are
  54.         terminated with the new line character.
  55.  
  56.         The second file that FFBL creates is called DO#.BAT (in which the #
  57.         once again denotes the node number).  This file is simply a batch
  58.         file that changes to your IGM drive and directory, and executes the
  59.         program.  For more information on how this file gets it's information
  60.         please read section [3] Linking your IGM to Franchise Football.
  61.  
  62. [2] Data Structures and File Formats
  63.  
  64.         Unless otherwise noted (as the above IGMINFO.#) all data files are
  65.         stored using a binary method, and all data files also begin with a
  66.         header that merely holds a two byte (C type int) number that is the
  67.         total records stored in that file.
  68.  
  69.         For Example, the owners file, called OWNERS.FBL is all the vital
  70.         information on the Franchise Football owners.  The file is in the
  71.         following structure.
  72.  
  73.         Number of Owners
  74.         Owner #1
  75.         Owner #2
  76.         .
  77.         .
  78.         .
  79.         Owner #Number of Owners - 1
  80.         Owner #Number of Owners
  81.  
  82.         If you forget to account for the two byte header all information will
  83.         be wrong.  The four major data files (and several others), OWNERS.FBL,
  84.         OFFICE.FBL, OFFENSE.FBL and DEFENSE.FBL all follow this format.
  85.  
  86.         Although Franchise Football was written entirely in C/C++, IGM's may
  87.         be written in any language.  The following are the major structures
  88.         for the game.
  89.  
  90.         coach_data:    (could also be called owner_data)
  91.                 int number;         // Coach number-used to link all records
  92.                 int unused;         // Unused (from previous version)
  93.                 char name[40];      // Username
  94.                 char nickname[25];  // Team nickname
  95.                 char city[25];      // Team city
  96.                 char stadium[40];   // Stadium Name
  97.                 int wins;           // Team Wins
  98.                 int losses;         // Team Losses
  99.                 char computer;      // Computer Player 1=YES 0=NO
  100.                 char password[7];   // Player Password for LAN and Security
  101.                 char offense1;      // Offensive set #1 (1-8)
  102.                 char offense2;      // #2 (1-8)
  103.                 char offense3;      // #3 (1-8)
  104.                 char defense1;      // Defensive set #1 (1-8)
  105.                 char defense2;      // #2 (1-8)
  106.                 char defense3;      // #3 (1-8)
  107.                 int points_for;     // Total Points for
  108.                 int points_against; // Total Points Against
  109.                 char streak;        // Winning/Losing Streak <0 Losing >0 Win
  110.                 char free_agent_days; // How long ago a free agent was signed
  111.                 char extra[30];     // Extra bytes
  112.  
  113.                 NOTE: Several items should not be edited.  Wins, Losses,
  114.                       number, name, computer, password, points for,
  115.                       points against and streak should not be changed, but
  116.                       can be read to yield important information.  All
  117.                       items in "()" are the valid values for the given items
  118.                       changing those to any other values may result in
  119.                       errors.  I reserve the right to use any or all of the
  120.                       extra bytes at the end, or in the middle of this
  121.                       structure.  Do not use any of these to store data for
  122.                       your IGM's.  They are not guaranteed to be free in
  123.                       future versions.
  124.  
  125.         office_data:
  126.                 char number;       //  Team Number (coach number)                 
  127.                 long money;        //  Cash (1-2,000,000,000)                
  128.                 long bank;         //  Money in the Bank (1-2,000,000,000)
  129.                 long attendance;   //  Last game attend (1-2,000,000,000)
  130.                 long max_capacity; //  Max attendance (1-2,000,000,000)
  131.                 int ticket_price;  //  Price per ticket (0-32000)
  132.                 int fame;          //  Fame of team rating (0-32000)
  133.                 char concession;   //  concession type (1-10)
  134.                 char promotion;    //  promotion type (1-10)
  135.                 char publicity;    //  publicity type (1-10)
  136.                 char merchandise;  //  Merchandising level (1-10)
  137.                 char covert;       //  covert operations (1-127) (not used)
  138.                 char stadium_type; //  type of stadium owned (1-10)
  139.                 long salary_cap;   //  total of all players salaries on team
  140.                 char extra[46];    //  extra
  141.  
  142.                 NOTE:  Other than the number and salary_cap, all items in
  143.                        this structure may be edited and saved to allow your
  144.                        IGM to effect game play.  Please stay within the limits
  145.                        following each of the items, enclosed in "()"
  146.  
  147.         player_data:
  148.                 char team_number;            // Team Number (coach number)  
  149.                 char first_name[STRLENGTH];  // Player First Name
  150.                 char last_name[STRLENGTH];   // Player Last Name
  151.                 char age;                    // Player Age (1-127)
  152.                 char height;                 // height (1-127) in inches
  153.                 int weight;                  // weight (1-32000) in pounds
  154.                 char position;               // position (see chart below)
  155.                 char lineup_string;          // Starter? 0=No 1=Yes        
  156.                 char traded;                 // Is Player offered for trade?
  157.                 char roster_slot;            //
  158.                 char trained_today;          // Has player trained today 0,1
  159.                 char off_def;                // Offensive/Defensive Player
  160.                 long salary;                 // Player Salary(1-2,000,000,000)
  161.                 char skill_modifier;         // Used during gameplay
  162.                 char extra_skills[5];        // Extra space for more skills
  163.                         // Attributes //
  164.                 char offense;                // Offensive Skill (1-20)
  165.                 char defense;                // Defensive Skill (1-20)
  166.                 char throwing;               // Throwing Skill (1-20)
  167.                 char running;                // Running Skill (1-20)
  168.                 char dexterity;              // Dexterity Skill (1-20)
  169.                 char kick;                   // Kicking Skill (1-20)
  170.                 char block;                  // Blocking Skill (1-20)
  171.                 char tackle;                 // Tackling Skill (1-20)
  172.                 char penalty;                // Penalty Rating (1-20)
  173.                 char stamina;                // Stamina Rating (1-20)
  174.                 char injury;                 // Injury Rating (1-20)
  175.                         // Statistics (Game) //
  176.                 char played_today;           // Did the player play in game
  177.                                              // This is used by MAINT.EXE   
  178.                         // Quarterback //
  179.                 char g_passes;               // # passes in last game
  180.                 char g_completions;          // # completions in last game
  181.                 int g_yards_passing;         // Total passing yards (lst gme)
  182.                 char g_interceptions;        // # Int in last game
  183.                         // Receiver //
  184.                 char g_receptions;           // # pass receptions (last game)
  185.                 int g_receiving_yards;       // Total receiving yards (lst gme)
  186.                         // Running Back //
  187.                 char g_rushes;               // # rushes (last game)
  188.                 int g_rushing_yards;         // # rushing yards (last game)
  189.                 char g_fumbles;              // # fumbles (last game)
  190.                         // Kicking Stats //
  191.                 char g_fg_attempts;          // field goal att (last game)
  192.                 char g_fg_made;              // fiels goals made (last game)
  193.                 char g_fg_long;              // longest field goal (last game)
  194.                 char g_punts;                // # punts (last game)
  195.                 char g_punt_long;            // longest punt (last game)
  196.                         // Defensive Stats //
  197.                 char g_tackles;              // # tackles (last game)
  198.                 char g_sacks;                // # sacks (last game)
  199.                 char g_pass_interceptions;   // # interceptions (last game)
  200.                 char g_fumble_rec;           // # fumble recoveries (last game)
  201.                         // Statistics (Season) //
  202.                 char games_played;           // Total games played in
  203.                 char injury_games;           // # of games injured
  204.                 char injury_level;           // Injury level (0-3) Healthy-Bad
  205.                 char injury_type;            // Exact type of injury
  206.                         // Quarterback //
  207.                 int s_passes;                // most of the following stats
  208.                 int s_completions;           // are the same as above, but
  209.                 int s_yards_passing;         // they are for the season,
  210.                 char s_interceptions;        // not just the last game
  211.                         // Receiver //
  212.                 int s_receptions;
  213.                 int s_receiving_yards;
  214.                         // Running Back //
  215.                 int s_rushes;
  216.                 int s_rushing_yards;
  217.                 int s_fumbles;
  218.                         // Kicking Stats //
  219.                 int s_fg_attempts;
  220.                 int s_fg_made;
  221.                 char s_fg_long;
  222.                 int s_punts;
  223.                 char s_punt_long;
  224.                         // Defensive Stats //
  225.                 int s_tackles;
  226.                 int s_sacks;
  227.                 int s_pass_interceptions;
  228.                 int s_fumble_rec;
  229.                         // Game play options //
  230.                 char in_game;                // Used by MAINT.EXE
  231.                 char g_touchdowns;           // Touchdowns (last Game)
  232.                 char s_touchdowns;           // Season
  233.                 char current_position;       // Used by MAINT.EXE
  234.                 char g_passing_touchdowns;   // Touchdowns thrown (last game)
  235.                 char s_passing_touchdowns;   // season
  236.                 char extra[15];              // extra items
  237.  
  238.         NOTE: If you are unfamiliar with C/C++ data types, they are as
  239.         follows:  char = 1 byte,  int = 2 bytes,  long = 4 bytes.  I believe
  240.         that is all I use in these structures.
  241.  
  242.         Obviously, certain items are used for indexing purposes (for example,
  243.         the number and team_number items relate to the team that the record
  244.         is for).  Still other data is for statistical data keeping.  Right
  245.         now, I can't think of any reason to change the data, most IGM's will
  246.         probably just read and display that data in different formats.  Given
  247.         the volume of data kept by the game, I would not be surprised to see
  248.         several IGM's that track different aspects of that information.
  249.  
  250.         As time goes on, I will include extra data files that are not used by
  251.         Franchise Football, but that may be used for IGM's.  For example,
  252.         there will be a team statistics file, which will keep information
  253.         like first downs, third down conversions, etc.
  254.  
  255. [3] Linking your IGM to Franchise Football
  256.  
  257.         I've tried to keep your job linking the IGM to Franchise Football as
  258.         simple as possible.  Franchise Football takes all IGM information
  259.         from a file in the FFBL directory called MODULES.DAT.  Each IGM has
  260.         three lines.  The first is the drive and path to your IGM.  The
  261.         second is the exact command line to execute your IGM, and the final
  262.         line is the name (with formatting) as it will appear to users in the
  263.         IGM list.  You may substitute a %1 for the node number on the second
  264.         line of the IGM triplet.  Also, if for any reason you'd like to
  265.         add a comment to this file, you may begin the line with a ;.  That
  266.         line will be ignored by Franchise Football.
  267.  
  268.         Here is an example of a MODULES.DAT triplet:
  269.  
  270.         C:\DOORS\FFBL\IGM
  271.         IGM CONFIG%1.CFG
  272.         This is a Sample IGM
  273.  
  274.         In this triplet, the first line is the path and drive to the IGM
  275.         files.  The second line is the exact line that your IGM will execute
  276.         with.  Depending on the door interface package you choose to use,
  277.         it may look different than the above, however, it should be exactly
  278.         as it is executed including all switches, config files, or anything
  279.         else.  The final line is simply what will be displayed to users when
  280.         they select the IGM they'd like to use.
  281.  
  282.         The last line of a triplet may contain special codes for color,
  283.         blinking, etc.  if you enclose the color text in a ` (that's a
  284.         reversed apostrophe) the text will be displayed in that color.
  285.         For example:
  286.  
  287.         `bright blue`T`blue`his `bright blue`i`blue`s `bright blue`a`blue`n
  288.  
  289.         This line would display "This is an" with the first letter of each
  290.         word in bright blue and the rest in dark blue.  Valid colors are:
  291.  
  292.         black
  293.         blue
  294.         green
  295.         red
  296.         cyan
  297.         magenta
  298.         brown
  299.         white
  300.  
  301.         Putting the word bright in from of any of these colors will yield
  302.         the "bright" versions of each of them.  For instance `bright black`
  303.         will give you a dark gray, while `white` produces a light gray.  One
  304.         other item I'll mention, the word "flashing" may be added before the
  305.         color to make the output blink.  To stop the flashing you may use
  306.         "flashing off" (I believe) - I don't use flashing often :).
  307.  
  308.         Your IGM should easily install and uninstall, meaning the user
  309.         (sysop) should be able to just run a utility to do all of the
  310.         initialization and if desired, remove the IGM.  Your installation
  311.         program should add the MODULES.DAT triplet to the file (in the order
  312.         discussed above), and your uninstall routine should remove your
  313.         IGM's triplet (and only your triplet) from the MODULES.DAT file.
  314.  
  315.         After your IGM concludes, it should write the time remaining for the
  316.         user on-line back to the IGMINFO.# file, FFBL reads that file and
  317.         updates the users information upon return to the main game.
  318.  
  319.         Basically, in order to link your IGM to FFBL, you have to add the
  320.         MODULES.DAT triplet, and write the time remaining on-line to the
  321.         IGMINFO.# file.  To remove the IGM, you simply have to remove the
  322.         MODULES.DAT triplet and do whatever you wish with the files for
  323.         your IGM.
  324.  
  325. [4] Additional Information
  326.  
  327.         I (after several authors have begun writting IGM's) realize that
  328.         this document is far short of the needed information for many IGM
  329.         ideas.  For this reason, I am going to begin putting together a
  330.         comprehensive IGM toolkit that will attempt to describe all data
  331.         files and formats.  In addtion, I may provide libraries of C/C++
  332.         code to aid authors in writting the IGM's.  You can get this
  333.         on the FFBL support BBS, Mos Eisley @ 413-684-4266, or FREQ "tools"
  334.         from 1:332/129.  If you have any development questions, I would be
  335.         happy to answer them.  Franchise Basketball 2.00 will also have an
  336.         IGM system.  Anyone interested in IGM programming for that may
  337.         obtain information from me on Mos Eisley.
  338.  
  339.         I do not require that IGM authors send any type of royalty to me.
  340.         I'm happy that people enjoy the Franchise Sports games to allow me
  341.         to continue writing them.  I do ask, however, that IGM authors
  342.         consider writing some routine into the IGM to ask non-registered
  343.         users of FFBL to register it, as well as the IGM.  Which brings me
  344.         to another point.  All IGM authors are free to charge for their
  345.         work, with again, no royalties to me.  (It would be nice to give
  346.         me a bi-line or something though :).  In addition, I would really
  347.         like to know if you write an IGM, and I'd like a copy of it, too.
  348.         It doesn't have to be a registered one, just something so I can see
  349.         what everyone is doing.
  350.  
  351.         If you do write an IGM, I'd like to offer my beta team
  352.         (those that are willing) and I to test it for you.  In exchange
  353.         for allowing us to help you hack out the bugs and put our stamp
  354.         of approval on it, I will include your IGM for distribution on my
  355.         BBS, and will try to pass it along to all official SnellaSoft
  356.         distro sites, as well as including it on the "recommended" list
  357.         which will be part of future versions of FFBL.  Again, this is
  358.         if it passes our rigorous testing process :), and I should also
  359.         mention - if it's in good taste.  After all, getting the product out
  360.         is half the battle.
  361.  
  362.         Other Notable Files:
  363.  
  364.         HEADLINE.FBL
  365.                 This file is a text file that uses the same color codes as
  366.                 the third line of the MODULES.DAT triplet.  It is a
  367.                 summary of some of the major happenings of the day.  If you
  368.                 add anything to this file, the first line you write
  369.                 should be the information, then a blank line, then a row
  370.                 of `green`- - - - - (dashes), followed by a blank line.
  371.                 Each day, MAINT.EXE deletes the file and creates a new one,
  372.                 so if your IGM adds something to this file, it must be run
  373.                 AFTER MAINT.EXE.
  374.  
  375.         I'm sure that I've left out several items here.  This file is
  376.         really just something to get authors going, I will over the next
  377.         few months compile a much more detailed file for download on IGM's.
  378.  
  379.         If you have any further questions, please contact me at the above
  380.         internet addresses, or VIA Mos Eisley the official home of
  381.         Franchise sports games and SnellaSoft... FIDO 1:332/129 or 413-
  382.         684-4266.  I should mention here, that it is possible the BBS will
  383.         be moving in the not-so-distant future.  At that time, I will try
  384.         to keep the FIDO address and release an amended version of all games,
  385.         with the new information, as well as advertising on FIDO, and several
  386.         internet newsgroups.
  387.  
  388.         Thank you for playing Franchise Football.
  389.  
  390. Franchise Football (C) 1996 SnellaSoft.
  391.