News:

11 March 2016 - Forum Rules

Main Menu

Castlevania - SotN Editor

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

Previous topic - Next topic

KernelEquinox

Another quick update, I've added a download link to the main post where you can download v0.1 of the program for Windows, Mac, or Linux.

You can find the downloads for the program here: https://github.com/KernelEquinox/SotN-Editor/releases/tag/v0.1

Also, note that the map located at BOSS/RBO5.BIN causes the program to crash due to a null pointer dereference related to mishandled sprites.

MysticLord

Will you add an editor for weapons and other items along with the maps and map scripting?

KernelEquinox

Quote from: MysticLord on October 25, 2022, 03:40:14 PMWill you add an editor for weapons and other items along with the maps and map scripting?

I plan to implement editing functionality for weapons, items, enemies, tiles, sprites, rooms, Master Librarian inventory, and more. I was considering creating a scripting language specifically for creating and modifying entity update functions, but that would come much later if I do implement it.

MysticLord

Quote from: KernelEquinox on October 25, 2022, 06:13:35 PMI plan to implement editing functionality for weapons, items, enemies, tiles, sprites, rooms, Master Librarian inventory, and more. I was considering creating a scripting language specifically for creating and modifying entity update functions, but that would come much later if I do implement it.
Gemini is IIRC the person who knows the most about CSOTN, have you contacted him?

Aceearly1993

A kinda obscure thing I have to ask: The Japanese v1.2 revision has the attack power and attribute of Richter's flame whip item crash (activated by pressing item crash button without picking sub-weapon) buffed, but later revisions never retain this change. Is there any unoccupied/unused programming/pointer left within the US version, which is related to this attack power buff?
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."


KernelEquinox

Another quick update, I've fixed a few bugs in the program and added a few new things. I've also improved POLY_GT4 detection, but I still need to work out a few kinks related to vertex positioning.

The download link has been updated in the main post.

Additionally, I've set up a CI/CD workflow on GitHub to automatically create builds of the program for Windows, Linux, and macOS, just in case you want to test out the newest features without waiting on the next full release.

Quote from: MysticLord on October 29, 2022, 08:21:04 PMGemini is IIRC the person who knows the most about CSOTN, have you contacted him?

I haven't spoken to Gemini as far as I'm aware.

Quote from: Aceearly1993 on October 30, 2022, 09:35:52 PMA kinda obscure thing I have to ask: The Japanese v1.2 revision has the attack power and attribute of Richter's flame whip item crash (activated by pressing item crash button without picking sub-weapon) buffed, but later revisions never retain this change. Is there any unoccupied/unused programming/pointer left within the US version, which is related to this attack power buff?

I'm not sure, but I can definitely look into it.

Quote from: Nyxojaele on November 01, 2022, 05:15:40 PMNeat.

Wow, I certainly didn't expect to see a Nyxojaele post. I just wanted to thank you for all you've done with regard to the SNEER tool, that thing is a work of art. Your work on SNEER is actually what pushed me to start reverse engineering SotN, you absolute legend. 🙏

gledson999

Congratulations for the tool together with nyxojaele, I can't wait to be able to edit the maps directly from tool.

MysticLord

#48
Quote from: KernelEquinox on November 02, 2022, 03:23:50 PMI haven't spoken to Gemini as far as I'm aware.
https://www.romhacking.net/forum/index.php?action=profile;u=128
Check out that registration date.

Gemini is probably the person other than yourself, Nyxojaele, and maybe paul_met that knows the most about C-SOTN.

heavyjo

#49
Hello, I want to congratulate you on your work, it's a great project.
I'm glad to see that someone is taking over the project.
But I noticed a small thing, when I click on an object, I see mark on line 38 that it is noted "object_id" but it is not quite exact.



The "0C" will be the category of the object. There are 4 of them.

   "03" will be for money and sub-weapons.

   "0A" Will be for objects that appear by destroying torches, enemies...
        They disappear over time.

   "0B" Will be for Relics.

   "0C" will be for objects that remain permanently.
        The list of objects changes with the level.

Example:
On the image above, we can clearly see "D2 00 99 00 0C 00 10 00 03 00"

D2 00 pos_x
99 00 pos_y
0C 00 the category
10 00 ??? it never changes
03 00 object_id

I made you a start of file.
I also give you a patch to have all the relics accessible in the menu and the real location of the "Nose Devil Card" and "Sprite Card" relics like on the JAP version.

object_id
TOP.bin
Patch AllRelics

Sorry for my English and I hope I helped.


MD_Prometh

With this editor, is it possible to have the Saturn exclusive music, levels and sprites ported to the PS1 version?

KernelEquinox

Quote from: heavyjo on November 02, 2022, 08:01:11 PMHello, I want to congratulate you on your work, it's a great project.
I'm glad to see that someone is taking over the project.
But I noticed a small thing, when I click on an object, I see mark on line 38 that it is noted "object_id" but it is not quite exact.



The "0C" will be the category of the object. There are 4 of them.

  "03" will be for money and sub-weapons.

  "0A" Will be for objects that appear by destroying torches, enemies...
        They disappear over time.

  "0B" Will be for Relics.

  "0C" will be for objects that remain permanently.
        The list of objects changes with the level.

Example:
On the image above, we can clearly see "D2 00 99 00 0C 00 10 00 03 00"

D2 00 pos_x
99 00 pos_y
0C 00 the category
10 00 ??? it never changes
03 00 object_id

I made you a start of file.
I also give you a patch to have all the relics accessible in the menu and the real location of the "Nose Devil Card" and "Sprite Card" relics like on the JAP version.

object_id
TOP.bin
Patch AllRelics

Sorry for my English and I hope I helped.



I actually thought the same thing at first when I was analyzing the data structures early on, so I can definitely see where you're coming from with 0C being a category of sorts.

The data structure you mentioned is located at offset 0x801823B8 in TOP.BIN, which is the 2nd entry in the entity layout section for that specific room.

The entries within each entity layout have the following structure:

struct EntityInitData {
    short pos_x;
    short pos_y;
    ushort entity_id;
    ushort slot;
    ushort initial_state;
};

The entity_id value is an index into a list of entity update function pointers, which determines which update function should be run for the entity. In the case of 0C, this is the "Pickup" entity function. This function effectively determines the item to be spawned by looking at the map's pickup table and using the initial_state value as the index into that table, as shown below.

void Entity_Pickup(Entity *entity) {
    ushort item_id;
    uint flag;
   
    if (entity->current_state == 0) {
        flag = entity->initial_state + 0x30;
        entity->pickup_flag = (u16)flag;
        uint flag_idx = (flag & 0xffff) >> 3;
        if (((&g_PickupObtainedFlags)[flag_idx] >> (flag & 7) & 1) != 0) {
            DestroyEntity(entity);
            return;
        }
        item_id = (&EntityPickupIDs)[entity->initial_state];
        if (item_id < 0x80) {
            entity->callback = Entity_SpawnPickup;
        }
        else {
            entity->callback = Entity_SpawnItem;
            item_id -= 0x80;
        }
        entity->initial_state = item_id + 0x8000;
    }
    else if ((entity->current_state < 5) && entity->unk48 != 0 {
        item_id = entity->pickup_flag >> 3;
        (&g_PickupObtainedFlags)[item_id] |= (byte)(1 << (entity->pickup_flag & 7));
        entity->current_state = 5;
    }
    entity->callback(entity);
    return;
}

Quote from: MD_Prometh on November 03, 2022, 05:06:49 PMWith this editor, is it possible to have the Saturn exclusive music, levels and sprites ported to the PS1 version?

Yes, it would definitely be possible to port those to the PS1 version. You would have to convert the assets into a format compatible with the PS1, but aside from that, it should be entirely possible to port the Saturn changes to the PS1 version of SotN.

MysticLord

Quote from: KernelEquinox on November 04, 2022, 04:28:06 PMYes, it would definitely be possible to port those to the PS1 version. You would have to convert the assets into a format compatible with the PS1, but aside from that, it should be entirely possible to port the Saturn changes to the PS1 version of SotN.
Is space an issue? If it is, is it feasible to remove the CD music track to make more room?

Vanya

Quote from: KernelEquinox on November 04, 2022, 04:28:06 PMYes, it would definitely be possible to port those to the PS1 version. You would have to convert the assets into a format compatible with the PS1, but aside from that, it should be entirely possible to port the Saturn changes to the PS1 version of SotN.

This probably what I want more than anything.
To me having that content in the PSX version (and expanding upon it) would be my dream version of SotN/NitM.

Beyond that I would consider using this editor for a larger project like a remake of Circle of the Moon.

SuxMenner

Quote from: Vanya on November 21, 2022, 05:02:56 PMBeyond that I would consider using this editor for a larger project like a remake of Circle of the Moon.

For a large project such as your idea it would be more wise to wait for the decomp to fully develop, but I am very very interested in what will come of all of this.

ps. Circle of the Moon's castle would need a significant overhaul because the default one is too zig-zaggy, and that's something the SoTN style gameplay on top can't fix as upsetting as it may be

MysticLord

How would one make the game harder and more interesting from a purely platforming perspective? Most of the rooms don't have a real gimmick besides run through and spam attack to kill things. How could you chain the various platforming/shapeshifting/movement mechanics together like people do with Super Mario World hacks?

azul120

Quote from: Vanya on November 21, 2022, 05:02:56 PMThis probably what I want more than anything.
To me having that content in the PSX version (and expanding upon it) would be my dream version of SotN/NitM.

Beyond that I would consider using this editor for a larger project like a remake of Circle of the Moon.

I'd like to see a properly optimized version of the Saturn port as well, though that would require someone more familiar with the hardware.

Weren't the sprites implemented as polygons given the quirks of the PS hardware?

VincentNL

I played both versions on hw back then and man, except for Maria boss fight and Human Face Tree enemy, the rest of Saturn exclusive new enemies and maps felt completely inconsistent to PSX SOTN art style and lazy copy paste of elements.

Cheering up OP again for such an awesome tool, I firmly believe modding community will come up with something much better for underground garden.

Midnight Metronome

This editor can't come soon enough. I will make a Sotn Redux. omg, can you pls make it so you can edit, create dialogue events and move sprites around for in-game cutscenes?