Difference between revisions of "Pikmin labeled parameter file"

From Pikmin Technical Knowledge Base
Jump to navigation Jump to search
m (Clarified opening sentence.)
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:''Pikmin'' labeled parameter file}}
 
[[File:Pom_Parms_Annotated.png|578px|thumb|right|Parameters and labels inside a file.]]
 
[[File:Pom_Parms_Annotated.png|578px|thumb|right|Parameters and labels inside a file.]]
 
[[File:Parsing_Information.PNG|514px|thumb|right|Labels for parsing Pom's local parameters inside of the DOL header.]]
 
[[File:Parsing_Information.PNG|514px|thumb|right|Labels for parsing Pom's local parameters inside of the DOL header.]]
 
[[File:Pom_Parms_in_Memory_Annotated.png|578px|thumb|right|Parameters and labels inside memory during gameplay.]]
 
[[File:Pom_Parms_in_Memory_Annotated.png|578px|thumb|right|Parameters and labels inside memory during gameplay.]]
'''Labeled Parameter Files''' are the most common form of parameter storage in Pikmin 1 by application (though not necessarily by quantity).
+
'''Labeled parameter files''' are the most common form of parameter storage in ''Pikmin'' by application (though not necessarily by quantity).
 
 
 
 
  
 
__TOC__
 
__TOC__
  
 +
==Rules==
 +
Values in labeled parameter files are preceeded by a '''Label''' (e.g. s00, p14, b03, x99, i40, etc.).
  
==Rules==
+
'''Distinct Parameters Groups''' within labeled parameter files (i.e. global, shared, and local) are terminated by a '''Null Byte Partition'''.
Values in ''Labeled Parameter Files'' are preceeded by a '''Label''' (e.g. s00, p14, b03, x99, i40, etc.).
 
  
'''Distinct Parameters Groups''' within ''Labeled Parameter Files'' (i.e. global, shared, and local) are terminated by a '''Null Byte Partition'''.
+
[[wikipedia:Parsing|Parsing]] information for labeled parameter files can be found embedded in the DOL header. Changing the labels here changes what is sought after by the parser.
  
[https://en.wikipedia.org/wiki/Parsing Parsing] information for ''Labeled Parameter Files'' can be found embedded in the DOL headerChanging the labels here changes what is sought after by the [https://en.wikipedia.org/wiki/Parsing parser].
+
The order of parameters in labeled parameter files does not matterWhen an instance of a label is encountered by the parser, it fills the memory address sharing the label with the value.
  
The order of parameters in ''Labeled Parameter Files'' does not matter.  When an instance of a label is encountered by the [https://en.wikipedia.org/wiki/Parsing parser], it fills the memory address sharing the label with the value.
+
* It is perfectly valid for a label to be absent from a labeled parameter file.  In this case, the value will instead be set to a default decided on by the developers.
* It is perfectly valid for a label to be absent from a ''Labeled Parameter File''.  In this case, the value will instead be set to a default decided on by the developers.
 
 
** These default values ''technically'' can be found embedded in the DOL header, but they are stored in a sort of primordial soup from compiling.  Which values belong to which parameters is currently a mystery.
 
** These default values ''technically'' can be found embedded in the DOL header, but they are stored in a sort of primordial soup from compiling.  Which values belong to which parameters is currently a mystery.
  
It is also perfectly acceptable for a ''Labeled Parameter File'' to be completely absent from the filesystem.  In this case, every parameter will be left at its default.
+
It is also perfectly acceptable for a labeled parameter file to be completely absent from the filesystem.  In this case, every parameter will be left at its default.
* This suggests that the purpose of ''Labeled Parameter Files'' is to ''overwrite'' values set during initialization of memory.
+
* This suggests that the purpose of labeled parameter file is to ''overwrite'' values set during initialization of memory.
 
** This, in turn, suggests that the default values are the earliest revision of all parameter values.
 
** This, in turn, suggests that the default values are the earliest revision of all parameter values.
  
 
As a rule of thumb, the first character of a label can often indicate what type of value a parameter is.
 
As a rule of thumb, the first character of a label can often indicate what type of value a parameter is.
* i-- and x-- labels often denote an [https://en.wikipedia.org/wiki/Integer_(computer_science) integer] parameter or, less often, a [https://en.wikipedia.org/wiki/Boolean_data_type boolean] parameter.
+
* <code>i--</code> and <code>x--</code> labels often denote an [[wikipedia:Integer (computer science)|integer]] parameter or, less often, a [[wikipedia:Boolean data type|boolean]] parameter.
* s-- labels are typically reserved for '''Global Parms''' groups, and often denote an [https://en.wikipedia.org/wiki/IEEE_754 IEEE-754 floating point decimal] parameter.
+
* <code>s--</code> labels are typically reserved for '''Global Parms''' groups, and often denote an [[wikipedia:IEEE 754|IEEE-754 floating point decimal]] parameter.
* p-- labels often denote an [https://en.wikipedia.org/wiki/IEEE_754 IEEE-754 floating point decimal] parameter.
+
* <code>p--</code> labels often denote an IEEE-754 floating point decimal parameter.
* Other letters of the alphabet (when used) often denote an [https://en.wikipedia.org/wiki/IEEE_754 IEEE-754 floating point decimal] parameter.
+
* Other letters of the alphabet (when used) often denote an IEEE-754 floating point decimal parameter.
  
 
Rarely, a parameter label does not follow the numbered character system and instead resorts to labels such as "spd" or "new".
 
Rarely, a parameter label does not follow the numbered character system and instead resorts to labels such as "spd" or "new".
 
  
 
==Vocabulary==
 
==Vocabulary==
'''Label:'''  A string [https://en.wikipedia.org/wiki/Word_(computer_architecture) word] preceeding a parameter value [https://en.wikipedia.org/wiki/Word_(computer_architecture) word].
+
'''Label:'''  A string [[wikipedia:Word (computer architecture)|word]] preceeding a parameter value word.
  
'''Null Byte Partition:'''  A [https://en.wikipedia.org/wiki/Word_(computer_architecture) word] of nothing but ''Null Bytes'' (<code>0xFF</code>).  Communicates the termination of a ''Distinct Parameters Group'' to the [https://en.wikipedia.org/wiki/Parsing parser].
+
'''Null Byte Partition:'''  A word of nothing but ''Null Bytes'' (<code>0xFF</code>).  Communicates the termination of a ''Distinct Parameters Group'' to the parser.
  
 
'''Distinct Parameters Group:'''  A collection of labeled parameters terminated by a ''Null Byte Partition''.
 
'''Distinct Parameters Group:'''  A collection of labeled parameters terminated by a ''Null Byte Partition''.
  
'''Global Parms:'''  A ''Distinct Parameters Group'' that is used by many similar ''and'' different types of objects across the game engine.  They are--
+
'''Global Parms:'''  A ''Distinct Parameters Group'' that is used by many similar ''and'' different types of objects across the game engine.  They are:
 
* '''s00:'''  friction
 
* '''s00:'''  friction
 
* '''s01:'''  wallReflection
 
* '''s01:'''  wallReflection
Line 47: Line 45:
 
* '''s04:'''  bounceFactor
 
* '''s04:'''  bounceFactor
  
'''Shared Parms:'''  A ''Distinct Parameters Group'' that is used by many similar types of objects in the game engine.  Bosses have these.  Tekis imitate this, though they use [[Pikmin unlabeled parameter files|Unlabeled Parameter Files]].
+
'''Shared Parms:'''  A ''Distinct Parameters Group'' that is used by many similar types of objects in the game engine.  Bosses have these.  Tekis imitate this, though they use [[Pikmin unlabeled parameter files|unlabeled parameter files]].
  
 
'''Local Parms:'''  A ''Distinct Parameters Group'' that is only used by one object in the game engine.  Most parameter files use this ''Distinct Parameters Group'' alone.
 
'''Local Parms:'''  A ''Distinct Parameters Group'' that is only used by one object in the game engine.  Most parameter files use this ''Distinct Parameters Group'' alone.
 
  
 
[[Category:Pikmin]]
 
[[Category:Pikmin]]

Latest revision as of 14:30, 10 September 2018

Parameters and labels inside a file.
Labels for parsing Pom's local parameters inside of the DOL header.
Parameters and labels inside memory during gameplay.

Labeled parameter files are the most common form of parameter storage in Pikmin by application (though not necessarily by quantity).

Rules[edit]

Values in labeled parameter files are preceeded by a Label (e.g. s00, p14, b03, x99, i40, etc.).

Distinct Parameters Groups within labeled parameter files (i.e. global, shared, and local) are terminated by a Null Byte Partition.

Parsing information for labeled parameter files can be found embedded in the DOL header. Changing the labels here changes what is sought after by the parser.

The order of parameters in labeled parameter files does not matter. When an instance of a label is encountered by the parser, it fills the memory address sharing the label with the value.

  • It is perfectly valid for a label to be absent from a labeled parameter file. In this case, the value will instead be set to a default decided on by the developers.
    • These default values technically can be found embedded in the DOL header, but they are stored in a sort of primordial soup from compiling. Which values belong to which parameters is currently a mystery.

It is also perfectly acceptable for a labeled parameter file to be completely absent from the filesystem. In this case, every parameter will be left at its default.

  • This suggests that the purpose of labeled parameter file is to overwrite values set during initialization of memory.
    • This, in turn, suggests that the default values are the earliest revision of all parameter values.

As a rule of thumb, the first character of a label can often indicate what type of value a parameter is.

  • i-- and x-- labels often denote an integer parameter or, less often, a boolean parameter.
  • s-- labels are typically reserved for Global Parms groups, and often denote an IEEE-754 floating point decimal parameter.
  • p-- labels often denote an IEEE-754 floating point decimal parameter.
  • Other letters of the alphabet (when used) often denote an IEEE-754 floating point decimal parameter.

Rarely, a parameter label does not follow the numbered character system and instead resorts to labels such as "spd" or "new".

Vocabulary[edit]

Label: A string word preceeding a parameter value word.

Null Byte Partition: A word of nothing but Null Bytes (0xFF). Communicates the termination of a Distinct Parameters Group to the parser.

Distinct Parameters Group: A collection of labeled parameters terminated by a Null Byte Partition.

Global Parms: A Distinct Parameters Group that is used by many similar and different types of objects across the game engine. They are:

  • s00: friction
  • s01: wallReflection
  • s02: faceDirAdjust
  • s03: accel
  • s04: bounceFactor

Shared Parms: A Distinct Parameters Group that is used by many similar types of objects in the game engine. Bosses have these. Tekis imitate this, though they use unlabeled parameter files.

Local Parms: A Distinct Parameters Group that is only used by one object in the game engine. Most parameter files use this Distinct Parameters Group alone.

Credits: Minty_Meeo