Open
Conversation
Based off the following research: Center template is also serialized and has group parent set when serialized. If the template contains a group parent besides the center template, the center of the object group will be calculated as the average of all objects' sprite origin positions. Since the game assumes the center is always X 0 Y -90 when pasting the objects regardless of the center template's position, this results in a bug where all objects inside the template are offset from their actual position. kCEK 10 1 - template id: int 2 - name: str 3 - variations: dict[template_match_string,list[dict_kCEK_11]] 4 - allow rotation: int 5 - allow flip x: int 6 - allow flip y: int 7 - ignore corners: int 4-7 are set upon first selection to value 1 while the template is in use, once saved they cannot be removed and the template does not remember the last selected options when loaded in-game. kCEK 11 1 - serialized objects: str 2 - weight: int Template match string 9-character string that encodes the template's 3x3 block layout. The character's index encodes position while its value encodes template type. The directions represent what side the legs of the slope point towards. 1x Slopes have equal legs so they are interchangeable while for 2x slopes the first direction is the one the longer leg of the slope points towards while the second direction is for the shorter leg. 2x slopes cover 2 blocks so they are represented by 2 different templates where center is the smaller half of the slope while side is the larger half. Index 0 - Center 1 - Top 2 - Bottom 3 - Left 4 - Right 5 - Top-Left 6 - Top-Right 7 - Bottom-Left 8 - Bottom-Right Values 0 - None 1 - Square 2 - 1x Slope Bottom-Right 3 - 1x Slope Bottom-Left 4 - 1x Slope Top-Left 5 - 1x Slope Top-Right 6 - 2x Slope Center Bottom-Right 7 - 2x Slope Side Bottom-Right 8 - 2x Slope Center Bottom-Left 9 - 2x Slope Side Bottom-Left A - 2x Slope Center Top-Right B - 2x Slope Side Top-Right C - 2x Slope Center Top-Left D - 2x Slope Side Top-Left E - 2x Slope Center Right-Top F - 2x Slope Side Right-Top G - 2x Slope Center Right-Bottom H - 2x Slope Side Right-Bottom I - 2x Slope Center Left-Bottom J - 2x Slope Side Left-Bottom K - 2x Slope Center Left-Top L - 2x Slope Side Left-Top
Author
|
Commit has an error, 4 and 5 are swapped around, should be like this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based off the following research:
Center template is also serialized and has group parent set when serialized.
If the template contains a group parent besides the center template, the center of the object group will be calculated as the average of all objects' sprite origin positions. Since the game assumes the center is always X 0 Y -90 when pasting the objects regardless of the center template's position, this results in a bug where all objects inside the template are offset from their actual position.
kCEK 10
1 - template id: int
2 - name: str
3 - variations: dict[template_match_string,list[dict_kCEK_11]]
4 - allow rotation: int
5 - allow flip x: int
6 - allow flip y: int
7 - ignore corners: int
4-7 are set upon first selection to value 1 while the template is in use, once saved they cannot be removed and the template does not remember the last selected options when loaded in-game.
kCEK 11
1 - serialized objects: str
2 - weight: int
Template match string
9-character string that encodes the template's 3x3 block layout. The character's index encodes position while its value encodes template type.
The directions represent what side the legs of the slope point towards. 1x Slopes have equal legs so they are interchangeable while for 2x slopes the first direction is the one the longer leg of the slope points towards while the second direction is for the shorter leg.
2x slopes cover 2 blocks so they are represented by 2 different templates where center is the smaller half of the slope while side is the larger half.
Index
0 - Center
1 - Top
2 - Bottom
3 - Left
4 - Right
5 - Top-Left
6 - Top-Right
7 - Bottom-Left
8 - Bottom-Right
Values
0 - None
1 - Square
2 - 1x Slope Bottom-Right
3 - 1x Slope Bottom-Left
4 - 1x Slope Top-Left
5 - 1x Slope Top-Right
6 - 2x Slope Center Bottom-Right
7 - 2x Slope Side Bottom-Right
8 - 2x Slope Center Bottom-Left
9 - 2x Slope Side Bottom-Left
A - 2x Slope Center Top-Right
B - 2x Slope Side Top-Right
C - 2x Slope Center Top-Left
D - 2x Slope Side Top-Left
E - 2x Slope Center Right-Top
F - 2x Slope Side Right-Top
G - 2x Slope Center Right-Bottom
H - 2x Slope Side Right-Bottom
I - 2x Slope Center Left-Bottom
J - 2x Slope Side Left-Bottom
K - 2x Slope Center Left-Top
L - 2x Slope Side Left-Top