Object Editing

From Custom Mario Kart
Jump to navigation Jump to search

Introduction

This page covers some important, but short and optional Custom Track topics. Move on to the KMP Editing tutorial when you're ready.

Creating a Cannon

*KMP Modifier might be required*

Cannons are anything that trigger your vehicle to fly enourmous distances. They are present in Mario Kart games since Mario Kart Double Dash!! (Supposedly in Mario Kart 64), and in Mario Kart Wii they appear in DK Summit/Snowboard Cross, Maple Treeway, Rainbow Road, N64 DK's Jungle Parkway and GCN DK Mountain. They also appear in a variety of custom tracks; Altough Cannon City is a track dedicated specially for cannons, the one with the biggest number of then is Jungle Island.

If you'd like to add a cannon in your track, then you will need to use Khacker35000vr's KMP Modifier.

First, extract your KMP Using CTools. Open it up in The KMP Modifier, and find the "Cannon" area. Simply adjust the amount of cannons by changing the Number up or down. Since the KMP Modifier automatically applies all changes, you may no close it once you have the desired number of cannons.

Re-import your KMP Using CTools, and replace the existing one (Make sure to back it up first just in case something goes wrong!). Save & re-open it in the SZS Modifier. From here, open your KMP in the KMP Editor. In the Cannons section, any newly added cannons should be located at 0, 0, 0, with a 1 in each angle position. Simply drag each cannon point to it's position (This is where the cannon will shoot you).

For the cannon to work properly, you will need the Y, Z, And X Angles, as well as the Y, Z, and X Cordinates. To learn more about these, visit the KMP Editing to find out how to properly configure them (Although in most cases, the Z & Y angles will stay at 0). The location of where your cannon point is set, and where the collison flag refering to it (See more below), may mean you have to use different angles.

For your new cannon to work properly, you'll need to set up a collison flag to refer to it. The means that once this point is touched in the KCL, it will activate your cannon. Let's say you wanted four cannons in your track. You'd add four cannons in the KMP Modifier, and then now what? You need a way for the collision to match the cannons. How is this done? It's easy. For each polygon in the KCL (Collison Data File) that is supposed to be a cannon, must use the 0x11 flag (A Cannon Trigger). (So you might want to add a square edge, or a wall in the collision model that will be a Cannon Trigger.

For the collision to refer to a cannon, each one must have a specail ID. To set up these IDs, after selecting 0x11 for each Polygon, you'll need to put in a variant for each cannon. So the first cannon's variant will be 000, the second's 001, the third 002, the fourth 003... (And so on). Now each cannon point in the KMP Must refer to the KCL's Polygons. In the "Cannon ID" section for each cannon point, put in the variant that refers to the corrisponding cannon point. So the first would be 000, the second 001, the third 002, the fourth 003... (And so on).

To select a cannon type, you must edit the "?" section in the cannon point you want to change. More on this is explained below.

Now your cannon should be full functional! Make sure to read the "Extra Info" below first!

Extra Info

  • The first cannon (Whether there is one or more) Must use 000 as a cannon ID and variant.
  • If you are using multiple cannons, then each variant and ID Must start at 000, and go in order like 000, 001, 002... (Like that).
  • The settings in the "?" section in your KMP point decide what type of cannon it will act like. Here are the settings: FFFF is straight (like most cannons), 0001 is curved (like N64DKJP), 0003 is slow (unused, goes about 1/10 or 1/15 of the normal speed), 0002 is similar to 0001.
  • In some courses, a Launch Star or DK Barrel will be used to represent a cannon. These ARE NOT needed for a cannon to work, and are purely for decoration.

Editing Objects

To change the texturing of an Object, open the BRRES file and import a new texture. The model itself can also be changed. Create a new model with your modeling program, and import the new model, preferably with SZS Explorer to keep the original texture animations. Custom Objects must use the name of a normal Mario Kart Wii object.

Porting Objects

For example, if you want to place a Thwomp in a track that's based off from GCN Mario Circuit, you must port the Thwomp model into the level. You can't simply place a dossunc (object for the Twhomp) in the KMP and expect it to work.

You must put the all files needed for that object (usually a just a BRRES, but sometimes effect and brasd files are required) into your track's SZS file. Doing this requires either the SZS Explorer or the Wiimms SZS Tools.

SZS Explorer

How to port an object, using the Goomba object as an example.

  • Open both course files (the course with the object you want to move, and the destination course) with two SZS Explorer windows.
  • Export the files for the Goomba from a course that contains Goombas. The required files are kuribo.brres and the kuribo folder (along with the two files contained in the folder) in the brasd folder. Right click the files and choose Export.
  • Import the files into the new SZS file. Right click the root folder and import kuribo.brres into it, and right click into the brasd folder and import the kuribo folder into it. The imported files must be in the same places as in the original course. If there isn't a brasd folder in your new course file, right click the root and create one.

To use the Goomba in your course, you will need to add a Goomba to your KMP and assign it a route. Different objects use different files - some objects use stuff in the effect folder, some use multiple BRRES files, some use KCL files, and some don't have BRRES files, such as fireworks.

Porting skydome models, map models, course models, KCLs and KMPs is the same proccess: you export it from the original course, and you replace it in the new course. The best KCLs to use are Koopa Cape's and Maple Treeway's and the best map_model.brres to use is Mushroom Gorge's. The KMP to use varies depending on the track you want to make, some people say that the N64 Bowser Castle one it the best.

Wiimms SZS Tools

Assume, we have 2 SZS files called SOURCE.szs and DEST.szs in the current directory. We plan to copy some objects from source to dest:

  1. Extract the files of both SZS files:
    wszst extract SOURCE.szs DEST.szs
    Now we have to new directories: SOURCE.d and DEST.d
  2. Copy the objects from SOURCE.d to DEST.d with a file browser of your choice. Be sure to use the same sub directories.
  3. Create a new destination file:
    If you want to overwrite the old DEST.szs use:
    wszst create DEST.d --overwrite
    If you want to crate a new SZS file use:
    wszst create DEST.d --dest NEW.szs
  4. If is possible to compare the SZS files on sub file level:
    wszst diff DEST.szs NEW.szs
References

Changing Post Effects

Post effects are meant to simulate the natural environment of the world. There are post effects to make courses look snowy, desert-like, very hot, etc. For example, if you decide to change a daytime course like Luigi Circuit so that it appears to be night time but don't edit the post effects, the course will still look bright and your characters will still seem to be in the sun, even if the level has been given a night-time sky. You must change post effects for lightning to be correct.

Swapping Post Effects

To change post effects, you simply export them from one course's file and import them into another, using SZS Explorer or Wiimms SZS Tools, the same as you would do with object files. Post effects, unsurprisingly, are found in the posteffects folder.

  • BBLM files - Glow, bloom
  • BDOF files - Focus, Sharpness and blur
  • BFG files - Fog
  • BLIGHT files - Lighting
  • BLMAP files - Post effect controller
  • ***1 files - Used for multiple post effects in the same course. Mushroom Gorge, for example, has post effect data for inside and outside the cave.

Editing Post Effect Files

A view of SZS Explorer's Hex Editor window with the Edit Menu displayed.

Currently the only method to edit post effect files is by Hex Editing. It is possible to find attributes by experimentally changing various hex values and then testing them in-game. The following attributes are currently known:

Fog

First you will need a posteffect.bfg file in your level; if there isn't one in the posteffect folder, import it from another level. You will want to find fog that already has the desired intensity because color is the only attribute currently known. Using SZS Explorer, open the file. Select Goto from the Edit Menu. Search for offset 0x0C. Then select Overwrite Mode to enable editing. The color is 4 bytes long and is in RR GG BB AA format; alpha is ignored. Intense red fog, for example, would have the value FF 00 00 00.

Lighting

Posteffect.blight in CTools Hex Editor

Open your posteffect.blight file in the posteffect folder with the Hex Editor Hex Editor and search for the magic LOBJ. The first LOBJ object is the normal road, so go to the next. The second object is the shadow. Go to the next LOBJ. Then activate this Object in your KMP, make a note of the ID, and change the RGBA light color. In this example, we want green lighting, so change it to the value 00 FF 00 FF. The alpha value is most likely ignored on lighting as well.

You activate the lighting effect by assigning the corresponding ID to a KCL flag. Three values after the activator you see the ID which is used.





Links