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 > Prior Versions of Our Games > Out of the Park Baseball 16 > OOTP 16 - General Discussions

OOTP 16 - General Discussions Discuss the new 2015 version of Out of the Park Baseball here!

Reply
 
Thread Tools
Old 01-23-2016, 01:50 PM   #1
D Love
All Star Reserve
 
Join Date: Mar 2002
Location: Queens, NY
Posts: 904
Historical Player Import

So I am getting error messages when trying to import an individual historical player. I was trying to import a fictional player (from pre-OOTP seasons of my fictional league) whose info was entered into csv files mirroring the Lahman database format. After many failures, I figured I must've entered something incorrectly.

So I tried to import a real player from the actual Lahman database files that I downloaded. But I'm still getting an error. I've clicked off importing historical stats but to no avail.

Anyone have any idea what might be the issue if I am using (1) the latest Lahman set of files and (2) have the player code entered correctly?

Also, I don't know what an ODB file is, but am I better off using a historical_database.odb file rather than the master.csv? And if so, can I (a non-programmer type) intuitively figure out how to edit the odb file so I can add my fictional player stats?
D Love is offline   Reply With Quote
Old 01-23-2016, 04:25 PM   #2
D Love
All Star Reserve
 
Join Date: Mar 2002
Location: Queens, NY
Posts: 904
OK, so I kept experimenting and using historical_database.odb works but not master.csv... so does anyone know how I can edit an odb file to have it contain that historical info for fictional players that I currently have in Lahman database format?
D Love is offline   Reply With Quote
Old 01-23-2016, 04:51 PM   #3
NoOne
Banned
 
Join Date: Apr 2015
Posts: 7,273
Infractions: 1/2 (4)
any db program should work for the type of things you want to do. if it's one entry you don't even have to learn sql, if you don't want

the key is that you cannot create a playerid by merely adding it to the CSV or ODB file. a playerid must be created within the game, first. then, you can copy over that playerid's data with the information from the player you intend to import. (make sure team id is matching the new league's id for that team. limited exp on what doesn't work, but that could potentially trip it up too)

there are multiple tables contributing to the 1 table you see in those exports. that is just a report of information, not the actual database nor its structure. each table has a field that links related tables. if you change a playerid, the import function doesn't change it in all related tables. so, you now have a big problem.

as long as you re-use existing playerids and sans errors like wrong team ids etc... everything should work fine.

Last edited by NoOne; 01-23-2016 at 05:07 PM.
NoOne is offline   Reply With Quote
Old 01-23-2016, 05:00 PM   #4
D Love
All Star Reserve
 
Join Date: Mar 2002
Location: Queens, NY
Posts: 904
Thanks. Sorry for what may be a dumb question, but if I created a fictional test league and was able to import David Aardsma, why would would his ID have come from within the game as opposed to from the Lahman database? Are you saying that OOTP effectively has these Lahman IDs hardcoded in so every league, whether fictional or not, will only recognize (1) players created in the fictional league or (2) historical players listed in Lahman?

And unfortunately, it would've been so easy to tinker with the csv files but I can't get a successful import that way, even with Mr. Aardsma, who worked as an import from the ODB.

Last edited by D Love; 01-23-2016 at 05:03 PM.
D Love is offline   Reply With Quote
Old 01-23-2016, 06:29 PM   #5
NoOne
Banned
 
Join Date: Apr 2015
Posts: 7,273
Infractions: 1/2 (4)
Quote:
Originally Posted by D Love View Post
Thanks. Sorry for what may be a dumb question, but if I created a fictional test league and was able to import David Aardsma, why would would his ID have come from within the game as opposed to from the Lahman database? Are you saying that OOTP effectively has these Lahman IDs hardcoded in so every league, whether fictional or not, will only recognize (1) players created in the fictional league or (2) historical players listed in Lahman?

And unfortunately, it would've been so easy to tinker with the csv files but I can't get a successful import that way, even with Mr. Aardsma, who worked as an import from the ODB.
Edit: the csv files will work. unless the import procedure is different, something else cause one to work while the other did not. i've successfully imported players from a fictional league 50 years inthe future to a new league starting in 2015. i only used the csv files. (the text format you choose to save the csv as can affect accents displaying correctly) the only difference between the types of export should be file format and what you use to read it.

okay, i'm not sure what matches up where..

lahman is external? not even going to look at that, if so.

the playerid's in the game must be unique. if you import another player of the same id, something will not work. if oyu import a playerid that doesn't exist in all other relevant tables within the database, it will not work.

(will not work = limited functionality or data integrity issues or bad feedback to you etc...)

the game creates playerIDs each time a game is created, from what i understand. if it's real players, it's possible they have the same player id each time you create the league. not important either way.

if there is a lahman db import feature or mod, that is different than editing exported csv or database files. never used sucha thing, not up on that stuff.
____________
E.G.
the game gets created with 1-10 player ids.

several tables are related by this field "playerid". google "relational database" if you don't know what i mean by this.

the re-import probably doesn't touch all the tables that it exists in. so, if oyu import a player with playerID=11, the game isn't going to display him correctly, because that playerid doesn't exist in some tables or doesn't matchup between tables in that league's database - or even a possible duplicate whch wil have it's own set of debilitating problems.

the import/export feature cannot create new players and isn't intended to do so. it's literally not written to do that, whether on purpose or just for sh&ts and grins. so, the playerid's must exist prior to import.
------

since it's one player doing this might be slower than just manually editing a scrub in game: (assuming you have basic understanding of spreadhseets, leaving that stuff out)

export players and the stats from your league. i'm assuming you have a file with teh historical player's data and ratings??? have that handy to copy/paste when/where necessary.

while still in the game: find some scrub free agent or team player you don't care for. write down his ID from the player editor. search for that playerid in the 2 exported files. copy and paste new ratings and stats, except for the player ID. that must remain the same. also, make sure the team ID is a valid one. you can find these in the league settings-> league structure or thereabouts. (year of birth is a concern in some instances - edit that if needed.)

team id are alphabitical order, so if you know one teamid value, you know them all. they don't start necessarily at 1. in fact, i've never seen it start at 1 for the my major league teams.

re-import those files. search for your newly imported player. it should be there.

edit: if you don't want to change an existing player, create a player in the game and write down that new player id.

Last edited by NoOne; 01-23-2016 at 07:01 PM.
NoOne is offline   Reply With Quote
Old 01-30-2016, 11:38 PM   #6
D Love
All Star Reserve
 
Join Date: Mar 2002
Location: Queens, NY
Posts: 904
Alright... so I'm having no luck with importing fictional players using Lahman formatted files... so as a test, I simply took the original files and tried importing Hank Aaron. It worked.

So then I edited Master.csv to change Hank Aaron's name to "Mike Smith". I tried importing his ID and it worked... except his name is still Hank Aaron even though that name is no longer in master.csv.

I'm perplexed. Anyone else have an idea of how Lahman works?
D Love is offline   Reply With Quote
Old 01-31-2016, 01:09 AM   #7
Spritze
OOTP Historical Czar
 
Spritze's Avatar
 
Join Date: Dec 2001
Location: Bothell Wa
Posts: 7,253
1) OOTP does not use standard Lahman CSV files, lots of things are added to that base
2) The ODB files are not editable.
3) If the ODB files exist in the folder they will always be used instead of any edited CSV files.
__________________
It's madness, madness, I tell you! For the love of God, don't do it!
Spritze 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 06:47 AM.

 

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