The KimiTech Industries Modders GuideThis is a guide for those wishing to create a mod for Cave
Story (AKA Doukutsu Monogatari). This document won't cover everything,
and should be used along side other resources and guides - this is
merely the bare-bones for getting into the most basic of modding. That
said, using just the subjects covered in this document, one would be
able to make a new, if incredibly basic, mod. ;) Jump To:
What You'll Need:Programs and tools that are essential to creating a mod.
Before You Begin:Things to keep in mind while getting started and working through to completion.
The Basics: TSCFirst things first, I'm going to give you the BASICS. TSC is a custom language in many ways unique and undocumented (officially, anyway). And in many ways VERY accessible. The most important points when working with TSC (and the source of most bugs):
An Example TSC Event#0100 Here's what it looks like:
The result of this is, when event 0100 is called, the player input is locked out (so the PC doesn't bounce around), and then a text-box is opened. In the first line of the text box, the text "Hello world, this is my text box!" is displayed. The game then waits for the player to press jump/shoot to advance to the next part. After player input is received, the previous text is erased and the text "This is the second section!" is displayed (this time in the second line of the text-box). Once more the game waits for player input and clears the text-box on receiving it before displaying the last line (in the third and final line of the text box), "I'm going to close it now.". It then waits for player input before closing the text-box and playing a sound. Finally, the entire event #0100 is ended. To get a feel for whitespacing and stuff, try goofing around with that script snippet in Cave Editor. A Note on Head.tscHead.tsc is the global script sheet. You can place events here that you will call frequently (such as beds, save points and the death events). Of important note here:
Adding CommentsComments may be added directly following an <END. As in: I'm going to close it now.<NOD<CLO<SOU0011<END //This line is a comment. Add comments to denote what does what when writing complex scripts. It can really help sort out rats nests. Calling EventsThere are a few ways to call events. The four most common are:
This is important because an event that isn't run is useless, and therefore a waste. Key TSC CommandsThese are commands that everyone who's anyone should know by heart. They are the core commands used by nearly every mod (see tsc.xls for more details on these and other commands). With these 13 commands you should be able to do 80% of what you need to.
The Basics: Music and SoundsTo add background music, use the <CMU command in the format: <CMUXXXX, where X is the number of the song you wish to play. Additionally, all songs except event tracks can be resumed playing with the <RMU command. This is handy for events like getting an item where you have a song playing, switch to the Get Item music and then want to go back to the previous song. The 4 event tracks are as follows: 0003 - Game Over Unlike normal songs they do not automatically loop back to the start. In order to not cut out the entire song, add a <WAI for 0160 before switching back to the original track. The names given are just what they're used for in original Cave Story, not what they have to be used for. Additionally, the <FMU command will reduce the current music to about 1/3 of its volume. Handy for areas with sound effects or for changing tracks without jarring. To play a sound effect, use the <SOU command. Sound effects are short noises that often accompany in-game action. The <SOU command is best reserved for cutscenes and areas with no enemies, though its quick execution doesn't prohibit its use in enemy-rich environments. Some handy values for this are: 0011 - Door opening The Basics: TSC-Based FlagsA flag is a special piece of data that informs the game that something has been done (such as defeating a boss). There are 4 types of TSC-based flags in Cave Story: Hard flags, skip flags, map flags and equip flags. The most commonly used are hard flags (so-called because they are saved to Profile.dat when the game is saved). Hard FlagsThere are 3 commands associated with hard flags: <FL+. <FL-. and <FLJ <FL+ sets a flag. Valid values are between 0001 and 9999. However, due to a limitation, only flags up to 7000 are saved to Profile.dat - Keep this in mind when writing a complex series of flags. As well, an unknown number of flags are reserved, so generally start with flags at 0100 to be safe and not muck up the game. <FL- clears a flag. Again, values from 0001 to 9999 are valid. Clearing a flag that hasn't been set doesn't do anything. <FLJ is the meat of the operation. It takes 2 arguments, the first being the flag it checks, and the second being the event to go to if the flag is set. Functions very similar to an IF statement. To bring this all together: #0100 #0101 What this example will do is, upon calling event #0100, check to see if flag 0100 is set. If it is, it jumps to event #0101 and runs it, which clears the flag. If the flag ISN'T set, it continues event #0100 on to set the flag (which will trigger the jump next time it is run). Don't be afraid to use flags, but be sure to make notes as to what flag is used for what. Lastly, hard flags are the only flags entities with flags 800 or 4000 set respond to. Skip FlagsSkip flags function EXACTLY the same as hard flags, with the exception that they are not saved to Profile.dat EVER. The 3 commands used are: <SK+, <SK-, and <SKJ. These commands have identical syntax to the hard flag commands. Skip flags are used for just that - to skip an event. Generally used in long-winded dialogues before boss fights to allow the dialogue to be skipped or sped up. Generally, no notes are needed for skip flags as their temporary nature allows you to get away with duplicate instances. Map FlagsMap flags are a type of flag discovered by yours truly. Their use is limited, however, to essentially marking areas the PC has visited. There are 2 commands associated with map flags: <MP+ and <MPJ. Note the lack of a command to unset these flags. These are permanent and saved, so keep that in mind. Other than the lack of unsetting ability, they function the same as hard or skip flags with the exception that you are limited to one map flag per map, and that the jump command (<MPJ) assumes it's looking for the flag for the current map (so the format is <MPJXXXX, where X is the event to run if the flag is set). Map flags can be set from anywhere for any level (eg. You can set the map flag for map 0043 from an event in map 0001). For example: #0100 #0101 As a general rule, map flags are limited in their usefulness except for, say, a mapping system that only allows you to view the map if you reach a certain point. Equip FlagsEquip flags aren't totally in line with the other flag types listed, but are included here for organization. These flags only have 2 commands associated with them: <EQ+ and <EQ- - There is no jump for these flags. To achieve a jump-if-equipped, use a hard flag in addition to setting the equip flag. You can use the hard flag for the actual jump, then. But what equip flags do provide, as their name suggests, are equipable items. The following are the ONLY valid values - Any others will do nothing. 0001 - Booster v0.8 Equipment can be added by any event, and you don't technically have to even have an item associated. Of special note are the Boosters - If 0032 is set then 0001 is ignored entirely. As well, equipping the Nikumaru Counter (0256) will start the timer and unequipping it will stop and reset it. To actually save the time recorded, use <STC. The Basics: Items and WeaponsThese are grouped together for the similarity of their mechanics and that they both appear in the inventory screen. In addition, they share a common command - <GIT. For details on <GIT, please refer to the full TSC notes. Weapons - Getting, Losing, Trading and UpgradingTo get a weapon: <AM+XXXX:YYYY - X is the weapon ID, Y is
the ammo you wish to set it to. To not let your cowboy into the bar because he's holding a 6-shooter: #0100 #0101 (Note: Weapon ID 0002 is the Polar Star) Items - Getting, Losing, TradingTo get an item: <IT+XXXX - X is the ID To not let a Leper into the city because he's carrying Leprosy: #0100 #0101 (Note: Assumes item 0003 is Leprosy) Using Items as FlagsIn order to save flags (they can become scarce in a long or complicated mod), you can use an item as a pseudo-flag. This is especially useful with items like keys or passwords. Weapons can also be used, though I'll leave you to figure out why a bar won't let you in if you're holding a gun. The Basics: EntitiesThis section details the flags that the various entities can have set. This only covers the basic, global ones - Some entities have special flags and things they do. What is an Entity?An entity is an object on the map that can be interacted with by the PC in one or several ways - enemies, save points and weapon energy are all entities. When editing an entity in Cave Editor, the following screen can be seen: The section highlighted in red is the portion relating to entities. Of note here:
Flag 2000This will be your go-to flag from most script/entity interaction. For starters, it will be the flag you set on all doors (usually) and any save points etc. Second, this will set the entity to be non-hostile - less used but still useful. If an enemy doesn't damage you, it probably has this flag set. The event called is the Event # associated with the entity. Flag 200Also called the boss flag, as that is one of its primary uses. It causes the entity to call Event # when it is killed. By setting every enemy to this and linking it to a global experience script in head.tsc, you could create an RPG-esque level-up system. Or something. Flags 100For the majority of entities, setting this flag will cause it to run a script on PC touch. This could be used with items to allow for automatic pick-up. Some entities, however, behave differently when this is set. Flag 1000This flag is for custom things and varies by-entity. Some entities will only animate if it is set, or will behave differently when this is set. Some entities have a second appearance accessible by setting flag 1000. Flags 800 and 8000These are two very useful things on an entity. Basically, it cause the game to check if a flag matching Entity ID is set. If it is, the entity is set (in)visible. An example of this is the Jellyfish in Grasstown - they only appear after you talk to Chaco. Setting both will result in 8000 winning out - 800 will be ignored. Other FlagsThe ones I've elaborated on are just the most useful. The other flags can be fun to play with, so feel free to experiment with different combinations. The Basics: Lyger's PartThe following series of images was created by friend and fellow forum-goer Lyger. As he has disappeared from reality at the moment, I am not sure if permission is given to use them, but I am hoping that it has been. I have included them here for two reasons: The first is that they provide a handy reference for map design and text-box information, and to back them up for future note (as Lyger's Photobucket is suspended as of writing). As well, seeing as the information was already well written and demonstrated, I figure I'd avoid creating duplicate works. |
Code
|
Direction
|
0000
|
Left |
0001
|
Up**
|
0002
|
Right
|
0003
|
Down**
|
0004
|
Center*
|
* Only works with <FAI/<FAO
** Generally only useful for <FAI/<FAO and <CNP/<ANP
There's two ways you can move the PC around the map locally - The lame, long, boring way of using <TRA and pointing to the same map, or the <MOV command. There are few commands simpler than <MOV - Just plug in your X and Y destination and off you go. Just remember to include all 4 digits or you can end up a thousand blocks off course.
This is a list of entities commonly used for various things - Things such as doors and save points:
Entity
|
Description
|
Code
|
Notes
|
Door | A standard doorway. | 0018 | These entities aren't associated with any particular event; you can use them for anything. |
Save Disk | That spinning floppy disk. | 0016 | |
Health Refill | Health refill station. | 0017 | |
Hidden Heart/Missile | Shootable hidden stuff. | 0125 | Setting flag 1000 sets it to be a hidden missile. Otherwise it's a heart. |
Teleporter | A teleporter. Has a special animation sequence. | 0022 | <ANPXXXX:0001:0000 to use. X is the entity event #. |
Teleporter Lights | Handy to indicate if a teleporter works or not. | 0023 | Place this in the space directly above the teleporter for correct alignment. |
Pot | Background entity. | 0078 | Can be used for anything; here for reference. Setting flag 1000 changes the pot to a second sprite (a slightly wider pot). |
Fireplace Fire | Background entity. | 0038 | Can be used for anything; here for reference. |
H/V Trigger | Most used entity ever. Use to trigger events in mid-map. | 0046 | Setting flag 1000 sets it to trigger when crossed horizontally. Setting flag 100 makes it follow the player along its triggering line. |
Smoke | A puff of smoke. | 0004 | Here for reference. You'll often <CNP things to this. |
Small Spikes | Small 5-damage spikes. | 0211 | Event # will change the direction. 0000 is left, 0001 points up, 0002 points right and 0003 points down. |
Large Spikes | Lethal damage spikes. | 0027 | Oooooh... Pointy *BOOM!* |
Sign | A sign post. | 0037 | Not associated with any script; can be used for anything. |
Bed | Nap time. | 0034 | |
Chest (Closed) | I wonder what's inside... | 0015 | See example below for details. |
Chest (Open) | Treasure chest with its contents removed. | 0021 | Setting flag 1000 causes this to display 1 tile down from its actual position. |
Life Capsule | The sprite for a life capsule. | 0032 | Not associated with any script; can be used for anything. |
Energy Capsule | Shootable weapon energy container. | 0253 | Setting the entity ID changes the amount of weapon energy contained inside. |
Missile | A single missile refill. | 0086 | Setting flag 100 makes it run Event # when the PC picks it up. Flag 1000 makes it not flash and disappear. |
Heart | A single life-restoring heart. | oo87 | |
Sparkling Item | A mysterious sparkle that begs the player to get it. | 0070 | Not associated with any script; can be used for anything. |
The entities listed here are those that are common in 2 regards: First that they are commonly used, and second that they can be used on ANY map. The majority of entities (enemies, in particular) are associated to a specific sprite set. As a map can only have 2 sprite sets attached to it, it's good to know a few global ones.
The following is an example of a starting map. Of note: Event #0200 is the default event that is run when the game is started. In original Cave Story, this event is the "From somewhere, a transmission..." scene. Illustrated in this are several commands not discussed in this document - Refer to the TSC Notes for further detail. With the recent influx of new modders making new mods, I figure I'd give them a break and host these few basic TSC scripts for functions common to most mods. They are very, very basic, only expanding a little into flags, but, with a few changes to the numbers provided in the examples, you can use these for many, many things. I may expand to include a teleports script and a few others, such as a pitfall trap or a basic boss fight. I don't intend to make this a script-mart for easy scripts, I intend this to be a dissection of the basic functions, as well as a learning tool. The scripts, while *theoretically* just usable as a copy-and-paste idea, will probably have to have a few values changed (and thus learn what the values do). I encourage those reading this to a.) view my organized and fully-explained TSC notes found here and b.) experiment with everything.
Jump To Example:
|
|
#1: Starting Map | |
#2: Basic Door (Inter-map) | |
#3: Basic Door (Intra-map) | |
#4: Locking Inter-map Door (Item) | |
#5: Locking Intra-map Door (Item) | |
#6: Lock-if-has (Inter) | |
#7: Chest (Intra) | |
#8: Teleporter (Basic) | |
#9: To Be Announced | |
#10: To Be Announced | |
#11: To Be Announced | |
#12: To Be Announced |
The Script:
#0090
<MNA<CMU0008<FAI0000<END
#0091
<MNA<CMU0008<FAI0001<END
#0092
<MNA<CMU0008<FAI0002<END
#0093
<MNA<CMU0008<FAI0003<END
#0094
<MNA<CMU0008<FAI0004<END // Events 0090 - 0094 are the
events called when you travel TO this map.
#0100
<KEY<ITJ0009:0101<MSGIt's locked...<NOD<CLO<END
#0101
<KEY<FAO0003<TRA0001:0093:0010:0010<END // The only exit, a
locked door needing item 0009 (Rusty Key) to open.
#0102
<KEY<FLJ0100:0001<CNP0102:0021:0000<SOU0022<MSGOpened
the chest...<NOD<CLR<IT+0009<GIT1009<CMU0010Got a =Rusty
Key=!<FL+0100<WAI0160<NOD<CLO<GIT0000<RMU<END //
Gets the Rusty Key, changes the chest to a closed sprite and sets flag
0100. If flag 0100 is set, it jumps to the global "Empty..." message
instead. Once flag 0100 is set, subsequent visits to the map will show
an open chest - The closed chest is hidden and the open one (one tile
above) is displayed instead.
#0200
<PRI<MS2Welcome to the fantastic world of
New Fantasyville! Please enjoy your
stay!<NOD<CLO<MNA<FAI0004<CMU0008<END // This is the
event that runs when the game is started for the first time.
Entities used:
The door is event #0100 with flag 2000 set, the chest is event #0102 with flag 2000 and 4000 set with an entity ID of 100. A treasure chest (open) entity one tile above the closed chest has flags 2000, 1000 and 800 set and is event #0001 (global "Empty..." message) with an entity ID of 100.
Explanation:
The above is explained in its comments. This is for two reasons: a.) The script is of enough length to warrant comments and b.) It demonstrates correct comment placement. The following examples are explained in the explanation section.
The Script (Map 0000):
#0100
<KEY<CNP0100:0000:0000<SOU0011<HMC<FAO0004<TRA0001
:0100:0006:0009
The Script (Map 0001):
#0100
<CMU0024<SMC<FAI0004<MNA<END
Entities used:
#0100: Door sprite with flag 2000 set (run on interact)
Explanation:
The above is a basic room-to-room door script.
Upon interacting with entity 101 (a door), the game locks out player
control (<KEY), changes the door to a <nothing> (<CNP),
makes a door opening sound (<SOU), hides your character (<HMC),
fades out into the center (FAO), and travels to map 2, coordinates X: 6
Y: 9, then runs script 0100 on that map (TRA).
Upon arriving at the destination map, the game changes the music
(<CMU), unhides your character (<SMC), fades in from the center
(<FAI), displays the name of the area (<MNA) and finally frees
the earlier player control lock (<END).
The Script:
#0100
<KEY<CNP0100:0000:0000<SOU0011<HMC<WAI0010<CNP0100
:0018:0000<MOV0006:0009<WAI0020<CNP0101:0000:0000<
SOU0011<SMC<CNP0101:0018:0000<END
#0101
<KEY<CNP0101:0000:0000<SOU0011<HMC<WAI0010<CNP0101
:0018:0000<MOV0009:0006<WAI0020<CNP0100:0000:0000<
SOU0011<SMC<CNP0100:0018:0000<END
Entities used:
#0100: Door sprite with flag 2000 set (run on interact)
#0101: Door sprite with flag 2000 set (run on interact)
Explanation:
The above is a simple script to move a character via a door within a
single room, and back (example being the Hideout in the Plantation).
The doors are: #0100 @ (9,6) and #0101 @ (6,9). The similarities
between the inter-map and intra-map script warrant no real explanation,
apart from pointing out the major difference: intra-map uses the
<MOV command instead of <TRA, and no additional script is called
beyond the event that is triggered.
The Script:
#0100
<KEY<ITJ0001:0101<MSG
It's locked...
Try getting a key!<NOD<CLO<END
#0101
<CNP0100:0000:0000<SOU0011<HMC<FAO0004<TRA0001:010
0:0006:0009
Entities used:
#0100: Door sprite with flag 2000 set (run on interact)
Explanation:
In this case, when you interact with the door, it called a check to see
if you have item 0001 (Arthur's Key). If you have it, it continues
(jumps) to event 0101 and runs the standard intra-map door script. If
you lack the item, it give a message: "It's locked. Try getting a key!"
As well, the above can be done using a flag by replacing the <ITJ
with a <FLJ. In doing so, to unlock the door you need to set the
flag.
The Script:
#0100
<KEY<ITJ0001:0101<MSG
It's locked...
Try getting a key!<NOD<CLO<END
#0101
<KEY<CNP0100:0000:0000<SOU0011<HMC<WAI0010<CNP0100
:0018:0000<MOV0006:0009<WAI0020<CNP0101:0000:0000<
SOU0011<SMC<CNP0101:0018:0000<END
#0102
<KEY<CNP0101:0000:0000<SOU0011<HMC<WAI0010<CNP0101
:0018:0000<MOV0009:0006<WAI0020<CNP0100:0000:0000<
SOU0011<SMC<CNP0100:0018:0000<END
Entities used:
#0100: Door sprite with flag 2000 set (run on interact)
#0102: Door sprite with flag 2000 set (run on interact)
Explanation:
This case provides (depending on context) a one-way door (if the first
door you encounter is #0102) or a locked door requiring an item to
open. Again, the doors are: #0100 @ (9,6) and #0102 @ (6,9).
The Script:
#0100
<KEY<ITJ0001:0101<CNP0100:0000:0000<SOU0011<HMC<FA
O0004<TRA0001:0100:0006:0009
#0101
<FLJ0100:0102<MSG
Oops, you bwoke it!<FL+0100<NOD<CLO<END
#0102
<KEY<MSG
Still bwoken... <NOD<CLO<END
Entities used:
#0100: Door sprite with flag 2000 set (run on interact)
Explanation:
The above is an interesting variation; the door is unlocked if you
DON'T have the item, and locked (broken) if you do. Additionally, by
the addition of a <FLJ to #0101 and a <FL+ that sets the
appropriate flag, you create a second message that says "Still
bwoken..." upon re-examining the door. Upon the removal of the item
from the inventory, the door will once again function; you need not
clear the flag because it is inside an event that is not triggered if
the door is unlocked.
The Script:
#0100
<KEY<FLJ0100:0101<MSG
Opened the chest...<NOD<CLR<CNP0100:0021:0000<SOU0022
<CMU0010<GIT1001<IT+0001You got =Arthur's
Key=!<WAI0160<NOD<GIT0001<CLO<FL+0100<END
#0101
<KEY<MSG
Empty...<NOD<CLO<END
Entities used:
#0100: Chest (closed) sprite with flags 2000 (run on interact) and 4000
(invisible if flag ID is set), and it's flag ID set to 100
#0101: Chest (open) sprite with 2000 (run on interact), 1000 (appears 1
tile lower) and 800 (visible if flag ID is set), and it's flag ID set
to 100, positioned one tile above #0100
Explanation:
This is a basic script for a chest. Upon opening the chest (#0100), the
closed chest is changed to an open one, and the player receives an item
and a little message with the "Got item" jingle, as well as the little
graphic of the item. After that, flag #0100 is set. Upon re-examining
the now open chest, the player receives the "Empty..." message (it can
be called as event #0001 from any map, but is provided here as #0101
for clarity). Upon leaving and re-entering the stage, because flag
#0100 is set, entity #0100 doesn't appear and entity #0101 does.
Upon interacting with the chest again, the player still receives the
"Empty..." message.
The Script (Intra):
#0101
<KEY
<SNP0111:0021:0006:0000
<HMC
<WAI0060
<ANP0108:0001:0000
<WAI0100
<ANP0108:0000:0000
<MOV0005:0011
<ANP0103:0001:0000
<CNP0105:0112:0000
<WAI0100
<ANP0103:0000:0000
<MYD0000
<SMC
<CNP0105:0000:0000
<MNP0105:0004:0010:0000
<END
#0103
<KEY
<SNP0111:0005:0012:0000
<HMC
<WAI0060
<ANP0103:0001:0000
<WAI0100
<ANP0103:0000:0000
<MOV0021:0005
<ANP0108:0001:0000
<CNP0106:0112:0000
<WAI0100
<ANP0108:0000:0000
<MYD0000
<SMC
<CNP0106:0000:0000
<MNP0106:0020:0004:0000
<END
Entities Used:
For all intents and purposes, just two teleporter entities (flag 2000
set on both), one at 0021 x 0005 (#0101) and one at 0005 x 0011 (#0103)
and two nothing entities (#0105 and #0106). Of important note is the
<ANP uses a Y value of 0001 to make the teleporter flash and 0000 to
make it stop. The entity created with <SNP is the "Quote teleports
out" entity.
Explaination:
Before I break this down, there are two important notes.
The first is that the animations for the teleporter entity are tied
to the teleporter entity. Additionally, the wait times
(<WAI) are the minimum for the animations to complete. As this is a
complicated script, I'll only explain the main functions and let you
figure out the rest. To begin, the game locks out player input, then
hides the PC. Immediatly after hiding the PC, it spawns an entity
version of the PC, which hops up onto the teleporter and fades out. It
then moves the PC to the destination, which another PC entity fades in,
before unlocking the player with the finishing of the script. The same
process occurs when using event #0103, except you return to the first
teleport.
This is a reference for important points in graphic editing. Of importance is that images are not limited to any specific colors in an external editor (Cave Editor limits you to a few) - You can convert all PBM/BMP files to 24 bit if you want - Though this will increase the file size significantly.
Firstly, the difference between a sprite and a tile: A tile is a section of the map, a sprite is the graphic for an entity. Tiles are ALWAYS 16 by 16 pixels and are stored in CS Directory/data/stage as Prt[TilesetName].pbm (or .bmp). To figure out how many tiles can fit on a map, divide the width and height by 16. If you get a fractional number, adjust the dimensions to be evenly divisible by 16. Sprites vary. A lot. As a general rule they are at least 16 by 16, but there are some extremely massive sprites (Balfrog, The Core). As an additional guide, the dimensions will usually be divisible by 8, so a 24 x 24 sprite is possible. The two global spritesheets are found in CS Directory/data, with the other entity sheets stored in /Npc.
As a means of preventing random goofing around with the game files, Pixel included a check in the game to verify if the images have been tampered with. This is accomplished by a hex string appended to the end of image files. Because of the way bitmaps save, if the image is edited the appended hex string is lost, and therefore will error out when the game tries to load it. I won't discuss how to use a hex editor to re-append the "(C)Pixel" string to the end of an image; I'll leave that to you to try. Built into Cave Editor is a way around this, though. In fact, 2 ways. The first is the manual way: You can edit images in CE's built-in editor. It will automatically append the required string. However, if you want to use an external editor, I suggest checking the "Remove (C)Pixel requirement for Images" box, like so:
If you wish to use *.bmp as your image extension, just change the file extension in CE. It will automatically change all the *.PBMs into *.BMPs. On a side note, *.pbm and *.bmp are the same format - Bitmap Image - Pixel probably chose to use *.pbm for the same reason as using the (C)Pixel string.
I cannot
stress this enough: BACKUP YOUR MOD. The things
covered in this section can quite possibly break your mod EXE, so
proceed with caution. Additionally, in the event you intend to use a
hacked EXE (such as one with a custom entity or weapon), resources
(e.g. music) should be replaced AFTER
the relevant edits. You have been warned.
The music of Cave Story is stored inside the EXE in a Pixel-created format called an Organya, or ORG for short. This music format has several advantages over the game-industry standard of WAV or MP3 that I won't cover.This stems from what an ORG is - Just a list (or table) of notes. The actual sound component is stored within the player itself, reducing the filesize of an ORG (as little as 4Kb) to far below a comparable WAV/MP3 (1 Mb+). The only major drawback is that you are presented with limited instrument choices - And even fewer when using them with Cave Story - As the actual notes are stored within the EXE and are hard to change. The limitation for ORGs in Cave Story is that your percussion set is limited to only a handful of the 2-dozen ones available in the latest Org Maker. The percussion tracks you can use are: Bass01, Snare01, HiOpen, HiClose, Tom01 and Per01. You can uses these tracks in any of the percussion slots, though, and you can have multiple of the same instrument. As for actually making the music, I am not much help there (I'm tonedeaf). But what I can say is that, even if you know nothing about music, you can still make an attempt. Lay down a few notes and give it a listen. If you don't like it, delete it or tweak it. When it sounds right move onto the next notes. As well, there are far better tutorials on how to use Org Maker, so I won't outline it here. What I aim to provide you with is the technical side of things.
To actually use the music in a CS mod, you need to import it. This is where a couple of important points come in. Firstly, at this point, Sue's Workshop cannot deal with imported ORGs. It is by this token alone that I strongly urge you to use Cave Editor if you're not already. Second, on a less horrendous note, the music resource names don't exactly match up with the song titles. For your convenience, I include this table.
TSC Code
|
<Un>Official Title
|
Resource Name
|
0000
|
<None>
|
XXXX
|
0001
|
Mischevious Robot
|
WANPAKU
|
0002
|
Safety
|
ANZEN
|
0003
|
<Game Over>
|
GAMEOVER
|
0004
|
Gravity
|
GRAVITY
|
0005
|
On To Grasstown
|
WEED
|
0006
|
Meltdown 2
|
MDOWN2
|
0007
|
Eyes of Flame
|
FIREEYE
|
0008
|
Gestation
|
VIVI
|
0009
|
Mimiga Town
|
MURA
|
0010
|
<Get Item>
|
FANFALE1
|
0011
|
Balrog's Theme
|
GINSUKE
|
0012
|
Cemetary
|
CEMETARY
|
0013
|
Plant
|
PLANT
|
0014
|
Pulse
|
KODOU
|
0015
|
<Boss Defeated>
|
FANFALE3
|
0016
|
<Get Life Capsule>
|
FANFALE2
|
0017
|
Tyrant
|
DR
|
0018
|
Run!
|
ESCAPE
|
0019
|
Jenka 1
|
JENKA
|
0020
|
Labyrinth Fight
|
MAZE
|
0021
|
Access
|
ACCESS
|
0022
|
Opression
|
IRONH
|
0023
|
Geothermal
|
GRAND
|
0024
|
Cave Story
|
CURLY
|
0025
|
Moonsong
|
OSIDE
|
0026
|
Hero's End
|
REQUIUM
|
0027
|
Scorching Back
|
WANPAK2
|
0028
|
Quiet
|
QUIET
|
0029
|
Final Cave
|
LASTCAVE
|
0030
|
Balcony
|
BALCONY
|
0031
|
Charge
|
LSTBTL
|
0032
|
Last Battle
|
LSTBT3
|
0033
|
The Way Back Home
|
ENDING
|
0034
|
Zombie
|
ZONBIE
|
0035
|
Break Down
|
BDOWN
|
0036
|
Running Hell
|
HELL
|
0037
|
Jenka 2
|
JENKA2
|
0038
|
Living Waterway
|
MARINE
|
0039
|
Seal Chamber
|
BALLOS
|
0040
|
Toroko's Theme
|
TOROKO
|
0041
|
<King's Theme>
|
WHITE
|
This is all fine and handy and all, but it doesn't tell you how to actually replace the resources. To that, you'll need Resource Hacker or a similar program. Once you have that, replacing music (or any resource, really) is as simple as the following steps.
Instructions
|
Screenshot
|
Step 1: Open the CS executable you wish
to swap the music in.
|
|
Step
2: Open the "ORG" resource catagory and find the song you wish to
replace (according to the table above. ACCESS is my example. Take note
of the name.
|
|
Step 3: Under the action menu select
"Replace Other Resource..."
|
|
Step
4: A dialogue will pop up. To begin, press "Open file with new
resource" and find the song you wish to import. The dialogue will
change to the one on the right; enter the information exactly as you
see it, replacing Resource name with the name of the track you're
replacing (Eg. Access). Press the replace button, then goto file >
save to save the EXE.
|
This guide is not a replacement for learning. To succeed, you will have to study the references provided, but more over experiment. What I hope I have left you with are the tools to figure out the rest. Following are a couple miscellaneous tips for improving your mod.
FPS Counter