Eastside Hockey Manager - Part IX Maybe 1.5 Edition?

Status
Not open for further replies.

BKarchitect

Registered User
Oct 12, 2017
7,437
12,872
Kansas City, MO
I have no idea what you guys are talking about but super pumped to see the batch function for the jersey editor ;)

If generation times are still long is there a way you can have it generate for only selected leagues or maybe above a CA or PA threshold?
 

archibalduk

EHM The Blue Line
Oct 29, 2005
391
349
England
Multi-threading is basically parallel processing. Modern CPUs have the ability to run multiple threads simultaneously. So instead of generating one jersey at a time, it can generate multiple jerseys simultaneously.

It's taking about 10 minutes to do 73,000 images which doesn't seem too bad. Annoyingly it crashed towards the end but I'm not sure why as it works with smaller batches of images. It might be that a player name wasn't a valid file name or maybe too many files in a folder. Windows really doesn't seem to cope well with several thousand images in a folder.

The Editor lets you export jersey data for selected leagues and/or nationalities, so that's one way of filtering it. I can add CA and PA to the spreadsheet or I can export reputation - which set of data would be preferable?
 
  • Like
Reactions: Beef Cake

xECK29x

Moderator
Sponsor
Jul 19, 2006
18,053
11,565
Deer Park, NY
Multi-threading is basically parallel processing. Modern CPUs have the ability to run multiple threads simultaneously. So instead of generating one jersey at a time, it can generate multiple jerseys simultaneously.

It's taking about 10 minutes to do 73,000 images which doesn't seem too bad. Annoyingly it crashed towards the end but I'm not sure why as it works with smaller batches of images. It might be that a player name wasn't a valid file name or maybe too many files in a folder. Windows really doesn't seem to cope well with several thousand images in a folder.

The Editor lets you export jersey data for selected leagues and/or nationalities, so that's one way of filtering it. I can add CA and PA to the spreadsheet or I can export reputation - which set of data would be preferable?

I’d filter on per-league and list of clubs, not sure I’d allow such large batches like the entirety of the DB.

Can we also have a “default” color scheme option (like matching the EHM default skin and BKs Modern skin)?
 

BKarchitect

Registered User
Oct 12, 2017
7,437
12,872
Kansas City, MO
I thought PA might be kind of a cool way to filter because you could set a limit (say '100') and then in your saved game - on junior type teams only the players who would seriously worth scouting would have a jersey. Kind of like an early scout filter...not so much that it gives the game away but enough that when you cycle thru a random J18 team in Sweden or a Minnesota HS team, you can start to see some guys who may be worth following because they show up with a jersey image.

I mean - in theory you could set it really high to like 160 to identify stars but then a majority of NHL players wouldn't get a jersey either.

Just a thought on how that could be used...but don't want to complicate it too much.
 

FreshBlood

Registered User
Feb 5, 2011
122
58
Yup I am already planning on:

- Combined Aussie+NZ
- Combined Balkan league
- Combined Baltic league

Some of these countries have very small and limited domestic leagues so this will allow some more fleshed out competitions IMO.

Any updates on Baltic league?
 

archibalduk

EHM The Blue Line
Oct 29, 2005
391
349
England
Here's beta v5 of the EHM Jersey Generator: Release v1.0.0-beta.5 · archibalduk/EHM_Jersey_Generator (github.com) (click on the "EHM.Jersey.Generator.v1.0.0-beta.5.zip" link at the bottom of the page underneath the "Assets" heading.

You will also need to download v0.5.1 of the EHM Editor: Eastside Hockey Manager Editor (v0.5.1) [BETA] - EHM The Blue Line

IMPORTANT!
(a) I accidentally included old spreadsheets with the release, so I have re-uploaded with the up-to-date spreadsheets. If you downloaded beta v5 before I posted this on HFBoards then you will need to re-download.
(b) Please delete any existing Generator installation folder - i.e. do NOT extract the downloaded zip over your existing installation. I renamed the various layer image file names and so you'll end up with a lot of duplicates if you just overwrite your existing installation.

Here's how to use the batch processing:

STEP 1: EHM Editor
(a) Open your database or saved game in the EHM Editor;
(b) Click on File -> Export Spreadsheet;
(c) Select "Jersey Generator Data" from the left-hand menu;
(d) OPTIONAL: You can add Club Competition and Nation filters if you wish, but you can leave them both blank if you want to export everything;
(e) Click on the Export Data button and make sure you save as XLSX. This will create two spreadsheets - one by Club Contracted and one by Club Playing For; and
(f) Exit the Editor.

STEP 2: Optional
You may want to cut down the number of players included in your spreadsheet or to split the spreadsheet into a number of batches. I'm getting around 205 jerseys generated per second at the moment but YMMV as performance will depend on your CPU and hard drive.

STEP 3: EHM Jersey Generator
(a) Open the EHM Jersey Generator;
(b) Change any settings from the left-hand menu that you want to change. I have added an Image Quality setting which can be set to -1 (use system default of any value between 0 (lowest quality, highest compression) and 100 (highest quality, lowest compression). I cannot see any visual difference between the lowest and highest quality settings but the file size difference is significant. I'd recommend either setting this to zero or leave it at -1;
(c) Click on the Batch tab;
(d) Click on the Browse button next to the "Player data" row and select the spreadsheet you exported from the Editor;
(e) Click on the Browse button next to the "Output folder" row and select where you want to save your exported jerseys. I'd strongly recommend selecting an empty folder; and
(f) Click on the Generate Jerseys button.

JERSEY DESIGN FILES:
You will find two spreadsheets in the Generator installation folder:

(1) team_jerseys.xlsx - This sets out the layer design schemes for specific teams. You can add any team or nation you like to this spreadsheet. The format should be self-explanatory but let me know if you have any questions. I have added all of the NHL teams as examples but the presets in the "Presets" folder take precedence over the Team Jerseys spreadsheet. If anybody sets up any additional team-specific jersey designs, please do share them and I'll add them to future releases.

(2) generic_jerseys.xlsx - This sets out combinations of jerseys which will be used where the team/nation in question does not have a preset in the "Presets" folder and there is no team/nation-specific design in the Team Jerseys spreadsheet. I have added around 65+ designs which should help provide some variety. As with the above, please do share any additional generic designs and I'll add them to future releases. Ideally, I'd like to get to around 100 generic designs.

CHANGELIST:
* Added batch jersey generation;
* Added image quality setting (-1 = default, 0 = lowest quality, 100 = highest quality);
* Added jersey layers for the remaining NHL teams;
* Added on-the-fly updates to the jersey preview each time a different layer or preset is selected;
* Any foreground or trim layer design can be selected for any foreground or trim layer;
* Changed the default colours in the preview screen in order to provide a greater contrast against the window background; and
* Fixed invalid two-tone colours beyond an RGB value of 255 being generated.

KNOWN ISSUES / TO-DO:
(1) I have just noticed that the Generator processes the header row from the spreadsheet as a player and misses the final row. I'll fix this in the next release. In the meantime, you could delete the header row from the spreadsheet insert a dummy row as a final row in the spreadsheet.
(2) I haven't yet sorted out the long names issue, so you will find that long names won't fit properly on the jersey.
(3) I have come across a font error when running the Generator through my IDE. The error won't pop-up in the Generator though. It's a rare issue and I need to narrow it down. I encountered it roughly ten times when processing over 73,000 jerseys, so it's pretty rare!
(4) The Generator crashed about 90% or 95% through the 73,000 test. I suspect that this may be a weird player name resulting in an invalid file name. I suggest keeping spreadsheets relatively small (e.g. batches of say 10,000). If you come across the issue then send the spreadsheet over to me and I'll try to debug it.
(5) I have done very little checking of player names yet. If you come across any issues with player names or DOBs which don't work with EHM then let me know. The Generator should save the files using European date format but obviously I cannot verify this beyond my own (European) system.
(6) The Batch screen hasn't yet been tidied up as I want to add some settings before I start finalising the screen.
(7) Some colour schemes in the DB have a trim colour similar to the background colour which then results in an invisible or barely visible jersey name and number. I'll add something to automatically use the foreground colour for the name and number where the trim colour is too similar.
 

archibalduk

EHM The Blue Line
Oct 29, 2005
391
349
England
I’d filter on per-league and list of clubs, not sure I’d allow such large batches like the entirety of the DB.

Can we also have a “default” color scheme option (like matching the EHM default skin and BKs Modern skin)?

Presently you can set the colours via the spreadsheet exported from the Editor, so this is possible. I might be able to add a setting to override the colour schemes from the spreadsheet and instead use a single colour scheme.

I thought PA might be kind of a cool way to filter because you could set a limit (say '100') and then in your saved game - on junior type teams only the players who would seriously worth scouting would have a jersey. Kind of like an early scout filter...not so much that it gives the game away but enough that when you cycle thru a random J18 team in Sweden or a Minnesota HS team, you can start to see some guys who may be worth following because they show up with a jersey image.

I mean - in theory you could set it really high to like 160 to identify stars but then a majority of NHL players wouldn't get a jersey either.

Just a thought on how that could be used...but don't want to complicate it too much.

I've added PA to the spreadsheet, so it should be easy to filter (due to a limitation with the Editor, the column is treated as text rather than numbers. It's on my list to fix but it's a big task, so I've been putting it off). See how you get on with how things are and let me know if it turns out to be a bit of a faff and we can have a think about how to streamline things futher.
 

NoQuitInNewMexico

Registered User
Jan 7, 2011
6,563
3,370
new mexico lol
The FM modders are also doing good work with the (creepy! I'm not gonna lie!) neural network faces, figure something like that can be used with a similar batch method. I kind of dabbled in it a few years ago using the spreadsheet data + the already existing player faces in the folder, but I can't find my old post.

NewGAN Manager v1.2.0 | FM Scout

upload_2021-3-6_17-6-49.png
 
Last edited:

Beef Cake

Registered User
Aug 10, 2016
251
367
@archibalduk

So what I did was renamed my current player picture folder to 1players and made a new players folder, set that as output.

Ran all 70k+ in the TBL DB while I made a quick lunch and no issues there, everything was exported straight into my game before I was back.
 

Attachments

  • Hughes.PNG
    Hughes.PNG
    25.2 KB · Views: 12

BKarchitect

Registered User
Oct 12, 2017
7,437
12,872
Kansas City, MO
Any updates on Baltic league?

No I blame archi for no progress on any of my DB since I've been screwing around playing in the jersey generator ;)

Cursory look - as of 20/21 there are 7 Latvian clubs and 5 each in Lithuania and Estonia top divisions (17 total). I'd like to narrow the scope down to 12 clubs...the Latvian league is naturally a little stronger so maybe final make-up would be 6 Latvia, 3 Lithuania, 3 Estonia (or even take all 7 Latvian clubs and add the 5 best options from Lithuania and Estonia) - taking the strongest/most history rich of the clubs and/or maybe making a new expansion franchise in Lithuania and Estonia that could arrive as clubs with higher intent than the traditional clubs in those countries. Riga will stay in the KHL of course.

If you are familiar with hockey in that region I am open to suggestions, otherwise I generally just scroll through league history and geography to try and pick the higher performing clubs to make the cut to the new league.

Edit: May bump the league to 14 for variety actually...but I'm probably not going to go higher than that for club count. 7 Latvian clubs and 7 between Lithuania and Estonia.
 
  • Like
Reactions: archibalduk

archibalduk

EHM The Blue Line
Oct 29, 2005
391
349
England
@archibalduk

So what I did was renamed my current player picture folder to 1players and made a new players folder, set that as output.

Ran all 70k+ in the TBL DB while I made a quick lunch and no issues there, everything was exported straight into my game before I was back.

Great to hear! Thanks for letting me know.
 

BKarchitect

Registered User
Oct 12, 2017
7,437
12,872
Kansas City, MO
I'd say whole process from export to working in game was between 5-10 minutes.

Thanks for doing this!

Really nice doing this like Mid August after the draft:

Love it - I know many will still prefer photos of players when possible and that's cool too but I think the universal application of this adds a huge amount of graphical consistency and upgrade to the game.

I feel like archi's done the legwork - now we need to get Riz to implement as an in-game feature someday so the jersey generation is automatic!
 

Beef Cake

Registered User
Aug 10, 2016
251
367
Love it - I know many will still prefer photos of players when possible and that's cool too but I think the universal application of this adds a huge amount of graphical consistency and upgrade to the game.

I feel like archi's done the legwork - now we need to get Riz to implement as an in-game feature someday so the jersey generation is automatic!


I'm thinking how cool the jersey retirement notification will be. Or if we get front facing and we can get Captains!

For online it's nice as it gives more consistency across the board.

Offline I'm already loving it, being able to make a big trade, save and import and have everything up to date is amazing. Fantasy draft guys will love this.

I'm thinking even with my 00DB being able to do an inital facepack at the time and release it for people who don't want to figure this out but want something more than a blank slate is really nice. We can even do a very neutral nationality based jersey/facepack too.
 

FreshBlood

Registered User
Feb 5, 2011
122
58
No I blame archi for no progress on any of my DB since I've been screwing around playing in the jersey generator ;)

Cursory look - as of 20/21 there are 7 Latvian clubs and 5 each in Lithuania and Estonia top divisions (17 total). I'd like to narrow the scope down to 12 clubs...the Latvian league is naturally a little stronger so maybe final make-up would be 6 Latvia, 3 Lithuania, 3 Estonia (or even take all 7 Latvian clubs and add the 5 best options from Lithuania and Estonia) - taking the strongest/most history rich of the clubs and/or maybe making a new expansion franchise in Lithuania and Estonia that could arrive as clubs with higher intent than the traditional clubs in those countries. Riga will stay in the KHL of course.

If you are familiar with hockey in that region I am open to suggestions, otherwise I generally just scroll through league history and geography to try and pick the higher performing clubs to make the cut to the new league.

Edit: May bump the league to 14 for variety actually...but I'm probably not going to go higher than that for club count. 7 Latvian clubs and 7 between Lithuania and Estonia.

Would you like to go up to 20 teams? Maybe bring in 3 more latvian teams (HK Riga 2000, HK Liepajas Metalurgs, ASK/Ogre) if not then just replace them with 3 worst existing teams? Those 3 teams have some big history in latvian hockey. And of the day ill be happy with whatever you come out with. ;)
 

GagneHanson12

Registered User
Aug 15, 2011
347
389
Trying this now, looks absolutely awesome. Do you happen to know what the word is for later game play? I'm currently in 2040 on my latest save and if possible would like to try to get this generator working for that with the current for my save rosters.
 

Beef Cake

Registered User
Aug 10, 2016
251
367
Trying this now, looks absolutely awesome. Do you happen to know what the word is for later game play? I'm currently in 2040 on my latest save and if possible would like to try to get this generator working for that with the current for my save rosters.

Shouldn't be any issues, depending what your initial DB was though the jerseys might not be an exact match
 
  • Like
Reactions: GagneHanson12

archibalduk

EHM The Blue Line
Oct 29, 2005
391
349
England
Trying this now, looks absolutely awesome. Do you happen to know what the word is for later game play? I'm currently in 2040 on my latest save and if possible would like to try to get this generator working for that with the current for my save rosters.

Yes, just follow the instructions I posted above and select your saved game at the point at which you select a DB/saved game to open in the Editor at the first step.
 
  • Like
Reactions: GagneHanson12

GagneHanson12

Registered User
Aug 15, 2011
347
389
Thanks for the help guys, got it working properly. One question (it may have been discussed before but I couldn't find it), what number for the player (fav number, assigned by team number, etc) is picked for the jersey?
 

archibalduk

EHM The Blue Line
Oct 29, 2005
391
349
England
It's the team jersey number but if one isn't assigned then it'll be the national team jersey number. If there's no national team jersey number either then it's the favourite jersey number.
 
  • Like
Reactions: GagneHanson12
Status
Not open for further replies.

Ad

Upcoming events

Ad

Ad