Latest News: OOTP PATCH 9.1.6 released! - OOTP 9 RELEASED! - Title Bout Championship Boxing 2.5 released! - OOTP 2007 receives Editors Choice Award from PC Gamer - Inside the Park Baseball Patch 1.03 released, DEMO now available

Click here to download Out of the Park Baseball 9!

Go Back   OOTP Developments Forums > OUT OF THE PARK BASEBALL 9 > OOTP 9 - Mods
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

OOTP 9 - Mods Logos, roster packs, historical databases, OOTP tools, FaceGen files... it's all here!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-30-2007, 03:46 PM   #1 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Teams Importer

Hot on the heels of the importer of parks.csv, I'm about half way through coding up an importer of all the teams*.csv's back into a teams.dat file.

This will allow you to add history to your teams, or delete history by removing relevant rows from the files etc...
Tony M is online now   Reply With Quote
Old 06-01-2007, 03:57 PM   #2 (permalink)
Major Leagues
 
DCHepler25's Avatar
 
Join Date: Jul 2002
Location: On the edge of Insanity.
Posts: 380
Any chance this will include team financials? Or, how about a mod that reads the financials.csv from a dump back into the necessary .dat files? If that doesn't already exist. If so, can someone point me in the right direction?

Thanks, and good work on the ballpark importer. It works great and makes editing much easier than the in-game method!
__________________
This is my new signature. Feel free to steal it and call it your own
DCHepler25 is offline   Reply With Quote
Old 06-01-2007, 04:55 PM   #3 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Quote:
Originally Posted by DCHepler25 View Post
Any chance this will include team financials? Or, how about a mod that reads the financials.csv from a dump back into the necessary .dat files? If that doesn't already exist. If so, can someone point me in the right direction?

Thanks, and good work on the ballpark importer. It works great and makes editing much easier than the in-game method!
If you download the Stadium importer from http://www.bourtonville.co.uk/OOTPStadium.zip it now has an import teams from ootp csv button.

It does financials - it took a bit of programming to get it correct because the financials are stored year by year in the history but the regular team record has current financials and last season financials (redundancy I assume put in for speed on the Front Office screen). There are also two fields in the team record that store the end balance for last season and current season and I've just zeroed them because I can't see a way to work them out because there are figures that just say 'total from trades' etc. These being zeroed might cause a following year budget to be higher or lower...

The only thing I know you will lose when importing from csv is your depth charts/lineups and pitching setup as these aren't exported anywhere. There is probably other stuff that is lost, but it's nothing that is obviously up front.
Tony M is online now   Reply With Quote
Old 06-01-2007, 05:12 PM   #4 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
note,

this only works for ootp2007 created csv's.

I've uninstalled my 2006 so can't check the format of those. Does 6.5 do export to csvs? If so and anyone wants to send an example of the 6.5 team csvs drop me a pm and I'll give you my email address and I'll add an import from 6.5 csvs to OOTP2007 format - and if you have the player ones as well that would be even more handy as I'll have the player imports done soon. I'm guessing this would clear up a lot of the issues regarding 6.5>2007 migration and the history.
Tony M is online now   Reply With Quote
Old 06-01-2007, 05:27 PM   #5 (permalink)
All Star Reserve
 
CBLCardinals's Avatar
 
Join Date: Feb 2002
Posts: 787
will this program allow mass data dumps to an existing league?

I'd LOVE to be able to add MLB team history, past stats, etc to a league I've been playing since 2004...

To what extend can you add team data? MVP's by year, etc?
CBLCardinals is offline   Reply With Quote
Old 06-01-2007, 05:31 PM   #6 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Quote:
Originally Posted by CBLCardinals View Post
will this program allow mass data dumps to an existing league?

I'd LOVE to be able to add MLB team history, past stats, etc to a league I've been playing since 2004...

To what extend can you add team data? MVP's by year, etc?
Good question.

I'm just starting a fictional ML in 2000 and going to sim it through to 1/1/2007 and then start a new fictional ML in 2007 and stick the csvs from the original game in the new games import_export directory and see what happens.

In order to do things such as MVPs you'd need to know their player ids as this is what is in the csv files. This would be MVP for each team, not the league. Rebuilding a league history would be more of a challenge as I don't think there is quite enough data in the csv's to accurately recreate world.dat.
Tony M is online now   Reply With Quote
Old 06-01-2007, 05:36 PM   #7 (permalink)
All Star Reserve
 
CBLCardinals's Avatar
 
Join Date: Feb 2002
Posts: 787
Quote:
Originally Posted by redsoxford View Post
Good question.

I'm just starting a fictional ML in 2000 and going to sim it through to 1/1/2007 and then start a new fictional ML in 2007 and stick the csvs from the original game in the new games import_export directory and see what happens.

In order to do things such as MVPs you'd need to know their player ids as this is what is in the csv files. This would be MVP for each team, not the league. Rebuilding a league history would be more of a challenge as I don't think there is quite enough data in the csv's to accurately recreate world.dat.
If that's successful then I could potentially import a Lahman DB league 1900-2003, then import the real MLB history from that file into my current league?

That would be FANTASTIC if it works that way!!

CBLCardinals is offline   Reply With Quote
Old 06-01-2007, 05:58 PM   #8 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Quote:
Originally Posted by CBLCardinals View Post
If that's successful then I could potentially import a Lahman DB league 1900-2003, then import the real MLB history from that file into my current league?

That would be FANTASTIC if it works that way!!

Updated version on the website. Forgot to enable the Import button.

For team statistics this copying them across from one to the other seems to work ok, subject to a few caveats.

The original csv's must be created during a pre-season. I tried it on the 1/1 and the files still held the 'current' season standings which when I imported into a blank league gave all the teams more wins and losses than they should have had (the last season was replicated).

The game into which data is being loaded must also be in pre-season.

The csvs must be exported from the new game and in copying over the csvs from the old game, the team_roster.csv and team_roster_staff.csv must not be copied over otherwise the database gets out of sorts with the players file saying players are on one team and the teams' rosters saying otherwise.
Tony M is online now   Reply With Quote
Old 06-02-2007, 12:36 AM   #9 (permalink)
All Star Reserve
 
CBLCardinals's Avatar
 
Join Date: Feb 2002
Posts: 787
maybe I overlooked it but I could not find the link for this utility?

thanks in advance
CBLCardinals is offline   Reply With Quote
Old 06-02-2007, 03:15 AM   #10 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Quote:
Originally Posted by CBLCardinals View Post
maybe I overlooked it but I could not find the link for this utility?

thanks in advance
it's in post #3

http://www.bourtonville.co.uk/OOTPStadium.zip
Tony M is online now   Reply With Quote
Old 06-04-2007, 09:36 AM   #11 (permalink)
Major Leagues
 
DCHepler25's Avatar
 
Join Date: Jul 2002
Location: On the edge of Insanity.
Posts: 380
Thanks Redsoxford! I can't wait to try this out. I had great success with the stadium importer. It was so much faster than the OOTP Park editor!
__________________
This is my new signature. Feel free to steal it and call it your own
DCHepler25 is offline   Reply With Quote
Old 06-04-2007, 12:37 PM   #12 (permalink)
Major Leagues
 
DCHepler25's Avatar
 
Join Date: Jul 2002
Location: On the edge of Insanity.
Posts: 380
Questions:

Which .csv do I need to edit? I made changes to teams, team_financials, and team_last_financials but upon importing them, the changes did not take.

Also, you said about the date. My league is on January 1, should I sim ahead to a different date to have these work?

Thanks for any help!
__________________
This is my new signature. Feel free to steal it and call it your own
DCHepler25 is offline   Reply With Quote
Old 06-05-2007, 04:16 AM   #13 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Quote:
Originally Posted by DCHepler25 View Post
Questions:

Which .csv do I need to edit? I made changes to teams, team_financials, and team_last_financials but upon importing them, the changes did not take.

Also, you said about the date. My league is on January 1, should I sim ahead to a different date to have these work?

Thanks for any help!
The date is only relevant if you're importing csv's from a different league folder into a new league.

Did you quit the game or at least load up another league when you ran the mod?

If the mod ran successfully you should see in your .lg directory a teams_xxxxxxxxxxxx.dat where the xxxx is the date-time the backup was made. If that file doesn't exist, then the mod didn't run successfully. I'm tidying it up so that it gives you a clue as to why it didn't work.
Tony M is online now   Reply With Quote
Old 06-05-2007, 08:43 AM   #14 (permalink)
Major Leagues
 
DCHepler25's Avatar
 
Join Date: Jul 2002
Location: On the edge of Insanity.
Posts: 380
Quote:
Originally Posted by redsoxford View Post
The date is only relevant if you're importing csv's from a different league folder into a new league.
This is good to know.

Quote:
Did you quit the game or at least load up another league when you ran the mod?
Yes, I had OOTP shutdown when I ran the utility.

Quote:
If the mod ran successfully you should see in your .lg directory a teams_xxxxxxxxxxxx.dat where the xxxx is the date-time the backup was made. If that file doesn't exist, then the mod didn't run successfully. I'm tidying it up so that it gives you a clue as to why it didn't work.
Thanks again. This will really help too!
__________________
This is my new signature. Feel free to steal it and call it your own
DCHepler25 is offline   Reply With Quote
Old 06-05-2007, 12:25 PM   #15 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Hopefully this link will work

http://www.bourtonville.co.uk/OOTPEditor/publish.htm

It's a bit clearer on there now.

You choose the saved game directory at the top and then click on either Ballparks or Teams (Players will be added today or tomorrow)

Click on the Start button to verify the location, and then click on Load to load up the CSVs. Any errors will appear in the text box, and an error.txt file will be created in the saved game .lg directory. If it doesn't pop up with a message box saying it has loaded successfully, you'll need to email me that file and I'll have a look and see what's going on.

It works fine at my end. I just created a fictional ML setup, exported the files and then changed all the team nicknames to the proper ones, and reimported the csvs and they were all shown correctly.
Tony M is online now   Reply With Quote
Old 06-05-2007, 05:57 PM   #16 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
dola,

One other thing, raised by DCHepler, is that all the files need to be in an export to csv. I'd never noticed the options before to deselect files, but for this to work you'd need all teams csvs to be produced.
Tony M is online now   Reply With Quote
Old 06-06-2007, 01:45 AM   #17 (permalink)
Minors (Double A)
 
Join Date: Nov 2002
Location: Chicago, IL
Posts: 179
Awesome! Do you plan to do an importer for the coaches also?
MrHaroldG is offline   Reply With Quote
Old 06-06-2007, 04:43 AM   #18 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Quote:
Originally Posted by MrHaroldG View Post
Awesome! Do you plan to do an importer for the coaches also?
There will be one. One thing I can say with that is that coaches managerial history will be lost as it is not included in a csv dump. A coaches history not only contains his record, but the batting, pitching, fielding and financial stats for that season.
Tony M is online now   Reply With Quote
Old 06-06-2007, 10:16 AM   #19 (permalink)
Major Leagues
 
Muzamba's Avatar
 
Join Date: Apr 2002
Location: St. Louis, MO
Posts: 356
I'm having a bit of trouble...

I decided to do a quick test before I began mass-editing information. Glad I did, because the game keeps crashing on me after I've run the program.

For my test, I simply changed a single team nickname. (Don't know. Maybe that causes a problem for some reason?) Anyway, here's the step-by-step process I went through:

1. Opened OOTP, went to Game Setup, and picked "Extract data to CSV" from the "Import/Export" menu.

2. Shut down OOTP and opened up the "import_export" folder in my saved game's folder.

3. Opened teams.csv and changed one team nickname, then saved the file and closed it.

4. Opened up the Teams Importer, browsed to my saved game folder, selected the Teams tab, and clicked the Start button. Once it said teams.dat was loaded successfully, I clicked the Load button. After a few moments, the alert box popped up and said it teams.dat was created, as was (luckily) a backup.

5. Closed out the Teams Importer and started OOTP again. When I clicked on Continue Game, it went through the normal file-loading process, but once it got to 100% and said Checking Database, it crashed.

Here's what the error log had to say about my misfortune...

----- 2007-06-06 08:32:04 -----
Message : Index was outside the bounds of the array.
Source : OOTP2007Editor
StackTrace : at OOTP2007Editor.MainScreen.cmd_TLoad_Click(Object sender, EventArgs e)

After repeating this about a hundred times, it then said...

----- 2007-06-06 08:32:05 -----
Message : The given key was not present in the dictionary.
Source : System
StackTrace : at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.SortedDictionary`2.get_ Item(TKey key)
at OOTP2007Editor.MainScreen.cmd_TLoad_Click(Object sender, EventArgs e)

...and repeated THIS about a hundred times also.

Ok, doc. So what's the diagnosis?
Muzamba is offline   Reply With Quote
Old 06-06-2007, 10:33 AM   #20 (permalink)
Moderator*
 
Tony M's Avatar
 
Join Date: Feb 2006
Location: Buckingham, England
Posts: 3,289
Quote:
Originally Posted by Muzamba View Post
3. Opened teams.csv and changed one team nickname, then saved the file and closed it.
DCHepler had an issue as well, and he sent me through his teams.csv file and it had commas missing at the end of some lines and this causes problems.
Tony M is online now   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:11 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 Out of the Park Developments