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

[probably fixed please check] Custom game can accept some invalid data #1038

Closed
User670 opened this issue Nov 10, 2023 · 8 comments
Closed
Labels
enhancement New feature or request

Comments

@User670
Copy link
Contributor

User670 commented Nov 10, 2023

Techmino Quest:7OZlorem!!!eJwDAAAAAAE=!
For example, this data has 7 hold and "lorem" sequence generator, which makes the hold count slider go out of bounds, and the sequence selector to fail.

also 21+ line boards. They should be blocked from being created, exported or imported.

edit: pull request #1049 implemented some checks and error messages. Please help check if there are any other chances where an invalid custom mode data can be imported without being caught by the game right away.

edit 2: here's a summary of custom mode data format, in case you want to mess with it yourself. For detailed "what value stands for what", please go to /parts/data.lua.

Boards are zlib-deflated-compressed and then base64-encoded data. The data before compression are bytes of 0 to 26, each representing a possible block color, arranged left to right from the bottom row upwards. When exporting/importing a single board, the data is prepended with Techmino Field:.

Sequences and missions are RLE-encoded. Some ASCII characters are assigned to be a piece or a mission goal, and some assigned to be a number. Number can be omitted to mean the piece or mission only appears once. When exporting/importing sequences or missions on their own, the data is prepended with Techmino SEQ: and Techmino Target: respectively.

Full custom mode data start with Techmino Quest:, followed by chunks of data separated by exclamation mark !. The first chunk contain some settings (first character is hold queue length as a number character, second character is O-spin (Z for disabled, anything else for enabled), third character is mission kill (same as O-spin), then the name of the sequence generator like "bag" or "his"). The second chunk is missions. The third chunk is sequence. Starting from the 4th chunk, each chunk is a board, with as many board chunks as there are boards.

@Not-A-Normal-Robot
Copy link
Member

idk about that last part though. we specifically added that feature to make it possible.

@SweetSea-ButImNotSweet
Copy link
Contributor

idk about that last part though. we specifically added that feature to make it possible.

It should be possible, for me

@User670
Copy link
Contributor Author

User670 commented Nov 11, 2023

If we decide to support 21+ line boards, we probably should have better code handling them. I don't want to see that "one single block on line 40" thing trolling people.

@coralphoenix76
Copy link

If we decide to support 21+ line boards, we probably should have better code handling them. I don't want to see that "one single block on line 40" thing trolling people.

you still mad? hehe

@SweetSea-ButImNotSweet
Copy link
Contributor

If we decide to support 21+ line boards, we probably should have better code handling them. I don't want to see that "one single block on line 40" thing trolling people.

Do I really need to redesign the UI of custom game menu scene?

@User670
Copy link
Contributor Author

User670 commented Nov 11, 2023

If we decide to support 21+ line boards, we probably should have better code handling them. I don't want to see that "one single block on line 40" thing trolling people.

Do I really need to redesign the UI of custom game menu scene?

No.

At the very least, an indicator that there are more lines than 20 would be nice. We could also have two buttons that scroll the board view up and down. Both of these can easily fit within the original page, no redesign needed.

@SweetSea-ButImNotSweet
Copy link
Contributor

If we decide to support 21+ line boards, we probably should have better code handling them. I don't want to see that "one single block on line 40" thing trolling people.

Do I really need to redesign the UI of custom game menu scene?

No.

At the very least, an indicator that there are more lines than 20 would be nice. We could also have two buttons that scroll the board view up and down. Both of these can easily fit within the original page, no redesign needed.

Hmm, ok I will look at the code later... Busying on other thing in Techmino

@shoucandanghehe shoucandanghehe added the enhancement New feature or request label Nov 14, 2023
@User670 User670 changed the title Custom game can accept some invalid data [probably fixed please check] Custom game can accept some invalid data Nov 17, 2023
@ImpleLee
Copy link
Contributor

Closing this issue until this is rediscovered again.

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

6 participants