Skip to content

Gbx Explorer (Discord Edition) Design (April ‐ May 2024)

Petr Pivoňka edited this page May 1, 2024 · 3 revisions

Gbx Explorer (Discord Edition) is a logical part of the general purpose GBX.NET Discord bot. It is focused on general Gbx file exploration.

State

Gbx state is stored as serialized bytes in an encrypted-at-rest database due to resilient reasons. On each modification, the Gbx is automatically serialized and stored in the database.

Undo

Undo should be supported and steps should stored in the database.

/gbx

Imports a Gbx file to work with.

Rate limits

This command is limited to 3 executions per hour for all users and 100 executions per hour for supporters.

Protected mode

  • If executed by the command's user, the message is modified.
  • If executed by other users, an ephemeral response is spawned.

Owner mode

Execution only allowed by command's user or server moderator.

Table

Table is a form of content to display node properties. It has 2 columns.

  • Name
    • Shows the property name as in C#
    • Max length is 32 (22 in Mobile mode)
  • Value
    • Shows the value formatted to certain forms (to be specified)
    • Max length is 24 (14 in Mobile mode)

Columns are wide only as much as necessary while being within the limits.

Main node

Main node is the initial response of the /gbx command. It shows primary information about the imported Gbx.

Embed

  • Title
    • Gbx file name
  • Description
    • Mono-spaced table with property name and values

Interaction

  • Select menu
    • Selecting a property spawns the Property response
  • Export (primary)
    • Responds with an always-ephemeral attachment of the Gbx stored in the database (with all applied modifications)
  • Up, Down, Left, and Right arrows
  • Gbx properties
  • Mobile mode
  • Discard (danger)
    • Delete the message and Gbx from memory and database entirely
    • Owner mode

Property

Property is an always-ephemeral response that shows in-depth information about the selected node property.

Embed

  • Title
    • Name of the property
  • Fields
    • Type
    • Value
    • Premium (configurable)

Interaction

Interaction can be different on different property types.

  • Set (primary)
    • Spawns a modal to change the value
    • Expected values are different based on the type
    • Some types can be too complex to set directly, so this can be disabled in these scenarios
    • Can be disabled on Premium properties for non-supporter users
    • Owner mode
  • Add (primary)
    • Spawns a modal to add an item to a collection
    • Available only for ICollection property types
    • Expected values are different based on the type
    • Some types can be too complex to set directly, so this can be disabled in these scenarios
    • Can be disabled on Premium properties for non-supporter users
    • Owner mode
  • Remove (danger)
    • Spawns the Remove Item response
    • Available only for ICollection property types
    • Can be disabled on Premium properties for non-supporter users
    • Owner mode
  • Export (primary)
    • Spawns the Node Export response on all CMwNod types
    • Other types have unknown export forms for now
    • Limited to 3 executions per hour for all users and 100 executions per hour for supporters

Remove Item

TODO

Node Export

Property is an always-ephemeral response that allows to specify node export parameters.

Interaction

  • Confirm (success)
    • Responds with an always-ephemeral Gbx file attachment of the serialized node

Gbx Properties

Gbx Properties is a response that shows Gbx-specific parameters like header sizes, compression types, etc.

Unavailable

Unavailable is a response when the Gbx GUID is either no longer available in database or the user does not have access to it.

GBX.NET

Practical

Theoretical

  • TimeInt32 and TimeSingle (soon)
  • Chunks in depth - why certain properties lag? (soon)
  • High-performance parsing (later)
  • Purpose of Async methods (soon)
  • Compatibility, class ID remapping (soon)

Internal

External

  • Gbx from noob to master
  • Reading chunks in your parser
Clone this wiki locally