Jump to content

Club UID list for a Python script


hrmantovani
 Share

Recommended Posts

Hello all! 

I have a Python script that creates a visual table of stats. The stats are obviously easy to extract and manipulate, but the visual table also includes the player photo and club logo.

The player photo is also easy, because you have the UID of the player so you know that the path to the file of his face is graphics/[hisUID].PNG

For NewGAN faces it demands a bit more effort because you have to read the config file to check the file path of the face that was used on your newgen (something like NewGAN/African/African123.PNG for example), but it's still easy.

The problem relies on the club logo. I have the team name and the country it is based on, so ideally I would have a Club UID list to match it. Once I have the UID of the clubs I automatically know the path to their logo.

I know this can be found in the editor pregame but I don't know to extract this info. Could anyone help me here? All I need is 3 columns of info: ID, ClubName, Nation

I'm on FM23 but I don't think a lot has changed to FM24 regarding club UIDs

Thank you in advance!!

 

I'll leave the output file here if anyone is curious. The script was made by the blog Son of a Corner, I just adapted it to use local files instead of web URLs and made some adjustments to the fonts, fonts size, spacing, etc. All the positions are set as LW because the code uses a function to extract the position of some website, but I am just inputting the data via csv ready to plot. Setting all the rows with the same position, logo and photo was easier to test. 

output.png

Edited by hrmantovani
Link to post
Share on other sites

There's no easy way to do it, unfortunately.  If I've understood you right, the easiest I found was to go into the pre-game editor, select all the clubs in the database, then amend all the fields you're interested in to a common value in bulk.  You can export the changes from there to an XML, then parse that to get what the "old" value for each field was (this will be the one you're interested in).  It's totally tedious and takes a long time, but in the absence of anything better.

Link to post
Share on other sites

1 hora atrás, forameuss disse:

There's no easy way to do it, unfortunately.  If I've understood you right, the easiest I found was to go into the pre-game editor, select all the clubs in the database, then amend all the fields you're interested in to a common value in bulk.  You can export the changes from there to an XML, then parse that to get what the "old" value for each field was (this will be the one you're interested in).  It's totally tedious and takes a long time, but in the absence of anything better.

I'm not quite sure I understood. Let's say I want to get all the UIDs of the top 6 divisions in England. Your suggestion would be to select all of them and change like their name to something specific like "CHANGE GET UID"? Then when I export to XML I would have their ID, old name and new name? So all I'd need would be to change Name and Based Country

If this is correct then yes it would be tedious but it's definitely doable, I'm already working with XMLs to get the newgens face path anyway 

Edited by hrmantovani
Link to post
Share on other sites

8 horas atrás, forameuss disse:

There's no easy way to do it, unfortunately.  If I've understood you right, the easiest I found was to go into the pre-game editor, select all the clubs in the database, then amend all the fields you're interested in to a common value in bulk.  You can export the changes from there to an XML, then parse that to get what the "old" value for each field was (this will be the one you're interested in).  It's totally tedious and takes a long time, but in the absence of anything better.

I tried changing all the Bundesliga teams names but the XML doesn't show the UID

image.png.d60145b32c80d2f09014c771f28f6af5.png

Maybe I understood you wrong?

Link to post
Share on other sites

What do you mean by UID?  Whenever I've needed an ID for an object I've just used the db_unique_id value.  Although I suppose I'm dealing directly with the editor values, maybe it needs the shorter ID for whatever your'e doing.  If that's the case, yeah, **** out of luck unfortunately.

Link to post
Share on other sites

Em 01/02/2024 em 06:23, forameuss disse:

What do you mean by UID?  Whenever I've needed an ID for an object I've just used the db_unique_id value.  Although I suppose I'm dealing directly with the editor values, maybe it needs the shorter ID for whatever your'e doing.  If that's the case, yeah, **** out of luck unfortunately.

I meant the Unique ID that we see in-game. Benfica for example is 1487.

image.png.11cb19cc38dbc132b22654d2ed70e02b.png

In case anyone ever comes into this thread, Genie Scout allows you to export a list of all players loaded with a "Club ID" column.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...