Exemplo n.º 1
0
        private void CheckFaces()
        {
            FaceForm      ff = new FaceForm();
            StringBuilder sb = new StringBuilder();

            Tool.SetKey("Key=Position,fname,lname,Photo,Skin");
            sb.Append(Tool.GetKey(true, true).Replace("#", "Key="));
            sb.Append("\nLookupAndModify\n" +
                      "#Team=FreeAgents   (This line is a comment, but allows the player editor to function on this data)\n\n");

            string skin        = "";
            string face        = "";
            int    faceInt     = 0;
            int    playerLimit = 1928;

            for (int player = 0; player < playerLimit; player++)
            {
                skin    = Tool.GetPlayerField(player, "Skin");
                face    = Tool.GetAttribute(player, PlayerOffsets.Photo);
                faceInt = Int32.Parse(face);
                switch (skin)
                {
                case "Skin1":       // white guys
                case "Skin9":
                case "Skin17":
                    if (!ff.CheckFace(faceInt, "lightPlayers"))
                    {
                        sb.Append(Tool.GetPlayerData(player, true, true));
                        sb.Append("\n");
                    }
                    break;

                case "Skin2":      // mixed White&black(light) guys, Samoans
                case "Skin18":     // mixed White&black(light) guys, Samoans, Latino, White,
                    break;

                // dark guys
                case "Skin3":     // inconsistently assigned
                case "Skin4":
                case "Skin5":
                case "Skin6":
                case "Skin10":
                case "Skin11":
                case "Skin12":
                case "Skin13":
                case "Skin14":
                case "Skin19":
                case "Skin20":
                case "Skin21":
                case "Skin22":
                    if (!ff.CheckFace(faceInt, "darkPlayers"))
                    {
                        sb.Append(Tool.GetPlayerData(player, true, true));
                        sb.Append("\n");
                    }
                    break;
                }
            }
            MessageForm.ShowMessage("Results", sb.ToString(), SystemIcons.Information, false, false);
        }
Exemplo n.º 2
0
        private void CheckDreads()
        {
            StringBuilder sb = new StringBuilder();
            FaceForm      ff = new FaceForm();
            string        dreads, photo;
            int           photo_i     = 0;
            int           playerLimit = 1928;

            for (int i = 0; i < playerLimit; i++)
            {
                photo   = Tool.GetPlayerField(i, "Photo");
                photo_i = Int32.Parse(photo);
                if (ff.CheckFace(photo_i, "Dreads"))
                {
                    dreads = Tool.GetPlayerField(i, "Dreads");
                    if (dreads != "Yes")
                    {
                        sb.Append(
                            String.Format("{0},{1},{2},Yes\n",
                                          Tool.GetPlayerField(i, "Position"),
                                          Tool.GetPlayerName(i, ','),
                                          photo
                                          ));
                    }
                }
            }
            if (sb.Length > 0)
            {
                sb.Insert(0,
                          "#Check these players\n\nLookupAndModify\n" +
                          "Key=Position,fname,lname,Photo,Dreads\n\n" +
                          "#Team=FreeAgents    (This line is a comment, but allows the player editor to function on this data)\n");
                MessageForm.ShowMessage("Verify Theese", sb.ToString());
            }
        }
Exemplo n.º 3
0
        private void checkSpecialTeamsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StringBuilder warnings      = new StringBuilder();
            string        goodReturners = "WR,RB,FB,CB,SS,FS";

            string[] teams = GamesaveTool.Teams;
            string   kr1   = "";
            string   kr2   = "";
            string   pr    = "";

            for (int i = 0; i < teams.Length; i++)
            {
                kr1 = mTool.GetSpecialTeamPosition(teams[i], SpecialTeamer.KR1).Replace("KR1,", "").TrimEnd("0123456789".ToCharArray());
                kr2 = mTool.GetSpecialTeamPosition(teams[i], SpecialTeamer.KR2).Replace("KR2,", "").TrimEnd("0123456789".ToCharArray());
                pr  = mTool.GetSpecialTeamPosition(teams[i], SpecialTeamer.PR).Replace("PR,", "").TrimEnd("0123456789".ToCharArray());
                if (goodReturners.IndexOf(kr1) < 0)
                {
                    kr1 = "bad";
                }
                if (goodReturners.IndexOf(kr2) < 0)
                {
                    kr2 = "bad";
                }
                if (goodReturners.IndexOf(pr) < 0)
                {
                    pr = "bad";
                }

                if (kr1 == "bad" || kr2 == "bad" || pr == "bad")
                {
                    warnings.Append("Team = ");
                    warnings.Append(teams[i]);
                    warnings.Append("\n");
                    if (kr1 == "bad")
                    {
                        warnings.Append(mTool.GetSpecialTeamPosition(teams[i], SpecialTeamer.KR1) + "\n");
                    }
                    if (kr2 == "bad")
                    {
                        warnings.Append(mTool.GetSpecialTeamPosition(teams[i], SpecialTeamer.KR2) + "\n");
                    }
                    if (pr == "bad")
                    {
                        warnings.Append(mTool.GetSpecialTeamPosition(teams[i], SpecialTeamer.PR) + "\n");
                    }
                }
            }
            if (warnings.Length > 0)
            {
                warnings.Append("\nTry running   Edit -> AutoUpdateDepthChart or manually edit to fix");
                MessageForm.ShowMessage("Check these", warnings.ToString(), SystemIcons.Warning, false, false);
            }
            else
            {
                statusBar1.Text = "No special teams issues found";
            }
        }
Exemplo n.º 4
0
        private void runSpecialActionItem_Click(object sender, EventArgs e)
        {
            if (classifyMode.Checked)
            {
                MessageForm.ShowMessage("Player stuff", GetSpecialString());
            }

            //WriteBigfaceImage();
            //MessageForm.ShowMessage("Skin map", mTriSkinMap.ToJson() );
            //MessageBox.Show("Modify 'runSpecialActionItem_Click' function to have this do something.");
        }
Exemplo n.º 5
0
        private void findPlayersMenuItem_Click(object sender, EventArgs e)
        {
            String content = "LookupPlayer\r\n" +
                             mResultsTextBox.Text;
            InputParser parser = new InputParser(Tool);

            parser.ProcessText(content);
            string results = Tool.GetKey(true, true) + "\r\n" +
                             parser.GetLookupPlayers();

            MessageForm.ShowMessage("Results", results, SystemIcons.Information, false, false);
        }
Exemplo n.º 6
0
        private void aboutCheckOperationsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string message =
                @"The 'check' operation results are crafted to be pasted into the main text area.
They are built to be 'LookupAndModify' Commands and editable with the 
Player Edit Form (unless otherwise stated).

Intended workflow:
1. <check operation>
2. Copy results message
3. Paste into Main Text area
4. Double click first player
5. Change/verify player attributes
6. Use 'Next Player' button to go through all the players.
7. Press 'Ok' once all desired changes are made
8. Apply data to gamesave ('Save' button or File->Apply data without saving).
";

            MessageForm.ShowMessage("About Check operations", message, SystemIcons.Question, false, false);
        }
Exemplo n.º 7
0
 private void ShowResults(string results)
 {
     if (results == null)
     {
         MessageBox.Show(this,
                         "Check formula and Positions Check boxes ",
                         "No Players"
                         );
     }
     else if (results.StartsWith("Exception!"))
     {
         MessageBox.Show(this,
                         results,
                         "Error, Check formula"
                         );
     }
     else
     {
         MessageForm.ShowMessage("Affected  Players", results, SystemIcons.Question, false, false);
     }
 }
Exemplo n.º 8
0
        private void ApplyTextToSave()
        {
            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();
            statusBar1.Text = "Applying data...";
            InputParser parser = new InputParser(this.mTool);

            //parser.UseExistingNames = reuseNamesToConserveNameSpaceToolStripMenuItem.Checked;

            parser.ProcessText(mTextBox.Text);
            sw.Stop();
            statusBar1.Text = "Done Applying data." + (sw.ElapsedMilliseconds / 1000.0) + "s";
            StaticUtils.ShowErrors(false);

            string lookupPlayers = parser.GetLookupPlayers();

            if (lookupPlayers != null)
            {
                MessageForm.ShowMessage("Lookup Players", lookupPlayers, SystemIcons.Information, false, false);
            }
        }
Exemplo n.º 9
0
        private void mFormulaButton_Click(object sender, EventArgs e)
        {
            string howTo =
                @"When selecting players to modify you can use the following player attributes:
    Number,Speed,Agility,Strength,Jumping,Coverage,PassRush,RunCoverage,
    PassBlocking,RunBlocking,Catch,RunRoute,BreakTackle,HoldOnToBall,
    PowerRunStyle,PassAccuracy,PassArmStrength,PassReadCoverage,Tackle,
    KickPower,KickAccuracy,Stamana,Durability,Leadership,Scramble,Composure,
    Consistency,Aggressiveness,
    Hand,BodyType,Skin,Face,Dreads,Helmet,FaceMask,Visor,
    EyeBlack,MouthPiece,LeftGlove,RightGlove,LeftWrist,RightWrist,LeftElbow,
    RightElbow,Sleeves,LeftShoe,RightShoe,NeckRoll,Turtleneck

Expressions like the following will work:
    Hand = Left and (Speed > 80 or Jumping < 50)

Random numbers:
Random_<min>_<max>  => will generate a Random number between <min> and <max>
   Examples:
     Random_1_100 > 70
     Random_0_10 = 5

Math Operators:
/ * - +
Logic Operators:
and
or
=
<> (Not Equal)

Check the Console output to see the formula the editor uses.
You can use these formulas in the Main Text area as well.
";

            MessageForm.ShowMessage("Usage", howTo, SystemIcons.Question, false, false);
        }
Exemplo n.º 10
0
 private void showUnclassifiedPhotosToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MessageForm.ShowMessage("Unclassified photos", GetUnclassifiedPlayers());
 }