Skip to content

PIUS format

Rodrigo Alfonso edited this page Aug 27, 2020 · 23 revisions

Definition

// PIU Steps (*.pius)

enum Channel { ORIGINAL, KPOP, WORLD };
enum DifficultyLevel { NORMAL, HARD, CRAZY, NUMERIC };
enum EventType {
  SET_FAKE,
  NOTE,
  HOLD_START,
  HOLD_END,
  SET_TEMPO,
  SET_TICKCOUNT,
  STOP,
  WARP,
};

typedef struct {
  char* title;          // 0x00 (31 bytes - including \0)
  char* artist;         // 0x1F (27 bytes - including \0)
  Channel channel;      // 0x3A (u8)
  u32 lastMillisecond;  // 0x3B (u32)
  u32 sampleStart;      // 0x3F (u32 - in ms)
  u32 sampleLength;     // 0x43 (u32 - in ms)

  u8 pixelate;        //   0x47
  u8 jump;            //   0x48
  u8 reduce;          //   0x49
  u8 negativeColors;  //   0x4A
  u8 randomSpeed;     //   0x4B
  u8 extraJudgement;  //   0x4C
  u8 hasMessage;      //   0x4D
  char* message;      //   0x4E (optional - 107 bytes - including \0)

  u8 chartCount;  // 0x4E if no message, 0xB9 otherwise (u8)
  Chart* charts;  // 0x4F if no message, 0xBA otherwise ("chartCount" times)
} Song;

typedef struct {
  DifficultyLevel difficulty;  // u8
  u8 level;

  u32 eventChunkSize;
  u32 eventCount;
  Event* events;  // ("eventCount" times)
} Chart;

typedef struct {
  int timestamp;  // in ms
  u8 data;
  /* {
        [bits 0-2] type (see EventType)
        [bits 3-7] data (5-bit array with the arrows)
      }
  */
  u32 param;
  u32 param2;
  u32 param3;
  // (params are not present in note-related events)
} Event;

Event params

Event param param2 param3
SET_FAKE fake enabled (1 or 0) - -
SET_TEMPO bpm scroll bpm how many frames it should take
SET_TICKCOUNT tick count - -
STOP stop length in ms judgeable (1 or 0) -
WARP warp length in ms - -
Clone this wiki locally