Project: Dozen
Make an automated draft and ability increase system for the Super Tecmo "12's" league.
Status: In Progress
Location(s):
Database Hardware Location (Code Word): vP
Database Name (Code Word): Pride
Stored Procs:
DraftPlayerInsertIntoPlayer_sp = Takes player from DraftPlayer and inserts it (hopefully) into Player table (for now) and also PlayerPotential Table.
DraftPlayerInsertIntoPlayer12s_sp = Stored Procedure in process, just have to remember to alter before I close
Tables:
Draft = Stores overall info of each draft (which league, season, draft type (Regular, Dispersal, Supplimental etc.) has DraftID, DraftDtlID
DraftDetail = Where info on Round, Pick in round, overall pick number, team picked by (TeamAbbr) as well as Notes and PlayerDtlId is stored.
DraftPlayer = Where 12s league draft prospects are currently
Player = Destination for drafted players from DraftPlayer
PlayerPotential = where the randomly generated potential of each draft player is inserted upon being drafted.
Game Files and Saves: GoogleDrive\Tecmo Bowl\12s League
Description:
Name comes from the SQL data base for different leagues. This league has a primary key of "12" so I just started thinking of it in my head as "The 12's league" and never really came up with anything I liked better.
Steps:
DONE: Take in parameter's: DraftDetailID and TeamAbbr
MmmmHmmmmm: pretty much everything else can be grabbed from there.
DONE: Create temp table to dump all of drafted players stuff in
DONE: Import drafted player into Player
DONE: Update TeamID in Player table using TeamAbbr, SeasondDtlID
Get random vanilla players attributes from Player table
create temp table for all players at that position
Fill with Vanilla PlayerIDs
Fill it with Index_ids to get a range for the random variable to grab.
generate indexs via a loop
get Attributes for randomly grabbed vanilla player
Compare random player attributes to drafted player attributes
Loaded Random and Drafted player int0 Comparison temp table
create loop to update temp table based on the following:
if an attribute is higher than the drafted player it's put in the PlayerPotential table
if not, it's a zero and the draft player can't increase that attribute.
Insert all pertinent data into PlayerPotential table <-- so this is the correct next step future self, and be sure to use rollback this time (it's in the SP)
is Draft set up in Draft table? No. It is now:
DraftDtlID =7
DraftID = 10
SeasonDtlID = 1992 season in Season table
18 is the SeasonDtlID
Insert into DraftDetail table (round, pick number etc.)
Update DraftPlayer TeamAbbr so it is known that he is picked.