From 5a2001fb061b6c4ca780f3ace7575f9428fc325a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Fri, 31 Jul 2026 16:35:09 +0100 Subject: [PATCH 1/4] feat(datastore): adjust GetApplicationConfig with new information Document new information and apply the 100 couse upload limit to everyone. This was previously only happening to those with 0 or 1 medals, but now we know how to apply it to those with more. --- .../get_application_config.go | 47 ++++++++++++------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/nex/datastore/super-mario-maker/get_application_config.go b/nex/datastore/super-mario-maker/get_application_config.go index 7bba4ed..04ff783 100644 --- a/nex/datastore/super-mario-maker/get_application_config.go +++ b/nex/datastore/super-mario-maker/get_application_config.go @@ -27,7 +27,7 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, switch applicationID { case 0: // * Player config? - config = getApplicationConfig_PlayerConfig() + config = getApplicationConfig_GlobalConfig() case 1: // * PIDs of the "Official" makers in the "MAKERS" section config = getApplicationConfig_OfficialMakers() case 2: // * Unknown @@ -55,21 +55,33 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, return rmcResponse, nil } -func getApplicationConfig_PlayerConfig() []uint32 { - // * This seems to be per-user configuration - // * settings, based on the fact that the - // * number of max uploads a user can do is - // * sent here. No idea what anything else - // * means +func getApplicationConfig_GlobalConfig() []uint32 { + // * This seems to be global configuration settings return []uint32{ - 0x00000001, 0x00000032, 0x00000096, 0x0000012c, 0x000001f4, - 0x00000320, 0x00000514, 0x000007d0, 0x00000bb8, 0x00001388, - MAX_COURSE_UPLOADS, 0x00000014, 0x0000001e, 0x00000028, 0x00000032, - 0x0000003c, 0x00000046, 0x00000050, 0x0000005a, 0x00000064, - 0x00000023, 0x0000004b, 0x00000023, 0x0000004b, 0x00000032, - 0x00000000, 0x00000003, 0x00000003, 0x00000064, 0x00000006, - 0x00000001, 0x00000060, 0x00000005, 0x00000060, 0x00000000, - 0x000007e4, 0x00000001, 0x00000001, 0x0000000c, 0x00000000, + 1, // * Number of stars for the 1st medal + 50, // * Number of stars for the 2nd medal + 150, // * Number of stars for the 3rd medal + 300, // * Number of stars for the 4th medal + 500, // * Number of stars for the 5th medal + 800, // * Number of stars for the 6th medal + 1300, // * Number of stars for the 7th medal + 2000, // * Number of stars for the 8th medal + 3000, // * Number of stars for the 9th medal + 5000, // * Number of stars for the 10th medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload when you have 0 or 1 medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 2nd medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 3rd medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 4th medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 5th medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 6th medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 7th medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 8th medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 9th medal + MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 10th medal + 35, 75, 35, 75, 50, // * Unknown + 0, 3, 3, 100, 6, // * Unknown + 1, 96, 5, 96, 0, // * Unknown + 2020, 1, 1, 12, 0, // * Looks like a date? 2020-01-01 12:00? } } @@ -89,9 +101,10 @@ func getApplicationConfig_OfficialMakers() []uint32 { } func getApplicationConfig_Unknown2() []uint32 { - // * I have no idea what this is + // * I have no idea what this is, looks like a date? + // * This was when the SMM bookmark was released, so maybe it controls accessibility to it? // * Just replaying data sent from the real server - return []uint32{0x000007df, 0x0000000c, 0x00000016, 0x00000005, 0x00000000} + return []uint32{2015, 12, 22, 5, 0} // * 2015-12-22 5:00 } func getApplicationConfig_Unknown10() []uint32 { From 37e1e7a100d84d36199ebfb6b36325e2ab62e4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Fri, 31 Jul 2026 16:40:43 +0100 Subject: [PATCH 2/4] fix(datastore): rename player config to global config --- nex/datastore/super-mario-maker/get_application_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nex/datastore/super-mario-maker/get_application_config.go b/nex/datastore/super-mario-maker/get_application_config.go index 04ff783..f4329e9 100644 --- a/nex/datastore/super-mario-maker/get_application_config.go +++ b/nex/datastore/super-mario-maker/get_application_config.go @@ -26,7 +26,7 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, var config []uint32 switch applicationID { - case 0: // * Player config? + case 0: // * Global config? config = getApplicationConfig_GlobalConfig() case 1: // * PIDs of the "Official" makers in the "MAKERS" section config = getApplicationConfig_OfficialMakers() From 99dc519a94daca98501c89aa3cca9a22d75bc7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Fri, 31 Jul 2026 22:34:13 +0100 Subject: [PATCH 3/4] feat(datastore): add constants for GetApplicationConfig --- .../super-mario-maker/constants/constants.go | 142 ++++++++++++++++++ .../get_application_config.go | 121 +++++++++------ 2 files changed, 215 insertions(+), 48 deletions(-) create mode 100644 nex/datastore/super-mario-maker/constants/constants.go diff --git a/nex/datastore/super-mario-maker/constants/constants.go b/nex/datastore/super-mario-maker/constants/constants.go new file mode 100644 index 0000000..cc3f26d --- /dev/null +++ b/nex/datastore/super-mario-maker/constants/constants.go @@ -0,0 +1,142 @@ +package constants + +const ( + // STARS_1ST_MEDAL represents the number of stars needed to acquire the 1st medal + STARS_1ST_MEDAL uint32 = 1 + + // STARS_2ND_MEDAL represents the number of stars needed to acquire the 2nd medal + STARS_2ND_MEDAL uint32 = 50 + + // STARS_3RD_MEDAL represents the number of stars needed to acquire the 3rd medal + STARS_3RD_MEDAL uint32 = 150 + + // STARS_4TH_MEDAL represents the number of stars needed to acquire the 4th medal + STARS_4TH_MEDAL uint32 = 300 + + // STARS_5TH_MEDAL represents the number of stars needed to acquire the 5th medal + STARS_5TH_MEDAL uint32 = 500 + + // STARS_6TH_MEDAL represents the number of stars needed to acquire the 6th medal + STARS_6TH_MEDAL uint32 = 800 + + // STARS_7TH_MEDAL represents the number of stars needed to acquire the 7th medal + STARS_7TH_MEDAL uint32 = 1300 + + // STARS_8TH_MEDAL represents the number of stars needed to acquire the 8th medal + STARS_8TH_MEDAL uint32 = 2000 + + // STARS_9TH_MEDAL represents the number of stars needed to acquire the 9th medal + STARS_9TH_MEDAL uint32 = 3000 + + // STARS_10TH_MEDAL represents the number of stars needed to acquire the 10th medal + STARS_10TH_MEDAL uint32 = 5000 + + // MAX_COURSE_UPLOADS_0TH_1ST_MEDAL represents the number of courses a user can upload when you have 0 or 1 medal + // Nintendo sets this to 10 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_0TH_1ST_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_2ND_MEDAL represents the number of courses a user can upload after getting the 2nd medal + // Nintendo sets this to 20 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_2ND_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_3RD_MEDAL represents the number of courses a user can upload after getting the 3rd medal + // Nintendo sets this to 30 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_3RD_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_4TH_MEDAL represents the number of courses a user can upload after getting the 4th medal + // Nintendo sets this to 40 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_4TH_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_5TH_MEDAL represents the number of courses a user can upload after getting the 5th medal + // Nintendo sets this to 50 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_5TH_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_6TH_MEDAL represents the number of courses a user can upload after getting the 6th medal + // Nintendo sets this to 60 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_6TH_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_7TH_MEDAL represents the number of courses a user can upload after getting the 7th medal + // Nintendo sets this to 70 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_7TH_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_8TH_MEDAL represents the number of courses a user can upload after getting the 8th medal + // Nintendo sets this to 80 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_8TH_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_9TH_MEDAL represents the number of courses a user can upload after getting the 9th medal + // Nintendo sets this to 90 by default and users earn more upload slots up to 100. + // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh + MAX_COURSE_UPLOADS_9TH_MEDAL uint32 = 100 + + // MAX_COURSE_UPLOADS_10TH_MEDAL represents the number of courses you can upload after getting the 10th medal + // Nintendo sets this to 100 by default. + MAX_COURSE_UPLOADS_10TH_MEDAL uint32 = 100 + + // COURSE_WORLD_EASY_FAILURE_RATE_MIN is the minimum failure rate for Easy levels on the Course World + COURSE_WORLD_EASY_FAILURE_RATE_MIN uint32 = 0 + + // COURSE_WORLD_EASY_FAILURE_RATE_MAX is the maximum failure rate for Easy levels on the Course World + COURSE_WORLD_EASY_FAILURE_RATE_MAX uint32 = 34 + + // COURSE_WORLD_NORMAL_FAILURE_RATE_MIN is the minimum failure rate for Normal levels on the Course World + COURSE_WORLD_NORMAL_FAILURE_RATE_MIN uint32 = 35 + + // COURSE_WORLD_NORMAL_FAILURE_RATE_MAX is the maximum failure rate for Normal levels on the Course World + COURSE_WORLD_NORMAL_FAILURE_RATE_MAX uint32 = 74 + + // COURSE_WORLD_EXPERT_FAILURE_RATE_MIN is the minimum failure rate for Expert levels on the Course World + COURSE_WORLD_EXPERT_FAILURE_RATE_MIN uint32 = 75 + + // COURSE_WORLD_EXPERT_FAILURE_RATE_MAX is the maximum failure rate for Expert levels on the Course World + COURSE_WORLD_EXPERT_FAILURE_RATE_MAX uint32 = 95 + + // COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN is the minimum failure rate for Super Expert levels on the Course World + COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN uint32 = 96 + + // COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MAX is the maximum failure rate for Super Expert levels on the Course World + COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MAX uint32 = 100 + + // COURSE_DOWNLOAD_WIIU represents the number of courses downloaded by the Wii U at the same time + COURSE_DOWNLOAD_WIIU uint32 = 100 + + // COURSE_DOWNLOAD_3DS represents the number of courses downloaded by the 3DS at the same time + COURSE_DOWNLOAD_3DS uint32 = 40 + + // CHANGED_DATE_YEAR contains the year of an unknown date, possibly when the config was last changed (2020-01-01 12:00) + CHANGED_DATE_YEAR uint32 = 2020 + + // CHANGED_DATE_MONTH contains the month of an unknown date, possibly when the config was last changed (2020-01-01 12:00) + CHANGED_DATE_MONTH uint32 = 1 + + // CHANGED_DATE_DAY contains the day of an unknown date, possibly when the config was last changed (2020-01-01 12:00) + CHANGED_DATE_DAY uint32 = 1 + + // CHANGED_DATE_HOUR contains the hour of an unknown date, possibly when the config was last changed (2020-01-01 12:00) + CHANGED_DATE_HOUR uint32 = 12 + + // CHANGED_DATE_MINUTE contains the minute of an unknown date, possibly when the config was last changed (2020-01-01 12:00) + CHANGED_DATE_MINUTE uint32 = 0 + + // BOOKMARK_DATE_YEAR contains the year of when the SMM bookmark was released (2015-12-22 5:00) + BOOKMARK_DATE_YEAR uint32 = 2015 + + // BOOKMARK_DATE_MONTH contains the month of when the SMM bookmark was released (2015-12-22 5:00) + BOOKMARK_DATE_MONTH uint32 = 12 + + // BOOKMARK_DATE_DAY contains the day of when the SMM bookmark was released (2015-12-22 5:00) + BOOKMARK_DATE_DAY uint32 = 22 + + // BOOKMARK_DATE_HOUR contains the hour of when the SMM bookmark was released (2015-12-22 5:00) + BOOKMARK_DATE_HOUR uint32 = 5 + + // BOOKMARK_DATE_MINUTE contains the minute of when the SMM bookmark was released (2015-12-22 5:00) + BOOKMARK_DATE_MINUTE uint32 = 0 +) diff --git a/nex/datastore/super-mario-maker/get_application_config.go b/nex/datastore/super-mario-maker/get_application_config.go index f4329e9..30caf57 100644 --- a/nex/datastore/super-mario-maker/get_application_config.go +++ b/nex/datastore/super-mario-maker/get_application_config.go @@ -7,16 +7,9 @@ import ( "github.com/PretendoNetwork/nex-go/v2/types" datastore_super_mario_maker "github.com/PretendoNetwork/nex-protocols-go/v2/datastore/super-mario-maker" "github.com/PretendoNetwork/super-mario-maker/globals" + "github.com/PretendoNetwork/super-mario-maker/nex/datastore/super-mario-maker/constants" ) -// * Nintendo sets this to 10 by default -// * and users earn more upload slots up -// * to 100. -// * This is a stupid, unfun, mechanic so -// * everyone gets 100 by default. Can be -// * more, but 100 is fine tbh -var MAX_COURSE_UPLOADS uint32 = 100 - func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, applicationID types.UInt32) (*nex.RMCMessage, *nex.Error) { if err != nil { globals.Logger.Error(err.Error()) @@ -26,14 +19,14 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, var config []uint32 switch applicationID { - case 0: // * Global config? - config = getApplicationConfig_GlobalConfig() + case 0: // * Gameplay config (Wii U) + config = getApplicationConfig_GameplayConfig() case 1: // * PIDs of the "Official" makers in the "MAKERS" section config = getApplicationConfig_OfficialMakers() - case 2: // * Unknown - config = getApplicationConfig_Unknown2() - case 10: // * Unknown - config = getApplicationConfig_Unknown10() + case 2: // * SMM bookmark + config = getApplicationConfig_Bookmark() + case 10: // * Gameplay config (3DS) + config = getApplicationConfig_GameplayConfig3DS() default: fmt.Printf("[Warning] DataStoreSMMProtocol::GetApplicationConfig Unsupported applicationID: %v\n", applicationID) } @@ -55,33 +48,54 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, return rmcResponse, nil } -func getApplicationConfig_GlobalConfig() []uint32 { - // * This seems to be global configuration settings +func getApplicationConfig_GameplayConfig() []uint32 { + // * This seems to be gameplay configuration settings return []uint32{ - 1, // * Number of stars for the 1st medal - 50, // * Number of stars for the 2nd medal - 150, // * Number of stars for the 3rd medal - 300, // * Number of stars for the 4th medal - 500, // * Number of stars for the 5th medal - 800, // * Number of stars for the 6th medal - 1300, // * Number of stars for the 7th medal - 2000, // * Number of stars for the 8th medal - 3000, // * Number of stars for the 9th medal - 5000, // * Number of stars for the 10th medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload when you have 0 or 1 medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 2nd medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 3rd medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 4th medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 5th medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 6th medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 7th medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 8th medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 9th medal - MAX_COURSE_UPLOADS, // * Number of courses you can upload after getting the 10th medal - 35, 75, 35, 75, 50, // * Unknown - 0, 3, 3, 100, 6, // * Unknown - 1, 96, 5, 96, 0, // * Unknown - 2020, 1, 1, 12, 0, // * Looks like a date? 2020-01-01 12:00? + constants.STARS_1ST_MEDAL, + constants.STARS_2ND_MEDAL, + constants.STARS_3RD_MEDAL, + constants.STARS_4TH_MEDAL, + constants.STARS_5TH_MEDAL, + constants.STARS_6TH_MEDAL, + constants.STARS_7TH_MEDAL, + constants.STARS_8TH_MEDAL, + constants.STARS_9TH_MEDAL, + constants.STARS_10TH_MEDAL, + + constants.MAX_COURSE_UPLOADS_0TH_1ST_MEDAL, + constants.MAX_COURSE_UPLOADS_2ND_MEDAL, + constants.MAX_COURSE_UPLOADS_3RD_MEDAL, + constants.MAX_COURSE_UPLOADS_4TH_MEDAL, + constants.MAX_COURSE_UPLOADS_5TH_MEDAL, + constants.MAX_COURSE_UPLOADS_6TH_MEDAL, + constants.MAX_COURSE_UPLOADS_7TH_MEDAL, + constants.MAX_COURSE_UPLOADS_8TH_MEDAL, + constants.MAX_COURSE_UPLOADS_9TH_MEDAL, + constants.MAX_COURSE_UPLOADS_10TH_MEDAL, + + // * These values are most likely settings about requesting courses, but it's not certain what they individually mean (mostly) + constants.COURSE_WORLD_NORMAL_FAILURE_RATE_MIN, + constants.COURSE_WORLD_EXPERT_FAILURE_RATE_MIN, + constants.COURSE_WORLD_NORMAL_FAILURE_RATE_MIN, + constants.COURSE_WORLD_EXPERT_FAILURE_RATE_MIN, + 50, + 0, + 3, + 3, + constants.COURSE_DOWNLOAD_WIIU, // * Maybe? + 6, // * Might be related with the extraData? + 1, + constants.COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN, + 5, + constants.COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN, + 0, + + // * Looks like a date, possibly when the config was last changed? 2020-01-01 12:00? + constants.CHANGED_DATE_YEAR, + constants.CHANGED_DATE_MONTH, + constants.CHANGED_DATE_DAY, + constants.CHANGED_DATE_HOUR, + constants.CHANGED_DATE_MINUTE, } } @@ -100,16 +114,27 @@ func getApplicationConfig_OfficialMakers() []uint32 { } } -func getApplicationConfig_Unknown2() []uint32 { - // * I have no idea what this is, looks like a date? +func getApplicationConfig_Bookmark() []uint32 { + // * Looks like a date? // * This was when the SMM bookmark was released, so maybe it controls accessibility to it? // * Just replaying data sent from the real server - return []uint32{2015, 12, 22, 5, 0} // * 2015-12-22 5:00 + return []uint32{ + constants.BOOKMARK_DATE_YEAR, + constants.BOOKMARK_DATE_MONTH, + constants.BOOKMARK_DATE_DAY, + constants.BOOKMARK_DATE_HOUR, + constants.BOOKMARK_DATE_MINUTE, + } // * 2015-12-22 5:00 } -func getApplicationConfig_Unknown10() []uint32 { - // * I have no idea what this is - // * Just replaying data sent from the real server - // * Only seen on the 3DS - return []uint32{35, 75, 96, 40, 5, 6} +func getApplicationConfig_GameplayConfig3DS() []uint32 { + // * This seems to be gameplay configuration settings for the 3DS + return []uint32{ + constants.COURSE_WORLD_NORMAL_FAILURE_RATE_MIN, + constants.COURSE_WORLD_EXPERT_FAILURE_RATE_MIN, + constants.COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN, + constants.COURSE_DOWNLOAD_3DS, // * Probably + 5, // * Unknown. Might be the resultOption value? + 6, // * Unknown. Might be related with the extraData? + } } From 6ceb3ff207ff11c4f1e150cedfcaeb9837268302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Fri, 31 Jul 2026 22:36:39 +0100 Subject: [PATCH 4/4] fix(datastore): use int32 for config values on GetApplicationConfig This has been wrong since forever, the DDL trees say the config values are supposed to be signed integers. --- .../super-mario-maker/constants/constants.go | 80 +++++++++---------- .../get_application_config.go | 22 ++--- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/nex/datastore/super-mario-maker/constants/constants.go b/nex/datastore/super-mario-maker/constants/constants.go index cc3f26d..0374907 100644 --- a/nex/datastore/super-mario-maker/constants/constants.go +++ b/nex/datastore/super-mario-maker/constants/constants.go @@ -2,141 +2,141 @@ package constants const ( // STARS_1ST_MEDAL represents the number of stars needed to acquire the 1st medal - STARS_1ST_MEDAL uint32 = 1 + STARS_1ST_MEDAL int32 = 1 // STARS_2ND_MEDAL represents the number of stars needed to acquire the 2nd medal - STARS_2ND_MEDAL uint32 = 50 + STARS_2ND_MEDAL int32 = 50 // STARS_3RD_MEDAL represents the number of stars needed to acquire the 3rd medal - STARS_3RD_MEDAL uint32 = 150 + STARS_3RD_MEDAL int32 = 150 // STARS_4TH_MEDAL represents the number of stars needed to acquire the 4th medal - STARS_4TH_MEDAL uint32 = 300 + STARS_4TH_MEDAL int32 = 300 // STARS_5TH_MEDAL represents the number of stars needed to acquire the 5th medal - STARS_5TH_MEDAL uint32 = 500 + STARS_5TH_MEDAL int32 = 500 // STARS_6TH_MEDAL represents the number of stars needed to acquire the 6th medal - STARS_6TH_MEDAL uint32 = 800 + STARS_6TH_MEDAL int32 = 800 // STARS_7TH_MEDAL represents the number of stars needed to acquire the 7th medal - STARS_7TH_MEDAL uint32 = 1300 + STARS_7TH_MEDAL int32 = 1300 // STARS_8TH_MEDAL represents the number of stars needed to acquire the 8th medal - STARS_8TH_MEDAL uint32 = 2000 + STARS_8TH_MEDAL int32 = 2000 // STARS_9TH_MEDAL represents the number of stars needed to acquire the 9th medal - STARS_9TH_MEDAL uint32 = 3000 + STARS_9TH_MEDAL int32 = 3000 // STARS_10TH_MEDAL represents the number of stars needed to acquire the 10th medal - STARS_10TH_MEDAL uint32 = 5000 + STARS_10TH_MEDAL int32 = 5000 // MAX_COURSE_UPLOADS_0TH_1ST_MEDAL represents the number of courses a user can upload when you have 0 or 1 medal // Nintendo sets this to 10 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_0TH_1ST_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_0TH_1ST_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_2ND_MEDAL represents the number of courses a user can upload after getting the 2nd medal // Nintendo sets this to 20 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_2ND_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_2ND_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_3RD_MEDAL represents the number of courses a user can upload after getting the 3rd medal // Nintendo sets this to 30 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_3RD_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_3RD_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_4TH_MEDAL represents the number of courses a user can upload after getting the 4th medal // Nintendo sets this to 40 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_4TH_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_4TH_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_5TH_MEDAL represents the number of courses a user can upload after getting the 5th medal // Nintendo sets this to 50 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_5TH_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_5TH_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_6TH_MEDAL represents the number of courses a user can upload after getting the 6th medal // Nintendo sets this to 60 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_6TH_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_6TH_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_7TH_MEDAL represents the number of courses a user can upload after getting the 7th medal // Nintendo sets this to 70 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_7TH_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_7TH_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_8TH_MEDAL represents the number of courses a user can upload after getting the 8th medal // Nintendo sets this to 80 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_8TH_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_8TH_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_9TH_MEDAL represents the number of courses a user can upload after getting the 9th medal // Nintendo sets this to 90 by default and users earn more upload slots up to 100. // This is a stupid, unfun, mechanic so everyone gets 100 by default. Can be more, but 100 is fine tbh - MAX_COURSE_UPLOADS_9TH_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_9TH_MEDAL int32 = 100 // MAX_COURSE_UPLOADS_10TH_MEDAL represents the number of courses you can upload after getting the 10th medal // Nintendo sets this to 100 by default. - MAX_COURSE_UPLOADS_10TH_MEDAL uint32 = 100 + MAX_COURSE_UPLOADS_10TH_MEDAL int32 = 100 // COURSE_WORLD_EASY_FAILURE_RATE_MIN is the minimum failure rate for Easy levels on the Course World - COURSE_WORLD_EASY_FAILURE_RATE_MIN uint32 = 0 + COURSE_WORLD_EASY_FAILURE_RATE_MIN int32 = 0 // COURSE_WORLD_EASY_FAILURE_RATE_MAX is the maximum failure rate for Easy levels on the Course World - COURSE_WORLD_EASY_FAILURE_RATE_MAX uint32 = 34 + COURSE_WORLD_EASY_FAILURE_RATE_MAX int32 = 34 // COURSE_WORLD_NORMAL_FAILURE_RATE_MIN is the minimum failure rate for Normal levels on the Course World - COURSE_WORLD_NORMAL_FAILURE_RATE_MIN uint32 = 35 + COURSE_WORLD_NORMAL_FAILURE_RATE_MIN int32 = 35 // COURSE_WORLD_NORMAL_FAILURE_RATE_MAX is the maximum failure rate for Normal levels on the Course World - COURSE_WORLD_NORMAL_FAILURE_RATE_MAX uint32 = 74 + COURSE_WORLD_NORMAL_FAILURE_RATE_MAX int32 = 74 // COURSE_WORLD_EXPERT_FAILURE_RATE_MIN is the minimum failure rate for Expert levels on the Course World - COURSE_WORLD_EXPERT_FAILURE_RATE_MIN uint32 = 75 + COURSE_WORLD_EXPERT_FAILURE_RATE_MIN int32 = 75 // COURSE_WORLD_EXPERT_FAILURE_RATE_MAX is the maximum failure rate for Expert levels on the Course World - COURSE_WORLD_EXPERT_FAILURE_RATE_MAX uint32 = 95 + COURSE_WORLD_EXPERT_FAILURE_RATE_MAX int32 = 95 // COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN is the minimum failure rate for Super Expert levels on the Course World - COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN uint32 = 96 + COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN int32 = 96 // COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MAX is the maximum failure rate for Super Expert levels on the Course World - COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MAX uint32 = 100 + COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MAX int32 = 100 // COURSE_DOWNLOAD_WIIU represents the number of courses downloaded by the Wii U at the same time - COURSE_DOWNLOAD_WIIU uint32 = 100 + COURSE_DOWNLOAD_WIIU int32 = 100 // COURSE_DOWNLOAD_3DS represents the number of courses downloaded by the 3DS at the same time - COURSE_DOWNLOAD_3DS uint32 = 40 + COURSE_DOWNLOAD_3DS int32 = 40 // CHANGED_DATE_YEAR contains the year of an unknown date, possibly when the config was last changed (2020-01-01 12:00) - CHANGED_DATE_YEAR uint32 = 2020 + CHANGED_DATE_YEAR int32 = 2020 // CHANGED_DATE_MONTH contains the month of an unknown date, possibly when the config was last changed (2020-01-01 12:00) - CHANGED_DATE_MONTH uint32 = 1 + CHANGED_DATE_MONTH int32 = 1 // CHANGED_DATE_DAY contains the day of an unknown date, possibly when the config was last changed (2020-01-01 12:00) - CHANGED_DATE_DAY uint32 = 1 + CHANGED_DATE_DAY int32 = 1 // CHANGED_DATE_HOUR contains the hour of an unknown date, possibly when the config was last changed (2020-01-01 12:00) - CHANGED_DATE_HOUR uint32 = 12 + CHANGED_DATE_HOUR int32 = 12 // CHANGED_DATE_MINUTE contains the minute of an unknown date, possibly when the config was last changed (2020-01-01 12:00) - CHANGED_DATE_MINUTE uint32 = 0 + CHANGED_DATE_MINUTE int32 = 0 // BOOKMARK_DATE_YEAR contains the year of when the SMM bookmark was released (2015-12-22 5:00) - BOOKMARK_DATE_YEAR uint32 = 2015 + BOOKMARK_DATE_YEAR int32 = 2015 // BOOKMARK_DATE_MONTH contains the month of when the SMM bookmark was released (2015-12-22 5:00) - BOOKMARK_DATE_MONTH uint32 = 12 + BOOKMARK_DATE_MONTH int32 = 12 // BOOKMARK_DATE_DAY contains the day of when the SMM bookmark was released (2015-12-22 5:00) - BOOKMARK_DATE_DAY uint32 = 22 + BOOKMARK_DATE_DAY int32 = 22 // BOOKMARK_DATE_HOUR contains the hour of when the SMM bookmark was released (2015-12-22 5:00) - BOOKMARK_DATE_HOUR uint32 = 5 + BOOKMARK_DATE_HOUR int32 = 5 // BOOKMARK_DATE_MINUTE contains the minute of when the SMM bookmark was released (2015-12-22 5:00) - BOOKMARK_DATE_MINUTE uint32 = 0 + BOOKMARK_DATE_MINUTE int32 = 0 ) diff --git a/nex/datastore/super-mario-maker/get_application_config.go b/nex/datastore/super-mario-maker/get_application_config.go index 30caf57..ab3cac7 100644 --- a/nex/datastore/super-mario-maker/get_application_config.go +++ b/nex/datastore/super-mario-maker/get_application_config.go @@ -16,7 +16,7 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, return nil, nex.NewError(nex.ResultCodes.DataStore.Unknown, err.Error()) } - var config []uint32 + var config []int32 switch applicationID { case 0: // * Gameplay config (Wii U) @@ -31,9 +31,9 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, fmt.Printf("[Warning] DataStoreSMMProtocol::GetApplicationConfig Unsupported applicationID: %v\n", applicationID) } - configNative := make(types.List[types.UInt32], 0, len(config)) + configNative := make(types.List[types.Int32], 0, len(config)) for i := range config { - configNative = append(configNative, types.NewUInt32(config[i])) + configNative = append(configNative, types.Int32(config[i])) } rmcResponseStream := nex.NewByteStreamOut(globals.SecureServer.LibraryVersions, globals.SecureServer.ByteStreamSettings) @@ -48,9 +48,9 @@ func GetApplicationConfig(err error, packet nex.PacketInterface, callID uint32, return rmcResponse, nil } -func getApplicationConfig_GameplayConfig() []uint32 { +func getApplicationConfig_GameplayConfig() []int32 { // * This seems to be gameplay configuration settings - return []uint32{ + return []int32{ constants.STARS_1ST_MEDAL, constants.STARS_2ND_MEDAL, constants.STARS_3RD_MEDAL, @@ -99,9 +99,9 @@ func getApplicationConfig_GameplayConfig() []uint32 { } } -func getApplicationConfig_OfficialMakers() []uint32 { +func getApplicationConfig_OfficialMakers() []int32 { // * Used as the PIDs for the "Official" makers in the "MAKERS" section - return []uint32{ + return []int32{ 2, // * Not a real user PID, this translates to the internal Quazal Rendez-Vous user used by NEX 1770179696, // * "official_player0" on NN, need to make PN versions 1770179664, // * "official_player1" on NN, need to make PN versions @@ -114,11 +114,11 @@ func getApplicationConfig_OfficialMakers() []uint32 { } } -func getApplicationConfig_Bookmark() []uint32 { +func getApplicationConfig_Bookmark() []int32 { // * Looks like a date? // * This was when the SMM bookmark was released, so maybe it controls accessibility to it? // * Just replaying data sent from the real server - return []uint32{ + return []int32{ constants.BOOKMARK_DATE_YEAR, constants.BOOKMARK_DATE_MONTH, constants.BOOKMARK_DATE_DAY, @@ -127,9 +127,9 @@ func getApplicationConfig_Bookmark() []uint32 { } // * 2015-12-22 5:00 } -func getApplicationConfig_GameplayConfig3DS() []uint32 { +func getApplicationConfig_GameplayConfig3DS() []int32 { // * This seems to be gameplay configuration settings for the 3DS - return []uint32{ + return []int32{ constants.COURSE_WORLD_NORMAL_FAILURE_RATE_MIN, constants.COURSE_WORLD_EXPERT_FAILURE_RATE_MIN, constants.COURSE_WORLD_SUPER_EXPERT_FAILURE_RATE_MIN,