Tabletop Simulator

Tabletop Simulator

Food Chain Magnate [by emptyset]
30 Comments
Il-Roberto  [author] Mar 24, 2024 @ 10:48am 
Also I cloned CFO card for each player and attached 2 buttons:
- a button that display money earned (linked to "+" player's bank)
- a reset button (clicked at the start of phase 5)

This is useful to track money earned in each round so you can add +50% easily.
Il-Roberto  [author] Mar 24, 2024 @ 7:43am 
I've posted to you the code but I don't see any update in change notes...
Il-Roberto  [author] Mar 24, 2024 @ 7:42am 
I've modified the code.
Bank amount updates when players click on their bank instead of checking inside onUpdate(). Code inside onUpdate() is executed every frame.

- commented all code in onUpdate() inside Bank.d3a1d3.lua
- added updateBank(value) in Bank.d3a1d3.lua
- added inside minus(), plus() and resetall() in every colour's bank a call to updateBank
- added inside startGame() a call to updateBank adjusting starting money
- added inside onBreakBankPress() in ReserveBank.873c87.lua a call to updateBank
{emptyset}  [author] Dec 21, 2023 @ 9:17pm 
I've sent you a friend request on Steam; we can coordinate that way. Sorry that I don't get to this very often; the notifications for Steam are not very notification-y.
Il-Roberto  [author] Nov 27, 2023 @ 11:33pm 
Tell me where to send scripts so you can upload
{emptyset}  [author] Nov 27, 2023 @ 2:54pm 
I don't really have time lately to tinker with the lua in this mod, but I'd be happy to reupload it with whatever edits you're describing.
Il-Roberto  [author] Nov 25, 2023 @ 2:58am 
Add also in assignColors() this code to update the table when changing colors

moneyCountersRef[p.color] = getObjectFromGUID(moneyCountersGUIDs[p.color])
Il-Roberto  [author] Nov 24, 2023 @ 9:39am 
I fixed re-sync bank in object script creating a countersPlayersGUIDs (indexed table) with
players color as index (ex. ["Red"] = "4c3104").
Then in onLoad function I get seated colors with a loop like this
selectedColors = {}
banks = {}
for key,p in ipairs(Player.getPlayers()) do
banks[key] = getObjectFromGUID(countersPlayersGUIDs[p.color])
end
Il-Roberto  [author] Nov 24, 2023 @ 7:44am 
...and also I need to re-syncronize bank counter. In onLoad part of Bank counter I need to check what colour are selected because you delete unused with Start Game button
Il-Roberto  [author] Nov 24, 2023 @ 5:50am 
To "save" money amount (temporary fix):
- set in Global.lua a moneyCountersGUIDs indexed table to store GUIDs for players' pieces bank( Ex. moneyCountersGUIDs = {["White"] = whitePieces.bank ...}
- set a blank table for moneyCountersRef
- in onLoad populate the moneyCountersRef table using selectedColors table and moneyCountersGUIDs
- in onSave create a local playersAmount table
- in onSave populate playersAmount table looping with selectedColors. Each entry in playersAmount will have a value from moneyCountersRef[key].getVar("ges"). Remove local keyword in object's script otherwise getVar doesn't work.
- in onSave insert in data_table playersAmount = playersAmount
- in onLoad inside "if saved_data" block if gameStarted is true, get those values from loaded_data.playersAmount and printToAll().
Players will adjust money manually reading values in chat.
Il-Roberto  [author] Nov 24, 2023 @ 12:41am 
To fix repeating saving errors I modified the script in this way:
- change variable name gameStarter to gameStarterGUID
- remove gameStarter variable in onSave
Il-Roberto  [author] Nov 23, 2023 @ 11:50pm 
And there's a problem with saving.
Bank resets to startup and every 10s it logs an error.
I think this is important because when a connection drops and you must reload you get these errors.
Il-Roberto  [author] Nov 23, 2023 @ 11:46pm 
I think you can add on Notebook:
"Before clicking "Start Game" each player must take the 3 restaurant tokens and their turn order marker otherwise they are deleted from table. Move away from scripting zone".
{emptyset}  [author] Nov 10, 2023 @ 6:21pm 
Hey all, apologies for the delay. I've updated the URLs for the food models, so hopefully it works for everyone now. I was able to open the mod up on a different computer, which made the problem easy to reproduce.
Winterish Jul 29, 2023 @ 8:15pm 
Is the recommendation you suggested something you're doing, or we need to do? (something about re-uploading the mod after fixing broken links)
Just found this mod yesterday, and while I can edit each food food path (added /raw) to fix the errors, if there is an easier way, do let us know.
Also, do you think you may add the milestone cards as an option instead of the bingo sheet?
CandyCaneCazoo Jul 15, 2023 @ 9:14am 
CONTINUED:


It seems that on retrieving data from the pastebin site, the lack of the "/raw" directory causes TTS to incorrectly retrieve the files. Therefore, adding the "/raw" directory back into the links for the food tokens fixes this problem. I have no idea how this discrepancy may have arose in the first place. As for the time being, it seems that for some people the tokens are broken, and for others they are not. My recommendation would be to reupload the mod after fixing the broken links, since I do not believe anyone has had an issue with the bag models, and thus that link must work fine.
CandyCaneCazoo Jul 15, 2023 @ 9:14am 
As an update as to specifically what is broken about the food tokens:

While I am unsure what caused it (since on your end you say it is fine), there has been a discrepancy between the food token URL and the food token bag URL.

The food token objs are being stored under pastebin links i.e. https://pastebin.com/W8STAWUx
The food token bag for the corresponding object has the link: https://pastebin.com/raw/W8STAWUx
HOAI May 29, 2023 @ 7:37pm 
food token models are broken
Los2tale May 6, 2023 @ 3:37am 
got error when pull token from bag
Failed to load model (.obj): https://pastebin.com/W8STAWUx
{emptyset}  [author] Feb 28, 2023 @ 12:46pm 
What exactly isn't working about the food token URLs? I can take food out of the food bags and I don't get any obvious errors.
wysit Feb 25, 2023 @ 8:06pm 
@Paulie For the broken urls for the food tokens, what I did was just to copy the custom url for the bags for the food tokens and paste that into the food tokens, then they'll be the exact shape of the bags.
{emptyset}  [author] Feb 20, 2023 @ 12:52pm 
Yeah, I try to clean up everything you don't need when you press Start Game, so if you don't grab your restaurants to your play area before that, you'll lose them permanently. Maybe not the best UX.
Paulie Feb 14, 2023 @ 11:07am 
Update: The restaurant tiles are being deleted when pressing "start game".

Thanks
Paulie Feb 14, 2023 @ 6:51am 
Hi, checking out this mod for the first time. Looks great!

Heads up on a couple of issues encountered, which prevented playing the game:

1. The URLs for the food tokens aren't working
2. Not sure if this is a bug, or just me not looking in the correct place - where are the restaurant tokens?

Thank you!
{emptyset}  [author] Feb 12, 2023 @ 11:26am 
Actually, I lied. Just updated it to fix the asset links and retain the bag on game start.

@Nicholas_bb is the hiring tree covering the main board still something you're seeing? I can't reproduce it.
{emptyset}  [author] Feb 12, 2023 @ 10:54am 
Thanks for the bug reports. I should be able to fix the asset links next week at the very least. I'll also not delete the tile bag on game start.

@Ben @Neari
[Gene-E] Ben Feb 10, 2023 @ 9:04pm 
If you have the host fix the missing asset issue following the instructions below, then this is the best of the Ketchup inclusive mods out there, fully scripted (calc your own dinnertime).
[Gene-E] Ben Feb 10, 2023 @ 8:51pm 
Currently, the 5 pastebin links to the assets are broken. They are pointing, for example, to https://pastebin.com/UkF089PG which doesn't work. Adding the "/raw" part to the URL will result in https://pastebin.com/raw/UkF089PG and solves the problem.

Would be great to see an update here!
Neari Dec 13, 2022 @ 5:50pm 
Where can we get the map tiles mid game? One of the new milestones allows for placing a new tile.
Nicholas_bb May 31, 2022 @ 2:45am 
hiring tree seems loading error, it covers the mainboard. see the pic