Coder Social home page Coder Social logo

agent's Introduction

Agent

Text hooker with javascript.

Features

  • Based on script.
  • scripts repo with auto updater: https://github.com/0xDC00/scripts
    • Lib: yuzu, vita3k, ppsspp, rpcs3, Unity, MAGES, HCode,...
    • Tons of scripts supporting...
  • Minimalistic GUI, configless.
  • Command-line support.

Quickstart

Download: https://github.com/0xDC00/agent/releases
Videos: https://www.youtube.com/watch?v=dFfuq2UnKjU&list=PLTZXVVG9AT6Sbl1Yg42sxzVAS6IMfnaNH&index=2

Folder Structure

agent.exe               <-- GUI
-data
  ├─scripts             <-- user scripts (sync from repo)
  └─user-data           <-- Electron cache

Community

If you have contributions, need support, have suggestions,
or just want to get in touch with the team, join our Discord server!

Script request?, please open an issue at scripts repo

Showcase

  • [Yuzu] Tsukihime
    Tsukihime Remake
  • [Yuzu] Tokimeki Memorial Girl's Side: 4th Heart
    Tokimeki Memorial Girl's Side: 4th Heart
  • [PC] TyranoScript
    Tyrano

Credits

Special Thanks

Thank you!

agent's People

Contributors

0xdc00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

agent's Issues

Script not showing up using Yuzu

So when the agent is attached and I click to proceed with text it (idk how to word it) the script does not show up on agent. I tried redownloading/updating Yuzu also tried redownloading agent.
I do everything according to the guide and also used agent a few times back in June and didn't have this problem

Script frame won't show up but already attached with yuzu

Hi...already try different version of yuzu but the script frame still won't show up on yuzu emulator but the script in the agent still running...can suggest a solution? By the way, the game I'm playing is Tokimeki Memorial Girl's Side 4th Heart...thank you in advance

Old version

Can you upload the older version of the program?

registerblock not found

sorry, im trying to use the scripts in agent (i tried with the older versions and this new one) but when i put them so i can translate the games it appears an error that says registerblock not found and idk what to do, i hope there is a solution...

Register block not found

I'm having the registerblock erro when trying to run with Tsukihime version 1.0.1,
I tried it on Yuzu versions 996, 851 and 837.
My scripts are up to date, the agent version is 0.1.3,

MessageError: {
"type": "error",
"description": "Error: RegisterBlock not found!",
"stack": "Error: RegisterBlock not found!\n at getDoJitAddress (:127)\n at (:11)\n at call (native)\n at (:208)\n at load (/agent.js:1)\n at _loadModule (/agent.js:1)\n at (/agent.js:1)\n at require (/agent.js:1)\n at (:101)\n at call (native)\n at (:231)\n at load (/agent.js:1)\n at _loadModule (/agent.js:1)\n at (/agent.js:1)\n at main (/agent.js:1)\n at (/agent.js:1)\n at (/agent.js:1)",
"fileName": "",
"lineNumber": 127,
"columnNumber": 1
}
Stack:
Error: RegisterBlock not found!
at getDoJitAddress (:127)
at (:11)
at call (native)
at (:208)
at load (/agent.js:1)
at _loadModule (/agent.js:1)
at (/agent.js:1)
at require (/agent.js:1)
at (:101)
at call (native)
at (:231)
at load (/agent.js:1)
at _loadModule (/agent.js:1)
at (/agent.js:1)
at main (/agent.js:1)
at (/agent.js:1)
at (/agent.js:1)

Issues with using this alongside Yuzu

I tried to use this with Tantei Bokumetsu (https://vndb.org/v30317) on Yuzu emulator.

The OCR worked fine with the first sentence. MEMORY_MAPPED was enabled. Out of JIS, UTF-16, UTF-8, only the last one produced some results.

Followed the instructions but either they didn't show anything or gave the error "Error: Invalid byte sequence in conversion input
at onMatch (/agent.js:40:41)".

Error: RegisterBlock not found!

Error: RegisterBlock not found!
' at getDoJitAddress (:80)
at (:10)
at call (native)
at (:213)
at load (/agent.js:1)
at _loadModule (/agent.js:l)
_ at (/agent.js:l)
‘ at require (/agent.js:l)
} at (: 9)
at call (native)
J at (:116)
[ at load (/agent.js:1)
at _loadMod111e (/agent.js:1)
‘ at (/agent.js:1)
L at main (/agent.js:l)
2 at (/agent.js:1)
) at (/agent.js:1)

Running on linux

I can't run on Linux, it seems to me the Linux version is a pre-compiled binary. I imagine that is an Ubuntu binary and I'm on Manjaro.
It would be nice if it was packed in a distro-agnostic format like Flatpack, since I don't have the source code to compile myself.

P5R Steam Detach process

I get agent working on any other game but there is a issue with the steam version where it automatically detaches itself from the game after a successful launch and loading script.
image

NOTE: There is no downgrade for this game, only different languages in the manifests.

// ==UserScript==
// @name Persona 5 Royal
// @Version 0.1
// @author Koukdw & [DC]
// @description Windows
// * Atlus
// *

Run:

  • D:\Steam\steamapps\common\P5R\P5R.exe
  • D:\Documents\Japanese\Agent\data\scripts\PC_Steam_Persona_5_Royal.js
    Device: [local] Local System
    TargetPID: 12768
    [+] Script Init
    [+] Agent loaded: D:\Documents\Japanese\Agent\data\scripts\PC_Steam_Persona_5_Royal.js
    [*] Detached from process (reason=process-terminated)

No idea why it is doing this. I tried drag and drop but continues to detach from process with zero indication as to why.

How do I fix "DoJit not found!"

I haven't faced this issue before and I'm afraid it's causing the program to not work since no text is being copied to my clipboard :(.

Tsukihime english script

Can you please add the ability to extract the script for the English version (I mean the fan translation) of "tsukihime"?

Error: Emulated realm is not supported on this OS

So i was trying to play Kamigami no asobi Infinite on an emulator of psp , but when i tried to attach it gives me this error "Error: Emulated realm is not supported on this OS". The version of the psp emulator is 1.15.4 and agent is in v0.1.3 . So any solution to this?

Query regarding ExecutionWatch

So, I tried to find the D-Code of Tantei Bokumetsu 1.0.2 and was successful. I also had a pattern from before so it was easy to judge.

Now I am trying to find out the D-Code for Buddy Mission Bond (https://vndb.org/v30145) 1.0.1

It has shift_jis encoding.

I tried to follow your steps and found out 4 addresses
G307P8N2at
The third address showed instructions when I moved to the dialog B from A.

It had these many instructions with low count (address is different because CE crashed but I followed the same steps from before)
cheatengine-x86_64-SSE4-AVX2_kBotcMLuPY

For the time being, I selected the 4th one because it had similar pattern from your tutorial (movzx, byte ptr).

But I don't know where to stop. Is it [eax, address] ?
cheatengine-x86_64-SSE4-AVX2_Hrl8sn40js

So I have two questions regarding your explanation in wiki:

1. How do I find out the TerminatedPattern for a particular game?
2. In Step 3 from your tutorial where I am checking instructions, how do I decide the range of addresses to copy from memory viewer?

PSP scripts

Hello!
I have few (+/-50) PSP games but only one of these has script in Agent. Can I make such script from game files? Is it even possible?

The new Yuzu (12??+) broke some scripts.

The new Yuzu (12??+) broke some scripts.
FIX: Yuzu -> Configuration -> General -> Debug:
Tab Debug => check 'Enable CPU Debugging' (Advanced section)
Tab CPU => uncheck 'Enable block linking'
-> OK (apply changes -> restart game)
I am trying to hook tsukihime text from the game, yet when I try to attach the game to the agent, it just says the thing about broken scrpits and fix. I did the fix, but nothing has changed, I can't extract the text, what can I do?

(Updated scripts are checked)

OCRserver "10060, 'A connection attempt failed" error

The agent in it self runs, no problem there, but OCR function is not running.
I start the the OCR server, it gives those first 3 lines, and noting happens...
Agent gives, "Agent Overlay" lines in its translation window, and no translation occurs.
After a while if I click on OCRserver window and press enter it pops message :
An exception occurred: TimeoutError(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond', None, 10060, None)

I have read around on this python based server and this error occurs in other implementations, when server detects this python script as scraper...

I know this solution is easy to implement and all, but would it be possible to do OCR and translation with offline solution, like Abby OCR and some of the opensource translators? The results would not be on online translation level, but at least it would work reliably.

Using with wine

Is this usable with wine? Any steps, if documented?
Thanks

Question regarding finding the D-Code

Hi, I am very new to Cheat Engine and Agent in general, and I would like to learn more.

In the first step of finding D-Code, it says to Save State at any dialogue (A).
And later on it says to Load State

The problem is: I haven't the slightest clue how to, and google hasn't been of much help.
I would really appreciate any assistance.

[Feature Request] Remember last configuration

Love the work on this. I'm trying to get these two boxes to remember what they were last set to, as it's kind of tedious to have to set them both every time you want to play a game.

image

Cannot read property "length" of undefined

I've been playing Tsukihime with yuzu and agent for the past few days and it's been running fine until today where I got this message when trying to attach agent

TypeError: cannot read property 'length' of undefined
at keys (native)
at setHook (E:\japanese\texthooker\agent\agent-v0.1.3-win32-x64\data\scripts\libYuzu.js:309)
at (E:\japanese\texthooker\agent\agent-v0.1.3-win32-x64\data\scripts\NS_01001DC01486A000_Tsukihime.js:115)
at call (native)
at (/agent.js:1)
at (/agent.js:1)
at (/agent.js:1)
at main (/agent.js:1)
at (/agent.js:1)

I've deleted and reinstalled yuzu, agent and the scripts but nothing changed. does anyone know how to fix this?

13 sentinels script (yuzu) doesn't retrieve text in some cases

For the 比治山隆俊 character, his second scene with delinquents (1985年廃工場裏/0%). The protagonist's phrases are captured by the Agent, but the text that other characters produce is not captured. Agent produces the error message for them:

onEnter name 2 (speech bubble)
onEnter dialogue 2 (speech bubble)
Error: access violation accessing 0x25c66800000
緒方稔二

System: Windows 11,
script 1388|yuzu 1675 | 十三機兵防衛圏 (64-bit) | 1.00 | AMD
Agent Version: 0.1.3
Yuzu version 1675 (2024-01-07)

Error: RegisterBlock not found!

So i was trying to play Fate extra ccc on an emulator of psp , but when i tried to attach it gives me this error "Error: RegisterBlock not found!". The version of the psp emulator is 1.15.4 and agent is in v0.1.3 . Anyone knows how to solve this ?

CLI no longer launches & attaches to game automatically

The first 1.3 version this still works. In the latest 1.3 version you now manually have to click attach using the same script that still works in a previous build.

start agent --target="C:\Users\x\AppData\Local\yuzu-windows-msvc\yuzu.exe" --args=" -g \"A:\Games\Switch\yuzu\WITCH ON THE HOLY NIGHT version v0 (BASE).nsp\"" --script="A:\Games\Switch\agentnew\data\scripts\NS_010012A017F18000_Mahoyo.js" exit

Issue with finding an address of text string

I was testing agent with RPCS3 and was able to pick a D-CODE for Disorder 6 (BLJM61067), but stuck at the first step doing the same for Harem Tengoku da to Omottara Yandere Jigoku Datta (BLJS10266, https://vndb.org/v14536).
It seems that the game uses an encoding different from shift-jis, utf-8, utf-16 or utf-32, so I couldn't find address of an text string in memory.
Will there be a solution for this?

RegisterBlock Not Found

I get the error register block not found while trying to texthook into the new Chaos Head Noah PC port using the latest version (1.3). Here is the error message:

Error: RegisterBlock not found!
at getDoJitAddress (:162)
at (:22)
at call (native)
at (:243)
at load (/agent.js:1)
at _loadModule (/agent.js:1)
at (/agent.js:1)
at require (/agent.js:1)
at (:11)
at call (native)
at (:249)
at load (/agent.js:1)
at _loadModule (/agent.js:1)
at (/agent.js:1)
at main (/agent.js:1)
at (/agent.js:1)
at (/agent.js:1)

yuzu gets closed

hi sorry for bothering again...i have a new problem when i try to translate one of the games in yuzu and its that when i start the game to translate it yuzu gets closed and idk if its because i need a new or an older version of yuzu (i have yuzu 1157)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.