I can’t believe I didn’t know an easy way
Thank you for the insight! We are not familiar with Tyranoscripts, so this will be very helpful when modding other games.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
Some useful information discovered by @ZeroScripts :
TyranoBuilder can utilize “.tpatch” files to add additional data, or overwrite existing files, even if they’re still compiled in the .exe or app.asar. This allows us to include all the mod-specific content into a single file, which then can be easily added to the game.
The “.tpatch” file itself is simply made out of a .zip, containing all the necessary files in their original folder structure (e.g., [gamename]\tyrano\plugins\kag\kag.tag_ext.js), which is then changed to the extension .tpatch. The file must also have the same name as the game’s .exe and be in the same directory.
I’ve gathered and am testing quite a few Tyrano games now.
For most of them, I managed to get the integration working and it’s just a matter of making the scripts (since I’m new to scripting, this is gonna take me some time tho ).
Some of the games however, don’t just call or have video files, but instead use Live2D assets for the animation.
Other games, like MountBatten’s Aesop’s Fables (and maybe his upcoming game as well), even seem to use a combination of both, videos that are then called by .csv files in the scenarios.
@affqprow & @vylon do you maybe have an idea on how to intercept the animations in those cases?
The Tyranno builder seems to play the video with the mtn number in the model file.
When specifying the mtn number in the scenario file, it must be sent to the player.
But I’m sorry I don’t know how.
Thank you, that’s some quite useful info.
All live2d animations are handled in data/others/plugin/live2d/driver/index.js (included in live2d.tpatch)
beautify js using https://beautifier.io/, and add the code below to index.js line 3604.
scriptPlayer.playScript(
${this._modelSetting.getModelFileName().replace(“.moc3”, “”)}/${n});
I guess the hardest part here is scripting these motion files.
And maybe we need to filter out some models like Doris_Heart, Doris_goddess, Doris_talk.
Awesome, that’s gonna be a big help! Thank you
Looks like the formatting caused some issues with the apostrophe in code snippet you provided.
With a small change, I was able to intercept the animations as well.
Like you said, since many of the motion elements are playing at the same time, they’re interfering with the FunscriptPlayer.
So I’m only filtering out those models that we don’t want for the scripts.
Which then looks like this:
if (!this._modelSetting.getModelFileName().startsWith('Doris_goddess') && !this._modelSetting.getModelFileName().startsWith('Doris_Heart')){
scriptPlayer.playScript(`${this._modelSetting.getModelFileName().replace(".moc3", "")}/${n}`);
}
I’m currently working on a good way to script these motion files.
Still unsure about how to get the later parts of the game working tho, since the animations switch back to video files, instead of Live2D.
I think kag.tag_ext.txt patch + index.js patch can handle both video and live2d.
Not sure as I only tested the trial version.
I tried that before, but couldn’t get the video interception to work.
Turns out I had an issue with the code format as well and needed to adjust it a bit for this game’s unique structure.
So now just comes the hard part
MountBatten has been posting dev updates on their Ci-en. It looks like they’ve implemented english subtitle to the game. They also replied to a comment in English.
I’m not sure if there’s a chance of gaining their applaud on integrating scripts to the game. Just having video export of the scenes will make things easier.
Yeah hopefully this sequel will include a English version.
It would be great to have videos, or at least the full models for the Live2D scenes, because as it stands right now, they’re a real pain to script.
I think I found the way.
There is a tool called CubismViewerGems, which can convert motion files into video files.
- Load *.model3.json file (ex. data\others\plugin\live2d\model\Doris_ride\Doris_ride.model3.json)
- Load *.motion3.json file (ex. data\others\plugin\live2d\model\Doris_ride\motion\4_1_1_2.motion3.json)
- Select motion and click Record Animation button.
That’s all, there will be a .mov video file in the viewer directory.
Great find!
I actually used the official Live2DCubismViewer to play each motion while recording the screen. Then I split the video into all the animation segments.
The build-in recorder here is definately an improvement. Just the resulting recordings where pretty big .mov files and wouldn’t play properly for me, so I used MediaEncoder to convert them into H.264 .mp4 and that works great.
You still have to detect the end of each motion and play the next one manually, which of course causes some delays between the animations. So there will be gaps in the recording, which is not ideal.
The tool @affqprow mentioned is nice, since it detects the start/end of each animation and automatically records it as well.
But now that I have all the animations in separate files, it was not hard to just compile them all into one video.
Had to make some more adjustments to the code for the Live2D animations, but got it all working well now, so I’m not sure if it’s worth switching to EDI at this stage, even though I would like to give it a shot.
Just getting rid of most the delays/stuttering between animation-switching could be worth it.
I’m also working on a translation for the game, which is a lot more time-consuming than expected.
It would be very helpful if someone wants to help script the scenes!
The seperate videos files, as well as a full compilation (with the Definitions.csv) can be found here, if anyone’s interested:
In their latest dev log, MountBatten ditched the live2d method due to some position issues and resorted to using video files instead. @ZeroScripts @affqprow