Update v6.9 Scripting Improvements & Beta Unity 5 Build!
Author: Kimiko,
published 8 years ago,
This update is a two-parter, the first focusing on the changes in the live build (all scripting) and the second is a beta branch you can opt in to, to test out Tabletop Simulator in Unity 5 (with all the regular updates as well)! Please check it out and let us know in [url=http://www.berserk-games.com/forums/showthread.php?2059-Beta-Branch-Unity-5-Bug-Reports-amp-Issues] this thread[/url] or [url=http://steamcommunity.com/app/286160/discussions/3/392183857628169903/]this thread[/url] of any bugs, issues, etc that you find. The more people who test it out and let us know of any problems, the faster we can get it working and implemented into the live build. Also, people on Unity 5 will be able to play with those on the live build. This is our initial upgrade to Unity 5 with all the same graphics. We’ll be looking into physics-based rendering in the future. Keep an eye out.
Thanks for your help and hope you like the changes!
[img]http://i.imgur.com/gwR2c9C.png[/img]
[h1][b]Live Build[/b][/h1]
[B]Scripting Improvements[/B]
[LIST]
[*] Fixed getSeatedPlayers(). Deep copy of playerlist now.
[*] Reordered parameters on setGlobalScriptTable().
[*] Fixed setTable(). It wasn't working right in the first place.
[*] Fixed setGlobalScriptTable(). It wasn't working right in the first place.
[*] getPointerPosition() and getPointerRotation() now return nil if passed a player color that is not seated
[*] colorToPlayerName() now returns nil if the player color is not seated and lets execution of the script continue.
[*] Removed error message from getObjectFromGUID(). It just returns nil which the scripter can check for.
[*] onPlayerTurnStart() is now called after player clicks OK in hotseat mode.
[*] Added "Global" global reference to Object and Global. Should only be used for referencing things that the Global Script owns.
[*] Deprecated getGlobalScriptVar(), setGlobalScriptVar(), getGlobalScriptTable(), setGlobalScriptTable(). Use Global.getVar(), Global.setVar(), Global.getTable(), Global.setTable() instead.
[*] takeObject() gains an optional parameter 'callback_owner'.
[*] Added "resting" member variable to Object script.
[*] Spectators can no longer click on Lua created buttons.
[*] spawnObject() now takes a Table for a parameter which includes a callback function.
[*] You can now call createButton() immediately after clearButtons() in the same frame.
[*] Added Player class and getPlayer() function.
[*] Player class can get and set lift height for a player.
[*] Player class can tell if player is blindfolded. Setting this just calls blind()/unblind().
[*] Player class has blind() and unblind().
[*] Deprecated getPointerPosition(), getPointerRotation(), and getPlayerHandPositionAndRotation(). They are now in the Player class as getPointerPosition(), getPointerRotation(), and getPlayerHand().
[*] Deprecated colorToPlayerName(). It is now in the Player class as steam_name member variable.
[*] Added Counter class.
[*] Added Tablet URL to getValue() and setValue().
[*] Fixed multiple buttons on a single object not syncing to players who joined late.
[*] Added addForce() and addTorque() to Object script.
[*] Added getVelocity() and getAngularVelocity() to Object script.
[*] Added mass member variable to Object script.
[*] Added use_gravity member variable to Object script.
[*] Added drag member variable to Object script.
[*] Added angular_drag member variable to Object script.
[*] Added static_friction member variable to Object script.
[*] Added dynamic_friction member variable to Object script.
[*] Added bounciness member variable to Object script.
[*] Added held_by_color member variable to Object script.
[*] Added guid member variable to Object script.
[*] Added missing parameters for setCustomObject for Custom Model.
[*] Added spawn Custom Figurine, Custom Board, Custom Tile, Custom Token, and Custom Dice.
[*] Added onPickedUp() and onDropped() events to Object script.
[*] takeObject() called from a deck will now take the top card and not the bottom by default.
[*] Added optional parameter to takeObject() for deck that will take from either the top or the bottom. Defaults to top.
[*] Fixed setRotationSmooth() and rotate() for (0, 0, 0).
[*] Objects taken from a container default to the rotation of the container if no rotation is provided in the parameters. If you set the rotation on a card but want to keep it facing (up/down) the same way as the deck, set the z component in the rotation parameter to the the z component of the deck via deck.getRotation().z.
[*] onObjectDestroyed() now has the object reference as a parameter. It has 1 frame left to live. It fires immediately before the object's onDestroy() event.
[*] Added getButtons() to Object script.
[*] Added removeButton() to Object script. It takes a frame for the button to be removed so multiple buttons can be removed in the same frame with their indices being preserved. In the following frame, the indices of any existing buttons are updated to their new locations as children on the object.
[*] Added editButton() to Object script.
[*] Calling getObjects() on a deck now returns a list of the cards with their indices inside the deck.
[*] takeObject() can remove a card from a deck based on its index in the deck.
[*] Added cut() for stacks and decks.
[*] Added getStateCount(), shuffleStates(), and setState() to Object script.
[/LIST]
[img]http://i.imgur.com/PZnS9IP.png[/img]
[h1][b]Beta - Unity 5[/b][/h1]
These are the changes that are different from the live build and Unity 5. To opt in to the beta, right click on Tabletop Simulator in your Steam library, then click Properties. There will be a new “Betas” tab. At the drop down menu choose “beta - Unity 5”. If it asks for a code, you can ignore it, as you will get the download. You will need to opt out of beta again to get back to the live build, but all players can play with one another, regardless.
[b]Improvements:[/b][list]
[*] Overall performance improvements.
[*] Physics stability and performance.
[*] Objects will no longer go through each other.
[*] Optimized many scripts for improved performance.
[*] Stutter reduction.
[*] Greatly improved the accuracy of auto raise.
[*] Zones (Hidden, Lua, etc.) are now much more reliable.
[*] Increased the number of objects that can be selected / grabbed from 64 to 128.
[*] UI should be much more responsive.
[*] Box select now works properly when 3D Text is selected.[/list]
[b]Limitations:[/b][list]
[*] Concave/Nonconvex colliders are only supported for locked objects.
[*] Touch input is currently disabled for porting to Unity 5.
[*] Tablet screen is not working.
[*] All sounds aren’t working on Linux.
[*] LINUX USERS: Add -force-opengl to the launch parameters otherwise the game will crash. This is a Unity bug in Unity 5 that Unity is planning on fixing at some point.
[*] Minimum requirements Windows XP SP2
[*] Minimum requirements Mac OS X 10.8
[/list]
Stay up to date on development by following us on [url=http://twitter.com/berserkgames]Twitter[/url] and [url=http://facebook.com/tabletopsimulator]Facebook[/url]!