home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
footb121.zip
/
IGMWRITE.DOC
< prev
next >
Wrap
Text File
|
1996-05-18
|
21KB
|
391 lines
Franchise Football IGM Author Documentation
by Scott Snella
Internet: aq239@detroit.freenet.org
or: bg229@scn.org
Table of Contents:
[1] What Franchise Football Creates
[2] The Data Structures and File Formats
[3] Linking your IGM to Franchise Football
[4] Additional Information
[1] What Franchise Football Creates
Franchise Football creates two files on exit of the game VIA
IGM execution. The first file is a custom dropfile called
IGMINFO.#, where the # is the node which the user is currently
operating under. This files format is as follows.
IGMINFO.# format:
System Name
Sysop Name
(Blank)
COM Address
Baud
(Blank)
Username
(Blank)
User Location
User ANSI
User Security
User Timelimit
Coach Number
Node
COM IRQ
Port
COM Method
REGISTERED/UNREGISTERED
The blank lines that are included are for compatibility purposes.
The first 12 lines follow the DORINFO#.DEF format, so if you have a
routine that reads that format, it may be possible to extract that
information from the IGMINFO.# file. The last 6 lines are added for
your convenience, included in them are the Coach Number that is
currently dropping to the IGM, what node they are using, and the
very last option, if Franchise Football is registered. I ask that
if the Game is not registered, either disable options in your IGM,
or add some sort of notice that encourages users to register. I am
not disabling the IGM section in unregistered versions, and therefore
ask that you do this.
NOTE: The IGMINFO.# dropfile is a strait text file and all lines are
terminated with the new line character.
The second file that FFBL creates is called DO#.BAT (in which the #
once again denotes the node number). This file is simply a batch
file that changes to your IGM drive and directory, and executes the
program. For more information on how this file gets it's information
please read section [3] Linking your IGM to Franchise Football.
[2] Data Structures and File Formats
Unless otherwise noted (as the above IGMINFO.#) all data files are
stored using a binary method, and all data files also begin with a
header that merely holds a two byte (C type int) number that is the
total records stored in that file.
For Example, the owners file, called OWNERS.FBL is all the vital
information on the Franchise Football owners. The file is in the
following structure.
Number of Owners
Owner #1
Owner #2
.
.
.
Owner #Number of Owners - 1
Owner #Number of Owners
If you forget to account for the two byte header all information will
be wrong. The four major data files (and several others), OWNERS.FBL,
OFFICE.FBL, OFFENSE.FBL and DEFENSE.FBL all follow this format.
Although Franchise Football was written entirely in C/C++, IGM's may
be written in any language. The following are the major structures
for the game.
coach_data: (could also be called owner_data)
int number; // Coach number-used to link all records
int unused; // Unused (from previous version)
char name[40]; // Username
char nickname[25]; // Team nickname
char city[25]; // Team city
char stadium[40]; // Stadium Name
int wins; // Team Wins
int losses; // Team Losses
char computer; // Computer Player 1=YES 0=NO
char password[7]; // Player Password for LAN and Security
char offense1; // Offensive set #1 (1-8)
char offense2; // #2 (1-8)
char offense3; // #3 (1-8)
char defense1; // Defensive set #1 (1-8)
char defense2; // #2 (1-8)
char defense3; // #3 (1-8)
int points_for; // Total Points for
int points_against; // Total Points Against
char streak; // Winning/Losing Streak <0 Losing >0 Win
char free_agent_days; // How long ago a free agent was signed
char extra[30]; // Extra bytes
NOTE: Several items should not be edited. Wins, Losses,
number, name, computer, password, points for,
points against and streak should not be changed, but
can be read to yield important information. All
items in "()" are the valid values for the given items
changing those to any other values may result in
errors. I reserve the right to use any or all of the
extra bytes at the end, or in the middle of this
structure. Do not use any of these to store data for
your IGM's. They are not guaranteed to be free in
future versions.
office_data:
char number; // Team Number (coach number)
long money; // Cash (1-2,000,000,000)
long bank; // Money in the Bank (1-2,000,000,000)
long attendance; // Last game attend (1-2,000,000,000)
long max_capacity; // Max attendance (1-2,000,000,000)
int ticket_price; // Price per ticket (0-32000)
int fame; // Fame of team rating (0-32000)
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-127) (not used)
char stadium_type; // type of stadium owned (1-10)
long salary_cap; // total of all players salaries on team
char extra[46]; // extra
NOTE: Other than the number and salary_cap, all items in
this structure may be edited and saved to allow your
IGM to effect game play. Please stay within the limits
following each of the items, enclosed in "()"
player_data:
char team_number; // Team Number (coach number)
char first_name[STRLENGTH]; // Player First Name
char last_name[STRLENGTH]; // Player Last Name
char age; // Player Age (1-127)
char height; // height (1-127) in inches
int weight; // weight (1-32000) in pounds
char position; // position (see chart below)
char lineup_string; // Starter? 0=No 1=Yes
char traded; // Is Player offered for trade?
char roster_slot; //
char trained_today; // Has player trained today 0,1
char off_def; // Offensive/Defensive Player
long salary; // Player Salary(1-2,000,000,000)
char skill_modifier; // Used during gameplay
char extra_skills[5]; // Extra space for more skills
// Attributes //
char offense; // Offensive Skill (1-20)
char defense; // Defensive Skill (1-20)
char throwing; // Throwing Skill (1-20)
char running; // Running Skill (1-20)
char dexterity; // Dexterity Skill (1-20)
char kick; // Kicking Skill (1-20)
char block; // Blocking Skill (1-20)
char tackle; // Tackling Skill (1-20)
char penalty; // Penalty Rating (1-20)
char stamina; // Stamina Rating (1-20)
char injury; // Injury Rating (1-20)
// Statistics (Game) //
char played_today; // Did the player play in game
// This is used by MAINT.EXE
// Quarterback //
char g_passes; // # passes in last game
char g_completions; // # completions in last game
int g_yards_passing; // Total passing yards (lst gme)
char g_interceptions; // # Int in last game
// Receiver //
char g_receptions; // # pass receptions (last game)
int g_receiving_yards; // Total receiving yards (lst gme)
// Running Back //
char g_rushes; // # rushes (last game)
int g_rushing_yards; // # rushing yards (last game)
char g_fumbles; // # fumbles (last game)
// Kicking Stats //
char g_fg_attempts; // field goal att (last game)
char g_fg_made; // fiels goals made (last game)
char g_fg_long; // longest field goal (last game)
char g_punts; // # punts (last game)
char g_punt_long; // longest punt (last game)
// Defensive Stats //
char g_tackles; // # tackles (last game)
char g_sacks; // # sacks (last game)
char g_pass_interceptions; // # interceptions (last game)
char g_fumble_rec; // # fumble recoveries (last game)
// Statistics (Season) //
char games_played; // Total games played in
char injury_games; // # of games injured
char injury_level; // Injury level (0-3) Healthy-Bad
char injury_type; // Exact type of injury
// Quarterback //
int s_passes; // most of the following stats
int s_completions; // are the same as above, but
int s_yards_passing; // they are for the season,
char s_interceptions; // not just the last game
// Receiver //
int s_receptions;
int s_receiving_yards;
// Running Back //
int s_rushes;
int s_rushing_yards;
int s_fumbles;
// Kicking Stats //
int s_fg_attempts;
int s_fg_made;
char s_fg_long;
int s_punts;
char s_punt_long;
// Defensive Stats //
int s_tackles;
int s_sacks;
int s_pass_interceptions;
int s_fumble_rec;
// Game play options //
char in_game; // Used by MAINT.EXE
char g_touchdowns; // Touchdowns (last Game)
char s_touchdowns; // Season
char current_position; // Used by MAINT.EXE
char g_passing_touchdowns; // Touchdowns thrown (last game)
char s_passing_touchdowns; // season
char extra[15]; // extra items
NOTE: If you are unfamiliar with C/C++ data types, they are as
follows: char = 1 byte, int = 2 bytes, long = 4 bytes. I believe
that is all I use in these structures.
Obviously, certain items are used for indexing purposes (for example,
the number and team_number items relate to the team that the record
is for). Still other data is for statistical data keeping. Right
now, I can't think of any reason to change the data, most IGM's will
probably just read and display that data in different formats. Given
the volume of data kept by the game, I would not be surprised to see
several IGM's that track different aspects of that information.
As time goes on, I will include extra data files that are not used by
Franchise Football, but that may be used for IGM's. For example,
there will be a team statistics file, which will keep information
like first downs, third down conversions, etc.
[3] Linking your IGM to Franchise Football
I've tried to keep your job linking the IGM to Franchise Football as
simple as possible. Franchise Football takes all IGM information
from a file in the FFBL directory called MODULES.DAT. Each IGM has
three lines. The first is the drive and path to your IGM. The
second is the exact command line to execute your IGM, and the final
line is the name (with formatting) as it will appear to users in the
IGM list. You may substitute a %1 for the node number on the second
line of the IGM triplet. Also, if for any reason you'd like to
add a comment to this file, you may begin the line with a ;. That
line will be ignored by Franchise Football.
Here is an example of a MODULES.DAT triplet:
C:\DOORS\FFBL\IGM
IGM CONFIG%1.CFG
This is a Sample IGM
In this triplet, the first line is the path and drive to the IGM
files. The second line is the exact line that your IGM will execute
with. Depending on the door interface package you choose to use,
it may look different than the above, however, it should be exactly
as it is executed including all switches, config files, or anything
else. The final line is simply what will be displayed to users when
they select the IGM they'd like to use.
The last line of a triplet may contain special codes for color,
blinking, etc. if you enclose the color text in a ` (that's a
reversed apostrophe) the text will be displayed in that color.
For example:
`bright blue`T`blue`his `bright blue`i`blue`s `bright blue`a`blue`n
This line would display "This is an" with the first letter of each
word in bright blue and the rest in dark blue. Valid colors are:
black
blue
green
red
cyan
magenta
brown
white
Putting the word bright in from of any of these colors will yield
the "bright" versions of each of them. For instance `bright black`
will give you a dark gray, while `white` produces a light gray. One
other item I'll mention, the word "flashing" may be added before the
color to make the output blink. To stop the flashing you may use
"flashing off" (I believe) - I don't use flashing often :).
Your IGM should easily install and uninstall, meaning the user
(sysop) should be able to just run a utility to do all of the
initialization and if desired, remove the IGM. Your installation
program should add the MODULES.DAT triplet to the file (in the order
discussed above), and your uninstall routine should remove your
IGM's triplet (and only your triplet) from the MODULES.DAT file.
After your IGM concludes, it should write the time remaining for the
user on-line back to the IGMINFO.# file, FFBL reads that file and
updates the users information upon return to the main game.
Basically, in order to link your IGM to FFBL, you have to add the
MODULES.DAT triplet, and write the time remaining on-line to the
IGMINFO.# file. To remove the IGM, you simply have to remove the
MODULES.DAT triplet and do whatever you wish with the files for
your IGM.
[4] Additional Information
I (after several authors have begun writting IGM's) realize that
this document is far short of the needed information for many IGM
ideas. For this reason, I am going to begin putting together a
comprehensive IGM toolkit that will attempt to describe all data
files and formats. In addtion, I may provide libraries of C/C++
code to aid authors in writting the IGM's. You can get this
on the FFBL support BBS, Mos Eisley @ 413-684-4266, or FREQ "tools"
from 1:332/129. If you have any development questions, I would be
happy to answer them. Franchise Basketball 2.00 will also have an
IGM system. Anyone interested in IGM programming for that may
obtain information from me on Mos Eisley.
I do not require that IGM authors send any type of royalty to me.
I'm happy that people enjoy the Franchise Sports games to allow me
to continue writing them. I do ask, however, that IGM authors
consider writing some routine into the IGM to ask non-registered
users of FFBL to register it, as well as the IGM. Which brings me
to another point. All IGM authors are free to charge for their
work, with again, no royalties to me. (It would be nice to give
me a bi-line or something though :). In addition, I would really
like to know if you write an IGM, and I'd like a copy of it, too.
It doesn't have to be a registered one, just something so I can see
what everyone is doing.
If you do write an IGM, I'd like to offer my beta team
(those that are willing) and I to test it for you. In exchange
for allowing us to help you hack out the bugs and put our stamp
of approval on it, I will include your IGM for distribution on my
BBS, and will try to pass it along to all official SnellaSoft
distro sites, as well as including it on the "recommended" list
which will be part of future versions of FFBL. Again, this is
if it passes our rigorous testing process :), and I should also
mention - if it's in good taste. After all, getting the product out
is half the battle.
Other Notable Files:
HEADLINE.FBL
This file is a text file that uses the same color codes as
the third line of the MODULES.DAT triplet. It is a
summary of some of the major happenings of the day. If you
add anything to this file, the first line you write
should be the information, then a blank line, then a row
of `green`- - - - - (dashes), followed by a blank line.
Each day, MAINT.EXE deletes the file and creates a new one,
so if your IGM adds something to this file, it must be run
AFTER MAINT.EXE.
I'm sure that I've left out several items here. This file is
really just something to get authors going, I will over the next
few months compile a much more detailed file for download on IGM's.
If you have any further questions, please contact me at the above
internet addresses, or VIA Mos Eisley the official home of
Franchise sports games and SnellaSoft... FIDO 1:332/129 or 413-
684-4266. I should mention here, that it is possible the BBS will
be moving in the not-so-distant future. At that time, I will try
to keep the FIDO address and release an amended version of all games,
with the new information, as well as advertising on FIDO, and several
internet newsgroups.
Thank you for playing Franchise Football.
Franchise Football (C) 1996 SnellaSoft.