> For the complete documentation index, see [llms.txt](https://enls.gitbook.io/rgss-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enls.gitbook.io/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-animation-frame.md).

# RPG::Animation::Frame

Data class for animation frames.

## Superclass

* [Object](/rgss-reference-manual/standard-library/built-in-classes/object.md)

## Referrer

* [RPG::Animation](/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-animation.md)

## Attributes

### cell\_max

Number of cells. Equivalent to the largest cell number in the frame set.

### cell\_data

2-dimensional array containing cell contents ([Table](/rgss-reference-manual/game-library/rgss-built-in-classes/table.md)).

Generally takes the form `cell_data[`*`cell_index`*`,`` `*`data_index`*`]`.

`data_index` ranges from 0 to 7 and denotes various information about a cell (0: pattern, 1: X-coordinate, 2: Y-coordinate, 3: zoom level, 4: angle of rotation, 5: horizontal flip, 6: opacity, 7: blending mode). Patterns are 1 less than the number displayed in RPGXP; -1 indicates that that cell is not in use.

## Definition

```ruby
module RPG
  class Animation
    class Frame
      def initialize
        @cell_max = 0
        @cell_data = Table.new(0, 0)
      end
      attr_accessor :cell_max
      attr_accessor :cell_data
    end
  end
end
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://enls.gitbook.io/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-animation-frame.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
