Blackjack

JimTheDinosaur

Vault Dweller
Modder
As many probably know, there's an unimped blackjack script in the source files of FO2. So, I was wondering, after looking around and finding almost no references to this, how incomplete is ZIBLKJCK? I'm guessing it was pretty incomplete if it was never added to RP (at least, I'm guessing it was never added given that the scripts haven't changed as far as I can tell from looking at the sources and win_max still stands at 0).

For me, having blackjack added would be the only thing making gambling kind of interesting, but maybe that's just cause it's the only thing I ever played in casinos :p.
 
Last edited:
Yeah, that would be fun. If you have high Gambling you should be able to count cards.

Poker would be nice too, but I suppose that's asking a lot.
 
Read it and find out I suppose? Might be more worthwhile to rewrite it anyhow.

That's the thing. It looks ok, but I was just thinking there must be something wrong with it if the devs left it out and the RP guys did too, right?

edit: but you're right, might as well try and make one myself, might be fun. Plus, with arrays it shouldn't be that hard.
 
Last edited:
Well, that was indeed relatively fun and easy (at least, I seem to have gotten it to work correctly). With arrays I could just simulate actual deck(s) of cards, with a random card "popped" from the array into either the player "hand" (each hand is another array) or that of the dealer (no other players are present) and the arrays rebuilt after each hand with the "shuffle". This would have been a bit more elegant with @phobos2077 's new array system, but given that I'm already doing so much with the old ones I stuck to creating and "freeing" arrays. Here's how the blackjack game functions:


  • The game is dealt from 3 decks, which are shuffled after every hand.
  • The player may purchase insurance.
  • No surrender is offered because the dealer has no hole card [I'm European, sue me].
  • Blackjack pays 3 to 2.
  • The player can double down on any starting hand.
  • The player may split to four hands.
  • The player may split non-identical card values (that is, the player may split Queen-King).
  • The player may double down on each of the split hands.
  • Dealer hits until a "hard" 17.
  • While no basis in actual rules, you can potentially exceed the maximum bet by "letting it ride." In a savescum inducive environment I like being encouraged to take risks.

Gambling, like @UniversalWolf suggested, allows you to "count cards". This means you can see the percentage likelihood of the next card either to you or the dealer being a "high card" (i.e. ace or 10/face card). At minimum gambling this likelihood is calculated based on 10 possible cards in the deck (including the correct one), while at max gambling only on the correct one (so you get either 100% likelihood, or 0%). To avoid just automatically counting cards each time, I want to make dealers notice you counting (maybe based on a charisma check on your part), and kicking you out if you do it too noticably. Similarly, I want to make the maximum you can bet at one dealer depend on how "popular" you are (this to avoid save scumming and other exploits), meaning charisma and long playing streaks let you play for more of the bank's money.

If anybody is interested in the source let me know (I left the deck and hand creating procedures generic so as to allow for other card games; I'm thinking of making texas hold 'em next).
 
Last edited:
...Poker would be nice too, but I suppose that's asking a lot.

Check out the New Vision mod. There are characters in Klamath now that you can play poker with. (I did add this component to the MM, as well.)

Nice. I've been meaning to try the MM for a long time now, BTW. I'm sure I'll give it a go one of these days.


Gambling, like @UniversalWolf suggested, allows you to "count cards".
Very nice. Texas Hold 'Em sounds great too.

It'll be nice to have somethng other than slots and craps to play. That's what's in vanilla, right? craps? I tried to figure out the rules for craps IRL once, and failed. That game is complicated.
 
Back
Top