Jump to content

Mamodel files: Difference between revisions

From Battle Cats Game Modding Wiki
No edit summary
Glow defaults to 0
Line 25: Line 25:
# Rotation
# Rotation
# Alpha
# Alpha
# Glow (only in versions greater than 1, defaults to)
# [[Glow]] (only in versions greater than 1, defaults to 0)
# Comment (Optional, unused by the game)
# Comment (Optional, unused by the game)



Revision as of 22:27, 28 September 2025

Mamodel files make up part of a model. They are responsible for giving assigning texture regions to parts of a model, giving them properties such as a base position, opacity, rotation, scale, etc. The parts are then animated using maanim files.

Structure

The file is a CSV file and starts with a line specifying the format. This is always [modelanim:model] or [modelanim:model2]and is unused by the game.

The next line is the version code, see below for more details.

The next line is the total number of parts.

Each part is made up of the following data:

Part Structure

  1. Parent ID
  2. Unit ID
  3. texture cut ID
  4. Z depth
  5. X position
  6. Y position
  7. X position of center of rotation / scaling (pivot x)
  8. Y position of center of rotation / scaling (pivot y)
  9. X scale factor
  10. Y scale factor
  11. Rotation
  12. Alpha
  13. Glow (only in versions greater than 1, defaults to 0)
  14. Comment (Optional, unused by the game)

Unit Data

After the part list, there is a row which defines the units to use for scale, angle, and alpha.

This is only in versions greater than 0.

Structure

  1. Scale unit - in version 0 this defaults to 100
  2. Angle unit - in version 0 this defaults to 360
  3. Alpha unit - in version 0 this defaults to 255
  4. Unknown - only in versions greater than 3. Seems to always be 1

Collision Data

After the unit data, there is collision data. This specifies information such as a basic x or y offset.

This is only available on versions greater than 2.

The first row defines how many collision data sets there are.

Then the rows that follow are the collision data with the following details:

  1. Part ID - part ID the collision applies to
  2. Group ID - unused, but seems to specify the category of collision data this belongs to
  3. X - some sort of x position offset
  4. Y - some sort of y position offset
  5. Radius - unused, maybe intended to be the radius of the hitbox
  6. Unknown - unused and no name is given in the code
  7. Comment - Optional, unused by the game