[TUT] How to add icons to squadfile

Discussion in 'FIFA 20 Tutorials, Help, Support' started by Aranaktu, Jan 7, 2020.

  1. Aranaktu

    Aranaktu Club Supporter

    Joined:
    Mar 27, 2017
    Messages:
    349
    Likes Received:
    371
    Location:
    Poland
    Some of the squadfiles currently available are poorly made (causing game crashes) and some others are outdated. After many questions, that I've seen on discord like "How to add icons" etc. I've decided to make this tutorial.
    I'll describe the most proper way of doing this based on my knowledge about FIFA. If you find any mistakes then let me know, nobody is perfect. :)

    [​IMG]
    [​IMG]
    [​IMG]

    Requirements:
    Of course, you may also use tools like excel to make some things faster, it's up to you. Just remember to keep the exact same number of rows when you will export/import the tables.

    Where to find icons data?

    First of all, we need to get the data of the icons. Their playerid, attributes, appearance etc. It's stored in cards_ng_db.db database. Open this file with db master.
    Players data is stored in players table, but first, we need to know the playerid. If you just want to add one icon then probably the quickest way will be to find the name in playernames table, copy it's nameid for example Ronaldinho - 20327:
    [​IMG]
    And then search for player which one of nameids (firstnameid/lastnameid/commonnameid/playerjerseynameid) is equal to 20327.
    [​IMG]

    To quickly find all playerids of icons you can check teamplayerlinks table. All icons are in team with teamid - 112658

    [​IMG]

    Adding the icons to squadfile

    All official squad files that you download through game are located in Documents\FIFA 20\settings. (Squadfiles got Squad prefix in the file name). Open one of these files in Revolution Database Master 20

    To add icon(s) to the squadfile you need to create a new record in 3 tables:
    • players table
    • teamplayerlinks table
    • editedplayernames table

    So, let's start from players table first.
    here we can copy the data 1:1. There isn't any magic here.

    • Find first empty record
      [​IMG]
    • Write down the values from players table from cards_ng_db to the players table in squad file
      [​IMG]

    Now, teamplayerlinks. Here you can define the team where your player will be. I recommend to put the player in free agents (teamid: 111592
    ) and then possibly transfer him using the transfer player feature in-game.

    • Again, find first empty record
      [​IMG]
    • artificialkey is the primary key in this table, so we shouldn't duplicate it. The table should be already sorted by its artificialkey value, so just increment by one the value from the previous row, in example, if last valid record got artificialkey equal to 20553 then our next artificialkey should be 20554.
    • teamid is up to you. If you want to have icon in free agents then put 111592 there
    • playerid is the id of our player. So, for Ronaldinho - 28130
    • position - preferably 28 or 29. 28 is substitute player and 29 is tribune player.
    • jerseynumber - for Free Agent should be 99 I belive. for other team you want to keep it unique, so better first check if the jersey number is free in the new team.
    • form/injury/isamongtopscorers. For form use 3 which is normal form, rest of the values keep on 0. You can try to experiment with these values if you want to.
    [​IMG]

    And the last table is editedplayernames. We need to set custom name for our player because the FUT mode and squadfile/career is using different playernames table. For example in FUT the nameid - 20328 is Ronaldo, but in career mode it can be Namjilyn or anyone else. The simplest fix is to set the name in table mentioned above. The game is at first checking if the name is set in editedplayernames and if it's not then it's pulling the name from
    playernames. Not quite sure how it works for commentary names. If the commentary is wrong you may need to set the value of lastnameid in players table to 0. This should remove commentary completely from the player.
    • Find first empty record
    • playerid is the id of our player. So, for Ronaldinho - 28130
    • Other fields can contain anything you want I belive.
    • If you want to keep it same as original then in cards_ng_db check what is firstnameid of the icon -> find the id in playernames -> copy the string. Repeat for lastnameid, commonnameid and playerjerseynameid
    [​IMG]

    Done! Now, you just need to repeat all the steps 266 more times to add all icons! Good luck!
    Just kidding... It's 2020, you can automate this boring process with any programming language you want. Actually I've automated it for you.

    Automate adding icons to squad file

    I've written two python scripts which can automate almost the whole process. All you need to do is:
    • export the players & teamplayerlinks table with RDBM from squadfile
    • run the script
    • import back the players, teamplayerlinks and editedplayer names table with all icons added with RDBM

    If you don't have python 3 then download and install python 3.7.6 x86 from here

    Download the python scripts (squadfile_icons.zip) and unzip it somewhere, can be on desktop.

    Open clean, official squad file from EA in RDBM. Then export the players table & teamplayerlinks table. Save these files in directory with the python script -> FIFA 20 -> squadfile
    [​IMG]

    run the add_icons_all.bat file to add all version of icons, or add_icons_baby/middle/prime_only.bat to add only one version.
    CMD window should pop up. Wait until it closes, meaning that python script has finished its job.
    If everything worked fine you should have 3 new files in the directory with script:

    • result_teamplayerlinks.txt
    • result_players.txt
    • result_editedplayernames.txt
    [​IMG]

    Import these tables to the squadfile with RDBM.
    • result_teamplayerlinks.txt to teamplayerlinks table
    • result_players.txt to players table
    • result_editedplayernames.txt to editedplayernames table
    And that's all.

    Saving the edited squadfile and loading it in the game

    After you have added the icon you can finally save the squadfile and load it in the game.
    To save it just click on File -> Save in top left corner
    [​IMG]

    To load in game, from main menu navigate to Customise -> Profile -> Load Squads
    [​IMG]

    And when the squad file is loaded you can finally start a new career with icons by choosing "Use Current Squads" option
    [​IMG]
     
    Last edited: Mar 4, 2020
  2. Andrei97X

    Andrei97X Youth Team

    Joined:
    Mar 22, 2013
    Messages:
    518
    Likes Received:
    80
    Awesome! Thank you so much!
     
  3. Aranaktu

    Aranaktu Club Supporter

    Joined:
    Mar 27, 2017
    Messages:
    349
    Likes Received:
    371
    Location:
    Poland
    I've updated the python script (squadfile_icons.zip).
    Now you are able to add only one version of icons if you don't want to have all.
    [​IMG]
     
    ledatcr and Thiego-BR like this.
  4. TOJICT9IK

    TOJICT9IK Club Supporter

    Joined:
    Aug 18, 2017
    Messages:
    160
    Likes Received:
    73
    Location:
    Russia
    Tell me how can all players change their age at once?
     
  5. ledatcr

    ledatcr Club Supporter

    Joined:
    Jan 16, 2008
    Messages:
    74
    Likes Received:
    4
    Great Tutorial and Script
     
  6. Aranaktu

    Aranaktu Club Supporter

    Joined:
    Mar 27, 2017
    Messages:
    349
    Likes Received:
    371
    Location:
    Poland
    I've updated the script.
    (squadfile_icons.zip)

    Added MOMENT icons, and icons added in latest FUTSquad update (for sure Riquelme, idk. if there are more)

    Squad files with icons in FA(4th March update):
    - All icons in FA
    - Moment icons only in FA

    I've noticed that for some reason game remove some of the players when you start new career. I don't know why and I don't know if there is any workaround. Maybe because they are very old and game replaces them with their regens. :(
    You can try to remove the players that you don't need to try to transfer the icons to any playable team.

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
  7. TOJICT9IK

    TOJICT9IK Club Supporter

    Joined:
    Aug 18, 2017
    Messages:
    160
    Likes Received:
    73
    Location:
    Russia
    Is there any quick way to make all the players in the game 20 years old?
     
  8. Aranaktu

    Aranaktu Club Supporter

    Joined:
    Mar 27, 2017
    Messages:
    349
    Likes Received:
    371
    Location:
    Poland
    Yes. It's called programming. I believe you can write code in any programming language which will change the value in "birthdate" column.
    Also, there is lua script for Live Editor which makes all players 16yo, you can edit it to make players 20yo.

    If you don't know any programming language then excel is probably your last hope.
     
    TOJICT9IK likes this.
  9. TOJICT9IK

    TOJICT9IK Club Supporter

    Joined:
    Aug 18, 2017
    Messages:
    160
    Likes Received:
    73
    Location:
    Russia
    Thanks (Y)
     
  10. TOJICT9IK

    TOJICT9IK Club Supporter

    Joined:
    Aug 18, 2017
    Messages:
    160
    Likes Received:
    73
    Location:
    Russia
    I noticed that after everything done, the names of some players change, what is the problem?
    [​IMG]
     
  11. mateo

    mateo Club Supporter

    Joined:
    Apr 4, 2020
    Messages:
    1
    Likes Received:
    1
    you could do a squadfile update with 20 year old players?
     
    Last edited: Apr 9, 2020
    Toxican likes this.
      

Share This Page