Talk:KMP (File Format)

From Custom Mario Kart
Jump to: navigation, search

MSPT points are supposed to be "Ending Positions" for Battle Mode or Tournament/Competition Mode. This can be proven simply by opening up a battle track in the KMP Editor of the SZS Modifier. igorseabra4 knows this too along with other people who have made custom battle tracks, including myself. ALPHAMARIOX 19:19, 26 April 2011 (CEST)

I already know that but I didn't write the main text, I'll edit it now
kHacker35000vr 20:24, 26 April 2011 (CEST)
I'm so glad it's changed now. :)
ALPHAMARIOX 0:23, 27 April 2011 (CEST)

In competitions that value in the STGI gave the number of laps, why is it named unknown now?
kHacker35000vr 11:08, 19 July 2011 (CEST)

Because that's not true :P, the competition header controls the amount of laps.
Vulcanus2 14:03, 19 July 2011 (CEST)
course.0 seems to say otherwise.
"TotalLap user_data 16 UShort 3" In the "StageInfo" section
Guilmon35249vr 18:51, 15 September 2011 (CEST)
Edit: Everything in the StageInfo in the .0 file lines up with the STGI in the KMP from Bowser's Castle, suggesting that it's correct.
Guilmon35249vr 18:57, 15 September 2011 (CEST)
It is something with laps but it doesn't control laps but it's just for the memory.
I spotted some changes in the memory when the STGI was changed. I still have to find out what gets changed.
kHacker35000vr 19:55, 15 September 2011 (CEST)
It's probably a left over from development, that also explains why it's in course.0
Vulcanus2 20:56, 15 September 2011 (CEST)
I have modified all parameters of STGI and I can't find any impact. T thing that this section is an artifact of the development.
Wiimm 21:10, 15 September 2011 (CEST)
I just did the same thing. So we can safely say that STGI doesn't do anything, but might have changed course info in the beta version.
Guilmon35249vr 00:24, 16 September 2011 (CEST)

AREA offset 0x02 is not a short

@KHacker35000vr: The camera link can't be a big endian short. If e.g value is 0x0100, it points to camera one, but the value is 256. I'm very sure, that the link is only a byte value. If ever, a little endian value is possible, but very unlikely.
Wiimm 18:10, 4 November 2011 (CET)

I wrote the meanings from the course.0 file and did some research at 6 different kmps but I still wasn't sure about it, I'll test the value today.
kHacker35000vr 12:03, 5 November 2011 (CET)
You can use the course.0 file only for hints to understand the system. I'm sure, that it describes a pre format. So don't use the infos unconfirmed. And the camera link is definitely only a byte value; I'm very sure because I have now set so many area/came combinations.
btw: I have a textual KMP representation of all 32 nin-tracks as text files sorted by sections and sorted by tracks. These are good for studying. If anyone have interests, I will upload it.
Wiimm 12:29, 5 November 2011 (CET)


I'm pretty sure the enemies are divided over the sections, when I made Cannon City I used 2 sections and some computers go to the left and the others to the right.
kHacker35000vr 10:06, 28 January 2012 (CET)

yes, this is true. Compare my last edit: Each driver uses one route randomly, but a short cut item can be set as condition (see ENPT Settings). To increase the probability of one route, enter the section index more than once.
The item route is different in this.
Wiimm 11:33, 28 January 2012 (CET)

short, int, long

I think we should not use short, int or long, because the names come from C and its size is implementation dependent. int is either 16, 32 od 64 bit, and short only smaller or equal int, and long greater or equal int. So u16 and u32 for non signed numbers and s16 and s32 for signed members are more accurate. And that's the reason for the definition of well sized data types.

-- Wiimm (talk) 12:18, 3 April 2016 (UTC)

In C# (and I think VB too), short, int and long has a fixed size. Short = 2 bytes, int = 4 bytes and long = 8 bytes (as it says here). It might be better to use u16 and s16, but then I think we should have a standard on this Wiiki, to either use short, int, long or u16, s16 on every article.
Wexos (talk) 13:31, 3 April 2016 (UTC)

STGI Lap Counter

@Leseratte: If you really think that the first byte is the lap counter why does Nintendo not read the byte and even uses 0x03 for battle tracks which do not use Laps? Also I only remember one Tournament which changed the lap count to 5 which is the Twilight House tournament. So your argument is that it must be the lap counter because of one tournament but my argument is the course.0 file and the fact that Mario Kart Wii has 10 battle tracks which all have it as a 0x03 byte without using laps. -- --Unsigned comment by Tock (talk).

Look at the other sections of the course.0 file. Both the structures inside the course.0 for AREA and CAME are different (missing variables, changed variable sizes, changed order etc.), the AREAtype and CAMtype array is completely different as well. The course.0 file seems to be a very early format, possibly taken straight from the DS. Yes, battle tracks have 0x03 as their lap count as well, but maybe just because nobody wasted time to set that to 0 if laps are irrelevant anyways. There has been at least one competition (it might even have been two different ones, though I'm not sure about that) with 5 laps which had that lap counter byte changed from 03 to 05, without any change to the u16 at the end of the STGI structure. In my opinion, this makes it far more likely that the first byte was intended for lap count and just hasn't been implemented because all normal tracks have three laps. -- Leseratte (talk) 21:46, 20 July 2018 (UTC)