Loading scripts can be made to be incredibly easy by a bookmarklet. These allow injection of JS through a url starting with
These are my mods and some mod methods I have compiled for the game.
These are scripts I have already written and placed in a bookmarklet. These will dynamically update whenever I make a change to the root file, so you don't need to revisit this page every time I update the mod.
Drag these links to your bookmarks bar. Any working page will update.
Custom Level Loader [ONLY levels i have made, you can view that list at readme.txt.]
Level Editor Rewriter. What you want to use to publish a level with modded items.
Animation Swapper [really just a test for myself]
This is the main reason you would mod the game. It allows you to directly modify attributes of items for the session, and allows for modded scores etc.
Consider the PNG: Spritesheet with item IDs. This is a useful page that shows the number ID of the visual (in case you can't, well, read French).
Now consider my annotated game.tilesdef file: game.tilesdef-annotated.js. This also helps as there is formatting to each item.
Most of what you need will be in game.tilesdef-annotated.js, more comments on the bototm.
When you've finished, paste this into the console while on an existing level.
Generally with the level editor rewriter, this is obsolete. However this is still needed for some levels, such as ones with no exits, more than one Rockbasher, or a level larger than 64x64.
This Google Doc has an empty level formatted so that it is easier to edit: Rockbasher - Google Docs
Note that the Spritesheet with item IDs image will be very important here.
You need to be very careful while creating these, as one mistake will make it unplayable (and it can be hard to debug).
Note that the rockbasher that the level will be played with is going to be the one closest to the top left.
Once you've finished, simply copy-paste that data into the console while on a level, then die.
This is the most useful for modded levels, as it allows you to directly change the item set available. When you do this, you can actually place the modded items straight into your level, and save it so it can be published.
Consider this .js file: https://www.rockbasher.com/js/map-editor.js. Most of it is useless (TO MY KNOWLEDGE) until you get down to line 76 where you see the "selector".
This has the actual table where you place the items. If you've followed any of the other tutorials, you'd know that the numbers are the actual item IDs. (again, spritesheet with IDs is very useful here.)
You can now replace the IDs (first fill in the 0s is my recommendation, until the "spacing" section where they won't show up) with any modded item (which you can see a mostly full list of at the bottom of game.tilesdef-annotated.js).
Again, once you've made your changes, simply paste the full file in the JS console and you should see changes right away.