News: BTB: Dallas Cowboys 53-Man Roster: Don't Like It? Change It!

NewsBot

New Member
Messages
111,281
Reaction score
2,947
20130804_ajl_aw3_275.0_standard_400.0.jpg

As soon as cuts rolled in, the first thing I wanted to do was update the roster builder. And I did.

But then I realized that, now that the 53-man roster is set, there isn't a whole lot of fun in re-doing the cuts, even with the benefit of hindsight. Most fans simply weren't too upset with most of the cuts - save perhaps for Brandon Magee being swiped by the Browns.

As it turns out, the greatest desire for many fans of the Cowboys is to have them pick up players that they may have followed closely elsewhere in the league, or in college, that were recently waived. Unfortunately, the roster builder never allowed for the addition of players that hadn't at one point been on a Cowboys' roster.

That's been changed.

Beginning now, the roster builder supports the addition of any player, real or imaginary, to the Cowboys' roster, at the click of a button. Simply provide the player's name and number of years in the league, and the roster builder will add him to the program and automatically sign him to a vet-minimum deal commensurate with his experience.

I'll also take this opportunity to review the roster builder controls.

To begin, click the button at the bottom of this article to launch the builder in a separate window. The builder will not function if the window that it was launched from (this one) does not also remain open. All of the code is here in the article. Similarly, the roster builder itself cannot be bookmarked - bookmark the article containing it, instead.

Once open, click 'Reset Everything' to populate the roster table. To view your cuts, click the 'Show Cuts' button on the left side of the screen; the hide cuts button will similarly hide that list.

Select any player to view his information panel on the right of the screen. With a player selected, click on the large red button at the bottom right to cut that player. Alternatively, press the 'delete' or 'x' keys on your keyboard to cut the player.

With a player selected, click on any position (ie, 'QB') to move the player to that position; this is how you 'undo' a cut, and is necessary to use generated players. You can also use this functionality to change players' positions to your liking (making Danny Coale a punter, for example) as well as edit the various injured and reserve lists.

If you have any question about this software, how to use it, how it was made, or anything else, I'm happy to answer; just ask.

As always, share the rosters you come up with in the comment sections, as fanshots, or, with some explanation and analysis, as fanposts! I'm looking forward to seeing what you come up with.

Dallas Cowboys Interactive Roster Builder

"; newHTML += "
2014 Dead Money if Cuttd>
"; newHTML += ""; newDocument.document.getElementById("currentPlayerInfo").innerHTML = newHTML; } else newDocument.document.getElementById("currentPlayerInfo").innerHTML = "Please select a player!"; var capTotal = deadMoney; var nextYearDeadMoney = deadMoneyNextYear; for ( i = 0; i < rosterArray.length; ++i) { capTotal += rosterArray.capHit; } if(irArray.length > 0) { for ( i = 0; i < irArray.length; ++i) { capTotal += irArray.capHit; } } if(pupArray.length > 0) { for ( i = 0; i < pupArray.length; ++i) { capTotal += pupArray.capHit; } } if (cut.length > 0) { for ( i = 0; i < cut.length; ++i) { capTotal += cut.capPen; nextYearDeadMoney += cut.nextYrPen; } } if(psArray.length > 0) { for ( i = 0; i < psArray.length; ++i) { capTotal += psArray.capPen; nextYearDeadMoney += psArray.nextYrPen; } } var color = ""; if (capTotal < 119495156) { color = "green"; } else if (capTotal == 0) { color = "black"; } else color = "red"; newDocument.document.getElementById("capTotalRow").innerHTML = "Current Salary:[COLOR=" + color + "]$" + numberWithCommas(capTotal) + "[/COLOR]Salary Cap:$119,495,156"; newDocument.document.getElementById("deadMoneyNextYearCell").innerHTML = "$" + numberWithCommas(nextYearDeadMoney); newDocument.document.getElementById("defenseCell").innerHTML = "Defense (" + (sArray.length + cbArray.length + olbArray.length + ilbArray.length + deArray.length + dtArray.length) + ")"; newDocument.document.getElementById("defensiveBacksCell").innerHTML = "Defensive Backs (" + (sArray.length + cbArray.length) + ")"; newDocument.document.getElementById("linebackersCell").innerHTML = "Linebackers (" + (ilbArray.length + olbArray.length) + ")"; newDocument.document.getElementById("defensiveLineCell").innerHTML = "Defensive Linemen (" + (deArray.length + dtArray.length) + ")"; newDocument.document.getElementById("sCell").innerHTML = "S (" + sArray.length + ")"; newDocument.document.getElementById("cbCell").innerHTML = "CB (" + cbArray.length + ")"; newDocument.document.getElementById("olbCell").innerHTML = "OLB (" + olbArray.length + ")"; newDocument.document.getElementById("ilbCell").innerHTML = "ILB (" + ilbArray.length + ")"; newDocument.document.getElementById("deCell").innerHTML = "DE (" + deArray.length + ")"; newDocument.document.getElementById("dtCell").innerHTML = "DT (" + dtArray.length + ")"; newDocument.document.getElementById("offenseCell").innerHTML = "Offense (" + (qbArray.length + rbArray.length + wrArray.length + teArray.length + otArray.length + gcArray.length) + ")"; newDocument.document.getElementById("offensiveBacksCell").innerHTML = "Offensive Backfield (" + (qbArray.length + rbArray.length) + ")"; newDocument.document.getElementById("receiversCell").innerHTML = "Receivers (" + (wrArray.length + teArray.length) + ")"; newDocument.document.getElementById("offensiveLineCell").innerHTML = "Offensive Linemen (" + (otArray.length + gcArray.length) + ")"; newDocument.document.getElementById("qbCell").innerHTML = "QB (" + qbArray.length + ")"; newDocument.document.getElementById("rbCell").innerHTML = "RB (" + rbArray.length + ")"; newDocument.document.getElementById("wrCell").innerHTML = "WR (" + wrArray.length + ")"; newDocument.document.getElementById("teCell").innerHTML = "TE (" + teArray.length + ")"; newDocument.document.getElementById("otCell").innerHTML = "OT (" + otArray.length + ")"; newDocument.document.getElementById("gcCell").innerHTML = "G/C (" + gcArray.length + ")"; newDocument.document.getElementById("stCell").innerHTML = "Special Teams (" + (pArray.length + kArray.length + lsArray.length) + ")"; newDocument.document.getElementById("kCell").innerHTML = "Kickers (" + kArray.length + ")"; newDocument.document.getElementById("pCell").innerHTML = "Punters (" + pArray.length + ")"; newDocument.document.getElementById("lsCell").innerHTML = "Long Snappers (" + lsArray.length + ")"; newDocument.document.getElementById("injCell").innerHTML = "Injured (" + (pupArray.length + irArray.length) + ")"; newDocument.document.getElementById("pupCell").innerHTML = "PUP (" + pupArray.length + ")"; newDocument.document.getElementById("irCell").innerHTML = "IR (" + irArray.length + ")"; newDocument.document.getElementById("psCell").innerHTML = "Practice Squad (" + psArray.length + ")"; } function buildRosterCell(name) { var result = "
" + name + "​
"; return result; } function nameToVar(name) { var tempName = name.replace("-", "_"); tempName = tempName.replace(".", ""); tempName = tempName.replace(".", ""); tempName = tempName.toLowerCase(); tempName = tempName.replace(" ", "_"); return tempName; } function prepareToMove(name) { playerToMove = window[nameToVar(name)]; posToMove = null; for (var i = 0; i < arrayArray.length; i++) { if (arrayArray.lastIndexOf(playerToMove) > -1) { posToMove = arrayArray; } } saveArray.push("prepareToMove('" + name + "')"); refreshRoster(); } function arrayByIndex(index) { return arrayArray[index]; } function showAuthor() { alert(author); } function movePlayer(destIndex) { var destination = arrayByIndex(destIndex); if (destination == cut) { arrayArray[arrayArray.indexOf(posToMove)].splice(arrayArray[arrayArray.indexOf(posToMove)].indexOf(playerToMove), 1); if (arrayArray.indexOf(posToMove) < 15) { rosterArray.splice(rosterArray.indexOf(playerToMove), 1); } cut.push(playerToMove); playerToMove = null; posToMove = null; } else if (posToMove != null && ((destination != psArray) || ((playerToMove.pracSquad == 1) && (psArray.length < 8)))) { arrayArray[arrayArray.indexOf(posToMove)].splice(arrayArray[arrayArray.indexOf(posToMove)].indexOf(playerToMove), 1); arrayArray[arrayArray.indexOf(destination)].push(playerToMove); if (arrayArray.indexOf(posToMove) > 14 && arrayArray.indexOf(destination) < 15) { rosterArray.push(playerToMove); } else if (arrayArray.indexOf(posToMove) < 15 && arrayArray.indexOf(destination) > 14) { rosterArray.splice(rosterArray.indexOf(playerToMove), 1); } playerToMove = null; posToMove = null; } saveArray.push("movePlayer(" + destIndex + ")"); refreshRoster(); } function showCuts() { var newHTML = "
Cuts​
"; for (var i = 0; i < cut.length; ++i) { newHTML += "
" + buildRosterCell(cut.name) + "
"; } newHTML += "

"; newDocument.document.getElementById('cutTableSection').innerHTML = newHTML; newDocument.document.getElementById('cutTableSection').value = 'shown'; } function hideCuts() { var newHTML = ""; newDocument.document.getElementById('cutTableSection').innerHTML = newHTML; newDocument.document.getElementById('cutTableSection').value = 'hidden'; } function saveRoster() { createCookie('btbRoster', saveArray.toString(), 365); } function loadRoster() { resetAll(); var rawSaveArray = readCookie('btbRoster'); saveArray = rawSaveArray.split(','); var saveQueue = rawSaveArray.replace(/,/g, ";"); var load = new Function(saveQueue); load(); refreshRoster(); } function createCookie(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); } else var expires = ""; newDocument.document.cookie = name + "=" + value + expires + "; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = newDocument.document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } function eraseCookie(name) { createCookie(name, "", -1); } //Source: http://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } function openNewPage() { var newDocumentHTML = "
Now's your opportunity to begin building your own Cowboys' roster. If you make a mistake, the \"Reset Everything!\" button will return everything to its original condition. To move players, click on the player to highlight him, and then click on the heading to which you wish to move him. Clicking on the red CUT cell, or pressing the Delete key will cut that player entirely. You can track your current roster count at the bottom left cell, and track the salary cap near the bottom. Good luck getting to 53!

Note: The Roster Builder now conforms to June 1st standards and splits cap hits over the next two years. Be mindful of how much dead money you accumulate for 2014!


Please select a player!
[COLOR=rgba(0,0,10,.95)]
Defense
Defensive Backs Linebackers Defensive Linemen
S CB OLB ILB DE DT
Offense
Offensive Backfield Receivers Offensive Linemen
QB RB/HB WR TE OT G/C
Special Teams Injured Practice Squad
Kickers Punters Long Snappers PUP IR​
Total Roster Size: 0 Click Here to CUT!
Current Salary: 0 Salary Cap: $119,495,156
2014 Dead Money: 0[/COLOR]​
"; newDocument = window.open(' '); newDocument.document.write(newDocumentHTML); newDocument.addEventListener('keydown', function(event) { if(event.keyCode == 88 || event.keyCode == 46) movePlayer(18); }); } function addNewPlayer() { var tempName = ""; while(tempName == "") { tempName = newDocument.window.prompt("Please enter the new player's name:"); if(tempName == "") { if(!newDocument.window.confirm("You didn't enter a name!\nWould you like to try again?")) return; } } if(tempName == "") return; var tempExp = ""; while(tempExp == "") { tempExp = newDocument.window.prompt("Please enter the new player's experience (number of seasons played):"); if(isNaN(tempExp)) { if(!newDocument.window.confirm("You didn't enter a valid number!\nWould you like to try again?")) return; else tempExp = ""; } } if(tempExp == "-1") return; if(!newDocument.window.confirm("This will create player " + tempName + " with " + tempExp + " years of experience.\nWould you like to continue?")) return; newDocument.window.alert("The new player has been created.\nPlease see your 'cut' list to find him and move him where you'd like."); var createPlayerString = "var " + nameToVar(tempName) + " = {};"; createPlayerString += nameToVar(tempName) + ".name = \"" + tempName + "\";"; createPlayerString += nameToVar(tempName) + ".pracSquad = " + getPracSquad(tempExp) + ";"; createPlayerString += nameToVar(tempName) + ".capHit = " + getVetMin(tempExp) + ";"; createPlayerString += nameToVar(tempName) + ".capPen = 0;"; createPlayerString += nameToVar(tempName) + ".nextYrPen = 0;"; createPlayerString += nameToVar(tempName) + ".picUrl = \"" + getRandomPhoto() + "\";"; createPlayerString += nameToVar(tempName) + ".exp = \"" + tempExp + "\";"; createPlayerString += nameToVar(tempName) + ".keep = \"You: This guy is the solution to all of the Cowboys' problems.\";"; createPlayerString += nameToVar(tempName) + ".cut = \"You: I frequently second-guess myself.\";"; createPlayerString += "playerArray.push(" + nameToVar(tempName) + ");"; createPlayerString += "cut.push(" + nameToVar(tempName) + ");"; createPlayerString += "window." + nameToVar(tempName) + " = " + nameToVar(tempName) + ";"; var createNewPlayer = new Function(createPlayerString); createNewPlayer(); refreshRoster(); } function getVetMin(exp) { if(exp < 1) return 405000; else if(exp < 2) return 480000; else if(exp < 3) return 555000; else if(exp < 4) return 630000; else if(exp < 7) return 715000; else if(exp < 10) return 840000; else return 940000; } function getPracSquad(exp) { if(exp < 3) return 1; else return 0; } function getRandomPhoto() { var url = 'http://cdn0.sbnation.com/player_photos/l.nfl.com/xt.fss.l.nfl.com-p.'; var randomnumber = Math.floor(Math.random() * 1000); randomnumber += 9000; url += randomnumber; url += '.jpg'; return url; } Sorry, but your browser does not support JavaScript.

Continue reading...
 
Top