Crono_ Posted April 21 Share Posted April 21 Hello, i'm making a custom league (Level 8 italy) for FM2022 and i need to add some clubs in order to make the league work. I should add like 780 clubs and im looking for a way to automatize most of the process, so i wonder if there is a way to retrive city UID and names from the database to a file that later i can use in my script to automatize club's creation. Thanks in advance for the help! Link to post Share on other sites More sharing options...
Wolf_pd Posted April 21 Share Posted April 21 Someone explained me how and I have to ask that person to post it here. Link to post Share on other sites More sharing options...
Crono_ Posted April 21 Author Share Posted April 21 4 ore fa, Wolf_pd ha scritto: Someone explained me how and I have to ask that person to post it here. oh okay, can you tag him? Link to post Share on other sites More sharing options...
forameuss Posted April 22 Share Posted April 22 If it's just the UID and name, it's not too bad, although still pretty tedious (unless someone else knows a better way, which I'd be delighted to hear). Go into the editor and load a fresh database Do a search for cities with no parameters to get all of them (make sure you set the Maximum Records per Search value in settings to Unlimited) Select all, then click edit It'll take a while, but once it's done getting them all, you'll see what looks like a blank city object. Change the name to anything (I usually just use A) This will again take a while, and the editor will be unresponsive throughout, but once it's back that should have changed every single city to have the same name Export those changes (not save) which will give you an XML file From that, you'll get an entry for each city with the "old" name, and db id within. You'll need to do some parsing of the data at that point, I use Python. from that you can pretty easily build up any format you need I probably still have a copy of exactly this list of IDs somewhere, can check when I'm back on my laptop if you'd like. Link to post Share on other sites More sharing options...
Crono_ Posted April 22 Author Share Posted April 22 57 minuti fa, forameuss ha scritto: If it's just the UID and name, it's not too bad, although still pretty tedious (unless someone else knows a better way, which I'd be delighted to hear). Go into the editor and load a fresh database Do a search for cities with no parameters to get all of them (make sure you set the Maximum Records per Search value in settings to Unlimited) Select all, then click edit It'll take a while, but once it's done getting them all, you'll see what looks like a blank city object. Change the name to anything (I usually just use A) This will again take a while, and the editor will be unresponsive throughout, but once it's back that should have changed every single city to have the same name Export those changes (not save) which will give you an XML file From that, you'll get an entry for each city with the "old" name, and db id within. You'll need to do some parsing of the data at that point, I use Python. from that you can pretty easily build up any format you need I probably still have a copy of exactly this list of IDs somewhere, can check when I'm back on my laptop if you'd like. Thanks you so much im going to try that, i've read about memory dump, im glad that it's "only" this. When the script tool im building is finished im gonna share with y'all hoping that mass editing would be simpler for anyone I have another question: this method can be used also with stadium and clubs? if needed Link to post Share on other sites More sharing options...
Crono_ Posted April 22 Author Share Posted April 22 6 ore fa, forameuss ha scritto: If it's just the UID and name, it's not too bad, although still pretty tedious (unless someone else knows a better way, which I'd be delighted to hear). Go into the editor and load a fresh database Do a search for cities with no parameters to get all of them (make sure you set the Maximum Records per Search value in settings to Unlimited) Select all, then click edit It'll take a while, but once it's done getting them all, you'll see what looks like a blank city object. Change the name to anything (I usually just use A) This will again take a while, and the editor will be unresponsive throughout, but once it's back that should have changed every single city to have the same name Export those changes (not save) which will give you an XML file From that, you'll get an entry for each city with the "old" name, and db id within. You'll need to do some parsing of the data at that point, I use Python. from that you can pretty easily build up any format you need I probably still have a copy of exactly this list of IDs somewhere, can check when I'm back on my laptop if you'd like. Hi i've done that but the exported xml it's all new value a. Am i doing something wrong? Link to post Share on other sites More sharing options...
forameuss Posted April 23 Share Posted April 23 Should be an odvl value in there that holds the original name, certainly was when I did it. Maybe they've changed something in the editor. Link to post Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now