Difference between revisions of "Documentation/Engine/Units/package version info"

From SCS Modding Wiki
Jump to navigation Jump to search
(Major reformat and rewrite; added relevant wiki links, reformatted attribute table (added informational attribute), and added raw unit structure from -dump_units output as of ATS 1.4)
m (Attributes)
 
(2 intermediate revisions by one other user not shown)
Line 7: Line 7:
 
{| class="wikitable"
 
{| class="wikitable"
 
!|Name
 
!|Name
!|Type
+
!|[[Documentation/Engine/Units#Attribute_types|Type]]
 
!|Required/Optional
 
!|Required/Optional
 
!|Description
 
!|Description
Line 19: Line 19:
 
|style="text-align:center;"|string array
 
|style="text-align:center;"|string array
 
|style="text-align:center;"|Optional
 
|style="text-align:center;"|Optional
|The array containg set of versions that are compatible with this version definition. If not specified this package will be used for all of the game versions not explicitly defined for other packages. <BR />'''Important:''' Each workshop mod's versions.sii can only contain ''one'' `package_version_info` unit without this parameter specified.
+
|The array containing the set of versions that are compatible with this version definition. If not specified this package will be used for all of the game versions not explicitly defined for other packages. <BR />'''Important:''' Each workshop mod's versions.sii can only contain ''one'' `package_version_info` unit without this parameter specified.
 
|-
 
|-
 
|informational
 
|informational
 
|style="text-align:center;"|bool
 
|style="text-align:center;"|bool
 
|style="text-align:center;"|Optional
 
|style="text-align:center;"|Optional
|When true, indicates that the package contains information only. If unspecified, defaults to false.
+
|When true, it indicates that the package contains information only. If unspecified, it defaults to false.
 
|}
 
|}
  
== Raw Unit Definition ==
+
{{UnitDef|def=<nowiki>  "package_version_info":{
<pre>  "package_version_info":{
 
 
   "superclass":"unit",
 
   "superclass":"unit",
 
   "attrs":{
 
   "attrs":{
Line 40: Line 39:
 
     "type": "bool"
 
     "type": "bool"
 
     }
 
     }
   }</pre>
+
   }</nowiki>}}
  
 
== See Also ==
 
== See Also ==
 
[[Tutorials/SCS_Workshop_Uploader/How_to_use_mod_versioning|Tutorial: How to Use Mod Versioning]]
 
[[Tutorials/SCS_Workshop_Uploader/How_to_use_mod_versioning|Tutorial: How to Use Mod Versioning]]

Latest revision as of 21:32, 2 April 2023

Package version info is a unit containing workshop mod package information, such as the name of the folder or archive with content and the array of compatible game versions. It is used in each workshop mod's versions.sii.

Special Case: Universal Version

Each workshop mod's versions.sii file may have a single package version info without any defined compatible_versions, called the “universal version.” The associated package will be used for all game versions that are not defined by another package version info unit inside the versions.sii file.

Attributes

Name Type Required/Optional Description
package_name string Required The name of the folder or archive with the version-specific mod content. For zip archives, package_name is just the file name without the extension.
compatible_versions string array Optional The array containing the set of versions that are compatible with this version definition. If not specified this package will be used for all of the game versions not explicitly defined for other packages.
Important: Each workshop mod's versions.sii can only contain one `package_version_info` unit without this parameter specified.
informational bool Optional When true, it indicates that the package contains information only. If unspecified, it defaults to false.


Raw Unit Definition

  "package_version_info":{
   "superclass":"unit",
   "attrs":{
    "package_name":{
     "type": "string"
    },
    "compatible_versions":{
     "type": "string_array"
    },
    "informational":{
     "type": "bool"
    }
   }

See Also

Tutorial: How to Use Mod Versioning