dtgreene: That assumes that it's possible to get a roll where everything is maxed out. The developers could have made it so that there's a cap on the character's stat sum, so a perfect roll would be intentionally impossible. Or, perhaps the game's RNG isn't perfect, and it just is not capable of generating the sequence of numbers that would lead to perfect stats, resulting in the perfect roll being unintentionally impossible. A variation on that last point would be if the RNG can generate the max stat sequence, but the number of random numbers used and the period of the RNG share a common factor, and the RNG just happens to not have the right alignment to generate the perfect roll.
In other words, your approach is not guaranteed to terminate.
(Before you ask, there's no way to reliably predict that it will terminate; otherwise we'd have a solution to the halting problem.)
Maighstir: Yes, an an easier version to do the same would be: "edit the save file" (or even "edit the value in memory while in chargen", if stats decide what you get when initally starting the game) using an application that likely already exists. But OCRing the screen to read a value is also fun.
Also, hacking can have side effects if you aren't careful.
For example, in classic Wizardry, you can't continue past stat allocation unless you have 0 bonus points remaining; if you somehow have all your stats maxed out and still have bonus points left, you won't be able to proceed, and depending on the game (and version) you may be softlocked (without further hacking).
Of course, while OCRing the game could be fun, if the game is on an easily emulatable console, how about writing a bot that generates an input sequence that yields a maximum bonus point roll? Would eliminate the need to OCR (just check in memory), would avoid having to modify the game or its memory in any way, and (with the right hardware setup) would be possible to port to the actual console.
idbeholdME: Rolling for stats is pure garbage. If you have infinite tries, there is literally 0 point. It just takes time. I always hated that in BG and ID when creating a character. I just went by the principle of "The relevant stats have to be at max level". So of course, rolling for 18/00 strength with enough points to max the other necessary stuff was just tedious.
You also roll for hitpoints you get per level. Either lock it at max value or just make a save and do it as many times as needed for a maximum roll.
Some stuff should NOT have been brought over to PC games from the D&D and rolling is probably the worst offender.
I would say it's not as much of a problem if it's guaranteed that you can eventually max your stats (including HP) regardless.
However, when you add in level caps (even if the cap is higher than feasibly reachable) and don't provide a way to level down your characters, and the game doesn't make it practical to create new characters, then it results in the "missable stat" problem.
Also, D&D has other issues, like having accuracy, rather than damage, be the primary thing that's affected by things like level and armor. The result is that you have a system that does not scale. In D&D, for example, attacks miss too often at the start (on both sides), and (barring Power Attack, which first appeared in 3e) accuracy becomes pointless at higher levels. I also note that, in 3.x at extreme epic levels, a small level difference has too much of an effect; around level 4000, for example, a 1% difference in level can mean the difference between a 5% hit chance and a 95% hit chance. (Contrast that to something like Disgaea, where a 1% level difference, even at that level, has only a minor effect.)
Lone_Scout: Personally, I've always enjoyed playing characters with low stats, they always lead to funny roleplaying situations, but computer RPGs tend to encourage stat maxing over interpretation/roleplaying (contrary to the original goal of RPGs). This tendency has somehow spread to modern pen and paper roleplaying. Sadly, no player nowadays enjoys underpowered characters anymore.
Sorry for grumpy derailing :P
Mortius1: That and the alignment violations.
I expect the majority of paladins in Baldurs Gate dutifully stood guard while the party thief broke into every house and stole everything that wasn't nailed down.
Or one particular paladin in BG2 who is racist against darker skinned elves.
dtgreene: And if the result is not viable?
(Incidentally, this can happen in Advanced Dungeons & Dragons (2e and earlier). Every class has a stat reqirement, and every character needs to have a class, so (especially rolling 3d6 for each stat in order) there's the possibility of rolling a combination of stats that do not qualify for any class, and being unable to finish character creation as a result. I believe 3e did away with stat requirements for classes, so this problem won't happen there, but such a character might not be fun to play (and spellcasting classes can't cast spells if the stat is too low).)
Lone_Scout: The probability of that happening (no stat with a 9+) would be really scarce, under 2.5%. Even less if you consider elves and halflings get a +1 to dexterity, allowing them to become thieves with a max roll of an 8 (although races also have stat requirements)
Personally, I've always enjoyed playing characters with low stats, they always lead to funny roleplaying situations, but computer RPGs tend to encourage stat maxing over interpretation/roleplaying (contrary to the original goal of RPGs). This tendency has somehow spread to modern pen and paper roleplaying. Sadly, no player nowadays enjoys underpowered characters anymore.
Sorry for grumpy derailing :P
The probability, however, is not 0.
Also, keep in mind that only 4 stats need to be 8 or less for the character to get stuck unable to choose a class, as Constitution and Charisma alone do not qualify the character for any class in early editions.