Builder XCRs Bitch Contributions: Difference between revisions

From Sinfar
(Updated documentation)
 
(Added Blackjack, Wheel of Fire, and Monster Arena)
Line 6: Line 6:


The Casino is meant to be a dual purpose gambling/arena, with opportunities for players to host events and stage auctions, and whatnot- by discussing with the owner and master of the area, Mebriewiel Relimion.
The Casino is meant to be a dual purpose gambling/arena, with opportunities for players to host events and stage auctions, and whatnot- by discussing with the owner and master of the area, Mebriewiel Relimion.




Line 11: Line 12:


'''Tickets can be redeemed for 500gp'''
'''Tickets can be redeemed for 500gp'''
The primary purpose of the casino isn't to reward money to the victors, but tickets, which they can cash in for valuable prizes. This is not a money farm, but a money sink, where people can go out and farm monsters and spend their money in the casino, hopefully socializing with others in the process.


The area is located in the Waterfront District of Sinfar City.
The area is located in the Waterfront District of Sinfar City.
Line 17: Line 20:


== '''Entering the area:''' ==
== '''Entering the area:''' ==




Line 24: Line 28:


Thus far it does one thing: Assigns the variable NITAKETOKENS int 1, to the entering PC. This has it so players who enter the arena will always have only one token taken from them by the slot machines- incase they forgot they did something silly and set themselves to 100 tokens and forgot to change it before they leave. Notably, the Slot Machines will not take ANY tokens from the player if this variable isn't assigned to the player, so it is to avoid an exploit.
Thus far it does one thing: Assigns the variable NITAKETOKENS int 1, to the entering PC. This has it so players who enter the arena will always have only one token taken from them by the slot machines- incase they forgot they did something silly and set themselves to 100 tokens and forgot to change it before they leave. Notably, the Slot Machines will not take ANY tokens from the player if this variable isn't assigned to the player, so it is to avoid an exploit.
'''Secondary Scripts:''' cas_onenterarena, cas_onexitarena
These two scripts control access to the actual gambling portion of the casino. You are required to make a deposit of 100,000gp to play the games. It is returned with cas_onexitarena. It will not let the player enter the area if they do not have sufficient coins. This was a mostly in character decision rather than an OOC necessary one and can be removed and the area modified (blame arockravensbeak).
=== '''Buying Tokens:''' ===
Players purchase tokens from the help desk NPC. The choices are set via dialog.
'''Scripts required:''' cas_createtoken1, cas_createtoken5, cas_createtoke10, cas_createtoke25, cas_creattoken50, cas_creattok100, cas_creatok1000
These scripts spawn the requisite number tokens into the player's inventory upon receiving payment.
'''Dialog:''' cas_helpdesk
Handles generic variables and token purchasing.
'''NPC:''' cas_helpdeskguy
=== '''REDEEMING TICKETS:''' ===
To be discussed with Admin Team.


== '''Game and their Scripts:''' ==
== '''Game and their Scripts:''' ==
Line 43: Line 67:


'''Dialog:''' cas_helpdesk- the dialog here contains the method by which the secondary scripts are assigned to the player.
'''Dialog:''' cas_helpdesk- the dialog here contains the method by which the secondary scripts are assigned to the player.
'''NPC''': cas_helpdeskguy - NPC with the dialog on him.


=== '''BLACKJACK:''' ===
=== '''BLACKJACK:''' ===
'''Main Scripts:''' cas_dealer_spawn, cas_dealer_ud
'''Main Scripts:''' cas_dealer_spawn, cas_dealer_ud, cas_deal_liston
 
These two scripts are critical to the game functioning. The cas_dealer_spawn handles the on_spawn functions of the game, assigning the ListenPatterns required for cas_dealer_ud to work. The latter script handles the bulk of the functions and how the game works.
 
cas_deal_liston initializes the game, and makes it so the NPC is ready to hear out players so he isn't constantly listening for PCs.
 
Players can assign how much they wish to bet. Generally, payout is 1.5x per token bet. So if a player bets 1 token, it's bumped up to 2, and if a player bets 5 tokens, they are rewarded 7. If they bet 10 tokens, they are rewarded 15 tickets.
 
The game uses listener functions so wonky behavior can occur.
 
'''Secondary Scripts:''' cas_bjnumplay1 (1-4), cas_bj_wager1(1, 5, 10, 50, 100), cas_bj_playtest(2, 3), cas_bj_giverules, cas_dealer_sit,
 
# cas_bjnumplay controls the number of players permitted to join the game. (max 4)
# cas_bj_wager1-100 controls how many tokens are bet on each round of blackjack.
# cas_bj_playtest handles various states of the game
# cas_bj_giverules hands the player how the game is played.
# cas_dealer_sit tells the dealer to sit in his god damn chair.
 
'''Conversation:''' cas_blackjack - handles setting player number, wager amounts, rulebook giving.
 
'''NPC:''' cas_blackjackdea - handles the game overall.
 
=== '''WHEEL OF FIRE:''' ===
Main Script: cas_wheeloffire
 
This script handles the overall function of the game. Essentially, it creates a vfx circle that is applied to the ground in a spherical shape along the diameter and rotates swiftly at first then slows down, landing on a number and applying a unique effect to handle the winning number. Players who bet on that number are rewarded 4x what they bet.
 
[TO BE DEVELOPED FURTHER]


These two scripts are critical to the game functioning. The cas_dealer_spawn handles the on_spawn functions of the game, assigning the ListenPatterns required for cas_dealer_ud to work. The latter script handles the bulk of the functions and how the game works.
=== '''THE MONSTER ARENA:''' ===
'''Main Scripts''': cas_arenastart, cas_arenaper, cas_arenaospawn, cas_arenaondeath, cas_arenaonclick


Players can assign how much they wish to bet. Generally, payout is 1.5x per token bet. So if a player bets 1 token, it's bumped up to 2, and if a player bets 5 tokens, they are rewarded 7.
# cas_arenastart spawns the monsters and controls the SetIsTemporaryEnemy() function, and tells them to attack each other have a delay. (
# cas_arenaper - deprecated, can be removed probably. Not removing because it isn't doing any harm, really.
# cas_arenaondeath - checks for the variable I_BET_ON_RED, I_BET_ON_BLACK, and handles reward functions, despawning the corpse, and deleting the surviving monster from the bout. Deletes variables on surrounding players if the BET functions are found.
# cas_arenaonclick - prevents bets during a monster bout. Assigns variable and deducts tokens from player who is placing bet. Controls how many tokens are being bet with BET_AMOUNT as a local variable. This is an OnClick Event.

Revision as of 13:34, 27 November 2023

Hello, this page is for ADMINS, DMS, and fellow builders.


Currently, the only contribution I have is for the following ERF: https://nwn.sinfar.net/res_list.php?erf_id=988 - or, the Casino.


The Casino is meant to be a dual purpose gambling/arena, with opportunities for players to host events and stage auctions, and whatnot- by discussing with the owner and master of the area, Mebriewiel Relimion.


Each token roughly costs 1000gp.

Tickets can be redeemed for 500gp

The primary purpose of the casino isn't to reward money to the victors, but tickets, which they can cash in for valuable prizes. This is not a money farm, but a money sink, where people can go out and farm monsters and spend their money in the casino, hopefully socializing with others in the process.

The area is located in the Waterfront District of Sinfar City.

I will organize the assets by their purpose:

Entering the area:

Main Script: cas_areaonenter

This script controls the various functions PCs have applied to them when they enter the casino.

Thus far it does one thing: Assigns the variable NITAKETOKENS int 1, to the entering PC. This has it so players who enter the arena will always have only one token taken from them by the slot machines- incase they forgot they did something silly and set themselves to 100 tokens and forgot to change it before they leave. Notably, the Slot Machines will not take ANY tokens from the player if this variable isn't assigned to the player, so it is to avoid an exploit.

Secondary Scripts: cas_onenterarena, cas_onexitarena

These two scripts control access to the actual gambling portion of the casino. You are required to make a deposit of 100,000gp to play the games. It is returned with cas_onexitarena. It will not let the player enter the area if they do not have sufficient coins. This was a mostly in character decision rather than an OOC necessary one and can be removed and the area modified (blame arockravensbeak).

Buying Tokens:

Players purchase tokens from the help desk NPC. The choices are set via dialog.

Scripts required: cas_createtoken1, cas_createtoken5, cas_createtoke10, cas_createtoke25, cas_creattoken50, cas_creattok100, cas_creatok1000

These scripts spawn the requisite number tokens into the player's inventory upon receiving payment.

Dialog: cas_helpdesk

Handles generic variables and token purchasing.

NPC: cas_helpdeskguy

REDEEMING TICKETS:

To be discussed with Admin Team.

Game and their Scripts:

SLOT MACHINES:

Main Script: cas_slotmachine

Handles the majority of the functions of the slot machines. Odds are currently 15% chance of winning any type of combo. Triple 111s are to set to 10%, 222 = 5%, 333 = 2.5%, 444 = 1.25%, 555 = 0.75%, and 666 = 0.1% chance of winning.

Betting more tokens on the game does not increase the jackpot accordingly. Playing 2 tokens at a time increases pay out by 25%. 3 tokens increases pay out by 50%. 4 = 75%, and 5= 100% more tickets. (So, playing 2 tokens and if you were to hit 555 = 125 tickets, versus 200.) This is to encourage spending.

Secondary Scripts: cas_slottoken1, cas_slottoken10, cas_slottoken25, cas_slottoken50, cas_slottoken100

These scripts are set by the Help Desk NPC found on either side of the casino. They control how many tokens a player uses per pull at the slot machine.

Placeables: cas_yellow, cas_red, cas_purple, cas_orange, cas_green, cas_blue

These placeables are used in cas_slotmachine to make a placeable fire appear above the slot machine as a visual representation of the numbers.

Dialog: cas_helpdesk- the dialog here contains the method by which the secondary scripts are assigned to the player.

NPC: cas_helpdeskguy - NPC with the dialog on him.

BLACKJACK:

Main Scripts: cas_dealer_spawn, cas_dealer_ud, cas_deal_liston

These two scripts are critical to the game functioning. The cas_dealer_spawn handles the on_spawn functions of the game, assigning the ListenPatterns required for cas_dealer_ud to work. The latter script handles the bulk of the functions and how the game works.

cas_deal_liston initializes the game, and makes it so the NPC is ready to hear out players so he isn't constantly listening for PCs.

Players can assign how much they wish to bet. Generally, payout is 1.5x per token bet. So if a player bets 1 token, it's bumped up to 2, and if a player bets 5 tokens, they are rewarded 7. If they bet 10 tokens, they are rewarded 15 tickets.

The game uses listener functions so wonky behavior can occur.

Secondary Scripts: cas_bjnumplay1 (1-4), cas_bj_wager1(1, 5, 10, 50, 100), cas_bj_playtest(2, 3), cas_bj_giverules, cas_dealer_sit,

  1. cas_bjnumplay controls the number of players permitted to join the game. (max 4)
  2. cas_bj_wager1-100 controls how many tokens are bet on each round of blackjack.
  3. cas_bj_playtest handles various states of the game
  4. cas_bj_giverules hands the player how the game is played.
  5. cas_dealer_sit tells the dealer to sit in his god damn chair.

Conversation: cas_blackjack - handles setting player number, wager amounts, rulebook giving.

NPC: cas_blackjackdea - handles the game overall.

WHEEL OF FIRE:

Main Script: cas_wheeloffire

This script handles the overall function of the game. Essentially, it creates a vfx circle that is applied to the ground in a spherical shape along the diameter and rotates swiftly at first then slows down, landing on a number and applying a unique effect to handle the winning number. Players who bet on that number are rewarded 4x what they bet.

[TO BE DEVELOPED FURTHER]

THE MONSTER ARENA:

Main Scripts: cas_arenastart, cas_arenaper, cas_arenaospawn, cas_arenaondeath, cas_arenaonclick

  1. cas_arenastart spawns the monsters and controls the SetIsTemporaryEnemy() function, and tells them to attack each other have a delay. (
  2. cas_arenaper - deprecated, can be removed probably. Not removing because it isn't doing any harm, really.
  3. cas_arenaondeath - checks for the variable I_BET_ON_RED, I_BET_ON_BLACK, and handles reward functions, despawning the corpse, and deleting the surviving monster from the bout. Deletes variables on surrounding players if the BET functions are found.
  4. cas_arenaonclick - prevents bets during a monster bout. Assigns variable and deducts tokens from player who is placing bet. Controls how many tokens are being bet with BET_AMOUNT as a local variable. This is an OnClick Event.