397
edições
Alterações
A UESPWiki – Sua fonte de The Elder Scrolls desde 1995
m
sem resumo de edição
{{Trail|File Formats}}
Skyrim supports version 3.0 to 3.1 compiled script files.
__TOC__
The format appears to be stored in big-endian regardless of platform (Windows & PS3 both observed as big-endian).
==Header==
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| magic
| uint32
| 0xFA57C0DE (FASTCODE?)
|- valign="top"
| majorVersion
| uint8
| 3
|- valign="top"
| minorVersion
| uint8
| 1
|- valign="top"
| gameId
| uint16
| 1 = Skyrim?
|- valign="top"
| unknown3
| uint64
| Probably compile time?
|- valign="top"
| sourceFileName
| [[#String|String]]
| Name of the source file this file was compiled from (.psc extension).
|- valign="top"
| unknown5
| [[#String|String]]
| Name of the compile build directory?
|- valign="top"
| unknown6
| [[#String|String]]
| Name of the server/machine this script was compiled on?
|- valign="top"
| stringTable
| [[#String_Table|String Table]]
|
|- valign="top"
| debugInfo
| [[#Debug_Info|Debug Info]]
|
|- valign="top"
| userFlags
| [[#User_Flags|User Flags]]
|
|- valign="top"
| objects
| [[#Objects|Objects]]
|
|}
== General ==
=== String ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| length
| ushort
| Length of string.
|- valign="top"
| data
| char[length]
| String data, not null terminated.
|}
== Sections ==
=== String Table ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| count
| uint16
|
|- valign="top"
| strings
| [[#String|String]][count]
|
|}
=== Debug Info ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| unknown0
| uint8
| flag?
|- valign="top"
| modificationTime
| uint64
|
|- valign="top"
| functionCount
| uint16
|
|- valign="top"
| functions
| [[#Debug_Function|Debug Function]][functionCount]
|}
==== Debug Function ====
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| objectNameIndex
| uint16
| Index into string table.
|- valign="top"
| stateNameIndex
| uint16
| Index into string table.
|- valign="top"
| functionNameIndex
| uint16
| Index into string table.
|- valign="top"
| functionType
| uint8
| valid values is >= 0 && <= 3?
|- valign="top"
| instructionCount
| uint16
|
|- valign="top"
| lineNumbers
| uint16[instructionCount]
|
|}
=== User Flags ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| count
| uint16
|
|- valign="top"
| userFlags
| [[#User_Flag|User Flag]][count]
|}
==== User Flag ====
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| nameIndex
| uint16
| Index into string table.
|- valign="top"
| flagIndex
| uint8
| ?
|}
=== Objects ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| count
| uint16
|
|- valign="top"
| objects
| [[#Object|Object]][count]
|}
==== Object ====
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| nameIndex
| uint16
| Index into string table.
|- valign="top"
| size
| uint32
|
|- valign="top"
| data
| uint8[size-4]
| (size includes itself for some reason, hence size-4)
|}
Skyrim supports version 3.0 to 3.1 compiled script files.
__TOC__
The format appears to be stored in big-endian regardless of platform (Windows & PS3 both observed as big-endian).
==Header==
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| magic
| uint32
| 0xFA57C0DE (FASTCODE?)
|- valign="top"
| majorVersion
| uint8
| 3
|- valign="top"
| minorVersion
| uint8
| 1
|- valign="top"
| gameId
| uint16
| 1 = Skyrim?
|- valign="top"
| unknown3
| uint64
| Probably compile time?
|- valign="top"
| sourceFileName
| [[#String|String]]
| Name of the source file this file was compiled from (.psc extension).
|- valign="top"
| unknown5
| [[#String|String]]
| Name of the compile build directory?
|- valign="top"
| unknown6
| [[#String|String]]
| Name of the server/machine this script was compiled on?
|- valign="top"
| stringTable
| [[#String_Table|String Table]]
|
|- valign="top"
| debugInfo
| [[#Debug_Info|Debug Info]]
|
|- valign="top"
| userFlags
| [[#User_Flags|User Flags]]
|
|- valign="top"
| objects
| [[#Objects|Objects]]
|
|}
== General ==
=== String ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| length
| ushort
| Length of string.
|- valign="top"
| data
| char[length]
| String data, not null terminated.
|}
== Sections ==
=== String Table ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| count
| uint16
|
|- valign="top"
| strings
| [[#String|String]][count]
|
|}
=== Debug Info ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| unknown0
| uint8
| flag?
|- valign="top"
| modificationTime
| uint64
|
|- valign="top"
| functionCount
| uint16
|
|- valign="top"
| functions
| [[#Debug_Function|Debug Function]][functionCount]
|}
==== Debug Function ====
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| objectNameIndex
| uint16
| Index into string table.
|- valign="top"
| stateNameIndex
| uint16
| Index into string table.
|- valign="top"
| functionNameIndex
| uint16
| Index into string table.
|- valign="top"
| functionType
| uint8
| valid values is >= 0 && <= 3?
|- valign="top"
| instructionCount
| uint16
|
|- valign="top"
| lineNumbers
| uint16[instructionCount]
|
|}
=== User Flags ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| count
| uint16
|
|- valign="top"
| userFlags
| [[#User_Flag|User Flag]][count]
|}
==== User Flag ====
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| nameIndex
| uint16
| Index into string table.
|- valign="top"
| flagIndex
| uint8
| ?
|}
=== Objects ===
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| count
| uint16
|
|- valign="top"
| objects
| [[#Object|Object]][count]
|}
==== Object ====
{| class="wikitable" width="100%"
! width="20%" | Name
! width="20%" | [[Tes5Mod:File Format Conventions|Type/Size]]
! width="60%" | Info
|- valign="top"
| nameIndex
| uint16
| Index into string table.
|- valign="top"
| size
| uint32
|
|- valign="top"
| data
| uint8[size-4]
| (size includes itself for some reason, hence size-4)
|}