What's new

VN/TEXT RPG Active NTR [Makura cover soft] Dungeon and Bride


Does anyone know how to open url and/or how to open txt file from krk game?
Is there any English documentation for krk?
 
Does anyone know how to open url and/or how to open txt file from krk game?
Is there any English documentation for krk?

Read the file?
Code to load a text file into an array by lines:
Code:
var lines = [];
lines.load(System.exePath + filename);
Use System.exePath to read a file from the same folder as the main exe. Without a path, it will load the file from the data folder or one of the .xp3 archives.

You can open the URL in the system browser:
Code:
System.shellExecute(url)
But if you need to download a file and read it, then it is probably impossible by default without plugins or using external programs to download the file, like writing a PowerShell script to download the file, run it with
Code:
System.shellExecute("download.ps1")
and then read downloaded file with load. I never tried this, so not sure if it will work.
 
Last edited:
Read the file?
Code to load a text file into an array by lines:
Code:
var lines = [];
lines.load(System.exePath + filename);
Use System.exePath to read a file from the same folder as the main exe. Without a path, it will load the file from the data folder or one of the .xp3 archives.

You can open the URL in the system browser:
Code:
System.shellExecute(url)
But if you need to download a file and read it, then it is probably impossible by default without plugins or using external programs to download the file, like writing a PowerShell script to download the file, run it with
Code:
System.shellExecute("download.ps1")
and then read downloaded file with load. I never tried this, so not sure if it will work.
I guess, to use System.shellExecute(url) I need to write a function and call the function from main menu, because I can't invoke it in main menu. Or can I? Is there any inline method to do so?

@select text="Where to buy the game" target=System.shellExecute(https://www.dlsite.com/maniax/circle/profile/=/maker_id/RG03103.html) does not work.
 
It depends on how the "select" macro is defined.
Probably something like this should work:
Code:
@select text="Where to buy the game" target=*openURL
*openURL is a label - named position in the code that should be executed, labels start with *.

And somewhere in the same script, it should be carefully placed not to break other code, on an empty line between some [jump ...] (or @jump ...) and label.
Code:
*openURL
[commit]
[iscript]
System.shellExecute("https://www.dlsite.com/maniax/circle/profile/=/maker_id/RG03103.html");
[endscript]
; return back to the menu
[jump target=*menu]

Instead of *menu should be a real label from this file, probably it will be on the top of the file (or next one after [return] or @return).
 
It depends on how the "select" macro is defined.
Probably something like this should work:
Code:
@select text="Where to buy the game" target=*openURL
*openURL is a label - named position in the code that should be executed, labels start with *.

And somewhere in the same script, it should be carefully placed not to break other code, on an empty line between some [jump ...] (or @jump ...) and label.
Code:
*openURL
[commit]
[iscript]
System.shellExecute("https://www.dlsite.com/maniax/circle/profile/=/maker_id/RG03103.html");
[endscript]
; return back to the menu
[jump target=*menu]

Instead of *menu should be a real label from this file, probably it will be on the top of the file (or next one after [return] or @return).
WORKS!!! THANKS!

Do you know how to use console? For example to see current variables?

Mtool allows viewing and editing some objects already, but not everything.
For example I tried to find specific character's Libido (an example). I knew the variable already, but can't find it in Object viewer/editor.

EDIT: It looks like the dev lost some files some time ago "ver 3.00(ファイル紛失。仕様も変えることにしたので、このバージョンは無かったことに)"
 
Last edited:
Do you know how to use console? For example to see current variables?

Comment lines (add "//" at start of line) @set (K2COMPAT_PURGE_DEBUG = 1) and @set (K2COMPAT_PURGE_CONSOLE = 1) at startup.tjs if there are such lines.
Run the game with the "-debug" argument like "game.exe -debug".
This should enable the console; you can just input variable names to check their values.
 
Comment lines (add "//" at start of line) @set (K2COMPAT_PURGE_DEBUG = 1) and @set (K2COMPAT_PURGE_CONSOLE = 1) at startup.tjs if there are such lines.
Run the game with the "-debug" argument like "game.exe -debug".
This should enable the console; you can just input variable names to check their values.
I think I did that, just the K2... variables were in different file (k2compat.tjs). I have a black dos-like debug screen, but no console...
The black screen seems read only.

@Alexander_rekaX :
here are sample censored files to test current decensoring tools on.
 
I think I did that, just the K2... variables were in different file (k2compat.tjs). I have a black dos-like debug screen, but no console...
The black screen seems read only.

I tested it, and the developer intentionally disabled the console.
Solution:
  • download k2compat_console.tjs, k2compat_modeless.tjs, k2compat_padcommon.tjs from
  • copy them to the "data/system" folder
  • initialize.tjs: replace var underDevelopment = (Storages.extractStorageName(System.exeName) == "krkr.exe"); with var underDevelopment = true;
"-debug" argument is not needed.

Looks like most data is stored in the game variable (GameMaster class from master.tjs).
For example, this will print or change bonus points in the character creation screen:
game.charaEdit.bonusPoint
Cannot remember if there is any way to output all object data to the console.
 
Back
Top