News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: DSVania Editor (v1.6)  (Read 19519 times)

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #180 on: November 16, 2017, 05:30:04 pm »
Progress update on HoD:
It seems HoD has a feature not in the other games: room states. When a certain event flag is set, a room can choose to swap itself out for a totally different state. This can allow a room to change the tiles, entities, doors, everything inside it. I got these different states displaying now so you can edit each of them:

I've also gotten more standard features like the tileset editor, music editor, map editor, shop editor, text editor, and adding new entities working.

In the process of supporting HoD I also fixed a few bugs in AoS support, like the chaotic realm backgrounds not displaying at all, the music editor saving the music indexes incorrectly, and the tileset editor crashing when saving changes.

By the way, I've added a door editor UI to DSVEdit so you don't need to use Tiled for that, and it also lets you visually position where in the destination room the door places you by dragging around an orange rectangle, rather than needing to do hexadecimal math:


I already made sereval hacks of Metroidvania before.But with the help of DSVania Editor,I successfully made my best hack of Castlevania AoS:
http://www.romhacking.net/hacks/3696/
I wanted to build my own castle long before.Now I realized it!!
Thank you very much!!

You're welcome! I'm glad you like it and were able to make a hack with it!

What you made was a real blessing lunatic, thanks for this great work, but i have a few questions.
Is there a way to put OoE and Dos
Background music into por?

I've tried replacing the music like that a couple times before. The only program I can find that replaces music files in the SDAT file is Tinke, but when you do so, the song you replaced just winds up sounding like silence.
VGMTrans is capable of extracting music files and converting them to MIDI successfully, but it can't import anything back in.
Maybe I'm just using these programs wrong? I dunno.


And also, a few subweapons from Jonathan which i want to use with Richter, use Jonathan's voice itself making the use of it with Richter weird, can i disable Jonathan's voice for the sub?

Unfortunately voices are hardcoded for most skills.
You'll need to go into the asm code of each skill you want Richter to use and find the line that calls PlaySfxAtPos (function 0204D5FC) to play Jonathan's voice, and make an armips patch to modify all these.
If you want to remove the voice regardless of who is using it you can just nop that call out. If you want Jonathan to still use his voice but not Richter, you could make a custom function that plays the voice if you're Jonathan but does nothing if you're Richter (or plays Richter's voice), and then replace each skill's PlaySfxAtPos call with a call to this new function instead.


And one last thing, i can actually add a jumpkick to Richter, but he uses the Chuck Norris spin kick instead of his actual jumpkick included in this game, is there a way to point his jumpkick animation to the jumpkick?

Yes, I found how to edit that a while ago, but DSVEdit doesn't have a UI to edit it yet so you'll need to use a hex editor.
First, if you have DSVEdit open, either close it or save your changes.
Then open up the file /ftc/overlay9_0 in your project directory with a hex editor. Jump to offset 50583, which has which animation Richter should use when jumpkicking straight down. The byte right after it at 50584 has the diagonal one.
By default they both are 0F, which you can see is the chuck norris spin kick if you look at Richter in the sprite editor. You can change both of them to 11, which is that jumpkick animation not used in the game. Save the file and build the rom, and now Richter should use that animation when jumpkicking. That animation already has the hitboxes set up correctly so it damages enemies too.

However, you'll notice there is one problem with using this animation:

Richter puts his leg back in instead of keeping it extended the whole time. I guess they didn't fully set up the animation.
To fix this, we need to edit the animation itself. To do this you need to export Richter's sprite to an external program called darkFunction Editor, edit the animation, and import it back ingame.

Open DSVEdit's sprite editor, select Richter in the Other tab, and press "Export to darkFunction". In darkFunction, find where you have DSVEdit on your hard drive, and open up the file: /darkfunction_sprites/p_0s_ric/p_0s_ric.anim
Select animation 11 and you'll see it has three frames/cells: Richter with his leg in, then with his leg extended, then back in. Select the third one and press the red minus key to delete it.
Save the file, and back in DSVEdit press "Import from darkFunction". That's it, Richter should now keep his leg extended the whole time he's jumpkicking:


And please keep it up, awesome work!
P.S.
I found out what unknown 6 in por's character editor does, it fully plays the double jump animation even if not fully executed (was made for charlotte's witch broom riding, so she's still riding it while falling).

Thanks! I couldn't figure out what that one was.

MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #181 on: November 16, 2017, 06:57:24 pm »
Thanks, now that you've shown me to point animations, i can make a LOT with Richter, i could cry for happiness.
Also i want to mention that something weird happened to my shop in por...
I made a lot consumables buyable, for example caviar, foie gras and so on, after that i noticed that i removed quest stuff, so i resetted the hack.
After that, going to the shop, i found still all consumables buyable PLUS all standard stuff.
The shop has now more items as possible in my game because of the save, so theoretically, is it possible to ADD stuff to the shop instead of just replacing them?
If you want to check it out i could try to upload my save file somewhere, so you can check it out by yourself if you're not believing me, but it was very surprising.

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #182 on: November 16, 2017, 10:10:40 pm »
Thanks, now that you've shown me to point animations, i can make a LOT with Richter, i could cry for happiness.
Also i want to mention that something weird happened to my shop in por...
I made a lot consumables buyable, for example caviar, foie gras and so on, after that i noticed that i removed quest stuff, so i resetted the hack.
After that, going to the shop, i found still all consumables buyable PLUS all standard stuff.
The shop has now more items as possible in my game because of the save, so theoretically, is it possible to ADD stuff to the shop instead of just replacing them?
If you want to check it out i could try to upload my save file somewhere, so you can check it out by yourself if you're not believing me, but it was very surprising.

Oh right, for some reason the shop actually stores which items are unlocked in your save file. I have no idea why they coded it like this, seems pretty unnecessary since they could just rely on checking which shop pools you have unlocked when entering the shop.

It should be possible to add new items to the shop. It will require me to code logic to repoint each shop pool to free space so there's room for new items, and that free space will probably have to be in the free space overlay added via Tools -> Add Overlay. It's a low priority but I'll definitely do it at some point.

MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #183 on: November 17, 2017, 01:18:16 am »
Thanks you're my hero.
Sorry to bother again lunatic, but the equipment's special effects, like the sage ring's mp restoration boost, is it also hardcoded?
Also, Jonathan and Charlotte are the only characters that are blinking very annoyingly after switching, can this be turned off somehow? Or is it just a palette that changes very quick like fake Trevor's whip?
I would like to get rid of this blinking.
Thanks in advance.
« Last Edit: November 17, 2017, 05:15:45 am by MaverickZero »

ikusatatsu_ushiromiya

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #184 on: November 17, 2017, 09:17:19 am »
I found a bug: When I change the room size in DoS, the game will freeze. In AoS, there is no problem. I try to build another castle in DoS, just like what I did in AoS.

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #185 on: November 17, 2017, 11:31:10 am »
Thanks you're my hero.
Sorry to bother again lunatic, but the equipment's special effects, like the sage ring's mp restoration boost, is it also hardcoded?

Yes, those are hardcoded.

Also, Jonathan and Charlotte are the only characters that are blinking very annoyingly after switching, can this be turned off somehow? Or is it just a palette that changes very quick like fake Trevor's whip?
I would like to get rid of this blinking.
Thanks in advance.

It is a palette that changes quickly, but somewhat surprisingly it's not hardcoded. Apparently "Palette unknown 1" in the player editor is whether to use blinking for each player, and you can just change it to 0 instead of 1.

There is one side effect of doing this which is that Charlotte's outline is now green instead of black. But you can change the palette easily, just select Charlotte in the sprite editor and click "Open in GFX Editor". Then click on the second color from the left and you can change the color to black.

I found a bug: When I change the room size in DoS, the game will freeze. In AoS, there is no problem. I try to build another castle in DoS, just like what I did in AoS.

Specifically which room did you change the size of? I tried making a couple rooms bigger but they worked fine with no crash.


MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #186 on: November 17, 2017, 01:15:02 pm »
Thanks, for the help with the palette lunatic, and with everything else, thanks to you i was able to manage myself to everything except the background music thing (not that bad) and the sub voice thing (working on it,even though i know nothing about asm), but here is the ultimate task.
It's always been my dream to play Charlotte in por like in hd, use spells while in mid air(possible now) and don't have to wait for your spell charge, and here is what i want to ask you,
The first bar can be set to 0 frames til release, but there is still that other bar, i want Charlotte to be able, even as my partner to use her spells at full charge.
Please, help me with that.

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #187 on: November 17, 2017, 03:43:19 pm »
Thanks, for the help with the palette lunatic, and with everything else, thanks to you i was able to manage myself to everything except the background music thing (not that bad) and the sub voice thing (working on it,even though i know nothing about asm), but here is the ultimate task.
It's always been my dream to play Charlotte in por like in hd, use spells while in mid air(possible now) and don't have to wait for your spell charge, and here is what i want to ask you,
The first bar can be set to 0 frames til release, but there is still that other bar, i want Charlotte to be able, even as my partner to use her spells at full charge.
Please, help me with that.

This is easy to do with asm, since all spells share code that sets the same base multiplier (1x) and then when fully charged they all get the same amount added to that (+1, for 2x). (This multiplier is what doubles their damage, as well as the size and number of certain projectiles.)
So if we change the base multiplier to 2x, and reduce the amount added to 0, then both half charged and fully charged spells will behave fully charged.

Here's the patch: https://github.com/LagoLunatic/DSVEdit/blob/master/asm/por_spells_always_fully_charged.asm

To apply this patch to your hack:
* Download ARMIPS: https://buildbot.orphis.net/armips/
* Open your project folder
* Copy armips.exe and the asm file I linked into that folder
* Open a command prompt in that folder and type in: armips.exe por_spells_always_fully_charged.asm
That applies the patch to your project.

Random side note: If you wanted to, you could change the base multiplier to 2x, but keep the amount added at the 1 instead of 0, which would give spells a 3x multiplier when fully charged. If you do this they'll do triple damage, and many spells will look visually larger or have more projectiles than would normally be allowed in the game. Like these for example:

Pretty OP, but cool looking.

---

Also, for the subweapon voices: Here is an example asm patch that removes Jonathan's voice when using Ricochet Rock:
Code: [Select]
.nds
.relativeinclude on
.erroronwarning on

.open "ftc/overlay9_0", 021CDF60h

.org 0x02210060 ; Where Ricochet Rock's code calls PlaySfxAtPos for Jonathan's voice.
  nop ; Remove it

.close

The exact process of making this asm patch is as follows:
Pick a subweapon, and first find where its code starts by looking at it in the item editor. Ricochet Rock's code starts at 0220FCB8.
Then, using No$GBA Debugger Version, open the built_rom_por.nds made by DSVEdit.
Go to address 0220FCB8. Then start scrolling down looking for places where the code says "bl PlaySfxAtPos". This is where the subweapon is playing a sound effect, but there will probably be more than one since subweapons usually make more sounds than just the voice. So try replacing these lines with "nop", and then use the subweapon. If it got rid of Jonathan's voice, you found the right place! If not, try again until you find the correct one. For Ricochet Rock, the correct line to remove is 02210060:


So once you know where the code you have to change is, you can add these two lines to your asm patch:
Code: [Select]
.org 0x02210060
  nop
Repeat that for every subweapon and they should no longer play a voice.


MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #188 on: November 17, 2017, 04:15:34 pm »
Can i also mute the change character voice clip with this somehow? My hack focuses on playing with the character's of your choice in storymode, so it's weird if Jonathan let's Maria take the lead but calls Charlotte.
And thanks. You made a dream come true and made around 90% of my hack right now, seriously thanks.

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #189 on: November 17, 2017, 05:23:06 pm »
Can i also mute the change character voice clip with this somehow? My hack focuses on playing with the character's of your choice in storymode, so it's weird if Jonathan let's Maria take the lead but calls Charlotte.
And thanks. You made a dream come true and made around 90% of my hack right now, seriously thanks.

It appears that the character switching voice lines are not hardcoded. Surprisingly, there's actually a whole list of which voice to play when switching from each character to each other character, like Jonathan->Jonathan, Jonathan->Charlotte, Jonathan->Stella, etc, for 49 different possible combinations.

To change the Jonathan->Charlotte one, go to 5027E inside /ftc/overlay9_0. Change C9 05 to 00 00 to remove the voice.

MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #190 on: November 17, 2017, 05:55:55 pm »
And what would i have to set to 0 i f i want to remove Charlotte's voiceclip as well?
And also, believe me it's pretty hard for me to ask that after asking that much, but do you have other patch formats for me, maybe?
It doesn't seem to be working on my laptop.T.T It says some kind of data is missing and armips wouldn't launch.
Again a Thousand thanks

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #191 on: November 17, 2017, 06:18:15 pm »
And what would i have to set to 0 i f i want to remove Charlotte's voiceclip as well?

That one's at 5028A.

And also, believe me it's pretty hard for me to ask that after asking that much, but do you have other patch formats for me, maybe?
It doesn't seem to be working on my laptop.T.T It says some kind of data is missing and armips wouldn't launch.
Again a Thousand thanks


Here's an IPS patch for the spell charge thing: https://www.dropbox.com/s/kqj573bfi24f8rm/overlay9_0.ips?dl=0
But you're going to need armips to make your own patch to modify subweapon voices.

What is the error you get with armips?

I suspect your computer can run armips, since DSVEdit runs it a lot, like any time you do Build and Test, or Set as starting room, so unless those features crash DSVEdit for you armips is working.
Maybe your computer can only run the 64bit version of armips? If you go into DSVEdit/armips there's a armips64.exe you can try and see if that works instead of the armips.exe you downloaded (which is 32bit).

ikusatatsu_ushiromiya

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #192 on: November 18, 2017, 03:49:07 am »
The first room in the lost village, when I change the size from 2X1 to 3X1.
Then when I attack in this room, the game crash.

MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #193 on: November 18, 2017, 06:34:04 am »
No, the 64 bit version say's from the start i need to use 32 bit.
But once i try to open the exe with the asm patch you gave me, it says that "api-ms-win-crt-runtime-l1-1-0.dll" is missing, so the program cannot start.
The only sub voice things that are bothering me are, jonathans cross, javelin and riccochet rock.
I want them to be like the shuriken, the shuriken play's only jonathan's voice if used by jonathan, if you use it with richter, no voice will play,
Is it impossible to do with just hex?
And thanks again with the other stuff, worked everything  :)
« Last Edit: November 18, 2017, 08:36:54 am by MaverickZero »

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #194 on: November 18, 2017, 11:51:17 am »
The first room in the lost village, when I change the size from 2X1 to 3X1.
Then when I attack in this room, the game crash.

Nope, I still don't get the crash:


Can you send me an IPS patch of your hack so I can look into the cause of the crash?

No, the 64 bit version say's from the start i need to use 32 bit.
But once i try to open the exe with the asm patch you gave me, it says that "api-ms-win-crt-runtime-l1-1-0.dll" is missing, so the program cannot start.
The only sub voice things that are bothering me are, jonathans cross, javelin and riccochet rock.
I want them to be like the shuriken, the shuriken play's only jonathan's voice if used by jonathan, if you use it with richter, no voice will play,
Is it impossible to do with just hex?
And thanks again with the other stuff, worked everything  :)

Google says you need this windows update if you're missing that dll: https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

Using a hex editor to change asm code is possible but it's a pain so I don't recommend it. What you would need to do is change the code in No$GBA, see what No$GBA changed the bytecode to by going to the same address in No$GBA's memory view, calculate the offset of that address within the file (overlay9_0), and manually copy over the bytecode into a hex editor one byte at a time.

MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #195 on: November 18, 2017, 01:24:36 pm »
How do i calculate the offset of that address for overlay 9?
I tried following your example with the ricochet rock, and everything worked perfectly so far, but i don't know how to find it's address for overlay 9.
Please help one more time :-[.
And if not too much explanation is needed, can i raise the lentgh of the ricochet rock's path?
In sotn it bounced off pretty often, but in por it bounces only one time off from a wall and disappears then...
« Last Edit: November 18, 2017, 02:11:34 pm by MaverickZero »

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #196 on: November 18, 2017, 02:21:30 pm »
How do i calculate the offset of that address for overlay 9?
I tried following your example with the ricochet rock, and everything worked perfectly so far, but i don't know how to find it's address for overlay 9.
Please help one more time :-[.

I have the locations that overlays are loaded into RAM documented here: https://github.com/LagoLunatic/DSVEdit/blob/master/docs/lists/PoR%20Overlays.txt
Overlay 0 is loaded at 021CDF60 in RAM, so if you take an address inside overlay 0 and subtract 021CDF60 from it you get the offset in the file (e.g. 02210060 - 021CDF60 = 42100).

And if not too much explanation is needed, can i raise the lentgh of the ricochet rock's path?
In sotn it bounced off pretty often, but in por it bounces only one time off from a wall and disappeared then...

The duration in frames it lasts is at 0220FD14 (this is also in overlay 0, so subtract 021CDF60 to get the offset, 41DB4).

MaverickZero

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #197 on: November 18, 2017, 04:24:03 pm »
Thanks, now i could REALLY handle everything, and yet another thing...
Do you know how to point Richter's
Subweapon shortcuts?
I want to replace Richter's cross with Jonathan's and his grand cross with the ricochet rock.
Thanks, in advance.
« Last Edit: November 19, 2017, 12:19:05 pm by MaverickZero »

ikusatatsu_ushiromiya

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #198 on: November 18, 2017, 11:27:19 pm »
I think I found the reason. I use a save data which has out of the castle many times. When I start a new game, there is no problem.

LagoLunatic

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: DSVania Editor (v1.6)
« Reply #199 on: November 19, 2017, 02:07:15 pm »
Thanks, now i could REALLY handle everything, and yet another thing...
Do you know how to point Richter's
Subweapon shortcuts?
I want to replace Richter's cross with Jonathan's and his grand cross with the ricochet rock.
Thanks, in advance.

Coincidentally I found the quickswap subweapons lists recently, Richter's is at 0221E2CC.
You may be interested in my PoR RAM map where I list all these various things I find: https://github.com/LagoLunatic/DSVEdit/blob/master/docs/PoR%20RAM%20Map.txt

I think I found the reason. I use a save data which has out of the castle many times. When I start a new game, there is no problem.

Ah, the memory corruption glitch. Yeah, that can have some strange side effects.