Search the Community
Showing results for tags 'tips'.
I will preface this post by stating that SI generally do not support files that have content created outside of the FM Editor, including Excel. I've used Excel with FM over the past year to help with big projects when it comes to importing a massive amount of data. It can rapidly reduce the amount of time you would otherwise spend in the Editor making the changes manually, and as long as you create the file separately from your main project, and test it in game to ensure that it works, you should find that it works flawlessly. This includes changes to the database for items like histories etc. One example of this is when setting up Fixtures in the editor - this can take a long time and when you have a few leagues you want to do, this can become monotonous (I have probably done a 100 of these over the past few years, and I did all fixtures not included in game for last years EEE release, minus 3 L9 leagues that still announce their fixtures monthly, in other words, the EPL, L7, L8 and 11 L9 leagues - 21 in total for one season while SI had the EFL and ENL covered with 7 leagues). Using excel text formulas you can manipulate the data in released fixture files and tabulate all the necessary details, such as the date, the home team and away team, and the time for the fixture. As an example, here is one original fixture announced for the EPL this year: 13/08/2016 15:00 Arsenal v Liverpool This is how the fixture is formatted by the FA in their original announcement here. The way I tabulated this data was first of all to separate the date, which could then be separated into the day of the week, the day of the month, the month and the year. The formula I used was "=LEFT(A2,10)" to retrieve the information for the date. I could then obtain all the other data by using formulas such as "=LOWER(TEXT(B2,"ddd"))" for the day of the week, "=DAY(B2)" for the day of the month, "=LOWER(TEXT(B2,"mmm"))" for the name of the month and "=YEAR(B2)" for the year. Similar formulas are done for the rest. The trickiest part here is getting the data for the teams separated so that you can find the team Unique ID. The formula "=MID(A2,25,100)" separated the teams from the original data, at which point you can then use formulas to get the home and away team. The " v " is the key part here, as you can use this as the dividing line to separate the data in formulas. I retrieved the home team using "=LEFT(D2,SUM(SEARCH(" v ",D2,1))-1)" and the away team using "=RIGHT(D2,SUM(LEN(D2)-SEARCH(" v ",D2,1))-2)". A separate sheet should be setup with the Unique ID's and the names of the clubs in question - not too hard to get from the Editor and not too time consuming. From here, you can use a VLOOKUP function to get the ID's of the clubs. I used this formula: "=VLOOKUP(J2,[ENG.xlsx]ENG!$A:$B,2,FALSE)", just a simple VLOOKUP to another spreadsheet which has the club name in the first tab and the ID in the second. So my end result is the following: DATE TIME MATCH Day Date Nmonth Year Time Home Team Away Team Home Team ID Away Team ID 13/08/2016 15:00 A.F.C. Bournemouth v Manchester United 13/08/2016 15:00 A.F.C. Bournemouth v Manchester United sat 13 aug 2016 1500 A.F.C. Bournemouth Manchester United 600 680 13/08/2016 15:00 Arsenal v Liverpool 13/08/2016 15:00 Arsenal v Liverpool sat 13 aug 2016 1500 Arsenal Liverpool 602 676 13/08/2016 15:00 Burnley v Swansea City 13/08/2016 15:00 Burnley v Swansea City sat 13 aug 2016 1500 Burnley Swansea City 622 724 etc. So, with this data I can now set up the xml data for the fixtures. Having exported a copy of the Advanced Rules file for England into an xml, I was able to ascertain which data I would need and inputted each xml line into a tab on the first row, and removed the data which would require altering. <record> <integer id="fixture_order" value="0"/> <string id="day_of_week" value=""/> <integer id="day_of_month" value=""/> <string id="month" value=""/> <integer id="year" value=""/> <string id="time" value=""/> <record id="home_team_id"> <integer id="id" value="1752003689"/> <integer id="Ttea" value=""/> </record> <record id="away_team_id"> <integer id="id" value="1635218537"/> <integer id="Ttea" value=""/> </record> </record> These were the first row tabs. As an example, the first cell that would need changing is '<string id="day_of_week" value=""/>'. Using a formula you can change this to find the day of the week easily from the previous worksheet. I used "=CONCATENATE(LEFT(C1,32),fixtures!E2,RIGHT(C1,3))", and similar ones for the rest. As for the cells that didn't need extra data, it was a case of equalling the first cell (e.g. "=B$1"). Once this was done, you could drag the formula all the way down to get the fixtures. I've attached the file to this so you can check out the exact worksheet I used so you can create your own. Lastly, you can use the xml data and paste it into an FM XML file. I just found the EFL fixtures, pasted that into the EPL file and overwrote the main fixtures part with the one from the worksheet. I've attached that file too so you can see the EPL Fixtures in the editor. So why go through all this, it seems like a lot of work from what I've written? If you've had to do this before, you'll know how long inputting fixtures into FM can take. This has taken me from 09:21 when I saved the original fixture list, to 10:04 when I saved the FM XML file with the fixtures formatted. A total of 43 minutes for 380 fixtures. And once you've done this only once, it becomes quicker the second time, and you can use this as a basis to edit other things like records and histories into the game. You could even use it to add players, although I have not done it. You just need to add a few records into the same and save the file as an xml to check the data and how it is formatted. Then you can identify what you need and implement a worksheet with Excel for what you need. I'm hoping to bring out more content like this in the future, please let me know if you found this useful or interesting! And please feel free to ask questions if you think I have missed something or if you think there is another way the work can be improved. EPL Fixtures Workbook.xlsx EPL Fixtures.xml