VWS Customizable SlotMachine [Template]
You need to own this item to leave a rating.
Customizable SlotMachine Template - Type1
This is a template for making a custom 5-reel slot machine. It comes pre-assembled along with the needed script to run a slot machine in standalone mode. Here is what you will still need to do to make your own custom slot machine theme using this template:
1) Create your own spritesheet's by editing the template graphic provided [see https://github.com/virtualworldsystems/slotmachinesystem] - (highly recommend 'spritesheetslicer' program for perfecting alignment of tiles in spritesheet)
2) Load the new spritesheet into all 20 cells of one of the slot reel objects materials (albedo + emissive map)
3) Copy the new materials from the reel you edited to the other 4 (use the copy materials to like objects method to save time)
4) Setup your WinningComobos, Events (if any, spawn something like fx when a winning combo or bonus occurs? :), Select the Sounds, Set desired BetAmounts, Prize Amounts, setup any BonusCombos you like the same way, etc.
5) Setup the various amounts the players can bet in the BetAmounts list.
6) Test, and Enjoy!
NOTES:
This slot machine system supports one pay line only, thus the product identifier 'type1'
This template comes with circular spinning reels, animated mesh with a separate material for each 'tile'
This machine uses one script per copy of it in the scene, it does not need any custom group names or anything adjusted to duplicate in the scene, just dupe it and go!
If you want to use a SlotController to retain player balances short and/or long term, as well as create a Point Redemption/Prize Center with store items, you will need to purchase the full script from our store. This machine only comes with the SlotMachine script that runs in standalone mode. The full script will also allow you to receive any patches/updates to the entire system, as well as gain access to the other features of the slot system in full.
The player can toggle between bet-amounts at runtime, but not in the middle of any bonus games!
You can remove the enclosure mesh as well as other various parts from this template, and replace with your own if you wish.
While this script can only be officially supported by us using official VWS slot reel objects such as the ones that come with our machine template(s), as they have to be in a very specific format/configuration. However, if you are super interested in making your own, we are happy to provide you with a sample fbx and its details -- see our GitHub repo with extra files for this system.
~~~~~
##### SlotMachine script #####
The slotmachine only has one chat command itself, and can only be ran by the scene-owner at runtime. This is useful for testing reel values for WinningCombo and BonusCombo lists. When the command is sent by the scene owner, the slot machine will not spin, but act like it just landed on the reel #'s you provide, for example if my prize is 1,2,3 and I want to test it.. the other two numbers out of 5 do not matter, so I could do:
/slotdebug 0 0 1 2 3
Provided below are all the various script properties for our SlotMachine script that is provided on this template, this will further explain the devices potential functionalities:
BootupDelay - Initialization Delay, this is recommended to keep the script running normally, for this many seconds after the scene instance is started the script will wait before initializing; Recommended value: 4
DebugMode - When on, lots of debug info, including any configuration errors, for initialization and runtime will be shown in the Sansar Debug Console; Please do not leave enabled for production usage
PullArmAnimator - A slot-in reference to the animator of the animated-mesh PullArm on the slot machine in this object group
ReelMesh1 - A slot-in reference to the 1st slot machine reel mesh in this object group (counting from left to right); Please use copy reference on the root of each reel's mesh in the scene objects hierarchy and then paste into these slots
ReelMesh2 - A slot-in reference to the 2nd slot machine reel mesh in this object group
ReelMesh3 - A slot-in reference to the 3rd slot machine reel mesh in this object group
ReelMesh4 - A slot-in reference to the 4th slot machine reel mesh in this object group
ReelMesh5 - A slot-in reference to the 5th slot machine reel mesh in this object group
SpinReelsUpwards - When on, the reels (when spinning) will animate spinning upwards, when this value is off.. downwards, from back to forward
SpinVolume - A slot-in reference to the 'Spin Button' volume
BetAmounts - Please create an entry here for each bet amount/denomination per spin the user can select, the first one will be the default; Prizes are multiplied by this value, positive or negative; Bonus round prize amounts are NOT multiplied by this amount;
DefaultBetOnForce - When true, and you send the 'Force Cashout & Reset' event to your slot controller (when using one), the machine will reset its 'Bet Amount' to the first entry
BetAmountVolume - A slot-in reference to the 'Change Bet Amount' volume
SpinDelay - The delay before spinning the reels, after receiving the event; Recommended value: 0.75
AddCoinsVolume - A slot-in reference to the 'Add Coins' button volume
AddCoinsSound - The sound that is played when the user logs into the machine for user by clicking 'Add Coins' button
BankruptCoinsAmount - The amount of coins to give the user, when they have none -- this is useful for gaming events, and when persistence isn't being used; DefaultValue: 100
CashoutResetVolume - A slot-in reference the the Cashout button's volume
CashoutSound - The sound that is played when the player cashes out of this slot machine
Group - The event group to use for this slot machine, should be the same for all slots of this brand in the scene; Only used for custom events definable on this script, not machine intercommunication with a SlotController; Default Value: 'slots'
LEDBoardMesh - Please slot in the machines 'VWS SlotMachine LEDboard' object provided with this template here, these are also separately available on our store
WinningCombos - This is where we define which icon #s on the sprite sheet/reels represent winning prizes; For example: 0,0,0 would mean the first sprite/icon when 3 in a row are landed on, the player gets the prize on the same entry # in the list below this one; 19,19,19 would represent the last icon on the sprite sheet/reels; just 19 one time here would mean for every time that last icon is landed on, it is its own prize, you can put up to five #s here (comma separate), and as little as one
WinningComboPrizes - Here we define all the prize (point/coin amounts) for al the WinningCombos in the list above this one
WinningComboEvents - Here we define events that will be sent (please use event@group if separated group) when each prize is landed on (optional) -- sometimes this is useful for spawning something such as particles/fx for certain prizes, or talking to some other script you might have added to the machine for extra effects
WinningComboSounds - The sounds to play for each prize defined in lists above this one (required)
WinningCombos2 - This is a secondary extra list for having a 20 extra winning combos (optional)
WinningComboPrizes2 - The prizes for the WinningCombos defined above
WinningComboEvents2 - The events for the WinningCombos defined above
WinningComboSounds2 - The sounds to play for each prize defined in lists above this one (required)
BonusCombos - The same as WinningCombos, except these combinations trigger 'bonus round' mode
BonusComboPrizes - The number of rounds to award the player for each BonusCombo defined above
BonusComboEvents - The optional events to send for each BonusCombo the reels land on
BonusComboSounds - The sounds to play for each BonusCombo landed on, these will play in the background and will not override other sounds -- BonusComboSounds only, this is usually used for short songs that play during each BonusCombo type in the background
BonusSpinDelay - The delay between bonus spins
IconsBrightnessNormal - The emissive value of icons when they are not lit up on the reels; Recommend Value: 0.025f
IconsBrightnessLit - The emissive value of icons when they ARE lit up on the reels; Recommended Value: 1.5
PullArmSound - The sound to play when the pull arm is pulled and/or the 'Spin' button is pressed
ReelsSpinningSound - The sound to play in the background to represent the slot reels are spinning
ReelStopSound - The sound to play when the slot reels stop spinning (once for each stop)
SpinCooldownTime - The required amount of pause (in seconds) between the last spin finishing and the next one being allowed by player activation; Recommended Value: 0.25
PlayWinningSounds - When enabled, defined sounds will be played for winning combos, and bonus rounds
MinimumSpinSpeed - The minimum speed the reels spin at; Recommended value: 3
MaxSpinSpeed - The maximum speed the reels spin at; Recommended value: 5
RandomizeReelsWhileSpinning - When enabled, reels are randomized WHILE spinning, recommended value: true
Spatialized - When enabled, sounds emitted from this slot machine will be spatialized; Recommended value: true
Loudness - The minimum loudness the machines sounds will be played at; Recommended Value: 50
~~~~~
You can view many different examples of this template in use at a demo world here: https://atlas.sansar.com/experiences/freelight-1030/casino-games
If you have further questions or need support for this or related products from our store, please join our discord support server @ https://discord.gg/gUfP23A2aC