Skip to content
PhoenixBound edited this page Dec 13, 2024 · 161 revisions

Welcome to the Library

Here is your complimentary Town Map.

Put links to the best CCScript creations here.

Please upload them to Gist using your GitHub account, and then edit this page and add the link.

Table of contents

Essentials

asm65816.ccs by H.S

  • Reference this in your ccs files to do ASM magic

jsl_rts.ccs by Catador

  • Macros that allow asm code to JSL into functions that return via RTS

ASMRef by H.S

  • A collection of labels/shortcuts to various ASM functions in the ROM
  • (Not really essential anymore, but a lot of older assembly patches require it.)

Assembly macros

attack_script by JTolmar

  • Macros that allow making custom attacks without assembly knowledge
  • Looks like weird Lisp

menu_macros by JTolmar

  • Macros to make custom menu assembly easier (still not that easy)
  • Still looks like weird Lisp

battle_menu by JTolmar

  • Macros to make it easy to edit the main battle menu (the bash/goods/psi/spy/pray/mirror menu)
  • Also edits the autofight AI!
  • Requires menu_macros.ccs
  • I sure hope you like weird Lisp

Bonuses

Notepad++ Syntax Highlights for CCScript by JTolmar (additions by Supremekirb)

  • If you're using Notepad++, this adds syntax highlighting for .ccs files to it. Add it from Language -> User Defined Language -> Open User Defined Language folder.
  • If you're using VSCode, this adds syntax highlighting for .ccs files to it. Add it in the Extensions panel.

RAM defines by SupremeKirb

  • Now that ebsrc doesn't have pointers commented, it's hard to get RAM values.
  • This file defines the pointers for all RAM labels from ebsrc.
  • It's also got all the unused space documented.

Expansion scripts

These scripts make it so you can add new entries to several tables! Please note that they will overwrite their .yml cousins. (There are EB++ related scripts here as well.)

CCExpand by cooprocks123e

  • Use this to write your own control codes in ASM
  • To use, write an ASM function and then add it as a new control code in the CodeTable section in the ccexpand.ccs file
  • Alternatively, use the version with cc_asmcall under quick-start - then you can do cc_asmcall(LabelOfAsmFunction, RET_NONE) without having to add your ASM function to the CodeTable

expand_flags.ccs by cooprocks123e

  • Add more event flags (up to 0x8e8) to the game without including EB++
  • The game normally has 317 battle actions, but this script lets you add even more (in addition to editing the existing ones).
  • Please note: This script overwrites the battle_action_table.yml file in your project folder.
  • Special thanks to the_kirby for finding all of this table's ASM addresses.
  • The game normally has 895 movement scripts, but this script lets you add even more.
  • This script defines commands for creating custom movement scripts from scratch, with a syntax vaguely resembling ASM.
  • This includes a big documentation detailing every "instruction", along with useful concepts like callbacks, tasks, variables and the "result" register. It also includes 3 fairly simple example movement scripts that you can use as a starting point to build more complex, custom ones.
  • Please note: Movement scripts are very different from CCScript and ASM (even though their syntax is vaguely similar to ASM). For this reason, it might take time until you get used to writing custom scripts without causing a catastrophe (i.e., a crash).

Extended Naming Screen Character Table by PhoenixBound & ShadowOne333

  • The game normally only uses 4 rows of characters in the Naming screens for both the beginning of the game and the Player's name, and the 5th one for switching between capital and small. With this script, you can now have an additional 5th row, and the CAPITAL/small row will be the 6th one, just above "Don't care".
  • The script explains in detail, under the LAYOUTS comment, how to add a 5th row of characters to both the small and capital boxes in comments. Usually, the 5th row will take values from B0-B9 and C0-C9 from the font layout image (0.png).
  • If you want to add your own custom letters/characters, be sure to read properly the CHARACTER CONVERSION TABLE comment detailed also in the script.
  • The game normally only supports 17 sprites for playable characters, but this extends that table to allow for more!
  • This script was created to implement having alternate sprites that give all four party members new costumes, enabled and disabled via event flags.
  • The game normally has 52 PSI Abilities, but this script lets you add even more (in addition to editing the existing ones).
  • Please note: This script overwrites the psi_ability_table.yml file in your project folder.
  • Special thanks to the_kirby for finding all of this table's ASM addresses.
  • (If interested in expanding the PSI animations, JeffMan made a tutorial on how to do so here. Just keep in mind it's a pretty advanced thing in hacking).
  • Makes it possible to have additional enemy-perspective battle animations that can either be swirls or ASM scripts for miscellaneous battle animations, like PSI attacks and assigning them to an argument for the [1C 13 XX YY] Control Code.
  • If you're going to be using extended battle actions and PSI abilities, you're going to want to use this.
  • RGB values must be divided by 8 in hex. 0 - 1F
  • Extends how many letters PSI can use (alpha, beta, gamma, etc), so you can add your favorite Greek letters
  • Requires D-Man's Extended PSI Ability Table

Extended Window Table by cooprocks123e

  • Normally, there are 53 different window types in the game, with different locations and sizes on screen.
  • This expands it so that there can now be 106 different window types.
  • No longer will you have to overwrite a pre-existing window type!
  • NOT A TOOL FOR EDITING THE INTRO CUTSCENE.
  • The game normally has 8 flyover text pointers, but this script lets you add more.
  • It also includes a movscr command to summon flyover text whenever you like, as well as an example script you can use.
  • Requires asm65816 and movscr_codes.
  • The game normally has 484 enemy groups, this script lets you add more.
  • You still edit groups 0-483 normally through enemy_groups.yml.
  • This script doesn't expand the Map Enemy Groups table!
  • If you want to be able to mark each group individually as a normal or boss one (instead of what the game does, i.e. groups 448 and higher marked as bosses), use this script here.

Extended Presents by JTolmar and phoenixbound

  • Provides an easy macro for making a new present type script.
  • You know, like how it says different stuff for trash cans, chests, and actual presents.
  • This way you only need to put in three bits of text, instead of thinking about all the edge cases.

EB++ Disassembly v1.1 by the_kirby

  • EB++ does various things:
    • adds more event flags to the game
    • create sprite with movement script pointer, and similar commands
    • a "window title" command that might erase your save
    • a whole bunch of pseudo-registers for doing basically ASM programming but it's actually CCScript
    • asmcall
  • This file compliments the ebpp.ccs file below. It contains all the commands that make it work.
  • ebpp defines all the commands that are in EB++ (the disassembly above) so you can actually use them. It might be a good idea for the community to merge these two files in the future.
  • ebpp_mem creates a system for storing data using a heap data structure using those pseudo-registers, for if you want to start trying to write C++ code for fake ASM but it's actually CCScript
  • ebpp_std creates more functions that would be useful for trying to write C++ code for fake ASM but it's actually CCScript, and a random number generator for that system

Convenience

  • Allows easy access to editing EarthBound's introduction (flyover scene, meteor crash).
  • You can still change the intro without this; this just re-creates the vanilla flyovers and provides macros to change them.
  • There is an updated version here by cooprocks123e which allows you to set flags before the map loads - this is useful if you want Onett to be daytime, for example.

Skip Logos by Anonymous941

  • Changes the screen that appears immediately after resetting
  • This can be used to automatically skip the 3 logos (Nintendo, Ape, Hal), start directly at the title screen, and more
  • This script gives you the ability to change what a text window does whether it be for dialogue or showing stats.

Naming Screen Character Animation Changer by PhoenixBound and Tzepish

  • Changes the sprites that show up on the naming screen, the sprites on the summary for the naming screen, and the movements the sprites all execute.
  • Lets you edit which window flavor is used on the file select menu
  • "Naming Screen Character Animation Changer" can be used to also select it by default
  • Lets you have three different backgrounds during the file select menu at the start of the game, with a fade out and fade in.
  • One for the file select menu, one for the new game setup, and one for the naming screen.
  • asm65816.ccs is needed for this script to work.
  • As the title entails, this script makes changing the time spent on each of the three logos much more accessible via ROM overwrite commands and simple ASM.
  • asm65816.ccs is needed for this script to work.
  • Allows for easy editing of text pertaining to the Mirror command, for when a party member goes down, when you or an enemy is/are ambushed, etc.
  • Rewrites the file setup menus with enough macros that it should be relatively easy to edit them without a great grasp of assembly. The example adds a difficulty selection menu.
  • Warps in EarthBound normally work following the teleport destination table which has a limited number of entries, this script adds a cc_asmcall macro (cc_warp) so you can warp to arbitrary coords without having to use that table.
  • asm65816.ccs, CCExpand and cc_asmcall are needed for this script to work.

CCS Effects by Vittorio

  • This script adds a few cc_asmcall macros for effects, like fades, a letterbox for cutscenes, ellipses and brightness changes.
  • asm65816.ccs, CCExpand and cc_asmcall are needed for this script to work.

Easier hotsprings by Vittorio

  • Hotspring movement scripts (683 and 684) normally work by checking if the player is in a certain area, this script changes it so instead it checks if the player is in shallow water.
  • This should make it easier to add new hotsprings by having water tiles and an NPC with movement 683 or 684 nearby. It also means the hotspring's should be the only water tiles in the area.
  • asm65816.ccs is needed for this script to work.

Font Changer by D-Man

  • Modifies the CC_1F control code tree
  • This will add [1F 32], [1F 33], and [1F 34] so that you can switch fonts. This will mirror what you will see in the Font folder.
  • Usage:
    • [1F 30] = Normal Font
    • [1F 31] = Saturn Font
    • [1F 32] = Big Font
    • [1F 33] = Battle Font
    • [1F 34] = Small Font
  • An implementation of branching dialogue via EB++
  • general.ccs of this contains a bunch of other miscellaneous useful commands too

Reset Routine by D-Man

  • An ASM routine that resets the game when executed.
  • Makes an item revive one of your party members automatically.
  • Allows normal movement speed in swamps and the Lost Underworld, and makes skip sandwiches work on stairs and ladders.
  • This script gives you the ability to change what a text window does whether it be for dialogue or showing stats.

Custom Text Windows by cooprocks123e

  • This script allows you to set the window size and position from CCScript when creating a window.
  • Requires the extended window table from above.
  • If you don't want to expand the text window table, you can use this version.
  • This script frees up 5 items slots that were formerly taken up by Lucky Sandwiches.
  • When buying a Lucky Sandwich in shop, the game would randomly give you one of 6 identically named Lucky Sandwiches, each one having a different effect! This script allows you to have ONE Lucky Sandwich item with the same 6 effects randomly chosen AFTER you use it!
  • Makes customising the dialogue of shopkeepers a lot easier and less confusing than the vanilla game.
  • Adds the feature of bulk-buying items! Can also be disabled if you don't like it.
  • Requires asm65816 and CCExpand. Follow the instructions in the file for installation.

Easy deaths by JTolmar

  • Makes it so dying doesn't halve your money.
  • Makes it so all the kids revive with full HP/PP on death. (There's a comment near the bottom of the file that says how to disable this.)
  • Lets you change the properties of temporary party members like Tony, the Flying Men, or Teddy Bears
  • Lets you change the positioning and movement of the letters.
    • For ActionScript experts, you can also make brand new scripts for them.
  • Requires movscr_codes and movscr_reloc.
  • Changes whether Ness/Paula/Jeff/Poo are referred to as he/she/it in battle actions and in the low HP overworld message
  • Useful for hacks with a completely different cast of four playable characters.
  • Other overworld messages containing dynamic pronouns are handled in script logic instead, with the party member's ID held in a script register. This file doesn't touch those, since it wouldn't even work in projects that decompile the script. You have to make the changes to those utility scripts/make brand new utility scripts yourself, using result_is or the [09 ...] control code or similar.
  • Normally, there are many control codes in EarthBound that are difficult to write out in CCScript, because you need to manually write out hex for them. This can be error-prone and difficult to read, especially when dealing with numbers split across multiple bytes (like needing to write 23 01 for 0x0123, or 291 in decimal).
  • This script contains CCScript commands representing every control code in the game. So instead of [03], you can say promptw, and instead of [19 22 01 02 64 00], you can say get_dir_from_char(1, TO_NPC, 100) ("get direction from party character 1 to NPC 100").
  • There are two download options. You probably only want the second one, stdext_only_new_commands.ccs, for your own hack.

New gameplay features

Multiple Bosses in a Single Battle by Messianic & vittorio

  • Now you can have more than one boss enemy in battle and killing one will not destroy the other!

Per level message by JTolmar

  • Gives each character/level its own unique CCS message that plays right after the "is now level X" message

Checkable People by JTolmar

  • Makes it so specific NPCs can be both "check"ed and "talk to"ed.

Repel Sandwiches by jtolmar

  • Makes it so the Skip Sandwich flag also turns off spawns. Because everyone and their Mother 2 uses a run patch these days, why not make the sandwich useful?
  • Makes "Y" the run button, and adds an event flag that controls whether you run when the button is pressed, or run when it's not pressed. Unlike the standard run button patch, this one also leaves the skip sandwich flag alone. Useful if you're using the "repel sandwiches" patch above.

Mute music flag by jtolmar

  • Adds an event flag to the game that mutes all music, but allows sound effects to play normally.
  • Unlike music_stop, this persists across doors, screen reloads, cutscene music playing, and battles.
  • This script lets you make PSI moves available based on the state of event flags, in addition to level (default).
  • Doesn't use EB++, only asm65816.ccs is required.
  • Included PSI sort order fix by cooprocks123e.
  • Allows character to learn PSI on levelup but also dependent on a flag. Uses EB++

Run Button script by ShadowOne333

  • Reworks the Y button to work like a Run Button in-game, similar to the Run Button in Mother 1/Mother 3.

GoodsMenuEquip by Chaz (On Livvy's Github.)

  • Lets you Use equippable items in the Goods menu to equip them, a la EarthBound Zero!

Colored Text by PhoenixBound

  • Adds support for changing the text color to any RGB color. See the beginning of the file for setup instructions and limitations to keep in mind.

Easy Portraits by felix.rodent

  • This file makes it extremely easy to add dialogue face portraits to your romhack.
  • You are encouraged to edit and create new windows to experiment with, but for basic use, this file should be rather simple to setup. (Encouraged that you download the zip file for faster 'drag n' drop' capabilities.)
  • Extends HP and PP odometers to have four digits!
  • Created for Mother Tensei, for some of that trademark Shin Megami Tensei difficulty
  • NOTE: read the comments in the version 1.2 in the file (scroll down, you'll see it), they are important.
  • This repo contains scripts to animate enemy battle sprites as well as making them float, if you want to.
  • Contains a folder with template images on how the enemy sprite animation flows.

Note - The following changes are required in order for this script to work properly:

  1. Windows 7, 45 and 52 require the following changes inside window_configuration_table.yml:
7: 45: 52:
Height: 12 Height: 12 Height: 14
Width: 13 Width: 14 Width: 16
X Offset: 18 X Offset: 1 X Offset: 15
Y Offset: 1 Y Offset: 13 Y Offset: 13
  1. In Fonts/0_widths.yml, change entry #111 to the following: 111: 7

  2. Download the following image, rename it to 0.png and place it inside the "Fonts" folder.

0.png

New Controls by ShadowOne333.

  • Original/Old hack made by Herringway, rewritten for CoilSnake by ShadowOne333
  • Script reworked by cooprocks123e for CoilSnake's new Expanded NPC Config Table.
  • A Button can now check objects and talk to people. The L Button can also be used for this.
  • Attempting to interact with the uninteractable (nothing in front) no longer produces a “No problem here.” message.
  • "Check" and "Talk to" have been removed from the menu to clean it up, since now the A Button does both functions.
  • Start Button will now open up the Town Map, while pressing Start, A or B will close it down.
  • X Button now opens the inventory menu.

Note - The following changes are required in order for this script to work properly:

  1. Modify Windows #0 height from 8 to 6.

  2. Modify the "Out of Battle" texts inside text_misc.yml to match the following:

Out of Battle Menu:

Check: Check

Equip: Status

Goods: Equip

PSI: PSI

Status: Status

Talk to: Goods

  1. Additionally, every reference to the 'X' or 'Y' buttons found within the game's script should be changed accordingly.

Name-Printing Commands by PhoenixBound

  • A collection of commands to deal with the names of playable character names and other strings character-by-character.
  • Effects include printing names slowly, making them randomly "corrupt" like in the final boss fight with the player name, and finding how long they are.

Enable/Disable all NPCs by cooprocks123e

  • This is actually in the vanilla game but is not easily usable. This corrects that!
  • Requires asm65816, CCExpand and cc_asmcall. Quick link to dependencies.
  • This script allows you to show any arbitrary spritegroups during battle.
  • In order to use this, you will need to be comfortable with writing new movement scripts (to control the generated sprites).
  • Requires asm65816, cc_asmcall, and movscr_codes (see example folder in repo).
  • This is outdated and needs to be edited to use the latest movement script stuff.
  • All of the warp styles in the one file so you can edit them.
  • Warp styles are used when going through doors, or warping with the teleport destination table.
  • Please note that this is not a table expansion. Do not add more on the end.

Palette tint fix by JTolmar

  • Changes the sprite palette tint system so that sprite colors don't depend on map palette 1 (Twoson)
  • You probably want this if you're using a normal Earthbound art style and have edited the maps.
  • The explanation is a lot longer than just dropping the file in:
    • Earthbound automatically tints all sprite palettes based on how different the map palette is from map 1, Twoson.
    • This makes the sprites darker in caves, have a gold tint in Dalaam palace, etc
    • If you've edited map 1 to be a cave though, then everywhere else will be lighter than it, and your sprites will be tinted brighter outside of caves.
    • That's probably not what you want, so this change makes it based on the original Twoson rather than whatever you have in map 1.

Y Mash by JTolmar

  • Holding the Y button automatically mashes through text.

Teleport anywhere by JTolmar

  • Turns off all the checks that disable teleporting indoors, during a delivery, etc.

Optimize text rendering by Catador, cooprocks123e, and JTolmar

  • Removes a boatload of lag during menus
  • Very cool
  • A tour de force of assembly prowess

Item modes by PhoenixBound

  • With this, present boxes can give you more than just items and money.
  • Party members, funky music, status effects, dumb jokes, even the secret of a diorama world! If you can script it, it can appear in the box!
  • Breaks the game's existing money presents -- see the beginning of the file for instructions on how to fix this

Experimental

MSU-1 patch script by ShadowOne333

  • Transcription of the MSU-1 patch into CCScript for use in CoilSnake project files
  • Original patch created by Conn on zeldix.net
  • Some files are required to be in the same directory as the game for it to work. You can get them here.

Max hp modifier by Romualdo666

  • Finally an easy way to modify main character's max hp!
  • You can modify them to your liking. (Note that if you put a very huge number, there might be some crashes)

Autosave feature by SupremeKirb

  • A simple script which saves the game every time you go through a door.
  • Includes the ability to disable it by setting a flag.
  • Automatically disables itself when you are in a dungeon.
  • Will still run the original refresh script (which only serves to spawn the Buzz Buzz sprite if he is with you.)
  • Redistributes tileset character (minitile) graphics data between foreground and background to effectively allow cramming more usable graphics into a tileset.
  • Configurable on a per-tileset basis.
  • Not currently compatible with EbProjEdit, so generally only useful to modders willing to hand edit map data.

Debugging and bug fixes

Y Button Spawn Control Patch by Chaz

  • This tiny patch puts control of all enemy spawn plates on your Y Button. When the Y Button is not held, all spawn plates are treated as 0%. If the Y Button is held, all plates are treated as 100%.
  • Include this single line in any CCS file: ROM[0xc0282E] = "[AD 65 00 29 00 40 D0 03]"

Debug Menu Enabler by Catador

  • Allows the player to enable the Debug Menu in-game with a simple button combo (L+R)
  • Fixes a bug in the game where the chances of a guts save are based on the attacker's guts rather than the defender's.
  • Removes the hard-coded length and Ness's name from the Lumine Hall text scroll. With this patch, you can use text_misc.yml to edit the text normally (but it doesn't support ccscript)

Stunlock nerf by jtolmar

  • Makes it so bosses have a 50% chance of escaping the "solidified" status and still acting on their turn.
  • Fixes bug where the game goes to a black screen if you game over in a scripted fight while the OSS flag is on
  • (Best known version of the bug is the Shattered Man glitch in the ending, but you can also do it a few other places.)
  • Fixes bug where the game hardlocks if you teleport through an area with too many sprites in it
  • (Most common in vanilla by teleporting out of Burglin Park)
  • Fixes bug where there can be graphical corruption when displaying a battle with only a single 2BPP background.
  • This will eventually be integrated into CoilSnake.

Better Battle Swirls by Pink Switch

  • Allows enemy groups to have specifically set pre-battle swirls instead of boss swirls being hardcoded to entries above 448.
  • The swirl type will be determined by the Sound value of the first enemy in the battle group.

Before the CCScript library, there was this thread on the forums! You can find some useful stuff here as well.

Clone this wiki locally