ryan6578 / codewords Goto Github PK
View Code? Open in Web Editor NEWA LUA script for Codewords on Tabletop Simulator for Steam.
Home Page: https://ryan6578.com
License: GNU General Public License v3.0
A LUA script for Codewords on Tabletop Simulator for Steam.
Home Page: https://ryan6578.com
License: GNU General Public License v3.0
Implement functionality to detect whether a player is AFK and perform certain actions when they have been AFK for a specified amount of time.
Implement the ability to shuffle and balance teams.
The box where Codemasters type the clue holds focus even after the clue is entered. If they don't notice and press C to talk, the box is filled with C's. If they want to chat, the box throws an error every time a space is entered due to validation rules. It is a slight annoyance to remember to click outside after entering the clue.
Wondering if there a way to do it automatically
Once all the agent cards are placed over the words and no longer in their original spawn positions. You'll get an 'attempt to index a nil value' error when somebody goes and hits the Shuffle Keymap button.
function doubleToRed and function doubleToBlue is causing this, because it detects no double agent card being there, so it spits out that error.
Prohibit new game from being started unless 2 spymasters are currently seated.
I notice that the clue tokens remain blank after you rewind and then fast forward again. This only happens with the latest version. Old version shows up fine.
New versions is the one where you have finishedClue assigned to a button and not separate like it was before.
Camera defaults to player's seat. When sitting, camera should default to the front of the game.
I was thinking to add an "Auto Start Next Round" option to the settings control panel with ability to set the time in seconds on when it should initiate. This way you can specify a time that will initiate a new game to start. This should be a togglable on/off option.
Example, you can set the amount of time in seconds that will initiate a new game to automatically start. I think this will better help the flow of the game.
Random Deck should also be a togglable option to allow every new round to start with a random deck if enabled.
On a rewind, load the previous game's save state. This is so that the script doesn't completely break on rewinding.
Under certain circumstances, players leaving the game throws the following error:
Error in Script (Custom Model - ) function : Could not find matching button index
GCloud-powered text-to-speech to replace the previous TTS method.
Broadcast a message to notify them that they have a certain amount of time remaining left before the round ends.
Not sure if it was meant to be this way but while looking for something else, I came across the line 394 in the latest commit:
if (playerColor == "Blue" and turnTracker == 0) or (playerColor == "Red" and turnTracker == 1) then
Does it mean, Red can add a code when the turn tracker is 1 but Blue can't do so?
This is to reload the table back to default, great for when the host/admin is AFK, and a promoted player can press this button to reload the table back to default incase there are any glitches.
Create a control panel that allows players, at the click of a button, to switch their color without having to switch to grey first.
Implement analytics in Codenames to provide insight into game dynamics.
Detect end game scenario and respond by moving any remaining agent cards to their respective codes.
Upon placing either the black card or having a team using up all their agent cards, have the game broadcast who the winning team is and then also reset the timer on the clock to 00:00:00
Another issue is with the automated end turn feature. I notice at times whenever a team places the opposite color card down or a white card, that it should automatically end their turn. But it doesn't. I couldn't figure out the cause of this either.
Request to add the option to put the game into "Codenames: Duet" mode, with the mechanics of the "Codenames: Duet" game.
Would require:
I notice that the endGame function isn't always working. I can't seem to pinpoint what the exact cause is. It doesn't always happen.
Sometimes when either all the red or blue agents card are placed on the word board, it doesn't execute the endGame function. Or when a black card is placed.
Curated list of Steam64 IDs that are known trolls. Upon joining, notifies the host and promoted players that this person is on the black list. Include a toggleable function to autokick players on the blacklist.
The card for Microscope in the Vanilla Codenames deck is spelled 'MICROPSCOPE'
Refactor some of the codebase for efficiency - particularly when shuffling. Make redrawing control panels less expensive. Instead of redrawing the entire panel, just redraw the element that is being changed.
I noticed some trolls who sit as spymaster like to press this button while the game is in progress. Could it only work when a game isn't in progress?
Find a workaround for the limitations within the TTS tablet object to allow codes to be announced immediately, instead of having to introduce a delay to get it to work.
Update analytics to provide further insight into games played. Record player information, etc.
I just notice that when starting a new game with the timer disabled, it'll turn on the timer again. The timer should remain off.
I think the problem lies in function setDouble().
Currently, clues are positioned on a position basis. Implement a more robust round robin style encoding schema. Clues will be positioned in chronological order with shifting upwards (if necessary). Old clues at the If more than 8 clues are given, older clues at the top of the list will be replaced with the new clues.
Have decks start in infinity bags and as they are called, move an instance outside. This will prevent lag when initially loading the table. The game will lag when calling a deck for the first time, but all subsequent calls to that deck will not lag.
When a code master wants to tell their team to avoid a word while giving them infinite guesses they use the number 0. The new update that relates to turns ending automatically by using the equation (number of guesses + the one bonus guess) works for well for every number of guesses listed except when the code master uses 0. It lets them have 1 guess and then turn ends.
I wouldn't call it a issue but more of a feature request. Rather than letting promoted players do it, let Codemasters who are sat on Red & Blue to start a new game. The control for a new game is particularly on 624, but I don't really see a problem in giving control of the panel to the codemasters.
583, 591, 599, 607 and 615
Now that we pull clue information, use the number to end the turn automatically once (number + 1) clues have been correctly placed on the board.
Explore the UI documentation. Add a custom UI element for turn tracking and other useful and helpful information.
Needs some sort of indication via audio and verbally to let the team know that a clue is ready for them. I get a lot of people not paying attention sometimes because they're unaware and it would make the game flow much better.
I have a few ideas on how we can improve on this:
or
With the latest update of TTS (10.9) that just came out. I noticed some new scripting additions that could finally make this possible. I saw this from the changelog:
https://api.tabletopsimulator.com/object/#setinvisibleto
Perhaps with these new LUA scripting additions, it would be possible to show which color a particular word card belongs to (WHITE, BLACK, RED, BLUE) perhaps having a subtle border around the card that only the spymasters can see. This would be a great visual cue for the spymasters and decrease the likelihood in placing the wrong agent card over the incorrect word.
I'm also sure these updated scripting functions can also help in hiding things with greater control from certain players or playercolor without using those ugly hidden zones.
I would like the script to be able to automatically tilt the codes after putting the agent cards on them.
A toggleable GUI function that allows players to click to votekick a player with a specified cooldown.
After a new round starts, the spymasters will each get a list of their words displayed to them somehow, so they can easily reference them. This makes it faster for them to connect their words and less likely to make mistakes.
Of course only the spymasters can see their list of words only.
So, we turn the cards to mark the words and we either flip the cards upside down/to it's back to mark out some word tiles.
Some of the card decks have an opaque background with a standard image. Proposal is to:
If someone has the text file and can share it with me, I'm quite happy to see if I can spawn a deck with the above suggestions.
OR ALTERNATIVELY
Instead of rotating the cards to select a word, is it possible to change the state of the word tile by clicking on it? That way, we can change the background to something like
State 1 - Normal
State 2 - Green (to highlight the words we are going to pick next)
State 3 - Red (to highlight the words not part of our clue)
I'm not sure how easy/difficult is to implement the second suggestion but I believe that needs some work on Unity.
Each codemaster should have his/her own encoding platform in front of them in a hidden area. This includes a text box and an encoding button (possibly a counter to denote the clue number). Teams will not be able to view the clue until it has been encoded. The clue will be transformed to uppercase so that case does not matter.
Write against an API that delivers word definitions in game.
Add clue validation:
Possibly include clue number in turn ending, etc.
Look at the new 10.9 API documentation and see if existing code can be refactored.
I noticed that the variable timerOn doesn't reset back to 1 once you have started a new game after the previous game has ended. I believe this is because of my previous request to disable the timer once the game is over. So any new game that is started after that, the timerOn variable will remain as 0. I believe it's in the function onObjectdrop:
-- Set the timer to 0 and disable
timerOn = 0
clockTimer.setValue(0)
Expand the functionality of the analytics to support more detailed statistics (at the player level). Possibly implement a ranking system to give a rough estimate of the player's skill level (codemaster and player).
Only Red, Blue, and promoted users should be able to enable/disable timer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.