View Single Post
Old 01-23-2016, 06:29 PM   #5
NoOne
Banned
 
Join Date: Apr 2015
Posts: 7,273
Infractions: 0/1 (3)
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