News:

11 March 2016 - Forum Rules

Main Menu

Castlevania SotN Editor (SNEER Revival)

Started by KernelEquinox, August 04, 2022, 08:13:20 PM

Previous topic - Next topic

KernelEquinox

Some of you may remember a tool called SNEER by Nyxojaele, a SotN modding tool that was capable of viewing many various aspects of the game's map files.

Unfortunately, it was last updated March 06, 2012.

I needed to utilize some of SNEER's functionality recently, so I re-downloaded the latest version (v0.15), but found myself wanting a few more features than those found in SNEER.

And that's how SotN Editor came into being.



SotN Editor


Project Link: https://github.com/KernelEquinox/SNEER


SotN Editor is a decompilation of the original SNEER, with a few improvements to the program.

I've also open sourced the code, which is very messy since it's largely just decompiled code at the moment, but I'll get to cleaning that up alongside everything else.

There are many other improvements planned, such as implementing a tile/collision editor, revamping the UI, optimizing data processing, and various other useful functionality.

I've also poured a ton of research into the game and discovered some technical aspects of the game that I haven't seen documented anywhere as of yet (trust me, it would've saved me a lot of headache if it were already documented), so I'll get to writing that up as soon as I can. Stuff like function addresses, data locations, what data is what, etc.

I'll also try to make this post look a bit tidier, writing forum posts is hard.


Also, one thing I did want to showcase as an upcoming feature in v0.20:

(click to view the full-size image)


It can now parse (most) entity sprites, and it now displays more technical details about the entities in the info boxes.



Changelog

Quotev0.15b
  • Added an Export PNG button to export the map as a PNG file
  • Added a transparent background option
  • Rooms are now processed in reverse order to prevent issues caused by rooms overlapping
    • This causes weirdness with towers in DAI.BIN, but it fixes more than it breaks


Also, I'm pretty sure this goes without saying, but all credit for SNEER goes to Nyxojaele. The guy's an absolute legend.

Aceearly1993

Impressive!!!!!! You should deserve more praise for reviving this potential SotN map editing tool project.
Quote"Did you know when one's most desperation time is? It's when he was beaten up by someone critically...
And he can't find who caused this."

VincentNL

Excellent!
I'll keep following this thread.

MysticLord

Fantastic work! Decompiling a rom hacking tool is the extra bit that makes it so much better, especially when many who worked on this game aren't keen to share what info they have on it.

Midnight Metronome

Awesome! Can't wait to try it out sometime.

Megatronformayor

Looks pretty interesting. Maybe it can be used to change up the layout in the reverse castle.

MysticLord

Quote from: Megatronformayor on August 06, 2022, 04:21:55 PMLooks pretty interesting. Maybe it can be used to change up the layout in the reverse castle.
What, are you saying that turning the castle upside down isn't the height of creativity?  ;)

Megatronformayor

Quote from: MysticLord on August 06, 2022, 08:15:37 PMWhat, are you saying that turning the castle upside down isn't the height of creativity?  ;)
It's just a thought ;D

pianohombre

I wish we could like a post instead of having to comment
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Midnight Metronome

Quote from: Megatronformayor on August 06, 2022, 10:05:59 PMIt's just a thought ;D

He was joking and ya, that's the first thing I thought too. Make the inverse castle a unique layout. I wonder if it would be possible to do something like Order of Ecclesia where there are some outdoor levels to get to the castle then the last part is the castle, maybe even a different castle and scrap the inverse one.

Megatronformayor

Quote from: Midnight Metronome on August 07, 2022, 03:56:36 AMHe was joking and ya, that's the first thing I thought too. Make the inverse castle a unique layout. I wonder if it would be possible to do something like Order of Ecclesia where there are some outdoor levels to get to the castle then the last part is the castle, maybe even a different castle and scrap the inverse one.
Don't worry I knew he was joking and your idea sounds interesting.

KernelEquinox

Just wanted to give an update that I've been working on the program like nobody's business, with around 85% of the work going into reverse engineering SotN and 15% of it actually writing code. The good news about spending so much time reversing SotN is that I'm learning a lot more about the game and subsequently documenting a lot more stuff that I haven't seen documented anywhere, so that's definitely a net positive.

As far as program updates go, it can now make a reasonable guess at the entity's type based on patterns I've noticed in the game, and it now shows the names of items in the info box. I've also made it possible to parse item/pickup sprites as well as candle sprites. I also made a few changes in the MIPS processor (the PSX CPU emulator) that should yield more accurate results.


In terms of issues, some of the palettes in the Underground Caverns are wonky, ditto for the Reverse Underground Caverns. Oddly enough, this is the only map in the game where this oddity occurs, so I'll need to look at that sometime soon.


All things considered though, I've been making a lot of headway with dynamically determining information about the map and entities while hardcoding/assuming as few things as possible since the ultimate end goal of this tool is to be able to make changes to entities and maps and be able to save those changes in a way that the game won't complain about.

It's been fun so far, and I'm having a blast reverse engineering the game and discovering how stuff is interconnected. I'll definitely write up a document or two going into more detail once I feel that the coverage of the document is good enough to stand on its own. And once I make the notes look actually presentable.

Also thank you for all the kinds words, it really does mean a lot to me, and makes it feel even more like all the work put into this tool will definitely be worth it in the end.  :thumbsup:

Midnight Metronome

What you're doing is truly amazing and unprecedented. It's something that I've wanted for a long time actually. Glad you're enjoying it.

MysticLord

Quote from: Midnight Metronome on August 07, 2022, 03:56:36 AMHe was joking and ya, that's the first thing I thought too. Make the inverse castle a unique layout. I wonder if it would be possible to do something like Order of Ecclesia where there are some outdoor levels to get to the castle then the last part is the castle, maybe even a different castle and scrap the inverse one.
Quote from: Megatronformayor on August 07, 2022, 11:47:10 AMDon't worry I knew he was joking and your idea sounds interesting.
Joking or not, the inverted castle is a lazy idea and I'd play the crap out of a new layout, especially with different enemies and items.

Megatronformayor

Quote from: MysticLord on August 08, 2022, 03:55:05 PMJoking or not, the inverted castle is a lazy idea and I'd play the crap out of a new layout, especially with different enemies and items.
Ahmen on that man. I'd totally play a hack of this game with alternate level designs.

KernelEquinox

I've finished implementing parsing for the save rooms and load rooms, and it should now be able to parse most entities and their sprites at this time. It also shows the names of items, relics, and enemies when hovering over the entity.



There are still some things that need to be looked into further though, such as Slogra and Gaibon's sprites not showing up, and I still need to analyze the logic for the red/blue doors.

There's also an odd issue concerning the the lamps in the Library and Reverse Library maps, but I haven't looked much into it just yet. It only shows the flame since the flame itself is composed of only a single sprite, but it doesn't show the surrounding lamp.


Development's coming along pretty well though, all things considered.



That brings me to my next point: I'm considering rewriting SNEER from the ground-up in C++.

SNEER was originally written in C# using the Microsoft XNA framework, and it's what I've been using to build off of it in order to make these modifications. However, C# is incredibly verbose and painfully slow for this purpose, especially when it comes to the MIPS processor.

On the other hand, I'm much more comfortable working in a C/C++ environment, and the MIPS processor (and the program in general) would be significantly more performant being written in C++. In addition, the GUI would be much more modular and aesthetically pleasing with many more possibilities for displaying technical information.

I'll get the current version of the program to a presentable state and then push the code to GitHub, after which I may begin work on the rewrite.

Midnight Metronome

#16
Awesome. Hope you do the re-write. Thanks for doing this.

btw, would it be possible to edit the sprites, say in photoshop or something, and put them back in the game, like if you're not happy with an animation or the way something looks?

KernelEquinox

I updated the Export PNG button to now export entities as well as map tiles, with the option to keep or remove the rectangles around the entities.

Map exported without entity boxes

Map exported with entity boxes

I also noticed something odd when looking through the maps. Apparently, the Anti-Chapel has a weird candle located out of bounds just below the long staircase at the top-right of the map. (ignore the overlapping parts in the tower areas, I haven't fixed that just yet)


I checked and it's definitely there in game, it just has a heart in it. I'm guessing it's been found before, but I still found it interesting.


I've also begun working out the layout for the rework, but I'm hopeless when it comes to UI design. I'll try to make it as usable as possible though.

DeathlesSNESs

This is looking really nice so far. Many interesting hacks came since DSVania, hopefully we can see the same regarding SotN once this editor gets advanced enough, as so many people (me included) love this game so much for so many years.

Also I think C++ sounds definitely like a better language choice, as that would allow cross-platforming more easily too.

Thanks for all the hard work on it!

KernelEquinox

Quote from: Midnight Metronome on August 12, 2022, 12:18:25 AMAwesome. Hope you do the re-write. Thanks for doing this.

btw, would it be possible to edit the sprites, say in photoshop or something, and put them back in the game, like if you're not happy with an animation or the way something looks?

I forgot to address this in my previous post. But yes, support for editing of all aspects of sprites, textures, tiles, etc. is planned.