Home | Webstore
Latest News: OOTP 25 Available - FHM 10 Available - OOTP Go! Available

Out of the Park Baseball 25 Buy Now!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 25 > OOTP Mods > OOTP Mods - In-Game Text and PbP Commentary
Register Blogs FAQ Calendar Today's Posts Search

Reply
 
Thread Tools
Old 06-22-2006, 01:23 AM   #1
tysok
Hall Of Famer
 
Join Date: Aug 2003
Posts: 4,925
Conditional statements

Quoted:
Conditions
But that's not all! Markus has added another capability that expands the customization possibilities even further: conditions. Conditions define specific criteria that must be met before a text object can be used. By default, all text messages can be used at any time. This makes writing objects difficult, because the messages need to be fairly generic. For example, you shouldn't write, "Veteran Marc Duffy slugged three homeruns today," because it would sound out of place to say "veteran" if the game chose to use that message in a case where the person who hit the homeruns was a 19-year old rookie phenom.

Conditions are assigned, if needed, to each text object, and they help text writers add more flavor. For example, if we add the text condition "PERSON_AGE_MIN=35" to an object, then that object will only be used if the player selected is 35 years or older. If the game picks this object when it's trying to write a message for a 19-year old, it will simply skip the object and try the next one, repeating the process until a valid object is found. Objects can also have multiple conditions. Some examples of conditions are:


The question was: How does the randomization effect the conditional statements, as in does it look for a conditional statement that fits, then go to a normal call if not, and if it looks for conditional statements first does it randomize in the case of 2 conditional statements that both meet the situation.

All right... so it still doesn't explain it. Maybe I'm just not getting it...
If I have a text object that should only be said when the bases were loaded, such as "It's a Grand Slam!" then I would put the condition in.
It randomizes the objects, and a home run where the bases aren't loaded wants to call this object, but it doesn't fit so it skips it.
The next home run IS a Grand Slam, but it's skipped this object already so would it or would it not say this line?
What if I had 2 calls for "Grand Slam". Would the first Grand Slam of a game call 1, and the next one call 2?
Or is it possible that the call wouldn't show up in either, as in it's skipped both objects already?

I don't know that it makes a large amount of difference, since I won't be writing or adding anything at least for quite some time... but I've asked three times and keep getting referred to the customization manual which doesn't explain it.
tysok is offline   Reply With Quote
Old 06-22-2006, 08:48 AM   #2
jbsnadb
All Star Starter
 
jbsnadb's Avatar
 
Join Date: Mar 2006
Posts: 1,098
I may be mistaken, but I believe this only applies to news items. This is how your 19 yr. old prospect is not referred to as a veteran.
jbsnadb is offline   Reply With Quote
Old 06-22-2006, 11:36 AM   #3
tysok
Hall Of Famer
 
Join Date: Aug 2003
Posts: 4,925
Quote:
Originally Posted by jbsnadb
I may be mistaken, but I believe this only applies to news items. This is how your 19 yr. old prospect is not referred to as a veteran.
And that's a good thing.

There are conditional statements in the play by play though, and was curious as to how it handled them there.
To name a few of those that would be in the play by play:
GAME_BASE_1
GAME_BASE_12
GAME_BASE_13
GAME_BASES_LOADED
GAME_COUNT_AHEAD
tysok is offline   Reply With Quote
Old 06-24-2006, 03:25 AM   #4
M's rule
All Star Reserve
 
Join Date: Jul 2003
Location: Seattle
Posts: 925
Quote:
Originally Posted by tysok
And that's a good thing.

There are conditional statements in the play by play though, and was curious as to how it handled them there.
To name a few of those that would be in the play by play:
GAME_BASE_1
GAME_BASE_12
GAME_BASE_13
GAME_BASES_LOADED
GAME_COUNT_AHEAD
I don't understand your question, maybe because you didn't ask one.

The conditions you mention are pretty self-defining. Messages with the condition GAME_BASE_12 will appear only if runners are on first and second, and so forth.
M's rule is offline   Reply With Quote
Old 06-24-2006, 03:28 AM   #5
M's rule
All Star Reserve
 
Join Date: Jul 2003
Location: Seattle
Posts: 925
Sorry. Double post.

Last edited by M's rule; 06-24-2006 at 03:30 AM.
M's rule is offline   Reply With Quote
Old 06-24-2006, 11:38 AM   #6
tysok
Hall Of Famer
 
Join Date: Aug 2003
Posts: 4,925
Quote:
Originally Posted by tysok
The question was: How does the randomization effect the conditional statements, as in does it look for a conditional statement that fits, then go to a normal call if not, and if it looks for conditional statements first does it randomize in the case of 2 conditional statements that both meet the situation.

It randomizes the objects, and a home run where the bases aren't loaded wants to call this object, but it doesn't fit so it skips it.

The next home run IS a Grand Slam, but it's skipped this object already so would it or would it not say this line?

What if I had 2 calls for "Grand Slam". Would the first Grand Slam of a game call 1, and the next one call 2?

Or is it possible that the call wouldn't show up in either, as in it's skipped both objects already?
The first is the original question, the rest is defining what it means.
I'm wordy, apparently, but want to make sure I relate what it is I'm actually asking.
tysok is offline   Reply With Quote
Old 06-24-2006, 10:44 PM   #7
M's rule
All Star Reserve
 
Join Date: Jul 2003
Location: Seattle
Posts: 925
Here's how I understand the process works:

When you start up the game, the program randomizes the objects in every text category. The resulting order of messages in each category does not change for as long as the game remains running. Let's say your XML file has 30 Rookie of the Year messages, and the game uses two of them every year (one for the NL, one for the AL). If you run the game for 15 seasons without quitting, the program will display all 30 messages in the sequence of their initial randomization. At the end of season 16, you'll get the same two messages you saw at the end of season 1, and so forth.

The game will display a message that has one or more conditions only if those conditions are met by the event that causes the game to look at that category. If the conditions are not met, the game looks at the next message in the queue and applies the same reasoning.

In your example about grand slam home runs, a message that specifically describes the grand slam will display only if that message has the GAME_BASES_LOADED condition and the value of the condition is 1 (meaning yes). Of all the messages in the database, only two of them mention "grand slam." Both are in category 277, and they both have the BASES_LOADED condition set to 1.

One of these messages will be displayed only if that message happens to be next in the queue AND the bases were loaded when the home run occurred. As you can tell, the chance of this happening is pretty slim.

However, that's not as much of a problem as it might seem, because it's clear (to me, anyway) that the game uses hard-coded text to describe what sort of home run just occurred if it wasn't a solo shot (2-run, 3-run, or grand slam). There's no text in the XML file that relates to how many runs came in on a homer. So, the vast majority of grand slam messages we are liable to see in the game are coming from within the program instead of from the database.

Personally, I'd like to see the XML file make much more use of conditions than it does now, but I suspect that's a project for the next version of the game and not something we can do much about in time for the patch(es?).

Does that explain it?

(I could swear I've seen this information spelled out somewhere; maybe it was in the earlier verion of the customization manual but for some reason was not retained for version 1.2.)
M's rule is offline   Reply With Quote
Old 06-24-2006, 10:53 PM   #8
M's rule
All Star Reserve
 
Join Date: Jul 2003
Location: Seattle
Posts: 925
dola,

I just found the information I was referring to. Steve does a much better job of explaining the whole thing:

http://www.ootpdevelopments.com/boar...d.php?t=119607
M's rule is offline   Reply With Quote
Old 06-25-2006, 04:19 PM   #9
tysok
Hall Of Famer
 
Join Date: Aug 2003
Posts: 4,925
Quote:
Originally Posted by M's rule
One of these messages will be displayed only if that message happens to be next in the queue AND the bases were loaded when the home run occurred. As you can tell, the chance of this happening is pretty slim.
That one answers the question.
I probably wasn't phrasing it well enough to get it understood I guess. So the game doesn't call to the xml file and LOOK for an object that meets the condition, it just calls the next line.

So if I wanted the announcer to freak out completely if it was a grand slam, and only inserted one message for that... I would most likely never see it (since grand slams are rare and it would have to be in the exact right location for home run calls when he hit it). I would have to have 20 objects, and then still wouldn't have a 100% possibility...

But I could put a condition on every line, that says if they're NOT loaded this is a good call... then that 1 grand slam call set to if they WERE loaded would be the only possibility and then would have that 100% possibility.

Okay. Just to make sure I completely get it (which I'm obviously beginning to get there) it doesn't randomize these conditions, only the whole category. So... I set all lines to have a condition, 20 lines that say if it ISN'T a grand slam this is a good call... and 2 that say if it IS a grand slam this is a good call. If 2 grand slams were hit in the same gaming session there's no guarantee that I would see the first, then the second... I very well could see the first twice because it's recently skipped the 2nd grand slam call.

That should be right, correct? Also, if I did this then I could possibly end up seeing repeats of the regular home run calls before it's used all 20. Because it's skipped some because of the grand slam.

Just to make that clearer. Randomizer says line 1 is regular, 2 is regular, 3 is regular, 4 is regular, 5 is grand slam. First home run is regular, so gets line 1. Second home run is grand slam so it skips to line 5. The third home run is regular, but since it skippeed 2,3, and 4 for the grand slam I'd get line 1 again.

I just use grand slam because it's short and sweet and bendable... I do mean to question how all conditions work in every category. I think I understand, was everything I said correct?
tysok is offline   Reply With Quote
Old 06-25-2006, 10:26 PM   #10
M's rule
All Star Reserve
 
Join Date: Jul 2003
Location: Seattle
Posts: 925
Quote:
Originally Posted by tysok
That one answers the question.
I probably wasn't phrasing it well enough to get it understood I guess. So the game doesn't call to the xml file and LOOK for an object that meets the condition, it just calls the next line.

So if I wanted the announcer to freak out completely if it was a grand slam, and only inserted one message for that... I would most likely never see it (since grand slams are rare and it would have to be in the exact right location for home run calls when he hit it). I would have to have 20 objects, and then still wouldn't have a 100% possibility...

But I could put a condition on every line, that says if they're NOT loaded this is a good call... then that 1 grand slam call set to if they WERE loaded would be the only possibility and then would have that 100% possibility.

Okay. Just to make sure I completely get it (which I'm obviously beginning to get there) it doesn't randomize these conditions, only the whole category. So... I set all lines to have a condition, 20 lines that say if it ISN'T a grand slam this is a good call... and 2 that say if it IS a grand slam this is a good call. If 2 grand slams were hit in the same gaming session there's no guarantee that I would see the first, then the second... I very well could see the first twice because it's recently skipped the 2nd grand slam call.

That should be right, correct? Also, if I did this then I could possibly end up seeing repeats of the regular home run calls before it's used all 20. Because it's skipped some because of the grand slam.

Just to make that clearer. Randomizer says line 1 is regular, 2 is regular, 3 is regular, 4 is regular, 5 is grand slam. First home run is regular, so gets line 1. Second home run is grand slam so it skips to line 5. The third home run is regular, but since it skippeed 2,3, and 4 for the grand slam I'd get line 1 again.

I just use grand slam because it's short and sweet and bendable... I do mean to question how all conditions work in every category. I think I understand, was everything I said correct?
Yes, I think you have it figured out.

Actually, we already have a way to isolate grand slam calls from other home run calls--use GAME_BASES_LOADED in every message and set the condition to 0 if the call is not for a grand slam, or 1 if it is for a grand slam.

The database isn't set up this way, and I wouldn't make this sort of a change to it without permission, but of course you can do anything you want with your personal XML file.

I realize that grand slam is just your example, but it also happens to be one of the in-game events for which the database could be precisely tailored, thanks to the condition.
M's rule is offline   Reply With Quote
Old 06-26-2006, 10:18 AM   #11
tysok
Hall Of Famer
 
Join Date: Aug 2003
Posts: 4,925
Quote:
Originally Posted by M's rule
Yes, I think you have it figured out.

Actually, we already have a way to isolate grand slam calls from other home run calls--use GAME_BASES_LOADED in every message and set the condition to 0 if the call is not for a grand slam, or 1 if it is for a grand slam.

The database isn't set up this way, and I wouldn't make this sort of a change to it without permission, but of course you can do anything you want with your personal XML file.

I realize that grand slam is just your example, but it also happens to be one of the in-game events for which the database could be precisely tailored, thanks to the condition.
So it's not 100% everything one could hope for, but it's pretty darn close... It would take extra programming, and be a pain in the back side probably to make it so. I wouldn't expect it to be so either... but wanted to make sure I understood what it could do.

From that post you linked me to (which is what I quoted from on the first post here) it read like it might or might not randomize for those specific conditions as well... I really didn't think it would.

From my latest, last post:
"Randomizer says line 1 is regular, 2 is regular, 3 is regular, 4 is regular, 5 is grand slam. First home run is regular, so gets line 1. Second home run is grand slam so it skips to line 5. The third home run is regular, but since it skippeed 2,3, and 4 for the grand slam I'd get line 1 again."

So you could actually shoot yourself in the foot (for staying away from seeing more than one occasion of the same call in the same day) by adding conditions to everything like that.
tysok is offline   Reply With Quote
Old 06-26-2006, 10:17 PM   #12
M's rule
All Star Reserve
 
Join Date: Jul 2003
Location: Seattle
Posts: 925
Quote:
Originally Posted by tysok
So it's not 100% everything one could hope for, but it's pretty darn close... It would take extra programming, and be a pain in the back side probably to make it so. I wouldn't expect it to be so either... but wanted to make sure I understood what it could do.

From that post you linked me to (which is what I quoted from on the first post here) it read like it might or might not randomize for those specific conditions as well... I really didn't think it would.

From my latest, last post:
"Randomizer says line 1 is regular, 2 is regular, 3 is regular, 4 is regular, 5 is grand slam. First home run is regular, so gets line 1. Second home run is grand slam so it skips to line 5. The third home run is regular, but since it skippeed 2,3, and 4 for the grand slam I'd get line 1 again."

So you could actually shoot yourself in the foot (for staying away from seeing more than one occasion of the same call in the same day) by adding conditions to everything like that.
Well, yeah, I see your point. If your HOMERUN category had only five messages structured as you describe, then message 1 would appear for home run #1 and again for home run #3. But if your category has a high number of objects that are used for home run calls then the likelihood of message 1 appearing twice in the same game is pretty close to zero.

In the database currently, the HOMERUN category has more than 80 entries, and it's only one of several categories that could be called when a home run occurs. You could cut out half of the existing messages (or replace them with grand slam calls if you like) and still have enough possibilities to get you through several games' worth of PbP in the same game session.

Just to be sure we're clear on this: I'm practically certain that the "kind" of home run (solo, 2-run, 3-run, GS) is identified by a piece of text that comes from the game code. If I'm correct, then any grand slam call you create in your personal XML file would be redundant with what the game already provides. This would also mean that the two messages in the database that specifically mention grand slam would cause that same sort of redundancy--if either one of them happened to be the next message in the queue when a GS occurs.

As a result of all this reasoning, I'm leaning toward deleting the two GS messages from the database, because there is a slim chance (around 2 in 80-something) that they will cause a double GS call. I would hate to get rid of Dave Niehaus's "grand salami" call, though. . . .
M's rule is offline   Reply With Quote
Old 06-26-2006, 11:21 PM   #13
tysok
Hall Of Famer
 
Join Date: Aug 2003
Posts: 4,925
Quote:
Originally Posted by M's rule
As a result of all this reasoning, I'm leaning toward deleting the two GS messages from the database, because there is a slim chance (around 2 in 80-something) that they will cause a double GS call. I would hate to get rid of Dave Niehaus's "grand salami" call, though. . . .
LOL... yes. I don't think a dual call on a grand slam would be all that bad. You often here them say it at least twice on the radio when it occurs anyhow.

Thanks for helping me clear that up. Completely curiosity on my part, I don't intend to do any pbp changes. Everytime I go into a game to modify it and make it more fun and enjoyable for ME, it ends up becoming a burden and I get sick of the whole thing and don't play the game at all for 6 months... kinda kills the point of my starting the modification in the first place.
tysok is offline   Reply With Quote
Old 06-27-2006, 11:42 PM   #14
M's rule
All Star Reserve
 
Join Date: Jul 2003
Location: Seattle
Posts: 925
Quote:
Originally Posted by tysok
LOL... yes. I don't think a dual call on a grand slam would be all that bad. You often here them say it at least twice on the radio when it occurs anyhow.

Thanks for helping me clear that up. Completely curiosity on my part, I don't intend to do any pbp changes. Everytime I go into a game to modify it and make it more fun and enjoyable for ME, it ends up becoming a burden and I get sick of the whole thing and don't play the game at all for 6 months... kinda kills the point of my starting the modification in the first place.
Glad I could help, tysok. Thanks for the interesting discussion.

k
M's rule 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 10:17 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 - 2024, vBulletin Solutions, Inc.
Copyright © 2020 Out of the Park Developments