smm-course-viewer
v1.3.0
Published
A package to reading courses (*.cdt) - Super Mario Maker
Downloads
19
Maintainers
Readme
smm-course-viewer
Simple viewer for level files from Super Mario Maker (Online). Based on MarioUnmaker and PointlessMaker.
This package has two main features:
SmmCourseViewer
: Interpret/extract course data from .cdt files.Draw
: Draw the course in a HTML Canvas element.
The code is developed in Vanilla JS, but with extension to Node.js (Code Documentation).
Explore the monsters and objects of your Super Mario Maker courses, see (Data Format) for more details.
Summary
Installation
Download or git clone.
git clone https://github.com/leomaurodesenv/smm-course-viewer.git
Download the images
/layout/draw/monster/
and/layout/draw/titleset/
Open the
/index.html
in a web browser.Load Example or Browse... to a *.cdt file.
To use the Node.js:
npm install --save smm-course-viewer
Node.js Example
Example: How to read courses files.
Run this example nodejs test/test.js
.
/* Include */
const smmCourseViewer = require('smm-course-viewer');
// ## Try interpret a course file
smmCourseViewer.read('path/course_data.cdt', function(err, course, objects) {
if(!err) {
console.log(course)
console.log(objects);
}
});
Object Structure
Accessing by a web browser:
- After Load Example or Browse for a file, the object is created.
- Open the web console, usually
Ctrl+Shift+k
orF12
, and typesmmCourseViewer
.
course:
\_ name: string
\_ mode: ['M1', 'M3', 'MW', 'WU']
\_ timeLimit: number
\_ scroll: [0, 1, 2, 3]
\_ scrollName: ['none', 'slow', 'medium', 'fast']
\_ theme: [0, 1, 2, 3, 4, 5]
\_ themeName: ['overworld', 'underground', 'castle',
'airship', 'water', 'ghostHouse']
\_ year: number (creation)
\_ month: number (creation)
\_ day: number (creation)
\_ hour: number (creation)
\_ minute: number (creation)
\_ width: number
\_ widthBlock: number of blocks
\_ heightBlock: number of blocks
\_ objectCount: number
\_ checksum: number (file check)
\_ version: number
\_ flags: (unknown)
\_ hexMiiData: (unknown)
objects:
\_ Array[CourseObject]
CourseObject:
\_ name: string
\_ x: X-axis
\_ y: Y-axis
\_ z: Z-index
\_ height: number
\_ width: number
\_ size: number (only monsters)
\_ wing: boolean (only monsters)
\_ type: number (monster ID)
\_ subType: number (sub ID)
\_ flags: number (under discovery)
\_ extendedData: number
\_ effect: number (unknown)
\_ transform: number (unknown)
\_ childFlags: number (under discovery)
\_ childTransform: number (unknown)
\_ childType: number (coupled monster)
\_ linkId: number (coupled monster ~father)
Also look ~
Any suggestions or doubts, please open an "issue".
If you want to contribute, make a "pull request".
- License GPLv3
- Create by Leonardo Mauro ~ leomaurodesenv