### StatFile JSON Input Example Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v3.md Provides an example of the JSON structure expected for input data, including blocks and attacks with their properties. ```json { "blocks": { 1: { "name": "cube", "health": 123, "mass": 456 }, 2: { "name": "tetra", "health": 234, "mass": 567 } }, "attacks": { 4: { "name": "smg_t1", "damage": 125 } } } ``` -------------------------------- ### StatFile JSON Input Example Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v2.md An example of the expected JSON structure for input data to be processed into the StatFile format. It includes blocks and attacks with their properties. ```json { "blocks": { 1: { "name": "cube", "health": 123, "mass": 456 }, 2: { "name": "tetra", "health": 234, "mass": 567 } }, "attacks": { 4: { "name": "smg_t1", "damage": 125 } } } ``` -------------------------------- ### JSON Representation of Robot Data Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v2.md Example JSON structure for representing robot data, including name, metadata, and a list of parts with their properties. ```json { "name": "robot", "metadata": 3, "parts": [ { "id": 32, "pos": [1, 4, -1], "rot": 68, "color": [255, 255, 0], "alpha": 255, "extra_data": [] }, { "id": 32, "pos": [-1, 4, -1], "rot": 86, "color": [255, 255, 0], "alpha": 255, "extra_data": [] }, { "id": 57, "pos": [0, 4, -1], "rot": 0, "color": [0, 70, 125], "alpha": 255, "extra_data": [0, 219, 75, 6] } ] } ``` -------------------------------- ### JSON Representation of Robot Data Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v3.md An example of the JSON format used to represent robot data. It includes the robot's name, metadata, an array of parts with their properties, and an array of cosmetics. ```json { "name": "robot", "metadata": 3, "parts": [ { "id": 32, "pos": [1, 4, -1], "rot": 68, "color": [255, 255, 0], "alpha": 255, "extra_data": [] }, { "id": 32, "pos": [-1, 4, -1], "rot": 86, "color": [255, 255, 0], "alpha": 255, "extra_data": [] }, { "id": 57, "pos": [0, 4, -1], "rot": 0, "color": [0, 70, 125], "alpha": 255, "extra_data": [0, 219, 75, 6] } ], "cosmetics": [ { "id": 432, "part_on": 1, "extra_data": [] } ] } ``` -------------------------------- ### Inventory JSON Structure Example Source: https://github.com/brennanstein/procelio-files/blob/master/docs/inventoryfile_v2.md An example of the JSON structure used for inventory data within the Procelio file format. It contains a 'parts' array, where each part has an 'id', 'name', and 'count'. The 'name' field is for readability and ignored during serialization. ```JSON { "parts": [ { "id": 12, "name": "tier 1 wheel", "count": 6 }, { "id": 432, "name": "idk some gun", "count": 3 } ] } ``` -------------------------------- ### StatFile Implementation Reference Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v2.md Points to the Rust source code file where the specifics of the StatFile implementation can be found. ```plaintext Check src/files/statfile/statfile.rs for the specifics. ``` -------------------------------- ### StatFile Implementation Reference Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v3.md Points to the Rust source file where the specifics of the StatFile implementation can be found. ```plaintext Check src/files/statfile/statfile.rs for the specifics. ``` -------------------------------- ### Rust Struct for Robot Data Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v3.md Provides the Rust struct definitions for representing robot data in memory. `JsonRobot` contains the robot's name, metadata, and a vector of `JsonPart`s. `JsonPart` defines the properties of a single robot part. ```rust pub struct JsonRobot { name: String, metadata: u64, parts: Vec } #[derive(Clone, Serialize, Deserialize)] pub struct JsonPart { id: u32, pos: [i8; 3], rot: u8, color: [u8; 3], alpha: u8, extra_data: Vec } ``` -------------------------------- ### Robot File Header Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v3.md Defines the layout of the header region in the Procelio robot file format. It includes the magic number, version, metadata, bot name length and content, number of parts and cosmetics, and an MD5 hash. ```APIDOC RobotFileHeader: magic_number: u32 (0xC571B040) version: u32 (3) metadata: u64 bot_name_length: u8 bot_name: UTF8 string num_parts: u32 num_cosmetics: u32 md5_hash: [u8; 16] (from byte 8 to just before the hash) ``` -------------------------------- ### Robot File Header Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v2.md Defines the binary structure of the Robot File header, including magic number, version, metadata, bot name, number of parts, and MD5 hash. ```APIDOC RobotFileHeader: magic_number: 4 bytes (0xC571B040) version: 4 bytes (expected to be 2) metadata: 8 bytes bot_name_length: 1 byte (length of bot name) bot_name: N bytes (UTF8 encoded bot name) num_parts: 4 bytes (number of parts) parts: K parts (structure defined below) md5_hash: 16 bytes (hash of data from byte 8 to just before the hash ``` -------------------------------- ### Rust Struct for Robot Data Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v2.md Rust struct definitions for representing robot and part data in memory, corresponding to the file format. ```rust pub struct JsonRobot { name: String, metadata: u64, parts: Vec } #[derive(Clone, Serialize, Deserialize)] pub struct JsonPart { id: u32, pos: [i8; 3], rot: u8, color: [u8; 3], alpha: u8, extra_data: Vec } ``` -------------------------------- ### Procelio Localization File Format v1 Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/localization_v2.md Defines the byte-level structure of the Procelio localization file format version 1. This includes the header, image data, and text data regions, specifying data types, lengths, and encoding for each field. ```APIDOC ProcelioLocalizationFile_v1: HeaderRegion: magic_number: 4 bytes (big-endian unsigned, 0x10CA112E) file_version: 4 bytes (big-endian unsigned, expected 2) image_data_offset: 4 bytes (big-endian unsigned) text_data_offset: 4 bytes (big-endian unsigned) anglicized_name_length: 2 bytes (big-endian unsigned) anglicized_name: anglicized_name_length bytes (UTF-8) native_name_length: 2 bytes (big-endian unsigned) native_name: native_name_length bytes (UTF-8) authors_length: 2 bytes (big-endian unsigned) authors: authors_length bytes (UTF-8) ImageDataRegion: pixel_data: 48 * 24 * 4 bytes (8-bit R, G, B, A per pixel, row-major order) TextDataRegion: num_text_elements: 4 bytes (big-endian unsigned) text_elements (K times): field_name_length: 2 bytes (big-endian unsigned) field_name: field_name_length bytes (UTF-8) field_value_length: 2 bytes (big-endian unsigned) field_value: field_value_length bytes (UTF-8) font_size: 2 bytes (big-endian unsigned) modifications: 1 byte (bitmask: &1=bold, &2=italic, &4=underline, &8=strikethrough) alignment: 1 byte (e.g., 0=left, 1=center, 2=right) has_color: 1 byte (1 if true, 0 if false) if has_color: red_channel: 1 byte blue_channel: 1 byte green_channel: 1 byte ``` -------------------------------- ### StatFile Header Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v2.md Defines the initial bytes of the StatFile format, including magic number, version, and placeholders for flag regions. ```plaintext 4 bytes: magic number (0x1EF1A757) 4 bytes: version (2) ? bytes: "blocks" flags region ? bytes: "attacks" flags region ``` -------------------------------- ### Robot File Cosmetic Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v3.md Describes the structure for cosmetics applied to robot parts. It includes the cosmetic type, the ID of the part it applies to, and an optional 'extra data' region. ```APIDOC RobotCosmetic: cosmetic_type: u32 part_on: u32 (block ID of the part to apply to) extra_data_length: u8 (max 64) extra_data: bytes (game-defined) ``` -------------------------------- ### Robot File Part Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v2.md Defines the binary structure of a single part within a Robot File, including block type, position, rotation, color, alpha, and extra data. ```APIDOC Part: block_type: 4 bytes x_position: 1 byte SIGNED y_position: 1 byte SIGNED z_position: 1 byte SIGNED rotation: 1 byte color_red: 1 byte color_green: 1 byte color_blue: 1 byte alpha: 1 byte extra_data_length: 1 byte (max 64) extra_data: N bytes (game-defined) ``` -------------------------------- ### Robot File Part Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/robotfile_v3.md Details the structure of a single part within a Procelio robot file. Each part has a block type, 3D position, rotation, color (RGB), alpha channel, and an optional 'extra data' region. ```APIDOC RobotPart: block_type: u32 x_position: i8 y_position: i8 z_position: i8 rotation: u8 color_red: u8 color_green: u8 color_blue: u8 alpha_channel: u8 extra_data_length: u8 (max 64) extra_data: bytes (game-defined) ``` -------------------------------- ### StatFile Header Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v3.md Defines the initial bytes of the StatFile format, including magic number, version, and sizes of subsequent regions. ```plaintext 4 bytes: magic number (0x1EF1A757) 4 bytes: version (3) ? bytes: "blocks" flags region ? bytes: "attacks" flags region ? bytes: "cosmetics" binary region ``` -------------------------------- ### StatFile Attacks Flags Mapping Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v3.md Lists the mapping between string names and their corresponding byte values for attack-related flags in the StatFile. ```plaintext "damage" => 7 ``` -------------------------------- ### Inventory File Header Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/inventoryfile_v3.md Defines the byte-level structure of the header region for the Inventory File format. It specifies the size and type of fields like magic number, version, block counts, and cosmetic counts. ```APIDOC InventoryFileHeader: magic_number: u32 (big-endian, unsigned, value: 0xC50CB115) version: u32 (big-endian, unsigned, value: 3) num_blocks: u32 (big-endian, unsigned) blocks: N times: block_id: u32 (big-endian, unsigned) block_count: i32 (big-endian, signed) num_cosmetics: u32 (big-endian, unsigned) cosmetics: M times: cosmetic_id: u32 (big-endian, unsigned) cosmetic_count: i32 (big-endian, signed) ``` -------------------------------- ### InventoryFile Header Region Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/inventoryfile_v2.md Defines the byte layout for the header region of the InventoryFile format version 2. It includes a magic number, version identifier, and a count of subsequent blocks, each with an ID and a signed count. ```APIDOC InventoryFile Header Region: 4 bytes: magic number (0xC50CB115) 4 bytes: version (2) 4 bytes: number of blocks "N" N times: 4 bytes: block ID 4 bytes SIGNED: block count ``` -------------------------------- ### StatFile Attacks Flags Mapping Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v2.md Maps string names of attack properties to their corresponding integer flag values used in the StatFile format. ```plaintext "damage" => 7 ``` -------------------------------- ### Procelio File Format v1 Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/localization_v1.md Defines the byte structure for the header, image data, and text data regions of the Procelio localization file format version 1. This includes magic numbers, versioning, offsets, string lengths and data, pixel data, and text element properties. ```APIDOC Procelio File Format v1: Header Region: 4 bytes: magic number (0x10CA112E) 4 bytes: file version (1) 4 bytes: image data region offset 4 bytes: text data region offset 2 bytes: length of anglicized name (bytes) N bytes: anglicized name (UTF-8) 2 bytes: length of native name (bytes) N bytes: native name (UTF-8) 2 bytes: length of authors (bytes) N bytes: authors (UTF-8) Image Data Region: 48 * 24 * 4 bytes: 8-bit RGBA pixel data (row-major order) Text Data Region: 4 bytes: Number of text elements K times (for each text element): 2 bytes: length of field name N bytes: field name (UTF-8) 2 bytes: length of field value N bytes: field value (UTF-8) 2 bytes: font size 1 byte: modifications (&1=bold, &2=italic, &4=underline, &8=strikethrough) 1 byte: alignment 1 byte: red color channel 1 byte: blue color channel 1 byte: green color channel ``` -------------------------------- ### StatFile Block Flags Mapping Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v3.md Lists the mapping between string names and their corresponding byte values for block-related flags in the StatFile. ```plaintext "health" => 0 "mass" => 1 "cost" => 2 "roboRanking" => 3 "cpuCost" => 4 "thrust" => 5 "rotationSpeed" => 6 ``` -------------------------------- ### StatFile Block Flags Mapping Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v2.md Maps string names of block properties to their corresponding integer flag values used in the StatFile format. ```plaintext "health" => 0 "mass" => 1 "cost" => 2 "roboRanking" => 3 "cpuCost" => 4 "thrust" => 5 "rotationSpeed" => 6 ``` -------------------------------- ### StatFile Binary Region Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v3.md Explains how binary data is stored within the StatFile, including the count of binary entities and the structure for each entity. ```plaintext 4 bytes: the number of binary entities K times: each entity 4 bytes: the entity ID# 1 byte: the length of binary N bytes: binary ``` -------------------------------- ### Inventory File JSON Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/inventoryfile_v3.md Specifies the expected JSON format for the inventory data within the Procelio file. It includes an array of parts, each with an ID, name, and count. ```JSON { "parts": [ { "id": 12, "name": "tier 1 wheel", "count": 6 }, { "id": 432, "name": "idk some gun", "count": 3 } ] } ``` -------------------------------- ### StatFile Flags Region Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v2.md Details the structure of the flags region within the StatFile, specifying how flagged entities and their associated flags/values are stored. ```plaintext 4 bytes: the number of flagged entities K times: each entity 4 bytes: the entity ID# 1 byte: the number of flags N times: each flagged value 1 byte: the flag 4 bytes SIGNED: the flag's value ``` -------------------------------- ### StatFile Flags Region Structure Source: https://github.com/brennanstein/procelio-files/blob/master/docs/statfile_v3.md Details the organization of flagged entities within the StatFile, including the count of entities and the structure of each entity's flags. ```plaintext 4 bytes: the number of flagged entities K times: each entity 4 bytes: the entity ID# 1 byte: the number of flags N times: each flagged value 1 byte: the flag 4 bytes SIGNED: the flag's value ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.