• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.
3.40 star(s) 14 Votes

derakino999

Well-Known Member
Sep 30, 2017
1,081
524
OK, I fixed the crash. Updated my previous post's MEGA link with an updated trainer. [new trainer]
holy fucking shit!
yea it works now thank you very much for this this is AWESOME
BUT HOW
it even acknowledges clothing status
what is this sorcery!?
how did you do this!?!?
like, seriously, is it very complicated for the average guy? cuz well, i have other ideas in mind, or even just for learning and future reference
 
  • Like
Reactions: Christin Eleven

JoeTermin

Member
Dec 24, 2017
155
801
holy fucking shit!
yea it works now thank you very much for this this is AWESOME
BUT HOW
it even acknowledges clothing status
what is this sorcery!?
how did you do this!?!?
like, seriously, is it very complicated for the average guy? cuz well, i have other ideas in mind, or even just for learning and future reference
This is reverse engineering, you have to play with CE, change variables, look at what happens, look at which code access these variables, try to change the code etc. and make sense out of the program. There will be a lot of trial and error and often you'll have to combine several tricks and idea at once. Saying this is "very complicated for the average guy" is probably an understatement. I think it's probably very complicated even for the average programmer.

The worst part is that it's not something that can be taught as it's mostly intuition. There's no well-defined process to reverse-engineer a game. You can do the CE tutorial to get the basics, but there will be a very steep learning curve once you try to apply that to an actual game. I can also explain you how this specific trainer works: it basically replaces the part of the game's code triggered when the enemies catch the heroine, with a few new assembly instructions. My new instructions access 2 of the game variables: one named "H_scenestart" (controls when to start the H-scene) and one named "H_scene" (that controls which scene to play, it's where I put the ID of the atk sprite variants). If you set these variables in the right function, there's not much more to do, eg. the handling of clothes is already built in the game (eg. "spr_H_basilisk_atk" is the name of the sprite I pass, then the game appends _underwear to it automatically and it will trigger the actual final sprite "spr_H_basilisk_atk_underwear").

Now this is how the trainer works but the hard part wasn't to write this, rather it was to find the variables and functions in the first place, in particular, the game makes heavy use of pointers. The good news is that I've already done most of it for this game so you can reuse a lot of my existing code.

I'd recommend you to start with the cheat engine tutorial until step 7, or at least step 6. If you don't succeed step 7 you won't be able to write any sort of mod, but you can still use CE to change basic things like HP etc. Then once you're done with step 6/7, run Moon Rhapsody with the Cheat Table I shared previously. I already managed to get all of the pointer offsets to the GameMaker variables and their name, for example, HP is around the begininng:

1705852061206.png

and the Hscene and Hstart variables I mentioned previously are under 'obj_game':

1705852739318.png

I've also managed to dump all the script names and their location in the code, attaching the file.

Now for example, say you want to write a mod that regenerates HP over time. You'd look for the function "obj_game_Step_2" in this file ("step_xxx" are the gameMaker "Update()" functions, run once per frame, for each object).

1705852913979.png

The file says it's at Moon Rhapsody.exe+130dd86 , so for example, we can go to this address, and add auto-assemble to inject code that retrieves the "hp" variable above, and increments it.
 
Last edited:

malodorous

Member
Dec 28, 2016
107
105
also I saw someone else either delete or reduce the repetitive "impact" sound during the scenes so you could hear the voices better, that could be great as well as part of the mod
 

derakino999

Well-Known Member
Sep 30, 2017
1,081
524
Holy shit Joe, thank you very much for the thorough explanation. This is indeed quite difficult, and it's so amazing that someone as knowledgeable as you came to the game and gave us this awesome mod gift.
IT really IS out of my league, but i'll try to study

The black filter he means is that thing where the whole screen darkens during the h scene except the h scene itself. Like the whole screen's brightness lowers so the CG is more visible, but that makes it so the tiny sprites are harder to see, i think that's what he wants
1705896358996.png 1705896265268.png
before h scene starts / after h scene starts

for example you can see how the sasha and undead sprites are darkened
everything gets darkened like this (this is the gallery so everything is black lol, but that's the idea)

I'm fairly certain that's done through code because i haven't found the sprite for it.
And what also makes me think that it's code is that during penetration and during climax, there is this graphics effect that turns the whole image into negative colors
like this
You don't have permission to view the spoiler content. Log in or register now.
and that must also be code i think because i couldn't find like a sprite that does this or something? as an overlay of sorts?

also I saw someone else either delete or reduce the repetitive "impact" sound during the scenes so you could hear the voices better, that could be great as well as part of the mod
That's done easily through undertalemodtool, you just find the SFX and reduce the volume to the number you want, even 0.
 
Last edited:
  • Like
Reactions: Artix0

JoeTermin

Member
Dec 24, 2017
155
801
Yes that filter is accessible through obj_game->"censor" in the table I shared previously. It starts at 0 and goes up to 0.95 as the background gets darkened. I can mod that, but I don't understand the ask, do you want it to stay at 0 ? or at 1 ? (above the game's normal maximum)

at 0:
1705939827439.png


at 0.95: (game's default)
1705939840062.png


at 1:
1705939858668.png


As for the image with inverted colors, yes that's also controlled by the game code, it simply applies an inverted filter to the current sprite. I roughly know how to control it.
 
  • Red Heart
Reactions: derakino999

Zorua/25830

New Member
Jul 14, 2019
3
4
Yes that filter is accessible through obj_game->"censor" in the table I shared previously. It starts at 0 and goes up to 0.95 as the background gets darkened. I can mod that, but I don't understand the ask, do you want it to stay at 0 ? or at 1 ? (above the game's normal maximum)

at 0:
View attachment 3286742


at 0.95: (game's default)
View attachment 3286745


at 1:
View attachment 3286748


As for the image with inverted colors, yes that's also controlled by the game code, it simply applies an inverted filter to the current sprite. I roughly know how to control it.
As such, it is the Sprite itself of the scene that is darkened, I attach a comparison with the Sprite outside the game vs ingame
 

JoeTermin

Member
Dec 24, 2017
155
801
As such, it is the Sprite itself of the scene that is darkened, I attach a comparison with the Sprite outside the game vs ingame
Yeah seems like the game applies a 0.5x alpha factor to the sprite. Unfortunately, I had a quick look and couldn't find where this factor is defined. Constants are typically hard to find in CE do I don't think I'll investigate more. I assume you already know this but if that helps you can set the opacity to 50% in your drawing software to mimic the render that will be in game (and put a dark picture in background)
 

Artix0

Member
Modder
Jun 26, 2017
301
307
Big ask here. Can anyone extract the in-game sprite scenes that happen when grabbed?
You can get all the sprites quite easily by opening the data.win file using UndertaleModTool - it will probably be a bit easier than someone sending you a specific few sprites, and also allow you to explore and grab any others you'd like ;)

See below, it's a nice intuitive UI with a list of sprites for you to browse on the left-hand side:

1706008305850.png
 

Mod Leaner

Member
Dec 1, 2019
282
201
Oh my god, this is 99% perfect.
The 1% remain is it'll pretty annoying to play if you must re-watch entire scene every time you lose.:eek:
 

HGEnthusisat

New Member
Aug 25, 2021
3
0
Besides the Basilisk and Undead anims, there's also the Incufly (Aroused) variant, did anyone here implement into their game?
 

Artix0

Member
Modder
Jun 26, 2017
301
307
Besides the Basilisk and Undead anims, there's also the Incufly (Aroused) variant, did anyone here implement into their game?
Not yet, but I will probably look at it for either Colormod (sometimes I tweak the scenes a little to taste lol) or for the Alt Scene mod I'm planning to do which will swap OG scenes with ones like sprite_ATK versions (handjobs etc.) or aroused versions (the Sasha BJ, the incufly one you mentioned etc.)

Not sure about other modders' plans, they might get there before me since Colormod is such a big project already! :D
 
  • Wow
Reactions: HGEnthusisat
3.40 star(s) 14 Votes