View Single Post
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