BioWare Atari
BioWare Info BioWare Games Support Forums Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

BioWare's BlackJack Inn Module

Play a Neverwinter Nights version of Blackjack using this custom module - the Dealer will actually listen and respond to what your character speaks out loud!

BlackJack Inn

(Updates are listed below)

Download Instructions:

You need to be logged in to download this file.

If you do not have an account, sign up for an account now! It's free and allows you greater access to all the BioWare sites.

BlackJack Inn
Released by BioWare, Designed by BioWare's Keith Warner
Additional testing by Jonathan Epp

For 1-4 players (any level)

Instructions

This is a simple Inn - unoccupied except for a Blackjack dealer. Speak with him to start a game of blackjack for one to four players.

After the initial settings are specified in conversation with the Dealer, all further game commands are done through the chat interface. The Dealer will give you the following instructions in a note if you request it:

Each round - you may tell the dealer what to do by typing in chat commands.

  • 'Start' - deals a players initial two cards.
  • 'Hit' - calls for the dealer to deal you one more card.
  • 'Stand' - Stops a players turn with the cards they have and passes the turn to the next player (if there is one), or ends the round (if there's not).
  • 'Total' - If you have been dealt cards - the dealer will tell you what your total is - doesn't matter who's turn it is, you can always ask for your total.

Custom Text Macros: Instead of typing the commands each round, you can add the commands to the quickbar. Simply right-click on an empty quickbar slot and select Custom Text Macro (the 12 o'clock option in the radial menu). Then enter in a label for the quickbar button, and then the command - which would be "Hit", or whatever command you are adding.

Designer Comments for BlackJack Inn
(or How I Taught Myself to use Listening Patterns):

I decided that a good way to teach myself how to use listening patterns in NWN might be to create a black jack game.

There are three steps in creating a NPC that uses listening patterns:

  1. First step is in the NPC's OnSpawn script. You need to set up what words you wish the NPC to be listening for and assign each word or phrase a unique number...

    SetListenPattern(OBJECT_SELF, "Start", 500);
    SetListenPattern(OBJECT_SELF, "Hit", 1000);

    Also in the NPC's OnSpawn script you want to set the NPC to fire an event whenever he 'hears' someone speaking. I did this by uncommenting the line from the Generic OnSpawn script as follows:

    SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004

  2. The Second Step is to enable the Dealer to start listening. I do this as part of the BlackJack Dealer's conversation. When someone says 'Yes, let's play', I run a script that does the following:

    //Set the Dealer to listen for Black Jack commands
    SetListening(OBJECT_SELF, TRUE);

    To turn the dealer off - when the game is over, you repeat the above command except change the TRUE to FALSE.

  3. The Last step is to define what actually happens when the NPC hears the words you have him/her listening for. I have created a script to go in the OnUserDefined event of my dealer that looks something like this:

    //First off - Check and make sure that the NPC is listening.
    if (GetIsListening(OBJECT_SELF))
    {

          //Get the object that the Dealer heard
          object oPC = GetLastSpeaker();
          //If that object is a PC
          if (GetIsPC(oPC))
          {

                // Get what the Dealer heard
                int nPattern = GetListenPatternNumber();

    Then you can use Case Statements or If Else statements to deal with each instance.

    //When someone says 'Start'
    if (nPattern == 500)
    {

          //Do what you want to do here when someone says start.
          //I use a lot of local variables to remember who has joined the game,
          //who's turn it is, and what cards they have been dealt.
    }
    // When someone says 'Hit' - Make sure all players are in the game, then go
    //through them one at a time till they say 'Stand'
    else if (nPattern == 1000)
    {

          //Do what you want to do here when someone says Hit.
    }
    and so on...

    The rest of the Dealer's script was setting up the specific rules for playing BlackJack - when to hit, stand - when you bust - paying out the players, etc...

For Advanced Users - Things to do
Want to improve this module yourself? Here's some ideas:

  1. The Dealer is not actually using a deck of cards, just generating a random number between 1 and 10 (with 1's being Aces - counting as 1 or 11). Alter the Dealer so that the numbers he generates use a scripted deck of cards.
  2. The timing of when the Dealer tells PCs how they've done, paying out money, and the sound effects used could be tweaked a bit.
  3. Make the chairs in the room useable so the characters can sit down.

Updates to Module
v1.1:
- Players can now sit on the chairs

v1.0:
- Initial release

 

 

Dragon Age: Origins Preorder
Neverwinter Nights 2 Forums
Hide/Show

English
Deutsch
Français
Español
Italiano

Hide/Show

View Latest Screenshots 

View Latest Screenshots
Hide/Show

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Current time is: (set time)
Sat, 21 November 2009 09:43PM

Hide/Show

Buy Premium Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Hide/Show

5,046,909 BioWare Users:
  78 Logged In
  10 Hidden
  257 Guests

1549 Playing Online
  100% NWN
  100% NWN: SoU
  100% NWN: HotU

447 Registered Guilds

8,768,252 posts in forums

Newest Forum Topics:
1. Stupid MAKO!! (Mass Effect 1 General Discussion (No spoilers allowed))

2. An Idea Realized and Marquee Abi... (Mass Effect 2 General Discussion (No Spoilers Allowed))

3. I've never playe... (Baldur's Gate II: SoA and ToB General Discussion)

4. Why are you developers scared to... (Mass Effect 2 General Discussion (No Spoilers Allowed))

5. hidden trail (NWN2: Builders - NWN2 Toolset)