Language…
12 users online:  AmperSam,  Anorakun, CroNo, JezJitzu, mtheordinarygamer, NewPointless, Null42, RPG Hacker, Skewer,  Tahixham,  Telinc1, Zavok - Guests: 288 - Bots: 341
Users: 64,795 (2,373 active)
Latest user: mathew

Super Mario Galaxy 2 Hacking (Full tutorial)

1- Basic Overview

Level creation is a big part of a project and actually...making ideas possible for galaxies in the Galaxy series. Level creation is the toughest area of the whole process, because it involves a ton of knowledge. Want to level create? Then this is your place! I'll teach all the areas of the game (With a lot of reading) and make sure a lot of you master it. Please read this large guide, and ask questions you have about this after you read it. Thank you! Enjoy.

But first, we must list all of the tools you'll need!
Here:
Collision Creator
Model Importer
BCSV Editor v0.7
MSBConv- Text Adding And Deleting (Python Version)
MSBConv- Text Adding And Deleting (EXE Version [Recommended For Newbies])

BMDView2

The last thing I would like you to download, is the Super Galaxy Pack.
It has Anarchy, Whitehole, ArcExtract, ArcPack, and all in 1 rar file!
Download the Pack

OR

I have put together a Template for creating all galaxies for SMG2.5 (and for custom galaxies in general for SMG2) in Flip-Swap.

Why? Because Flip-Swap isn't as sensitive to crashing as the other galaxies are in the game.

Once the galaxy is finished, it can be moved to it's correct location, from Flip-Swap.

This Includes a blank RedBlueExGalaxyMap (With the necessary stuff to make the level work correctly.) If you wish to change the comet, please do so yourself, so multiple Scenarios don't have to be made.

This includes 45 Paths for you to use, so paths won't be a problem to handle.

Have fun! Download link is right here; http://kuribo64.net/get.php?id=xQRIYjM0RQLVKHjl


2- The Filesystem


The Galaxy series (Both games) use similar filesystems and filetypes. They are listed here.

1- ARC
Pretty much the archives for images, planet models, and levels.

2- BCSV
Filled with tables of information for levels. Used for Scenarios, Object lists, flags, and more.

3- MSBT
Text files. Used to edit the text in the game, as well as a ton of tags for certain images, aligning, size, and even more.

4- MSBF
Another file for text. Not too much is known about this file, as of yet.

5- KCL(Used in a lot of games)
This is the basic collision for a planet. There are collision values for each texture that is on a model.

6- PA
This gets exported for collision too with the kcl. It's a form of bcsv.

7- AST
The music file format. This file has the music for the game.

8- BRLAN
An animation file for an image.

9- TPL
An image file. It holds an image in-game. It's used for the Logo, and much more.

10- BCK
Animations for a model in the game.

11- BDL
This is the model format for a planet, or any object.

12- AW
The sound effect files. This can't be edited yet, but soon it will be able to. It holds the character sounds, object sounds, and effects.

Next stop is the actual iso. And what's in it.
Here we go!

This is the root of the folder.
Code
SMG2\SystemData

This is basically the system data. As by the name, if you couldn't tell.

Code
SMG2\StageData

The folder with all the stages in the game in it.

Code
SMG2\ParticleData

The folder with all the effects in it stored.

Code
SMG2\ObjectData

The folder with all the objects in it.

Code
SMG2\ModuleData

Data about the module.

Code
SMG2\MapPartsData

Nothing in here, left over.

Code
SMG2\LocalizeData

The folder with all the text in the game inside.

Code
SMG2\LightData

The data about all the lighting in the entire game.

Code
SMG2\LayoutData

Everything image-related (The logo, and all) is in here.

Code
SMG2\HomeButton2

Has to do with the home button screen when you hit it. Every game has this, I'm pretty sure.

Code
SMG2\Debug

Useless. It's empty. (Although there is a code to show a debug screen on a crash. See below in the tutorial for it.)

Code
SMG2\AudioRes

Stands for Audio Resolution. In it has all the music, and sound effects.

Code
SMG2\AllTargetModuleData

Useless, empty.

Code
SMG2\AllTargetAddressMap

Useless, empty.

SubFolders
These are the folders inside of the root folders. Let's look at those, shall we?

Code
SMG2\LocalizeData\UsEnglish
SMG2\LocalizeData\UsFrench
SMG2\LocalizeData\UsSpanish

These 3 folders have the text in the game, each in different languages.
1st is English.
2nd is French.
3rd is Spanish.

Code
SMG2\LocalizeData\UsEnglish\LayoutData
SMG2\LocalizeData\UsFrench\LayoutData
SMG2\LocalizeData\UsSpanish\LayoutData

These 3 folders just have the Font, the HomeButton, and Wii remote strap screen in them. Once again, all in different languages.

Code
SMG2\LocalizeData\UsEnglish\MessageData
SMG2\LocalizeData\UsFrench\MessageData
SMG2\LocalizeData\UsSpanish\MessageData

These 3 folders have the literal text that's in the game. Once again, all in the languages the folder name is.

Code
SMG2\AudioRes\Info

This folder has the information about the music. To the sounds, BGM Parameters, and more.

Code
SMG2\AudioRes\Seqs

Music sequence files.

Code
SMG2\AudioRes\SpkRes

Unknown. Just has a regular file in there called SpkRes.

Code
SMG2\AudioRes\Stream

Where all the AST's in the game are stored. This is all of the game music.

Code
SMG2\AudioRes\Waves

The AW files I talked about earlier. All the sounds are in here from effects, voices, and everything.

3- Anarchy: The Basics

There are currently 2 level editors for the SMG Series. These 2 editors are called Anarchy and Whitehole. The difference?

Anarchy:
-Can edit camera data
-Can add any type of object
-You just need the StageData files to edit a level

Whitehole:
-Has a 3D Overview
-Easier to place objects
-You need all of StageData and ObjectData folders to edit a level

In this tutorial, I will show you both of these editors and how to use them! :)

3.2- Level Organization Categories


Inside of the SMG iso is a folder called StageData. It has all the stages in the game, and the files with them.
It goes like this:
Code
SMG2\StageData\____Galaxy\_____Galaxy___.arc

Or
Code
SMG2\StageData\____Zone\_____Zone___.arc


With the first 2 blanks being the galaxy names, and the 3rd blank being the type.
The types are listed here:

Map: Basically the whole level's objects. Inside of this archive are the objects, areas, gravity, cameras, paths, and points to the level.

Scenario: The star and layer layout of the level. Can be extracted and it's contents can be viewed in the bcsv editor.

Design: The Lighting to the level.

Light: The light data used in the level.

Sound: The music and sound effects in the level are stored in here.

Ghost [td]The ghost race data for the level.
[tr][td]Demo [td]Cutscene and animation triggers are found in this file, the contents of the actual Demo are found in the map file.
[tr][td]UseResource [td]The resource for finding objects that are stored in the level. The fields show it pointing to the model in ObjectData.
[tr][td]ZoneInfo [td]Zone information for the galaxy.
[/table]

Here's a brief description about each of these:

1- Map
The most IMPORTANT type of archive in this whole game. This file stores where objects are placed, areas that are configured, camera data, path data, Debug information, Layers for certain stars, List info (Always has a Undefined entry), and much more.

2- Scenario
This is the most important file to comet changing and star adding. This configures how many stars are in a level, what type of star, and what type of comet, and how much time you get for the level.(Found only in the files that have the last part "Galaxy" in it.)

3- Design
This archive mostly holds lighting stuff. Like glares, tone, etc.

4- Light
Holds light information on levels. And effects.

5- Sound
Sound is basically....sound. It holds audio effects for levels, and the BGM Music (Backround Music).

6- Ghost
The ghost luigi that is in the level. This file can be opened, but it shows nothing in anarchy. So, we have to extract it using tools. When we do, there are file types called .gst and .pad files.(Found only in the files that have the last part "Galaxy" in it.)

7- Demo
Cutscene holders. They are filled with bcsv animations that configure triggered cutscene animations in-game. All have to be present for a certain type of animation.

8- UseResource
In this file, all of the objects in the levels' models are added here. Adding files to this isn't needed for proper functions in a level.

ZoneInfo
All of the zones and information to them are stored in here.

3.2.1- Stage Organization Categories



3.3- Areas

An area is a location of a trigger that will show an effect in-game. When Mario enters into the area, something happens.

Basic way to set up an Area

ModelShapeNo Needs to be filled in. Usual value used for a box is 0.
It can be scaled accordingly.

Can Be Edited In Whitehole:
Can Be Added In Whitehole:


3.4- Paths

Paths are basically the way an object moves from 1 location to another.

How a Path Works and is Connected

Anarchy:
It is on the left drop-down bar and choose "Paths". It should show all the paths in the level or zone.

Whitehole:
On the top bar, hit "Show all paths" and click on the colored block that shows up. Move it around to where you want it to be. The path links have to be in order for this to properly work.



Can Be Edited In Whitehole:
Can Be Added In Whitehole:

3.5- MapParts


MapParts are basically the moving parts of a level that rotate, move, flip, or do anything in that sort of way.
It's factors in it's category are these:
Code
[1A691A84]=Activation (0=normal, 1=stepped on)
[D1DFFB8C]=Speed (higher=faster)
[D0E17418]=Degrees of rotation per stop (higher=more rotation)
[7217EFBC]=Axis of rotation (0=X, 1=Y, 2=Z)
[86AC8907]=Smoothness (0=sharp start/end, 1=smooth start/end)
[4558808A]=Wait time (higher=more wait between rotations)
[72209755]=Rotation controller (0=stops after rotating, 1=swings back and forth, 2=rotates in one direction)
[39FCC89A]=??? (2 for FlipTurnMoveStep)
[6D3E35CD]=Shaking (0=none, 1=shakes before each rotation)
[4137EDFD]=??? (Seems to be an integer)


Can Be Edited In Whitehole:
Can Be Added In Whitehole:

3.6- Cameras


There are 2 types of cameras. The CameraArea OR a camera in general.
The CameraArea works the same way as an area would.

Here are a couple things about cameras that you should know.
For a couple of cameras, they are attached to an object and only appear for a certain event. In the camera section, you see a number next to the Camera name in Japaneses characters.
e:伸び植物固有出現デモ031
e:伸び植物固有掴まり031
e:パワースター固有100
e:パワースター固有030
For the camera set ID for an object for the camera to appear, the number in the CameraSetID has to be the number in the camera name.

Another way of making cameras is in CameraCubeInfo. There are CameraAreas in there, and can be edited any way you wish.

For example.
Let's say I want a vine to appear and have a camera follow it up. (This can be used in any way, as I know of at this moment. If it does, I'll just call it a follow camera.)
Here's how it's set up.
e:伸び植物固有出現デモ031
The number 31 is what we need to be focused on.
031= 0x01F in hex.
So 1F will be the CameraSetID for the object.
This works for plenty of activating cameras.

The cameras for the intro to levels are found in the level files when you extract the Map file. These cannot be opened with an editor yet, so hang tight for that, where it will be possible in the future.
Most other cameras are found in CameraCubeInfo. These act like Areas, with a shape and size. obj_args set out on what it does when the Area is entered. For example, it looks up at the area, down, behind, to the side, zooms out, etc.

There are also cameras in the camera section that look similar to this: c:0000
This just activates a camera that can shoot at any angle, at any time. the c:0XXX can be edited with a setting on a CameraArea that connects the camera to this camera in this section.

Even Launch Stars can have their own camera when you shoot off of them.
e:スーパースピンドライバー:000:02番目 (th 000:02: e: Super spin driver)
This connects to the Launch Star with a CameraSetID of 1.
There are a ton of settings to the cameras that we can use, and we can control them in any way provided!

There are also camera TYPES in the settings of one. These are what some look like:
CAM_TYPE_XZ_PARA
CAM_TYPE_POINT_FIX
CAM_TYPE_OBJ_PARALLEL
CAM_TYPE_EYEPOS_FIX_THERE
CAM_TYPE_FOLLOW
CAM_TYPE_WONDER_PLANET
There are many more out there.

Another thing that has to do with cameras are DemoGroups.
DemoGroups are a CUTSCENE, literally. Not SimpleDemoExecutor, that's a short cutscene. These are like, animations like talking, moving, speaking, noises, and more.
DemoGroupID is one of the main things to look for in this thing. It connects the object to the demo it's going to play. Plus, it has to have the necessary animations stored in the "Demo" file in StageData's file for a galaxy. It's connected in DemoObjInfo in the map files. With the following fields:
name:
DemoName: (Japanese)
TimeSheetName: (The name of the demo)
ID:
Switches (Like usual)
DemoSkip: (?)
Position, Angles, and scale as usual.

Have you ever thought on how the power star appears with the camera? Well, it runs off of a camera called e:パワースター固有000. It means 000 unique Power Stars: e. This is the star appearing camera, when the power star goes to it's resting place.
Just make the CameraSetID 0 for the power star, and add this camera and it's properties (Can be found in a ton of levels. Only use if the star will appear by a switch, or anything.)



Motion Cameras
Turns out, we have been using NON motion cameras. A motion camera still shows the animations of objects around the area. The ones we have been using do not use this option. It freezes everything except the object we want it to focus on.
Well, I have found the Motion Camera, and got it working perfectly.

Where would we need a motion camera?
We would use a motion camera whenever an object or planet is appearing with a switch.
Things that would NOT need a motion camera:
-Launch Star Appearing
-Powerup Appearing
Here is the info you want:
e:簡易デモ実行固有簡易デモ012
version: 30016
gflag.camendint: 0
gflag.enable.EndErpFrame: 0
gflag.thru: 0
num2: 0
num1: 0
angleB: Adjust However you wish
angleA: Adjust However you wish
Dist: Adjust However you wish
flag.collisionoff: 0
vpanaxis.X: 0
vpanexis.Y: 1
vpanaxis.Z: 0
vpanuse: 1
udown: 78
pushdelaylow: 78
pushdelay: 78
lplay:800
uplay: 300
gndint: A0
lower: 0.1
upper: 0.3
camint: 78
fovy: 45
roll: 0
loffserv: 0
loffset: 0
woffset.X: 0
woffset.Y: 0
woffset.Z: 0
camtype: CAM_TYPE_XZ_PARA
axis.X: 0
axis.Y: 0
axis.Z: 0
evpriority: 0
camendint: 0
eflag.enableEndErpFrame: 0
evfm: 5A
eflag.enableErpFrame: 0


(The Japanese Symbols may not work. If they don't, go here: http://pastebin.com/V29Q1Ki1)
And set up a SimpleDemoExecutor with a ObjID of 35 and a CameraSetID of C because 0x012=C in hex.

If an option that is on a new camera and isn't on here, just set it to 0.

I'm putting my skills to the test and actually TESTING a cutscene in a level.


All Cameras
Here, I'm going to document all the cameras that are tied to objects.
e:土管固有出現000 Pipe Camera
e:スーパースピンドライバー固有出現イベント用114 Launch Star Camera
e:スピン雲アイテム固有出現デモカメラ050 First Cloud Flower Collected Camera
e:パワースター固有000 Power Star Appear Camera
e:シナリオスターター:005:00番目 Fly In Camera
e:キノピオ固有会話001 Talking To Toad Camera

This is a list of what some of the parts of cameras work: http://pastie.org/9787185
I'll update this table later. This is all I can get ATM.

Can Be Edited In Whitehole:
Can Be Added In Whitehole:

3.7- Gravity


Gravity is where Mario walks around a spherical planet, or just flipping to the side or upside down.

This is for GlobalPlaneGravityInBox

Regular Gravity
X, Y, Z scale- Any you want.

Range- Any you want.
Distance- Any you want.
Priority- 0
Inverse- -1

Right Gravity
Z Rotation- 90

X, Y, Z scale- Any you want.

Range- Any you want.
Distance- Any you want.
Priority- 1004
Inverse- -1

Left Gravity
Z Rotation- -90

X, Y, Z scale- Any you want.

Range- Any you want.
Distance- Any you want.
Priority- 2003
Inverse- -1

Upside-Down Gravity
X Rotation- 180

X, Y, Z scale- Any you want.

Range- Any you want.
Distance- Any you want.
Priority- 1006
Inverse- -1

Front Gravity
X Rotation- 90

X, Y, Z scale- Any you want.

Range- Any you want.
Distance- Any you want.
Priority- 10
Inverse- -1


There are a lot more, but these are mostly the basics. I'll try to find more about these. :)
Also if you're asking how you know which direction it goes to, look at the Green axis line on the gravity object. The way it points is the way it will have Mario standing.

Can Be Edited In Whitehole:
Can Be Added In Whitehole:
3.8- Other Little Stuff



4- Whitehole: The Basics

First, you want to open up the .exe or .jar of Whitehole, to load up this screen;

Now, you want to load up your galaxy folder. As shown above, hit the Select Game Folder button to open a Open File Dialog.

Choose the folder that has your files, in my case, mine is named SMG2. It should have StageData and ObjectData inside of it to load stuff properly. Now after you highlight the folder, hit Open. If done correctly, it should look like this;

You have now loaded the SMG2 files into the editor! Now, you want to highlight the galaxy you wish to edit (Filenames for galaxies are in another thread. Will update this with all the names soon.) and double-click it. Once you've done that, this screen should appear in another window:
Linked for stretched purposes.
Now that we're at it, let me explain the basic usage!


This box shows the different star missions. The first three are the main missions, with the last 3 being the green star missions. You can alter the missions by clicking on each layer on what star you wish to edit.


This is the Zone List. Zones in SMG2 are used to organize parts of a level in a specific file. But Whitehole loads all the files, and objects are placed in each individual zone.


Directly under the Render screen is this. It shows what mission you're currently editing, plus the galaxy file name.


The top button saves your revisions to the level you've made. The "Scenario" tab shows the zones, and the mission layers. We'll talk about the "Object" tab later. ;)


This is directly above the render screen. Here's what the buttons and labels do;
Selected; Shows the current object you've selected.
Deselect; Deselects the current select object(s).
Show All Paths; Shows the paths in the level. Will explain more later.
Reverse Rotation; Reverses the way you can rotate the level. If you hit left, the level goes left. If you hit "Reverse Rotation", if you hit left, it goes right. The opposite direction from default.

Linked for stretch purposes.
This is the basic screen that shows the level. It displays all the objects, and paths in the level. The blue boxes are objects, but they don't use an actual model.

Linked for stretch purposes.
If you click on an object, it will highlight it, like the picture shown above. The object functions/settings shows up on the bottom left corner of the window.

And the list of objects in the level will appear when you hit it.


Now, let's talk about those settings, shall we?

Here's a basic explanation of these shown above:
Object; The object name.
Zone; The Zone the object is located in.
Layer; The Layer (Mission) the object is in.
X Position; X Position of the Object.
Y Position; Y Position of the Object.
Z Position; Z Position of the Object.
X Rotation; X Rotation of the Object.
Y Rotation; Y Rotation of the Object.
Z Rotation; Z Rotation of the Object.
X Scale; X Scale of the Object.
Y Scale; Y Scale of the Object.
Z Scale; Z Scale of the Object.
Paramscale; Unknown on what this really does. Just set it to 1. (Done by default)

obj_arg0-7
Obj_args are object settings. They alter the object to do different kinds of things. If you want to know what does what, go check the Object Database to see for yourself. ;)



SW_APPEAR; Appearance switch of an object.
SW_DEAD; Makes something disappear. Connects with SW_APPEAR.
SW_A; Activates a switch/object.
SW_B; Deactivates a switch/object.
SW_AWAKE; Turns on an object(s).
SW_PARAM; Speed, probably.

Object ID; A number given to each object. Can be just left at 0, doesn't effect anything.
Message ID; Message ID for text.
Generator ID; The ID for generating an object.
View group ID; Connected with ViewGroupCTRLArea. The ID of the View Object.
Path ID; The path ID. If you want the object to have a path, you assign this.
Clipping Group ID; Clipping ID.
Group ID; The ID for a group of Objects connected to each other via switch.
Demo Group ID; The Demo ID of the DemoGroup. Used for animations and cutscenes.

CameraSetId; The ID to connect a camera in the "camera" section.
CastId; Unknown.
ShapeModelNo; Shape number. Used with different types of Flowers and Water.
MapParts_ID; Connects the object with a MapParts object.
Obj_ID; The only time I've seen this, is with a Demo executor.

Now, let's learn how to add an object to the level!
First, you need to be in the "Objects" tab.
Now, hit "Add Object".

Here are the descriptions on what you can add;
General Object; Just a regular object.
Map Part; A moving, turning, platform.
Gravity; A gravity point.
Start Point; A starting point for the player.
Path; Adds a whole new path. (BROKEN ATM)
Path Point; Adds a new point. (BROKEN ATM)

Now hit "General Object"
You should get this;

This is the main screen for adding objects. You can search for an object, or look through the list. (MAKE SURE THE OBJECT YOU CLICK IS COMPATIBLE WITH THE GAME YOU'RE EDITING. IF NOT, IT WILL CRASH THE GAME.)

Now let's look at something on the bottom of the window.

This lets you add an object to a certain mission. (Common means all Stars, A is first, B is second, C is third. For all galaxies, this is not the case.)

Now I'm just going to add a simple Coin. So I type in "Coin" in the search box and find the object, and click on it.

I double click, and the window goes away. Now I just click on where I want the coin to be placed at.

Page-streching image.
There it is! Now I just move it around by dragging it with my mouse, and it will go anywhere.


5- MSBT Editing (Text Editing)


This next tutorial was written by NWPlayer123 as well.
I thought that I ought to take the time to explain messages and such.
To start off with, adding new messages.
Take for example Flip-Swap.
Quote
<msgstd version="SMG2">
<message label="Rabbit000">
<trigger>shout</trigger>
<unknown0>1</unknown0>
<unknown1>0</unknown1>
<unknown2>0</unknown2>
<unknown3>0</unknown3>
<unknown4>0</unknown4>
<unknown5>255</unknown5>
<unknown6>255</unknown6>
<unknown7></unknown7>
<string>
<font color="blue"/>Jump<font color="none"/>! <font color="red"/>Spin<font color="none"/>! Make 'em flip!
</string>
<message>
<message label="SignBoard000">
<trigger>shout</trigger>
<unknown0>1</unknown0>
<unknown1>0</unknown1>
<unknown2>0</unknown2>
<unknown3>0</unknown3>
<unknown4>0</unknown4>
<unknown5>0</unknown5>
<unknown6>255</unknown6>
<unknown7></unknown7>
<string>
Stop the Chomps, <font color="orange"/>P2<font color="none"/>!
</string>
<* NWPlayer123ssage>
</msgstd>

Say I wanted to add a Pianta that says "I'm a chuckster!" (OhGodIHateThatMission)
I would add another message like this:
<message label="Monte000">
<trigger>shout</trigger>
<unknown0>1</unknown0>
<unknown1>0</unknown1>
<unknown2>0</unknown2>
<unknown3>0</unknown3>
<unknown4>0</unknown4>
<unknown5>255</unknown5>
<unknown6>255</unknown6>
<unknown7></unknown7>
<string>
I'm a chuckster!
</string>
<message>

Let's take it step-by-step.
<message label="Monte000">
If you want to add in an NPC and none that are like it exist already, it would be the filename (Monte), and you would start a counter at 000 and work your way up.
The number is the important part as that is the message ID. In my example, I would add a Monte in a map with the MessageID 0.

Now onto the trigger.
<trigger>shout</trigger>
There are 4 possible kinds of triggers - talk, shout, auto, and auto_global.
Talk would be where you walk close to the NPC and press A to talk.
Shout is where the message is displayed above the NPC when you walk close, which is what mine is.
Auto is apparently like talk and shout combined. You would walk close to it and then it automatically talks to you.
Auto_global is where it will talk to you no matter where you are. This would be something like the trailer at 0:12, where when you land the bunny automatically talks to you.
http://www.youtube.com/watch?v=iatTKUw00Vo&feature=plcp

Next is the unknown tags.
I dont know what the unknown things are but according to blank, 0-6 are intergers from 0-255, and 7 is a string.
However, as long as you follow the same thing as a working NPC, you should be good.

Lastly is the string message itself.
You can have normal text only if you want, but there is a lot you can do to customize it. First up is the font tag. It can have 2 possible attributes - size, and color. The possible things for color are black, red, green, blue, yellow, purple, orange, gray, and none. Possible sizes are simple - small, normal, and large.
An example would be <font color="red" size="small"/> Hello! <font color="black" size="normal"/>

Then you have the character tag which inserts the current character that is playing. It doesn't need an attribute so I assume you'd put <character/>

Then we have the wait tag, which requires an attribute for the amount of time to wait.
An example is <wait time="30"/>
I assume that the time is in milliseconds or something because I got this from that very first planet in Sky Station, and none of the text waits for THIRTY SECONDS.

We can also add in an icon, which needs a source attribute.
The possible attributes are
abutton, bbutton, cbutton, wiimote, nunchuck, 1button, 2button, star, launchstar, pullstar, pointer, starbit1, coconut, arrowdown, bunny, analogstick, xmark, coin, mario, dpad, pullstarchip, launchstarchip, homebutton, -button, +button, zbutton, silverstar, grandstar, luigi, copointer, purplecoin, greencomet, goldcrown, crosshair, unknown1, bowser, hand1, hand2, hand3, starbit2, peach, letter, questionmark1, unknown2, 1up, lifemushroom, hungryluma, luma, comet, questionmark2, stopwatch, masterluma, yoshi, cometmedal, silvercrown1, flower, flag, emptystar, emptymedalcoin, emptycomet, emptysecretstar, bronzestar, blimpfruit, silvercrown2, bronzegrandstar, topman, goomba, coins, dpadup, dpaddown, columa, toad and bronzecomet.

An example is <icon src="yoshi"/>

We can also play a sound effect while saying text.
It requires a source attribute
The following example was taken from a hungry luma making its little squealing noise as it TTTTTRRRRRAAAAAANNNNNSSSSFFFOOOOOOOOOORRRMMMMSSS
<sound src="SE_SV_TICOFAT_META"/>

Lastly, we can also have a variable tag which I dont see as useful until we look into it more. This was also taken from the hungry luma and based on context clues, I'm assuming this calls forth and displays the number of starbits it wants.
<variable data="0000000000000000" parameter="3" type="integer"/>

Hope my guide was helpful (Despite being rediculously long).

Here's the files for the test level I created and used for this guide. I changed one of the coins in star 1 of flip-swap to a pianta that when you walk near it says "I'm a chuckster!"
https://dl.dropbox.com/u/56043942/Requests/MessageDemo.zip


6.1- Model Importing (Python Way)


This tutorial was written by NWPlayer123. All credit for this one tutorial goes to him.


Starting Notes/Modeling Details


To start off, even if you're using another program to model and/or texture a planet for importing into the game, I would recommend Sketchup PRO for importing and finalizing. Regardless, you should have Sketchup set to meters. If it is not or you're not sure, and this is not your first time loading it with that setup screen, go to Window > Preferences > Template and make sure it's set to Simple Template - Meters.

If you're going to use Mario's model from the game exported from BMDView2, which I will probably add a download later to, go to File > Import and make sure types of files is set to 3DS, click the options button on the right, merge coplanar faces and make SURE it's set to Yards. That way the scale of his model to the game is correct.



Export Settings


Once you have made the model, it's time to import. To export in Sketchup, triangulate faces, because otherwise half of the faces will be gone, export texture maps because otherwise in whitehole and in-game the model won't even be seeable, and if you're using Mario's model as a reference for the scale and such, make sure you flip YZ coordinates in Sketchup. If your model uses textures on both sides of a polygon anywhere inside the model, make sure to check Export 2 Sided Faces.

NOTE: For the collision, MAKE SURE WHEN YOU EXPORT THAT 2-SIDED FACES ARE OFF.





Creating the BDL


Once you're done, open the command prompt (type cmd into the start menu and hit enter) and navigate to it using cd path
Quote
In this case, mine would be cd C:\Users\Nick\Desktop\SMG2WorkFiles\Tools\BDLCreate-0.2


The dependencies for OBJ2BDL are Python 3.X, I use 3.2.3, and PyQt4 which you can download the 32-bit version or the 64-bit version.

Then you would type
Quote
C:\python32\python.exe obj2bdl.py obj.obj
or
Quote
C:\python33\python.exe obj2bdl.py obj.obj
where obj.obj is the name of your OBJ file, in my case, LoopPlanetTextFinal.obj. It should create a BDL file of the same name as your OBJ.



Creating the Collision


Then take the OBJ for your collision, either the same model if nothing needs to be edited to make it non-glitchy and there's no 2-Sided Faces, or a different one that is non-glitchy and has no 2-Sided Faces, and double click the collision_import.exe file to open it. It'll be a nice easy GUI. Open the OBJ file inside it and you should have a list of all the materials/textures in the model, and this is where you can assign floor codes, and other values if you want to get really fancy. See this post.

Once you're done, export to KCL/PA and WAIT A WHILE. It takes a long time to export tons of polygons, and it'll probably look like it freezes, but trust me, it doesn't.

Once it's done and it stopped being "frozen", close it and copy the BDL, KCL, and PA, and move them into a folder where ArcPack is. The BDL, KCL, PA, and folder should all be the same exact name except for extension.

Once that's done, drag the folder onto RARC Packer.exe, it should give you filename.arc. Then drag that arc onto the yaz0enc.exe. It should give you filename.arc.yaz0. Delete the old arc file, and rename the arc.yaz0 to just filename.arc.

Tada, you're halfway done with getting to level creating. Now you have to import it into the game.



Opening the Game Files


Go to the files you supposedly dumped from the SMG2 ISO, and look for either "PlanetMapDataTable" or "ProductMapObjDataTable" in ObjectData. Use ArcExtract to extract the file, which is a BCSV, and open it using the BCSV editor. Click the add button at the bottom to add a new entry at the bottom of the list, and go down and click it.



Using PlanetMapDataTable to import a planet


Here's where it gets complicated. If you opened the PlanetMapDataTable, you'd be importing a planet, if you opened the ProductMapObjDataTable, you'd be import some kind of object. If you're using PlanetMapDataTable, the first "field" named PlanetName is the name of your planet, minus any extension. Once you fill that in, make the LowFlag, MiddleFlag, BloomFlag, WaterFlag, and IndirectFlag 0. That tells the game that there is no model for those conditions.

LowFlag and MiddleFlag would be used to optimize your galaxy's performance - If you get a certain distance away from a planet, it loads the FilenameMiddle.arc file, which is a model with less polygons so the wii doesn't have to work as hard to render it. The same with the Low file. If you want to use low and middle models, just set those values to 1 to tell the game to look for a model called that.

The "Unknown" fields at the bottom of the entry's list should all be blank, no values or anything. So that means you'd need to delete the "Placeholder" text from each field. Once you're done, go to File > Save, and save the BCSV.

NOTE: ONCE YOU'VE DONE THAT, CLOSE THE EDITOR, OTHERWISE WHEN YOU PACK IT, IT WOULD CRASH THE GAME.





Using ProductMapObjDataTable to import an object/import a planet the wrong way


If you're using ProductMapObjDataTable, it's much more simple. Just Add a new entry, the first field is the Object's name. The second field will most likely be
Quote
SimpleMapObj
unless you want to get into fancy object definitions.

NOTE: ONCE YOU'VE DONE THAT, CLOSE THE EDITOR, OTHERWISE WHEN YOU PACK IT, IT WOULD CRASH THE GAME.





Packing and Final Notes


Once you're done editing the respective BCSV, pack using the same method as you did for the model, put it in a folder, drag it onto the exes, and rename. Once that's done, you're ready to create and test.

6.2- Using Marionumber1's (Easier) Program

Next up is MN1's program.

1) Download it above.

2) Open up the main.py

3) Fill in the # of parts of the model.

4) Fill in the OBJ name (That you exported.)

5) Enter the name of the collision model.

6) Add the name to the ProductMapObjDataTable of your planet model. (Or PlanetMapDataTable.)


7- BCSV Editing

BCSV is probably the common file in the galaxy games. PA files use it, almost everything uses it's format.

But here's how you use it.
In the Super Galaxy Pack, there is a folder called ArcExtract. Open and extract the EXE in that folder. Now, this is just an example.
You need to find a file that has a BCSV inside of it. Like, ProductMapObjDataTable in the ObjectData folder. Drag the arc into ArcExtract. You should get a bcsv file. Now open up the bcsv editor that you dowloaded earlier. Go to the bcsv you just extracted. Open it.
There should be fields that you can click on on the main panel. Experiment with it and see what values do.

8- AST Editing

The first thing you want to do is download AST Converter GUI v1.4
1) Open The program
2) Click on "Convert To AST"
3) Select your .wav, .mp3 file
4) Set loop points if you wish
5) Choose the galaxy you want it to replace
6) Convert
7) Wait for it to convert, place it in AudioRes\Stream

You're done!

9- Adding a New Star


this will come when i am not lazy

10- Porting a Galaxy

So you want to port a galaxy from one world to another? Don't worry, that's easy! But first, you need a few tools:
-World Map Editor v0.4
-The WorldMap0X.arc files from ObjectData
-A BCSV editor

First, open up the world map editor and open the 2 files you wish to use.
If you're replacing a galaxy, all you have to do is rename the StageName and MiniatureName. But if you wish to add it in without replacing any galaxy, follow these steps.
1) Next to "File", hit "Add". Then add a Galaxy, Link, and a point.
2) Go into the "Galaxies" tab. The new Galaxy entry isn't visible, but click underneath the last listed galaxy and it should highlight blue. In StageName, type in the galaxy's file name. In the MiniatureName field, just add "Mini" to the front of the galaxy name, and put that in there.
3) Set the ScaleMin to 1.3, and set the ScaleMax to 1.55. Set PosOffsetY to 2500, the NamePlatePosY to 1500, and the IconOffsetY to 1. Everything else is 0. (Except for the PointPosIndex.)
4) Go to "Points" tab. Look for the point you added (Usually is 00000000). The last 3 fields are the X, Y, and Z placement. Adjust that to your liking. Now for the x's and o's, here's how I set them up:
04E99DFC- o
8710F350- x
81F680DC- x (o is a pink point)
While 60B866DS is 00000000.
5) Go to the "Links" tab. Select the link you just added.
PointIndexA: The Current point ID that you've selected.
PointIndexB: The point ID that it connects to.
CloseStageName & CloseGameFlag can be kept empty, and CloseStageScenarioName can be FFFFFFFF.
IsSubRoute is usually o, but it's unsure what this function does.
FA20A549 is unknown as well, but keep that as 'x'.

6) Save the map, and put it on your SD card.
7) Next, open up the galaxy you ported's scenario in StageData, and extract GalaxyInfo.bcsv from it. Open it up in the BCSV editor, and change the WorldNo value to the NEW world you ported it to. Save, and pack the bcsvs back into an archive (.arc). Then put it in your stagedata section on your SD card.
11- Ready To Test!

Okay, so you're ready to test your level? Great! Now this is what you need to do.

In the Super Galaxy Pack you downloaded earlier, look for the folder that says SDCard on it. Open it up. You should get a folder that has smg2 and riivolution as the names. Highlight both of them, and put them on the ROOT of your SD card.

Saving With Anarchy
Just click on "Save As" in the "File" menu. Then nagivate to your SD Card. Click on the smg2 folder, then StageData, look at the file name you're saving. Make a new folder in StageData, called TheGalaxyNameHereGalaxy.

No, don't put TheGalaxyNameHereGalaxy in the file name.
"TheGalaxyNameHere" is the file name for the galaxy, and add Galaxy at the end. Like this.
BigTree2Galaxy (Tall Trunk)
And you're done! Put your SD in your wii, boot up riivolution, enable the testing, and test your level!

Saving with Whitehole
Just click the save button on the editor. Go to the file you just saved, and copy it to your SD card in the correct place, as said above.


12- Additional Links/Help
There is some stuff that you can do to SMG that isn't in here. I can list some of the stuff here.

Debug Screen
The debug screen is a screen that shows what went wrong when the game crashes. This is how you put it in.

Go to the riivolution folder on your SD card. Open up the SMG2.xml in Notepad. On the 2nd last line, before </patch>, put in this code.

Code
<memory offset="0x804B7D90" value="60000000" />
<memory offset="0x804B7E54" value="60000000" />
<memory offset="0x805B66B4" value="60000000" />

And you're done.

BUT WAIT!
There's a way to test a level on your computer, without using an ISO! Check This thread for more details!

Alternative Links
Made a discovery about SMG? Post your findings here!
Have to ask a question SMG2 related? Ask here!
If you have a question about a program or a bug report, post it in this forum's alternate thread.

Thank you for reading this thread, and I hope you learned something.
It would be quiet helpful to have suggestions and feedback for this.
Thanks!
~MrRean
Nice tutorial you did there. Since I never hacked SMG2, I may try this to see if I can successful at it reading the tutorial and doing it in the same time. Maybe please make a video of it?
Thanks! This is very helpful! Just one question about models. I want to replace Peach with Rosealina (However you spell her name). This tut appears to be about level models. How would I go about doing this?
Originally posted by Polar Hacker
Thanks! This is very helpful! Just one question about models. I want to replace Peach with Rosealina (However you spell her name). This tut appears to be about level models. How would I go about doing this?

This is easy to do since you only have to replace the model. but you might have some difficulties with the skeletons and/or animations.
Nice tutorial you did there!
Please help me how to edit *.brfnt file!
Here is example (font file in Super Mario Galaxy 2): Download
Thanks!
Thanks! This will help me a lot because I've been trying to hack smg2.
*honk*

The Links for "Model Importer" and "BCSV Editor v0.7" aren't working anymore, seems that t has been take down from dropbox :(

Does anyone still have the Files?
It will be a miracle if someone responds, because I'm 4 years late :(
Anyways, almost every single one of your download links that are dropbox links takes me to a 404 or 400 error. #w{=(}

Can someone find:
Model Importer,
BCSV Editor,
MSBConv (exe version),
The Super Galaxy Pack (This is like the most important thing I need),
MessageDemo.zip,
And all the images linked in the post? (Not really important)

Thank you so much to whoever can find at least some of these.
my antivirus blocked bmdview2
I was with you on the custom galaxies tutorial up until 7) Next, open up the galaxy you ported's scenario in StageData, and extract GalaxyInfo.bcsv from it. Open it up in the BCSV editor, and change the WorldNo value to the NEW world you ported it to. Save, and pack the bcsvs back into an archive (.arc). Then put it in your stagedata section on your SD card. I dont understand what you mean by that and tried loads of stuff with different crashes everytime. At first when Luigi touches the wheel in the hub and it zooms out it would crash half way into zooming out. Then I messed around in the BCSV editor and managed to get it so when I entered World 1 (The one I edited) I would get stuck in the air with no way to move along the path and the game would crash if I hovered over World 1 in the zoomed out mode or when opening the menu that shows all the worlds galaxies and stars. Is it just because of the last part or something else???
One of more basic controller used to avoid duplicate objects and puzzles
How to make object disappear. Cuz I know only how to make them appear.
Please, add 9 Adding new stars. i doubt anyone ever sees this but c'mon i gotta try at least