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 > Out of the Park Baseball 26 > OOTP Mods > OOTP Mods - Names and Nations

Reply
 
Thread Tools
Old 04-21-2022, 01:36 PM   #41
joefromchicago
Hall Of Famer
 
joefromchicago's Avatar
 
Join Date: Jun 2011
Posts: 3,695
Quote:
Originally Posted by erik.ootp View Post
If there are any questions on this file I'll be happy to answer as good as I can. I don't know anything about modding OOTP though, so don't ask me about that
Thanks, Erik, for dropping in to explain some of the "behind the scenes" work on the names.xml file. I have just one question, regarding this:

Quote:
Originally Posted by erik.ootp View Post
not having multiple records with the same name, but different language ids no more.
Why exactly is that an advantage? Let me give a very prosaic example. In version 22, I could determine exactly how many names were in any nameset. Since the names were grouped by ethnicity/language ID, all it took was to count them, starting with the first and going through to the last. And if there were too many names to count manually, I could always copy and paste the csv names into a spreadsheet.

Now, with a single entry belonging to possibly multiple namesets, how can I determine how many names are in a nameset? I can't just transfer the xml entries into a spreadsheet, because that will, at best, only show me which names are unique to a nameset. For instance, the first_names.txt file had 265 first names for the Australian (28) nameset. If I go into the names.xml file and sort them by language ID, however, I get only 10 Australian first names. But those are just the names that are unique to the Australian nameset. There are lots of other names that belong to that nameset, but how do I know how many there are?

That may seem like a pretty pointless exercise. I mean, who cares how many names are in a nameset, right? But for a modder like me, it's actually fairly important. I want to know how many names are in a nameset because: (1) I want to know which namesets are small so that it makes sense to enlarge them; and (2) I want to know what difference I've made by improving a nameset. Take a look at this post to see what I'm talking about.

That's just one point where I don't think "reducing redundancy" actually improved the names files. It's not the biggest point, but it at least might give you some insight into the modding process.
joefromchicago is offline   Reply With Quote
Old 04-21-2022, 01:39 PM   #42
erik.ootp
OOTP Developments
 
erik.ootp's Avatar
 
Join Date: Sep 2021
Location: Berlin, Germany
Posts: 107
Quote:
Originally Posted by RMc View Post
One thing I've always done with the Names file is add an apostrophe at the end of every last name (Smith becomes Smith', for example); that way I can instantly tell if a player is a "fictional".

Now? Sheesh!
Shouldn't be a big task.
Open the names.xml in some text editor, highlight all of the last names (CTRL + G can be used to go to a specific line) and replace every </EN> you find with &apos;</EN>



Thanks for bringing this exact example up, because you will now also need to worry about escaping certain characters.
Those are the characters and their replacements to not break the xml structure:
" &quot;
' &apos;
< &lt;
> &gt;
& &amp;
erik.ootp is offline   Reply With Quote
Old 04-21-2022, 01:46 PM   #43
erik.ootp
OOTP Developments
 
erik.ootp's Avatar
 
Join Date: Sep 2021
Location: Berlin, Germany
Posts: 107
joefromchicago indeed in the names.xml itself it's hard to get those stats. Let me give you a small workaround: take the names.ods I uploaded and filter by language id = 28 there you have all of the names in the australian nameset.
erik.ootp is offline   Reply With Quote
Old 04-21-2022, 01:54 PM   #44
kq76
Global Moderator
 
kq76's Avatar
 
Join Date: Nov 2002
Location: Vancouver, Canada
Posts: 11,695
Quote:
Originally Posted by joefromchicago View Post
Now, with a single entry belonging to possibly multiple namesets, how can I determine how many names are in a nameset?
Can you not just run a find all in document (in notepad++) of the nameset ID For example, I just searched for lid="27", pressed the find all button, and it told me there 3193 hits. Or am I misunderstanding the question?
kq76 is offline   Reply With Quote
Old 04-21-2022, 01:59 PM   #45
joefromchicago
Hall Of Famer
 
joefromchicago's Avatar
 
Join Date: Jun 2011
Posts: 3,695
Quote:
Originally Posted by kq76 View Post
Can you not just run a find all in document (in notepad++) of the nameset ID For example, I just searched for lid="27", pressed the find all button, and it told me there 3193 hits. Or am I misunderstanding the question?
That's first and last names, isn't it?
joefromchicago is offline   Reply With Quote
Old 04-21-2022, 01:59 PM   #46
joefromchicago
Hall Of Famer
 
joefromchicago's Avatar
 
Join Date: Jun 2011
Posts: 3,695
Quote:
Originally Posted by erik.ootp View Post
joefromchicago indeed in the names.xml itself it's hard to get those stats. Let me give you a small workaround: take the names.ods I uploaded and filter by language id = 28 there you have all of the names in the australian nameset.
Thanks. I'll have time to do that tonight.
joefromchicago is offline   Reply With Quote
Old 04-21-2022, 02:33 PM   #47
kq76
Global Moderator
 
kq76's Avatar
 
Join Date: Nov 2002
Location: Vancouver, Canada
Posts: 11,695
Quote:
Originally Posted by joefromchicago View Post
That's first and last names, isn't it?
You're right. Well, it looks like the last names start at line 31879 and the nicknames at 252902. You could just split it up into smaller files when working on it and then put it back together. I would as the problem I see with the file is it's just too big and so it constantly crashes my notepad++ and my laptop is only a year old.
kq76 is offline   Reply With Quote
Old 04-21-2022, 03:13 PM   #48
darkcloud4579
Hall Of Famer
 
Join Date: Jun 2003
Posts: 8,659
Quote:
Originally Posted by Thundercrack View Post
Joe from Chicago, do you know if creating a league in 22 with the old files then importing the league into 23 work-
It does work, yes. Can confirm I've been doing this and it keeps the imported names. This is only for new leagues that won't be able to use old files.
darkcloud4579 is offline   Reply With Quote
Old 04-21-2022, 05:21 PM   #49
Thundercrack
All Star Reserve
 
Thundercrack's Avatar
 
Join Date: Jul 2008
Posts: 854
Quote:
Originally Posted by darkcloud4579 View Post
This is only for new leagues that won't be able to use old files.
thanks but not sure what you mean by this
Thundercrack is offline   Reply With Quote
Old 04-21-2022, 06:48 PM   #50
darkcloud4579
Hall Of Famer
 
Join Date: Jun 2003
Posts: 8,659
Quote:
Originally Posted by Thundercrack View Post
thanks but not sure what you mean by this
I was saying that if you import a file from OOTP22, the game will continue to use the names data that you imported from the old file, it does not use the new in-game names.xml file, it's only on a fresh OOTP23 save that'll use that information.

So if someone is importing a file using expanded name sets, those name sets are preserved in imported save from OOTP22 into 23.
darkcloud4579 is offline   Reply With Quote
Old 04-21-2022, 07:47 PM   #51
Ktulu
Hall Of Famer
 
Join Date: Feb 2003
Location: BC
Posts: 4,506
Quote:
Originally Posted by erik.ootp View Post
Okay I have created an ods file from the names.xml so you can open it in open office or excel. This ods file is pretty much build like the names txt files used to be. You got the name with langueage id and distribution. If there are multiple language ids for this name you will have multiple lines with this name.

Additionally you have a column for the namesid this needs to be unique.
I also added a column that builds the corresponding XML element.



If you want to change a name, language id or its distribution you can do it in the ods file and copy the XML element column text and replace it in the names.xml. This can also be directly done by some text editors like notepad++ or ultra edit via search and replace functions.
Adding names to this ods file manually, from a CSV or TXT file should be no problem. Keep in mind that the namesid needs to be unique. Also the combination of name and language id should be unique.


For now this seems to be the best solution to think of. I am sure we can adjust the names.xml some time after release to also fit the modders needs.
Thanks for doing this! Haven't had a chance to dive in, but hopefully this weekend...
__________________
"The ice is getting even more thinner, my friend!"
Ktulu is offline   Reply With Quote
Old 04-21-2022, 08:10 PM   #52
darkcloud4579
Hall Of Famer
 
Join Date: Jun 2003
Posts: 8,659
Quote:
Originally Posted by erik.ootp View Post
Okay I have created an ods file from the names.xml so you can open it in open office or excel. This ods file is pretty much build like the names txt files used to be. You got the name with langueage id and distribution. If there are multiple language ids for this name you will have multiple lines with this name.

Additionally you have a column for the namesid this needs to be unique.
I also added a column that builds the corresponding XML element.



If you want to change a name, language id or its distribution you can do it in the ods file and copy the XML element column text and replace it in the names.xml. This can also be directly done by some text editors like notepad++ or ultra edit via search and replace functions.
Adding names to this ods file manually, from a CSV or TXT file should be no problem. Keep in mind that the namesid needs to be unique. Also the combination of name and language id should be unique.


For now this seems to be the best solution to think of. I am sure we can adjust the names.xml some time after release to also fit the modders needs.

I've tried downloading this and my Mac keeps saying the zip file is empty. Not sure if it's just my machine or a real problem.
darkcloud4579 is offline   Reply With Quote
Old 04-21-2022, 08:32 PM   #53
erik.ootp
OOTP Developments
 
erik.ootp's Avatar
 
Join Date: Sep 2021
Location: Berlin, Germany
Posts: 107
You're right seems like the file is still to big. I will have a look tomorrow.
erik.ootp is offline   Reply With Quote
Old 04-21-2022, 08:35 PM   #54
pilight
All Star Starter
 
pilight's Avatar
 
Join Date: Mar 2003
Location: Where the Action is
Posts: 1,953
Quote:
Originally Posted by darkcloud4579 View Post
I've tried downloading this and my Mac keeps saying the zip file is empty. Not sure if it's just my machine or a real problem.
I got the same result in Windows 11
pilight is offline   Reply With Quote
Old 04-22-2022, 04:50 AM   #55
erik.ootp
OOTP Developments
 
erik.ootp's Avatar
 
Join Date: Sep 2021
Location: Berlin, Germany
Posts: 107
I changed the attachment to a google drive link.
erik.ootp is offline   Reply With Quote
Old 04-22-2022, 10:35 AM   #56
Thundercrack
All Star Reserve
 
Thundercrack's Avatar
 
Join Date: Jul 2008
Posts: 854
Quote:
Originally Posted by darkcloud4579 View Post
I was saying that if you import a file from OOTP22, the game will continue to use the names data that you imported from the old file, it does not use the new in-game names.xml file, it's only on a fresh OOTP23 save that'll use that information.

So if someone is importing a file using expanded name sets, those name sets are preserved in imported save from OOTP22 into 23.
Got it, thx
Thundercrack is offline   Reply With Quote
Old 04-23-2022, 08:28 PM   #57
darkcloud4579
Hall Of Famer
 
Join Date: Jun 2003
Posts: 8,659
I know how to replace the names and do this the slow way, but if someone has a faster way to migrate the names from the older .txt files into this format with the code, let me know. I do not want to do it manually, but using spreadsheet software it ends up being too many lines.
darkcloud4579 is offline   Reply With Quote
Old 04-24-2022, 08:22 PM   #58
plannine
All Star Reserve
 
plannine's Avatar
 
Join Date: Mar 2003
Location: Michigan
Posts: 571
Quote:
Originally Posted by RMc View Post
One thing I've always done with the Names file is add an apostrophe at the end of every last name (Smith becomes Smith', for example); that way I can instantly tell if a player is a "fictional".

Now? Sheesh!
I would capitalize all of the last names in the names.txt file.
(I want to know if fictional players are "slipping" into the game)
Won't be able to easily do this with a XML file and a text editor.
__________________
Good pitching will always stop good hitting and vice-versa - Casey Stengel

Last edited by plannine; 04-28-2022 at 07:21 AM.
plannine is offline   Reply With Quote
Old 04-24-2022, 08:59 PM   #59
plannine
All Star Reserve
 
plannine's Avatar
 
Join Date: Mar 2003
Location: Michigan
Posts: 571
Quote:
Originally Posted by Syd Thrift View Post
I'm sorry, man, but XML files are roughly the same level of difficulty - either way, you're going into Excel or Google Sheets and converting to that particular format - and there are a number of things that XML has going for it from an ease of work standpoint. Comma-separated files are notorious for getting line items messed up by missing a comma or not enclosing text that's supposed to have a comma in the right kind of quotes or whatever. And for all this talk of "ease of use", XML is *far* easier to look at and tell what the heck it's doing from an end user standpoint; you may not notice this because you're opening the file in Excel but this remains the case.

The true mark of the devs taking over is if they changed all these files to use JSON instead.

One thing I would love is something to edit the english.xml file. I have half a mind of working on one myself...
(For me) It took 30 seconds to change all the last names to upper case in the txt file. Just opening the xml takes longer.
__________________
Good pitching will always stop good hitting and vice-versa - Casey Stengel

Last edited by plannine; 04-25-2022 at 12:22 PM.
plannine is offline   Reply With Quote
Old 04-26-2022, 05:48 PM   #60
Mister_G
All Star Reserve
 
Mister_G's Avatar
 
Join Date: Jan 2012
Posts: 576
I'm having all kinds of difficulties with this. Google sheets keeps telling me, "This action would increase the number of cells in the workbook above the limit of 10000000 cells." when I try to add rows so I can fit all the names. I haven't even gotten to how to actually do all of it.
__________________
A man doesn't make mistakes, mistakes make the man

@MisterG90
Mister_G 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 07:53 PM.

 

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