APF Editor - #1 Player Names

Collapse

Recommended Videos

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KingJavo
    Pro
    • Jan 2009
    • 431

    #1

    APF Editor - #1 Player Names

    This thread will be the first of many to organize things I'm trying to do in my new editor.

    This one in particular is related to editing Player names. I'll post things already found and we can go from there.

    The intent is to ONLY include things related to the research and discovery of Player Names in this thread.
    Last edited by KingJavo; 12-07-2014, 09:55 AM.
  • KingJavo
    Pro
    • Jan 2009
    • 431

    #2
    Re: APF Editor - #1 Player Names

    First legend player on a CPU Team (Mark Smith, Scorpions) offset = 0000D180

    First created player on a created team offset = 000829F0

    First legend player on a created team offset = 000843E0

    It's not that simple, unfortunately.

    This is what a normal cell of player data looks like inside a hex editor:



    The color-coded areas contain most of a player's information:

    Attributes, abilities, position, jersey number, facial structure, tier, shoe type, face mask type, birth year -- all of this stuff is already present in FlyingFinn's editor.

    But if all you do is change a player's first and last name, none of the numbers inside that data cell will change.

    Best I can tell, the only numbers in one of those cells that have anything to do with the player's name are the two boxes near the top of the data set that I've stenciled in a black outline.

    If you mess with those two boxes and manually change their values, you can reset a players name so that it's completely blank, and then you'll be able to retype it from scratch inside the game's regular player editing screen.

    Changing the name length won't have any affect on a player's data cell. I can change someone like "David Hawthorne" to "Al Bundy" and his cell will still look identical in hex code.

    The only way that the values in the stenciled black boxes will change is if you go into a hex editor and change them manually. They don't seem to react to any changes that you make in FlyingFinn's editor or any changes that you make from the in-game player editor.

    So let's say "David Hawthorne" was originally "00 19 72 47 00 19 72 65"

    Then I decide that I want to reset his name and change him to "00 19 71 46 00 19 71 64" which causes his name to show up as blank in the game.

    When I go into the in-game player editor screen and rename him to something like "Randal Graves" his code would still read "00 19 71 46 00 19 71 64" when I bring that roster file back into a hex editor.

    These are the only other places I know of in the roster file where player names are listed:

    offset 00208730 through offset 0020FFF0 (legends and generics)

    offset 0021200 through offset 00222000 (legends and generics)

    offset 00222020 through offset 00222560 (created players)

    If you change the names there by entering new hex values, the new name has to have the same amount of letters as the old name, otherwise the file won't work.

    If you use this method, it also only changes a player's displayed name. The announcers will still refer to the athlete's original name in the play-by-play commentary.

    I never figured out how to change a player's play-by-play name using hex editing.

    The character restrictions only apply to the names that appear from offset 00208730 through offset 00222560. That is one method of changing names from within a hex editor.

    The other method I've used to change names is just doing it normally from inside APF 2K8's player edit screen. There are no character restrictions there.


    Quote:

    This is very confusing and I could use help nailing down the research already done so I can begin coding. Making sense of this stuff with caps, legends, etc and the number of teams you can have total and the way apf restricts things make my mind burn.

    You can only have 8 user-created teams. Their players will appear from offset 000829F0 until offset 0009EE90.

    The players from the remaining 24 CPU teams are listed from offset 0000D180 until offset 0005ECC0.

    Quote:

    Along with how many hex values are in each player's section of attributes.

    It varies depending on the type of player your looking at. Created players usually have larger data cells than legends and generics. The reason is that created players have different facial structures than legends and generics. Other than the face section, their data blocks will be the same size.

    You can tell where one player cell ends and another begins by looking for the strings of 00s and FFs in the hex code.

    Here's what a generic player's cell looks like:



    You can tell he's a generic player because of the hex code 84 at offset 00087A60. 84 = generic, 05 = created player, 04 = legend.

    The player directly above that generic is a legend on the same team:



    Even though the legend has 00s instead of 7Fs for his facial data, that block is still the same size.

    The image I posted on page one shows what a created player looks like:



    The "green" facial data block for a created player is much larger and full of different 7x and 8x values.

    Comment

    • KingJavo
      Pro
      • Jan 2009
      • 431

      #3
      Re: APF Editor - #1 Player Names

      I've figured out how the Player Name Attributes point to the actual Text names in the file.

      Here, I've set Mike Golic's first name to Joey Barret's last name. Golic's player attributes actually share Mike Haynes first name instead of creating his own. If you look at Golic's name in the name bank section (offset 2135839) you won't see his first name only his last.

      This is because his first name attribute is pointing to the Mike in Mike Haynes section.

      Comment

      • KingJavo
        Pro
        • Jan 2009
        • 431

        #4
        Re: APF Editor - #1 Player Names

        JYoung or anyone else who can answer this question, is there any issue with freezes etc if you mess with the Text in the Legend names section.

        Offset 2135839

        I added a new name for Mike Golic there and it worked fine in game. Only problem is you lose the Team/Years part in game.

        Does this matter to anyone? If not, then I may just allow the editor to rename names and not reuse names, but there is much more to think through as I progress through different players in the game.

        This will take more than 1 week because of my schedule and the complexity, but I don't think it will take much longer to be honest. I just need to get the editor code pulling in names and then determining if the names are being shared or not. I may just allow an overwrite of names even if their shared to start with because resusing names will take more time to code and one of the more difficult parts is detecting who is sharing when you load up a Roster file.

        Does anyone have any opinion on what the requirement can be for changing names?

        Comment

        • jyoung
          Hall Of Fame
          • Dec 2006
          • 11132

          #5
          Re: APF Editor - #1 Player Names

          Some of the player names are definitely linked.

          You'll notice this sometimes (but not always) after you rename legends who happen to share names with other players in the game.

          But the bigger issue in APF 2K8 is how the pool of generic players isn't large enough to have unique generics at every position on every team. So a generic possession wide receiver like Emanuel Husak might appear on 4 or 5 teams in the game. And when you edit his name on 1 team, it also changes his name on all the other teams he's on.

          That's why I used to employ the technique of "resetting" a player's name by turning it completely blank before I renamed him if I noticed that he had a linked name. Doing so would remove the link. The problem with this technique was that it also corrupted that spot in the names database the moment I "hit reset." And whenever I did that to a player, his play-by-play name would no longer function, and the announcers would just refer to him forevermore by his jersey number.

          That crude method wouldn't cause any hard system freezes, but it would lead to some annoying superficial flaws. And you could still take rosters that had been edited that way online, which was always important to me.

          So basically, I would suggest designing the editor in such a way that edited first/last names can no no longer be used by other players. Otherwise, it will create a lot of problems on the roster if edited names remain reusable.

          I'd much rather have "Mike Golic" turn into "**blank** Golic" instead of becoming "Richard Golic" after I change "Mike Haynes" to "Richard Sherman."
          Last edited by jyoung; 12-07-2014, 11:57 PM.

          Comment

          • Jermaine76
            Rookie
            • Jan 2011
            • 49

            #6
            Re: APF Editor - #1 Player Names

            You change the names of any player and you won't be able to play online. So I assume this will be for offline only, right?

            Comment

            • KingJavo
              Pro
              • Jan 2009
              • 431

              #7
              Re: APF Editor - #1 Player Names

              Originally posted by Jermaine76
              You change the names of any player and you won't be able to play online. So I assume this will be for offline only, right?

              Unless we can uncover how to properly change a player's name without breaking online.

              I'm trying to do this for at least offline as online is unpredictable and I would need help researching what we can and can't get away with online.

              Comment

              • KingJavo
                Pro
                • Jan 2009
                • 431

                #8
                Re: APF Editor - #1 Player Names

                Thx for the reply JYoung. The player links are all based on pointers in the file.

                So in Golic's case his first name was based on offsets which pointed to that other name. If we wanted to break the link as you call it, we would need to make room in the file for him to have his own first name.

                If I put his first name next to his last name then I eat into his team yes history text. I can either do that or try to find other areas we can link to without stepping on there bio text.

                What do you think?

                Comment

                • jyoung
                  Hall Of Fame
                  • Dec 2006
                  • 11132

                  #9
                  Re: APF Editor - #1 Player Names

                  The team history text isn't very important, since it only appears during the pre-game loading screens.

                  I would have no problem sacrificing that stuff.

                  Comment

                  • KingJavo
                    Pro
                    • Jan 2009
                    • 431

                    #10
                    Re: APF Editor - #1 Player Names

                    Originally posted by jyoung
                    The team history text isn't very important, since it only appears during the pre-game loading screens.



                    I would have no problem sacrificing that stuff.

                    Then that will make the renaming of names much easier.

                    Do you know of any places in the hex where the names are back to back to back from one player to another similar to how 2k5?

                    If not, then I won't have to worry about moving names down and can just let the names grow over the spaces or history text.

                    Comment

                    • KingJavo
                      Pro
                      • Jan 2009
                      • 431

                      #11
                      Re: APF Editor - #1 Player Names

                      Couple quick questions...

                      You mentioned somewhere that the Legends are in one spot, but then they are also in every team section depending on what teams possess which Legends.

                      If this is so then do both need to be maintained in the editor or just the team ones? If so, do they need to be synced up so that if you change one, the other gets updated as well?

                      Second, does every player have the same length of attributes? I know the legends don't have the facial structure and instead have zeros, but are the total number of attributes slots the same?

                      Comment

                      • KingJavo
                        Pro
                        • Jan 2009
                        • 431

                        #12
                        Re: APF Editor - #1 Player Names

                        I'm still a little unclear on the attribute ranges...

                        If I look at the D180 offset you said is where the first player starts and I change the PBP in Finn's editor, it actually changes offset D15B which is above the D180.

                        So, what I need are the ranges for at least the first 3 players. So D180 - D266, D266 - D3B4 for instance.

                        Can someone confirm the ranges because I'll use this as the "block" of attributes I pull in for each player?

                        The only other part would be is the total # of attributes per block consistent across all player types or does it change per type?

                        Once I have this, I can start coding!

                        Comment

                        • jyoung
                          Hall Of Fame
                          • Dec 2006
                          • 11132

                          #13
                          Re: APF Editor - #1 Player Names

                          The first three players in the file are all on the CPU Scorpions team:

                          Last edited by jyoung; 12-08-2014, 05:50 PM.

                          Comment

                          • KingJavo
                            Pro
                            • Jan 2009
                            • 431

                            #14
                            Re: APF Editor - #1 Player Names

                            Thx but from the short look at your pics the lengths are not 100% consistent.

                            Can't tell with the last one because it looks like dec

                            Comment

                            • jyoung
                              Hall Of Fame
                              • Dec 2006
                              • 11132

                              #15
                              Re: APF Editor - #1 Player Names

                              The ending point for each player is always a set of 00s followed by FFs.

                              The starting point, best I can tell, is the player's 8 name blocks. Those follow the format of: 00 XX XX XX 00 XX XX XX.

                              The easiest way to identify that is to look in the right column of the hex file and look for where the letters start to change. First player has a bunch of Fx values right before he starts. Second player has a bunch of Tx values before he starts. Third player has a bunch of Sx values before he starts. Etc.
                              Last edited by jyoung; 12-08-2014, 05:59 PM.

                              Comment

                              Working...