Home | Webstore
Latest News: OOTP 26 Available - FHM 11 Available - OOTP Go! Available

Out of the Park Baseball 26 Buy Now!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 26 > OOTP Mods > OOTP Mods - Rosters, Photos, and Quick-Starts

Reply
 
Thread Tools
Old 12-30-2023, 08:01 PM   #1
The Game
Hall Of Famer
 
The Game's Avatar
 
Join Date: Feb 2012
Location: Inside The Game
Posts: 30,937
Is There an Easier Way to Mass Import NLB Players?

I have the file below that was given to be by Mitchkenn, I think, but in order to upload them i have to weirdly copy aspects of them and then paster it into a new txt file. i want to know if there is an easier way.


I am working on an All NLB file. 44 teams, every player all at once. Editing this file is tedious and could take me all 2024.
Attached Files
File Type: csv NegroLeaguePlayerList -1.csv (153.5 KB, 113 views)
__________________
Go today don't wait for tomorrow
It isn't promised, all the time you get borrowed
Don't live your life for other people
Don't bottle your emotions till they crack and fill a couple just sorrows
Take your mind and refocus go get a paper write your goals out
Throw your middle fingers to all your haters


"Stay Strong"


The Game is offline   Reply With Quote
Old 01-01-2024, 05:39 PM   #2
Cod
All Star Starter
 
Cod's Avatar
 
Join Date: Nov 2009
Location: Fort Worth, TX
Posts: 1,088
What columns do you want in the text file? BBrefMinorsID and debutYear? I wrote a quick python script that converted the entire CSV to a txt file (see attached). Obviously it needs to be comma delineated with the correct columns, but I could probably put something together in a few mins.

EDIT: Made another text file with just ID and debut year (forOOTP.txt).
Attached Files
File Type: txt NegroLeaguePlayerList-1.txt (153.5 KB, 132 views)
File Type: txt forOOTP.txt (64.5 KB, 136 views)

Last edited by Cod; 01-01-2024 at 05:49 PM.
Cod is offline   Reply With Quote
Old 01-03-2024, 07:23 AM   #3
The Game
Hall Of Famer
 
The Game's Avatar
 
Join Date: Feb 2012
Location: Inside The Game
Posts: 30,937
Quote:
Originally Posted by Cod View Post
What columns do you want in the text file? BBrefMinorsID and debutYear? I wrote a quick python script that converted the entire CSV to a txt file (see attached). Obviously it needs to be comma delineated with the correct columns, but I could probably put something together in a few mins.

EDIT: Made another text file with just ID and debut year (forOOTP.txt).
That worked great. Around 300 players didn;t seem to import but the IDs are different to my knowledge. Now i just have to figure out why many stars rating suck compared to when I imported them in other leagues.


Thank You.
Attached Images
Image Image Image Image Image 
__________________
Go today don't wait for tomorrow
It isn't promised, all the time you get borrowed
Don't live your life for other people
Don't bottle your emotions till they crack and fill a couple just sorrows
Take your mind and refocus go get a paper write your goals out
Throw your middle fingers to all your haters


"Stay Strong"


The Game is offline   Reply With Quote
Old 01-03-2024, 09:18 AM   #4
Cod
All Star Starter
 
Cod's Avatar
 
Join Date: Nov 2009
Location: Fort Worth, TX
Posts: 1,088
Glad it worked. Seeing Norman "Turkey" Stearnes as one star hurts my heart . Hope you get it sorted out. If you need me to make any adjustments to the script, I can do that as well when I have time.
Cod is offline   Reply With Quote
Old 01-04-2024, 02:17 PM   #5
The Game
Hall Of Famer
 
The Game's Avatar
 
Join Date: Feb 2012
Location: Inside The Game
Posts: 30,937
Quote:
Originally Posted by Cod View Post
Glad it worked. Seeing Norman "Turkey" Stearnes as one star hurts my heart . Hope you get it sorted out. If you need me to make any adjustments to the script, I can do that as well when I have time.
He's great in my EBL vs MLB save.So not sure what i did differently when i imported him.
Attached Images
Image Image 
__________________
Go today don't wait for tomorrow
It isn't promised, all the time you get borrowed
Don't live your life for other people
Don't bottle your emotions till they crack and fill a couple just sorrows
Take your mind and refocus go get a paper write your goals out
Throw your middle fingers to all your haters


"Stay Strong"



Last edited by The Game; 01-04-2024 at 02:18 PM.
The Game is offline   Reply With Quote
Old 01-04-2024, 05:46 PM   #6
percolaten
All Star Reserve
 
percolaten's Avatar
 
Join Date: Oct 2021
Location: West
Posts: 724
Could one of you please tell me how I can mass import historical MLB players?
percolaten is offline   Reply With Quote
Old 01-04-2024, 08:49 PM   #7
LansdowneSt
Global Moderator
 
Join Date: Feb 2004
Location: From Duxbury, Mass residing Baltimore
Posts: 7,172
Quote:
Originally Posted by percolaten View Post
Could one of you please tell me how I can mass import historical MLB players?
How mass are we talking? Is there any common theme? All of a particular debut year? The all-time WAR leaderboard of the Diamondbacks? How broken up can it be?
__________________
Complete Universe Facegen Pack 2.0 (mine included)
https://www.mediafire.com/file_premi...k_2.0.zip/file

Just my Facegen Pack: https://www.mediafire.com/file_premi..._Pack.zip/file
LansdowneSt is offline   Reply With Quote
Old 01-04-2024, 10:07 PM   #8
percolaten
All Star Reserve
 
percolaten's Avatar
 
Join Date: Oct 2021
Location: West
Posts: 724
Lans,
I'm thinking along the lines of something like, say, every player from the D-Backs, 1999-2003, from each individual season. So in this example, there'd be 5 Gonzos in there, but one Reggie Sanders from the one season he was with the club.
percolaten is offline   Reply With Quote
Old 01-04-2024, 10:40 PM   #9
LansdowneSt
Global Moderator
 
Join Date: Feb 2004
Location: From Duxbury, Mass residing Baltimore
Posts: 7,172
Quote:
Originally Posted by percolaten View Post
Lans,
I'm thinking along the lines of something like, say, every player from the D-Backs, 1999-2003, from each individual season. So in this example, there'd be 5 Gonzos in there, but one Reggie Sanders from the one season he was with the club.
That should be easy enough. Don't even need Stathead for that.

Start here: https://www.baseball-reference.com/t...9-roster.shtml

Select that table with all the names like you are doing in an ordinary highlight selection. Then copy it. Then paste it into Excel.

You will have a nice bunch of columns reflecting that very table. Name, Age, Country, Bats, Throws... etc. Color the bottom row (the one with the last guy on the roster list so you know he is the last guy in 1999).

Repeat this for every year.

Then delete all the columns except the name (which pasted as a hyperlink). You should have just a list of the names with that colored fill line marking every year break.

Not in the column to the right of that name list, but the next column (So if names are in column A go to column C) and then put 1999 in column C for every row that is populated until you get to that first colored line (who also gets 1999.) Then after that line you know the 2000 guys start so add 2000 in their column C. (also delete any of the headers from these additional year pastings). Repeat for all the years you posted.

Then save that Excel sheet as a Macro-enabled Excel sheet (these end in .xlsm). Then go to the Developer tab and select "Virtual Basic". That opens a box with its own header. From that new header, select "Insert" and then select "Module" and a big blank white space you can type in appears. Paste this into that page:

Sub ExtractHL()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next
End Sub

Then go back to the box header and select "Run" and from that list choose the option "Run/SubUserForm". Close out of that Developer area now.

You can now see why we left column B blank. The hyperlinks of the names from column A are extracted into Column B. Select column B in its entirety and pull up Find and Replace. Find "https://www.baseball-reference.com/players/*/" - notice my wildcard asterisk. That's important. Leave the "Replace" line blank since we want to delete that part of the web address. Now repeat the find and replace with ".shtml". See that we have removed the other part of the link we didn't need.

Column B is just the import code now for all those players - and you have their year in Column C. That code still is a hyperlink though, so go and highlight all of column B again and right click. Select "Remove hyperlink".

Delete Column A. Delete blank columns on the left so that the IDs are in Column A and the years in Column B.

Save that macro-enabled Excel file as a .csv file. Convert that .csv file to a text file and you should have the code, a comma and then the year. That's the mass import text file.

I do this all the time (except the .csv to .txt. conversion) but that should work as described. It seems like a lot when I type it out but it's just a lot of clicks that you get used to.

You know how to find me if you need a hand in any of the steps. Good luck!
__________________
Complete Universe Facegen Pack 2.0 (mine included)
https://www.mediafire.com/file_premi...k_2.0.zip/file

Just my Facegen Pack: https://www.mediafire.com/file_premi..._Pack.zip/file

Last edited by LansdowneSt; 01-05-2024 at 12:03 AM. Reason: typo
LansdowneSt is offline   Reply With Quote
Old 01-04-2024, 11:42 PM   #10
percolaten
All Star Reserve
 
percolaten's Avatar
 
Join Date: Oct 2021
Location: West
Posts: 724
Thank you for taking the time to explain how! Just read this, will try it out now.
percolaten is offline   Reply With Quote
Old 01-05-2024, 06:49 AM   #11
luckymann
Hall Of Famer
 
Join Date: Nov 2019
Posts: 13,021
Quote:
Originally Posted by The Game View Post
I have the file below that was given to be by Mitchkenn, I think, but in order to upload them i have to weirdly copy aspects of them and then paster it into a new txt file. i want to know if there is an easier way.


I am working on an All NLB file. 44 teams, every player all at once. Editing this file is tedious and could take me all 2024.
This is how I do it on Mac.
  1. Copy the ID and debut year for each player to be imported into the first two columns of a new .xlsx file.
  2. Save that file as your backup copy.
  3. Save it again as a normal .csv file
  4. Manually change the .csv suffix in your file directory to .txt

That file is the one you add in the IMPORT HISTORICAL PLAYERS dialogue box, with minors DB selected and all the other settings EG make bads you want.

Works a treat for me, without fail. not sure you can do the same on Windows, though.


Now regarding that old file we've both been using for ages. The issue is that for 24, a project began to bring those old 049 IDs into line with BBRef. so many of them no longer work. So I normally keep the players names in the original .xlsx file I create (then delete them in the .csv copy) for ready reference after you do the import so you can see which one(s) didn't go through.

I am SLOWLY fixing that file as I do new imports into my Everyman League save, but that is only one season every fortnight or so. Like your project, that means it is some way off completion.

Hope that helps.

G
__________________
HISTORICAL DO-OVERS

A'S

RED SOX

DODGERS



CUSTOM SAVES

ECLIPSE LEAGUE MOON SHOT LEAGUE

EVERYMAN LEAGUE
GULF LEAGUE

USBA
luckymann is offline   Reply With Quote
Old 01-05-2024, 11:36 AM   #12
The Game
Hall Of Famer
 
The Game's Avatar
 
Join Date: Feb 2012
Location: Inside The Game
Posts: 30,937
Quote:
Originally Posted by percolaten View Post
Lans,
I'm thinking along the lines of something like, say, every player from the D-Backs, 1999-2003, from each individual season. So in this example, there'd be 5 Gonzos in there, but one Reggie Sanders from the one season he was with the club.
Landowne's way is probably more accurate but the way i did my All Sox Players Baseball League was
I created a Custom League with real teams with all the White Sox 1901 - 2022.
i dumped all players into FA pool.
Sorted them by name.
I then went in and deleted all players keeping only the players with their 1st year in a Sox jersey.
Then I imported all players using their BBREF ID for players that were traded to the Sox but were not on the team the next season.
It took me 2 days.
I then created my 50 team ASPBL
Ran a FA draft.
I do have several errors though. For some reason i have both the 1902 Cubs & 902 White Sox. i am missing 22 players that were traded to the Sox prior to FA that also later played for the Sox, Meaning i have their 1st full season not their partial season.
see more below
https://forums.ootpdevelopments.com/...76#post5052976

You could also just pull up each players BBREF ID and right click copy them all into a notepad file.5 years should only take an hour or 2.i don't have excel or a free version of it.
__________________
Go today don't wait for tomorrow
It isn't promised, all the time you get borrowed
Don't live your life for other people
Don't bottle your emotions till they crack and fill a couple just sorrows
Take your mind and refocus go get a paper write your goals out
Throw your middle fingers to all your haters


"Stay Strong"



Last edited by The Game; 01-05-2024 at 11:40 AM.
The Game is offline   Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:59 PM.

 

Major League and Minor League Baseball trademarks and copyrights are used with permission of Major League Baseball. Visit MLB.com and MiLB.com.

Officially Licensed Product – MLB Players, Inc.

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2023 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright © 2024 Out of the Park Developments