Today, I started a quick little console program called Shock Tile, to be released the day after Keen Day. It won't take three weeks to write; I actually got essentially all of it done in my study halls just this day. Its purpose is to help squeeze more tiles into a Galaxy mod by compacting the tileset, removing unused tiles, and of course updating levels and tileinfo accordingly.
It works in a few stages:
- Read the script file. This is a little text file, ST.TXT, that gives the names of the six (or seven for Keen Dreams) resource files that Shock Tile can affect.
- Open the files. Before doing so, ensures that they actually exist and gives a helpful error message if not.
- Scan the levels. Found tiles are shoved into a map from the original ID to the new ID, which are sequential in order of discovery. Tileinfo animation offsets are also adjusted during this stage.
- Shock the levels. The levels are again looped through, replacing the data with the new IDs.
- Shock the graphics. Tile images are re-ordered based on that map and unused images are erased.
- Shock the tileinfo. Property entries are re-ordered based on that map and entries past the end of used tiles are set to blank.
I'm currently experiencing issues with tile mapping; it likes to put other tiles into ID 0, which is the "blank" entry and should not be changed.
No comments:
Post a Comment