emberborja / ForbiddenStarsMod

Lua mod for Table Top Simulator
0 stars 0 forks source link

Automatic combat card upgrades #1

Open emberborja opened 2 years ago

emberborja commented 2 years ago

I want to emulate the functionality from another popular FS mod which allows a user to upgrade their combat deck by clicking an "upgrade" button on the combat card upgrade pairs arrayed out on the table next to each player area.

The desired functionality is like so:

emberborja commented 2 years ago

something I found is that the combat card upgrades when the game starts are all their own decks with a guid. If you add these cards to the main combat deck, the deck with that starting guid is lost because I guess it has been destructed.

now from the TTS discord it looks like you can create a new object and give it the same GUID programmatically. Otherwise TTS generates a new guid for that object.

we could hard code the starting GUIDs and then lock down those decks so that they are not player interactable, or we can use a reference other than a guid and search for all objects with a certain name and then lock that name down from being player edited.

we will need a way to find the new deck of the starting cards that gets created because we can assign a guid but if it is taken then TTS makes a new guid anyway and there is no way to reserve a GUID I think.

emberborja commented 2 years ago

explore leveraging command level data to hide and show upgrade buttons, enforcing the command level? It cannot be discounted with hammers so will have to explore if there are other ways to discount by faction such as event cards.

It could be possible to automatically deduct material from the counter after an upgrade as well.

A flex goal would be material enforcement in the same vein as command level enforcement, taking into account how an event card would affect the logic for the feature and incorporating special rules when an event card is drawn at the end of the round.