Jump to content

Mamodel files: Difference between revisions

From Battle Cats Game Modding Wiki
units
No edit summary
Line 3: Line 3:
== Structure ==
== Structure ==


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


The next line is the version code, this is always <code>3</code>, but there is code in the game to handle different versions.
The next line is the version code, see below for more details.


The next line is the total number of parts.
The next line is the total number of parts.
Line 32: Line 32:
After the part list, there is a row which defines the units to use for scale, angle, and alpha.
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, otherwise it defaults to scale out of <code>100</code>, angle out of <code>360</code>, and alpha out of <code>255</code>.
This is only in versions greater than 0.


=== Structure ===
=== Structure ===


# Scale unit
# Scale unit - in version 0 this defaults to 100
# Angle unit
# Angle unit - in version 0 this defaults to 360
# Alpha unit
# Alpha unit - in version 0 this defaults to 255
# Unknown - only in versions greater than 3.


=== Collision Data ===
=== Collision Data ===

Revision as of 17:49, 8 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)
  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.

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