Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card counts from servers #15

Open
ArthurCose opened this issue Jul 11, 2022 · 10 comments
Open

Card counts from servers #15

ArthurCose opened this issue Jul 11, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@ArthurCose
Copy link
Owner

Net.set_player_card_counts(player_id, cards) -- cards = { package_id: string, count: number }[]
Net.get_player_card_counts(player_id) -- { package_id: string, count: number }[]
Net.set_player_card_count(player_id, package_id, count)
Net.get_player_card_count(player_id, package_id)

May make sense in the Player Data API. Net.get_player_card_counts(player_id) might be unnecessary.

@ArthurCose ArthurCose added the enhancement New feature or request label Jul 11, 2022
@TheMaverickProgrammer
Copy link
Contributor

What does this feature intend to achieve? I'm a little confused by it.

@ArthurCose
Copy link
Owner Author

Specifying how many chips a player owns in their pack, instead of the default 5 of every chip installed in the mods folder.

@TheMaverickProgrammer
Copy link
Contributor

TheMaverickProgrammer commented Jul 12, 2022

ok yeah I see a need for that. I think this should be a big packet from the server since card pools are going to be big. we don't want to call this function for every possible chip I think. One function with a table input parameter would be nice.

@ArthurCose
Copy link
Owner Author

We'll want these in for small adjustments still (shops, chip traders, etc) unless we have a better API for it.

For a grouped function maybe:

Net.set_player_pack(player_id, cards) -- cards = { package_id: string, count: number }[]

@TheMaverickProgrammer
Copy link
Contributor

TheMaverickProgrammer commented Jul 12, 2022

ok I see. This isn't for nerfing this is for transferring card to their pool. In that case, does set_player_card_count(...) send the mod too if they never had the card in the first place? That wasn't clear here.

@ArthurCose
Copy link
Owner Author

It would not send the mod zip, this would be for nerfing. Net.offer_package, and maybe Net.preload_package would be used for giving the mod zip to the player.

A purchase through a shop may increase the count of the player's chip by one, we just don't need to send every count for the entire pack for this update.

@TheMaverickProgrammer
Copy link
Contributor

why nerf? The game allows x99 copies.

@ArthurCose
Copy link
Owner Author

ArthurCose commented Jul 12, 2022

Not sure what you're meaning here now.

The game does not provide 99 copies by default, you need to earn them through gameplay is what I thought you meant by nerf, rather than just having a static 5 available at all times.

The server should be able to adjust how many cards are available to the player, same as the player earning the cards through gameplay or buying in a shop.

This is separate from providing the mod, the player may already have the mod zip but we want to change the amount of copies usable in a folder from 1 to 2 after the player wins a battle or makes a purchase in a shop.

The player may join the server with the mod but not be required to. If the player doesn't have the mod the server can offer it separately through Net.offer_package

@TheMaverickProgrammer
Copy link
Contributor

TheMaverickProgrammer commented Jul 13, 2022

It would not send the mod zip, this would be for nerfing.

I don't understand this then.

@ArthurCose
Copy link
Owner Author

Might be worth asking users on the discord, not sure how to better explain what I'm talking about. I know Dawn + Keristero expressed interest in this.

Another thing to add here:
Card counts should default to zero and not five when counts are specified. Cards with a count of zero should be hidden in the pack.

Net.set_player_pack(player_id, {}) would make every chip unusable as a side effect of this, but servers should provide enough chips for a starter folder if they're using this API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants