Home | Webstore
Latest News: OOTP Update 20.7 - OOTP 20 Available - FHM 6 Available

Offseason Discount! SAVE 50%!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 19 > OOTP 19 - New to the Game?

OOTP 19 - New to the Game? If you have basic questions about the the latest version of our game, please come here!

Reply
 
Thread Tools
Old 12-21-2018, 03:34 PM   #1
Blackjack
Minors (Single A)
 
Join Date: Mar 2018
Posts: 88
Thanks: 57
Thanked 39x in 25 posts
Is there a report that lists all the teams in my baseball world?

I'm playing a fictional league and I'm in the middle of expanding it. I don't want to duplicate any cities that already have teams as I create the minor league affiliates. Is there a report that lists them all in one spot
Blackjack is offline   Reply With Quote
Old 12-29-2018, 12:48 AM   #2
fredbeene
Major Leagues
 
Join Date: Aug 2016
Posts: 401
Blog Entries: 1
Thanks: 220
Thanked 56x in 31 posts
Quote:
Originally Posted by Blackjack View Post
I'm playing a fictional league and I'm in the middle of expanding it. I don't want to duplicate any cities that already have teams as I create the minor league affiliates. Is there a report that lists them all in one spot
EXACTLY - it is impossible to keep track of 200 cities and no way to manage them...not only that, they CHANGE frequently in historical sims.

Some times I amazed that after 19 versions things still aren't addressed....but all that time spent on a new skins...sigh
fredbeene is offline   Reply With Quote
Thank you for this post:
Blackjack (01-08-2019)
Old 01-04-2019, 12:03 PM   #3
stealofhome
Hall Of Famer
 
stealofhome's Avatar
 
Join Date: Apr 2014
Posts: 2,066
Blog Entries: 1
Thanks: 109
Thanked 455x in 343 posts
There is a way to do this that takes a little work and requires Excel/something similar but makes it possible. It only took me a couple minutes.

In the game, go to Game -> Game Settings -> Database
Select the Database Tools dropdown and then Configure data export to CSV files
Click deactivate all
Check these boxes: Replace accents, Dump only cities in use, Dump only nations in use, Insert column names/CSV headings, nations, cities, teams_basic
Click Save
Click the Database Tools dropdown again and select Export data to CSV files
Click the Database Tools dropdown once more and select Open data import/export folder
Open cities.csv, states.csv, and teams.csv in Excel - they should open as regular Excel formatted files.

Depending on your level of familiarity with Excel, this can get tricky - you basically use the VLOOKUP command to link up the teams, cities, and states.

Insert three columns in the teams.csv file after the city_id column (select the heading, right click, insert). Name the first column City, the second column state_id, and the third column State.

In the first new column (City), put the formula =VLOOKUP(city_id,cities.csv table,4,0)
-the city_id will be the cell directly next to where you are typing, probably F2
-while editing the formula, you can go to the cities.csv file and select the appropriate range. Mine was A2:D5478, this would change based on the number of cities in your game.
My final formula looks like this: =VLOOKUP(F2,cities.csv!$A$2:$D$5478,4,0)
Press enter and drag down the length of the file.

In the second new column (state_id), put the formula =VLOOKUP(city_id,cities.csv table,3,0)
Follow the same rules as before but you will be referencing the third column instead.
Here's my final formula: =VLOOKUP(F2,cities.csv!$A$2:$D$5478,3,0)
Press enter and drag down the length of the file.

In the third new column (State), put the formula =VLOOKUP(state_id,state.csv table,3,0)
Follow the same rules as before but you will be referencing the state.csv file instead.
Here's my final formula: =VLOOKUP(H2,states.csv!$A$2:$C$1204,3,0)
Press enter and drag down the length of the file.

You now have Team, City, and State for all teams in the universe.

You can clean the file up by selecting the columns you just created, right click copy, then right click, paste as values. This will remove the formulas and only leave the values in place. If you move or delete the other files that you're referencing, you can run into problems. You can also delete the state_id column as you probably won't need it anymore.

Hope this helps!
stealofhome is offline   Reply With Quote
Thank you for this post:
Blackjack (01-08-2019)
Old 01-13-2019, 08:29 PM   #4
Sharkn20
Minors (Triple A)
 
Join Date: May 2015
Posts: 244
Thanks: 76
Thanked 64x in 52 posts
Quote:
Originally Posted by stealofhome View Post
There is a way to do this that takes a little work and requires Excel/something similar but makes it possible. It only took me a couple minutes.



In the game, go to Game -> Game Settings -> Database

Select the Database Tools dropdown and then Configure data export to CSV files

Click deactivate all

Check these boxes: Replace accents, Dump only cities in use, Dump only nations in use, Insert column names/CSV headings, nations, cities, teams_basic

Click Save

Click the Database Tools dropdown again and select Export data to CSV files

Click the Database Tools dropdown once more and select Open data import/export folder

Open cities.csv, states.csv, and teams.csv in Excel - they should open as regular Excel formatted files.



Depending on your level of familiarity with Excel, this can get tricky - you basically use the VLOOKUP command to link up the teams, cities, and states.



Insert three columns in the teams.csv file after the city_id column (select the heading, right click, insert). Name the first column City, the second column state_id, and the third column State.



In the first new column (City), put the formula =VLOOKUP(city_id,cities.csv table,4,0)

-the city_id will be the cell directly next to where you are typing, probably F2

-while editing the formula, you can go to the cities.csv file and select the appropriate range. Mine was A25478, this would change based on the number of cities in your game.

My final formula looks like this: =VLOOKUP(F2,cities.csv!$A$2:$D$5478,4,0)

Press enter and drag down the length of the file.



In the second new column (state_id), put the formula =VLOOKUP(city_id,cities.csv table,3,0)

Follow the same rules as before but you will be referencing the third column instead.

Here's my final formula: =VLOOKUP(F2,cities.csv!$A$2:$D$5478,3,0)

Press enter and drag down the length of the file.



In the third new column (State), put the formula =VLOOKUP(state_id,state.csv table,3,0)

Follow the same rules as before but you will be referencing the state.csv file instead.

Here's my final formula: =VLOOKUP(H2,states.csv!$A$2:$C$1204,3,0)

Press enter and drag down the length of the file.



You now have Team, City, and State for all teams in the universe.



You can clean the file up by selecting the columns you just created, right click copy, then right click, paste as values. This will remove the formulas and only leave the values in place. If you move or delete the other files that you're referencing, you can run into problems. You can also delete the state_id column as you probably won't need it anymore.



Hope this helps!
Trying to learn how to use effectively .csv files, from where do you recommend me to start? Any useful books? Maybe Excel for Dummies will teach me?? Or MySQL?
I would like to track mainly changes in ratings in OOTP and FOF, thanks in advance

Sent from my SM-G960F using Tapatalk
Sharkn20 is offline   Reply With Quote
Old 01-16-2019, 08:16 AM   #5
NoOne
Hall Of Famer
 
NoOne's Avatar
 
Join Date: Apr 2015
Posts: 6,721
Thanks: 720
Thanked 1,834x in 1,482 posts
for the cities and avoiding redundancies, you could go to league structure (under global/game settings, i believe)

if you are familiar with either of those 2 options -- dB / spreadsheet -- both would work fine... the more complicated you go, you probably want the dB. you can do just about anything needed with a spreadhseet too and have it just as automated / 1-click operation type stuff too.

the db route is probably easier for what you describe, but a bit more technical? you have to do a lot more of the work with spreadsheets, imo. you could make all sorts of reports and queries to display the data you mentioned over time or whatever independent variable.

the csv files are just text files with a specified delimiter. when you import into a spreadsheet or source a databse, make sure to set the same delimiter -- think comma is default, but you can change those settings in OotP, too.

they'll be compatible with anythign you choose to do with it.

about the db settings in ootp -- you can reduce what is exported, if you have not already. you probably want to include "headers" -- at least as a reference to cut out, if it's a problem with impoting to excell/access type program. usually you can ignore first line etc, if needed.

as far as learning.. the type of stuff you'd be doing wouldn't take too much.. been long time for me, but you can find all sorts of sql examples online. how to select and manipulate is very straightforward. it will take time, of course... not unlike learning how to properly make a spreadsheet that doesn't require hands-on work each time you open it.

with only superficial knowledge from a college class 20 years ago, i was able to recently source a ~300mb relational db and make create soem sql statements to customize it a bit. i didn't recall any of the vocabulary, but i did know basically what had to be done. got user accoutns set up, it's communicating across my lan, but not with internet and working properly with a client.

the point: it may seem 'greek' the first time you read it sql statements and the like, but it's incredibly straight-forward stuff, really. it's likely covered in some forum or youtube video.

Last edited by NoOne; 01-16-2019 at 08:22 AM.
NoOne is offline   Reply With Quote
Old 01-16-2019, 05:01 PM   #6
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,054
Thanks: 342
Thanked 568x in 346 posts
Though nothing there addresses your initial question of listing teams and cities, you can read the first site in my signature for how to set up a MySQL db with OOTP data. From there, getting that list can be done with the following query:

Code:
SELECT teams.name AS city
    , teams.nickname AS 'team name'
    , leagues.abbr AS league

FROM teams INNER JOIN leagues ON teams.league_id = leagues.league_id

ORDER BY teams.name;
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 01-16-2019, 05:02 PM   #7
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,054
Thanks: 342
Thanked 568x in 346 posts
And really, you don't need to set up the whole database to do this. You can do this in Access and just load the teams and leagues file.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 01-16-2019, 05:12 PM   #8
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,054
Thanks: 342
Thanked 568x in 346 posts
Quote:
Originally Posted by Sharkn20 View Post
Trying to learn how to use effectively .csv files, from where do you recommend me to start? Any useful books? Maybe Excel for Dummies will teach me?? Or MySQL?
I would like to track mainly changes in ratings in OOTP and FOF, thanks in advance

Sent from my SM-G960F using Tapatalk
Last post on this thread, I promise - but feel free to PM me with any other questions.

Tracking ratings over time is really difficult outside of the game. That's because the dump does not include ratings history. It can be done, but it takes some work.

The inelegant way is to create a table called ratings_year where year is the game year that you dumped the data. Create a new table every game year and join them on player_id.

The more elegant way would be to create a single ratings table and write a script in SQL that takes the annual ratings dump, creates a temporary table from it, adds a game_year column to it, inserts it to your single ratings table, and deletes the temp table.

Just taking a stab at it here, it would look something like this:

Code:
CREATE TEMPORARY TABLE ratings_temp LIKE ratings;
LOAD DATA LOCAL INFILE 'filepath/ratings.csv'
INTO TABLE ratings_temp
FIELDS TERMINATED BY ',';

INSERT INTO  ratings (game_year, field1, field2, fieldn)
    SELECT 2018 as 'game_year', field1, field2, fieldn
    FROM ratings_temp;

DROP TEMPORARY TABLE ratings_temp;
You'd only have to update the game year value (bolded above) each time you ran the script.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery

Last edited by cavebutter; 01-16-2019 at 06:27 PM.
cavebutter is offline   Reply With Quote
Thank you for this post:
stealofhome (01-16-2019)
Old 01-16-2019, 06:18 PM   #9
stealofhome
Hall Of Famer
 
stealofhome's Avatar
 
Join Date: Apr 2014
Posts: 2,066
Blog Entries: 1
Thanks: 109
Thanked 455x in 343 posts
Quote:
Originally Posted by cavebutter View Post
Last post on this thread, I promise - but feel free to PM me with any other questions.
Feel free to keep going!
stealofhome is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

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 03:43 PM.

 

Major League Baseball trademarks and copyrights are used with permission of MLB Advanced Media, L.P. Minor League Baseball trademarks and copyrights are used with the permission of Minor League Baseball. All rights reserved.

The Major League Baseball Players Association (www.MLBPLAYERS.com ) is the collective bargaining representative for all professional baseball players of the thirty Major League Baseball teams and serves as the exclusive group licensing agent for commercial and licensing activities involving active Major League baseball players. On behalf of its members, it operates the Players Choice licensing program and the Players Choice Awards, which benefit the needy through the Major League Baseball Players Trust, a charitable foundation established and run entirely by Major League baseball players. Follow: @MLB_Players; @MLBPAClubhouse; @MLBPlayersTrust

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 © 2017 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

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