spiiin / CadEditor

NES Universal Level Editor (Chip & Dale, Darkwing Duck, Duck Tales, Duck Tales 2, MegaMan 4, Chip & Dale 2, Tale Spin, Little Mermaid, Jungle Book, Flintstones and many others)
MIT License
206 stars 31 forks source link

How to use with sega contra hard cops #3

Closed salvadorc17 closed 6 years ago

salvadorc17 commented 8 years ago

I just try to load level, and it display only tileset, how to use and what can modify..

spiiin commented 8 years ago

You can edit layerA and layerB level maps and blocks (metatiles) for all levels with CadEditor, and view (read-only, because I have no decode all objects codes) all level objects.

To start CadEditor with one of game map

There are many runCadEditorContra.bat in settings_sega_contra_hardcorps folder for every level in game. Run one of them or pass Config.cs parameter to CadEditor wia command line as it is written in the bat files – "start CadEditor.exe settings_sega_contra_hard_corps/Config_1.cs" for example.

There are three important functions in this file:

  1. getFileName – name of your Contra Hard Corps ROM file, it's not included in the repository.
  2. getConfigName – settings file SettingsSegaContra*.cs, this file show how data will be loaded from ROM and dump files)
  3. getDumpName – dumped level map. It's separated from ROM file, because inside ROM level maps are compressed, so you need either rip it from RAM while game running in emulator, either rip original archives from ROM file and decompress it with LZKN decompressor/decompressor: I put all decompressed archives to map_*.bin files, so you don't need to do this step manually.

To put changed map inside game After editing level, you must compress map file back with LZKN decompressor/decompressor and replace original archive inside ROM with your new archive. I save offsets of original archive in Setting_SegaContra*.cs files, for example for 1st level: https://github.com/spiiin/CadEditor/blob/master/CadEditor/settings_sega_contra_hard_corps/Settings_SegaContra_1.cs#L55 private string BLOCKS_NAME = "blocks_11.bin"; //1E391A//1E597C 1E391A - offset for layerA archive 1E597C - offset for layerB archive

After this you can load game in emulator and view changed level.

salvadorc17 commented 8 years ago

So it will be expanded to edit objects/events?? That is like most important..

spiiin commented 8 years ago

Maybe, but not soon

spiiin commented 6 years ago

Objects can be edited now (with a changing bytes in table, so you must know what exactly you doing). Also improved sega block editor and added recompressing plugin for inject maps back in ROM from CadEditor https://github.com/spiiin/CadEditor/releases/tag/v4.6

video example in release notes