View Single Post
Old 02-24-2010, 02:06 AM   #1
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
OOTP11 Mod: Fictional Logo File Utility

Hi there, OOTP Forums. Long time, no see.

I am proud to announce the release of the Beta version of a the "OOTP Fictional Logo File Utility". The purpose of the program is increase the usefulness of generic logo files for use in fictional leagues (explained in detail below).

Download the latest version (0.7.1.487)

How Generic Logos Work
OOTP allows you to customize your game by placing custom logos in the \logos folder. For example, if you put a file called Toronto_Blue_Jays.png in your \logos folder and then start an MLB game, that file will automatically get loaded in as the logo for the Toronto Blue Jays.

On top of that, you can create a file simply called Blue_Jays.png. This file will automatically be loaded for any team called the "Blue Jays". This is especially helpful if you play fictional leagues, because you can have a team called the Cleveland Blue Jays and it will still have an appropriate logo.

Dedicated members of the OOTP Forums have put together collections of thousands of generic team logos, mostly pulled from around the web. Saving these (with appropriate file names) in your \logos folder greatly increases the visual realism of fictional leagues.

Specifying Team and Uniform Colours with Logo Files
On top of the ability to automatically assign generic logos to teams, OOTP provides the ability to specify appropriate team and uniform colours that suit the logo.

For example, if you have a file called Blue_Jays_000000_FFFFFF.png, OOTP will automatically assign it to any team called the "Blue Jays" when you start a new game. Moreover, it will set that team's background colour to black and foreground (text) colour to white (the colours are specified using hexidecimal red, green, and blue values from 0 to 255).

OOTP even takes it a step further. A file called Blue_Jays_000000_FFFFFF_0000FF_000000_000000_FFFFF F_0000FF_0000FF.png would automatically set the team colours and the uniform colours (in this case, the cap is all black and the uniform is white with blue trim; see the file naming conventions for details).

By downloading cephasjames' excellent generic logo set and re-naming the files to specify the team and uniform colours, you can start fictional leagues without having to customize logos and uniforms afterward (unless your teams have obscure names for which no logo exists). This allows you to set up a rich, realistic fictional league in minimal time.

Problem and Solution
The problem with taking that approach is that you would have to manually re-name hundreds or thousands of logo files to add in the colour information. This would be even more tedious than just customizing the logos and colours using the in-game editor.

This software is my attempt to solve that problem in a way that will drastically automate and speed up the file re-naming process.

The program will load every file in your \logos folder (and all sub-folders) into a spreadsheet. When a logo is selected from the list, it shows up at the top of the screen. When you click on any part of the image, the colour value of the pixel you clicked on will become the background colour associated with that logo. The next colour you select becomes the text colour, and so on until you've picked all 8 colour values. The program then jumps to the next logo for you to work on. When you are done, the program will rename every logo file with the colours you've associated with them.

Now if you start a new fictional league, those logos (with team and uniform colours) will be automatically loaded in for any team that has a name matching one of your logos.

Basic Instructions
  1. When you first open the utility, you will be asked to select a working folder. The program will load every .PNG file in that folder and in all sub-folders. It is strongly recommended that you backup your logos before using the program, just in case.
  2. All your logos should be loaded up into the spreadsheet at the bottom of the screen. For each logo, there are "cells" for background, text, secondary, ballcap, visor, jersey, trim, and pinstripe colours (the secondary colour is not used in the game; you should just fill this in with the same value as the text colour).
  3. Start selecting colours (there are four methods of picking colours, described below).
  4. When you are finished working on a particular logo, click "rename file" to update its file name with the colour information you've entered.

Picking Colours
There are four ways to select colours. Every time you pick a colour, the program will auto-advance to the next cell. Selecting a colour will overwrite any previous colour data in the active cell.
  1. Eyedropper. This is probably the easiest method. Hover your mouse over the logo preview in the top-left portion of the screen. Click your mouse to select the active colour, as shown in the colour swatch to the right of the logo.
  2. Common colours. There are some colours that you will end up picking frequently (e.g. black and white). To the right of the logo preview, there are 6 "common colours" that you can select by clicking on them (black, white, grey, red, green, and blue). In addition, there are two buttons labelled "BG" and "TXT". Usually, the uniform colours will be some combination of the background and text colours. Once these values have been selected, use the "BG" and "TXT" buttons to repeat them in later cells.
  3. Colour dialog. To open a standard windows RGB colour selection dialog, click on the "pick colour" button. The value you select will be entered in the active cell.
  4. Manual entry. If you know the hexadecimal RGB value of the colour you want, you can simply type it into the spreadsheet manually. You can also use this method to change the team nickname (remember to replaces spaces with underscores!)

Randomized Uniforms
Usually, the colours you pick for the ball cap and jersey will be a combination of the colours you picked for the background and text colours. To save on time, you can use the program's randomization feature. Once you have selected the background and text colours, click "randomize" to auto-generate uniform colours.

If you prefer your uniforms to be white (plain home jerseys), select "use white uniforms" in the randomization settings box. If you prefer coloured uniforms (alternate jerseys), select the "use coloured uniforms" options. If you want a mix of both, select "use both".

If you always use the randomize feature, there is an option called "auto-populate uniform colours" in the settings menu. If this option is checked, uniform colours will automatically be added as soon as you select the background and text colours of any logo.

Batch Features
The program also includes three batch features: randomize all, rename all, and clear all.

Randomize all automatically adds uniform colour information to any logo that already has the background and text information specified.

Rename all updates all file names as necessary. You will always be prompted to rename all before quitting the program.

Clear all removes all colour information from every logo. Use this feature with caution. If you accidentally hit this button, close the program and do not re-name the files when prompted.

Screenshots
Below are some screenshots of the program, as well as the results in-game (the in-game screenshots were taken immediately after setting up a fictional league, with no customization).








Release Information
The beta version of the software is now available for download at the top of this post. I will update the download link as updates are released. I have no specific schedule for releasing updates, but the current version has most of the core features and should work for most use cases.

2010-03-01: Released Version 0.5.0.446 (Beta)
2010-03-04: Released Version 0.5.1.470 (Beta) - added clear uni, clear all unis, delete file, copy file functions
2010-03-20: Released Version 0.6.1.481 (Beta) - fixed handling of punctuation marks in team nick names
2011-02-28: Released Version 0.7.1.487 (Beta) - released the most up-to-date version to see if it resolves some reported bugs

Logo Pack Release
I am hoping that the community will be able to work through some of the generic logo sets out there and re-release them under new file names. I am working on a sub-set of cephasjames' collection, and I know that others are working on their own sets of files. I will be releasing my set of logo names once they are done (unless someone else releases a comprehensive set first).

Source Code
The program is open source. Feel free to make changes to the code and try some different things out. If you can improve on the program, that's fantastic! It was written using Lazarus IDE for the FreePascal compiler. The source code is included with the installation.

Last edited by Layton is my Homeboy; 02-28-2011 at 09:08 PM. Reason: Updated to version 0.7.1.487
Layton is my Homeboy is offline   Reply With Quote