[Game Integration] Nakara - EDI Mod

Thanks your changes seem to have fixed it. Only nitpick I have is, when returning to the hub either from a game over or exiting the gallery scene, would be nice if it then reset the device position to some kind of home. 0 is pretty common.

That said, boy do I need to vent about this game lol. It is so frustrating because of how close to perfect it is for me :sob:.
The game is basically a roguelite with replay-ability and gorgeous art, and really is my ideal kind of game for modding with stroker devices. That is, EXCEPT for the fact that you can only get the NSFW scenes on a game over. If that one mechanic could be changed, then it would be great! And I believe it is possible to modify it to be changed that way:

Like @pjp40003 said, this game was made in GZDoom which is basically a game engine used for modding DOOM 1 and 2. But as we see here, you can also just make a standalone game out of it if you make all the assets. The scripting language it uses is ZScript, which is similar to Java or C#. The archive Nk.ipk3 can be directly edited using Slade, or unpacked with 7-Zip and directly edited.

So, I’d like to call on anyone familiar with ZScript, Java/C#, or just scripting in general to take a look (@to4st you’re also welcome to take a crack at this if you have time!). While I have not done proper Java in over 10 years, I am trying to comb through and learn ZScript to figure out what I would need to change to mod this game. It looks like the scripts that would need to be focused on are
player.zsc
monsters folder of scripts
sex folder of scripts
possibly the HSceneHandler.zsc as well

Here is specifically what I’d like to have changed:
When the player is hit by a melee attack from a monster girl (I don’t think it should apply to other ranged attacks like the arachne webshoot), in addition to losing a heart of health, the sex scene for that monster girl should play.
If player total health is above 50%, play ā€œFuckStage1ā€
If player total health is below 50%, play ā€œFuckStage2ā€
Then when the animation plays, the player has to mash F to escape. This logic already exists with the Prisoner enemy, so I feel that code could be repurposed. If the player does not escape by the time the animation ends, I think it should loop and another heart of health gets taken away (transitioning to ā€œFuckStage2ā€ if the loop causes the player to fall below 50% health).
If the player just decides to stay in the animation until they lose all health, then it proceeds to ā€œFuckStage3ā€ and then ā€œEjacā€ and so on like the normal game over, and then loops back to ā€œFuckStage1ā€ and goes through all the normal stages also like a game over, and the player can hit F to return to hub.
I think we can leave the behavior of getting killed the same, though maybe it starts at ā€œFuckStage3ā€ instead. Unsure about this.

In addition, some monsters should potentially have unique mechanisms for this. For example, I like the idea of when getting hit by the Direwolf, it still follows the same logic as above, but will randomly select one of it’s many scenes with the prisoners to play. It would then use the scene with the actual player on a game over (though maybe this could be made configurable).

The tricky part will be how this interacts with buffs. For example, there is a buff you get that auto-kills the monsters around you on first hit. Would need to decide whether to let that buff act like normal (and thus not get a scene for that hit), OR you still get a scene but no damage is taken and the monsters still all die when you exit the scene. Personally I am for the former.

Anyway, sorry for the long rant but I feel motivated to share my thoughts in the hopes that we can make this happen. I will continue to read through and learn at my own pace, but I want to work with anyone who may have the skills to make this happen, so hit me up!

5 Likes

well well well, i think thats kinda too much, it would be enough to just play the animation after every hit and return to the gameplay flawless.
Press ā€œFā€ to return to the game and if death Press ā€œFā€ to return to hub.. simple but enough to make it more enjoyable.
As far as I can tell, the game gives you on death an item which starts the hscene. I tried to mod it myself, got a damagehandler running but couldnt figure out how to start the hscene, so would be nice if someone knows what line of code starts the hscene :smiley:

1 Like

Look at the StartH() and StartReverseH() methods and where they are called

1 Like

Hey all,
So in my attempts to understand Nakara and ZScript better, I actually managed to get in contact with Redspike (the developer for Nakara). They are very supportive of people making mods, and offered to help answer questions about their code. However, they had this to say regarding making mods:

"Important — Please read this first.
Please be sure to inform any other modders about this as well.
This part is extremely important.

Please do not modify the game’s original .ipk3 file when creating a mod.
That file is the game itself, and distributing modified versions of it on other sites would count as illegal sharing.

If you create a mod, always make it as a separate .pk3 file, just like traditional Doom mods.

Please make sure your mod is created as a separate .pk3 file, not by editing the ipk3.

To run a mod, you can simply drag your .pk3 file onto nakara.exe before launching the game.
If that is inconvenient, you may also use any GZDoom-based mod loader."

I am new to GZDoom and wasn’t aware of this, but it makes sense. the .ipk3 file basically has everything in it.
@pjp40003 In order to avoid illegally sharing Nakara here, you will need to move your code to be on a seperate .pk3 file. I think this should make it easier to update the mod whenever Redspike updates their game as well. But wanted to make you and everyone else here aware of this in case you were not already.

5 Likes

Thanks for the clarification. I’ve revised the mod and uploaded it again. It should work the same as before, simply run GameMonitor.exe

4 Likes

Do you think the developer would be keen on adding brand new animations/variations into the game to support your modding idea? It would be cool to have variations upon getting hit then once defeated having the actual animations.

Others have already asked the dev for more variations of existing monsters. I think me asking for that would be more appropriate if I can actually achieve what I’m trying to do. I agree that would be awesome, but I also know the dev is cooling down from working on the game so much, as it was affecting their health.

1 Like

How can you connect this to an OSR2? I am having trouble getting the device to connect to EDI

I only have a Handy so I can’t help you with this problem. You can maybe find a solution in the EDI topic here for example.

You will need to go into the ā€œEDIConfig.jsonā€ and make sure ā€œEnableMultiAxisā€ is set to true. Then you just set the COM port in EDI to match the COM port your OSR is connected to

Gotcha, I set that to true but I still can’t connect. do I need to do anything with buttplug.io since I am using an OSR2? Or should I just have to open EDI, connect the correct COM port, and start the game?

Did you ever get anywhere making a mod for this?

Farthest I got was getting the game to fade to a black screen on enemy hit :sweat_smile:
On top of needing to learn ZScript, I am an amateur at programming, so I kindof got stuck. I’ll eventually go back in and keep trying.

you are my hero!

does anyone know how to solve this, when i go in the gallery, sometimes when transitioning between scenes for a particular monster, there is significant delay and the handy will pause between each scene, is this a mod issue or edi issue?

sounds like a script upload delay. this is to be expected as each scene has the script uploaded at scene play time with this game i think.

If you are connected via WiFi that’s probably the reason in my experience. Usually I find that for games, especially ones with reactions or sudden interruptions, Bluetooth connection is usually better. WiFi is more precise especially for fast or complex scripts, but it takes it a second to upload compared to Bluetooth which can respond very quickly. Of course I haven’t done any testing it’s just a trend I’ve noticed with EDI games.

I see for clarification since I am new to game integration does it mean I simply turn on bluetooth on my PC?

Is there any way to make the script loop until it changes to a new scene? What happens currently is there is a pause somewhere in between each scene

not really, not unless you extend the time it goes, or you change the mod to not stop till it changes. at least from what i can see. there will always be a pause while its uploading to the handy.