riperiperi / FreeSO

Re-implementation of The Sims Online.
http://freeso.org
Mozilla Public License 2.0
829 stars 96 forks source link

Fully Functional Slot Machines (entertainment) #51

Closed TheArchitectFreeSO closed 7 years ago

TheArchitectFreeSO commented 7 years ago

These changes make the three slot machine objects fully functional.

Since FreeSO does not allow objects to go into debt, each slot machine has a balance min-max range of $2500-7500, $12500-17500, and $25000-32500 for the $1, $5, and $10 slot machines, respectively. These minimums have been calculated to cover the maximum payout possible from a "jackpot" spin, which is always 500x the player's bet (see below).

Players can choose to "Play $% Slots" where % is "10" for the "'Jack of Hearts' Slot Machine", "5" for the "'Gypsy Queen' Slot Machine" and "1" for the "Viva PGT[sic] Home Casino". Each machine allows the player to bet one to five "chips" of their respective increments (1, 5, and 10) before pulling the slot machine handle and spinning the wheels. When the player chooses their bet amount and pulls the handle, the server checks to make sure the sim has the money, debits their budget and pays the object's budget, spins the wheels, and checks the results. If the player wins, the server debits the object's budget and pays the player's budget. After every single game, the server checks the machine's balance to make sure it is within the appropriate range before starting a new game. If the object's balance if out of range, the object enters the "off" state, telling the player that the machine is closed for maintenance.

All newly purchased slot machines begin with a balance of $0. Owners MUST deposit a balance from the "manage" interaction by clicking the "cash out" button and choosing "Deposit" BEFORE players will be able to play. If a machine does not have enough stocked simoleons, has too many stocked simoleons, or is powered "off" (a bubble button found in the "manage" interaction's UI Panel), then the interaction to "play" will not be found in the pie menu when a user clicks the object.

Finally, owners can set the "odds" of a machine. This has proven to be a very convoluted concept, but with the help of TSOMatt and his impressive TSO memory, I have decided that the number displayed should be considered the machine's "Return to Player" or RTP.

RTP is a gambling industry standard calculation that adds together all of the probabilities of winning combinations of slot stops multiplied by their payout rate in order to determine the "fairness" of a slot machine. Usually when manipulating RTP in the favor of the house (less than 100%) the payout amounts change, leaving the odds of any winning combination to remain the same.

However, due to the cryptic use of the word "Odds" that Maxis chose to label this slider, as well as TSOMatt's recollection that all payout schemes remained ubiquitious across each machine despite the "Odds" setting, I decided this slider should directly affect the probability of each winning combination. Therefore, when the owner manipulates the "Odds" slider, he is literally manipulating the odds of a player winning as it is programmed to directly affect the number of winning stops and blank stops available in any one game. However gambling experts and enthusiasts should still regard this slider number as representing RTP.

Known Issues: •Certain sound effects do not play despite being called from the slot machine object "play" tree: "slot_pull_handle" , "slot_win" , "slot_lose" and "slot_tantrum_vox" •The "?" buttons on the UI in "Play" and "Manage" do nothing •Depositing and Withdrawing in "manage" mode do not play the classic "slot_coin_drop_in" sound effect •Amounts of simoleons paid or rewarded are not displayed in a box over the sims' heads, as is currently congruous with all other interactions in FreeSO