Git Product home page Git Product logo

ffxivpythontrigger2's Introduction

FFxivPythonTrigger

简介

  • FFxivPythonTrigger 是一个以 python 编写,提供基于事件回调触发其他事件的触发器框架
  • 你可以选择用任何你熟悉的语言编写插件 —— 只要最后可以对接上 python 的接口
  • 更多请参阅开发指南

注意事项

  • 使用本工具有导致账号遭封禁的风险
  • 随缘支持随缘更新
  • 出问题请提供相关log(默认位置为根目录InjectErr.log或是AppData/Core/log_xxxxxxx.txt
  • 仅处理最新版本的技术问题(出问题请先尝试更新)

食用方式

  • 需求环境:python 3.9.0+ x64 windows 版本
  • 安装py环境,官网:https://www.python.org/
  • 安装程序依赖 pip install -r requirements.txt ** 注入器自带依赖检测、安装,无需特意手动安装依赖
  • 运行injecter.py注入游戏
  • 游戏内操作相关请参阅:Command插件
  • 注意:版本初首次需要纯净注入,后续无需
  • 强烈推荐关闭游戏前输入/e @fpt close以退出本插件

插件一览

核心功能/依赖:

名字 介绍
SocketLogger 作为注入器和程序内核通讯的桥梁,用于传递程序日志
HttpApi 提供一个 http api 供其他程序调用本程序功能
ChatLog 读取聊天框信息,产生 chatlog 事件(todo:产生聊天框信息)
XivMemory 提供对于 FFXIV 相关内存操作的接口
XivMagic 提供对于 FFXIV 相关函数调用的接口
XivNetwork 产生网络相关事件
CombatMonitor 提供战斗分析功能(伤害分析相关)
Command 处理游戏内指令,并提供基础内核操作指令

功能插件:

名字 介绍
MoPlus 鼠标功能增强(未完成)
ActorQuery actor 查询
XivCraft 生产规划
ACTLogLines 对接ACT获取 logline 并且产生相关事件(未完成)
SendKeys 提供对本游戏传递按键的接口
Markings 提供游戏标点的接口

常见问题

如何启动默认加载插件:

有关中文用户名等:

  • 避免在python路径及fpt路径出现中文
  • 中文用户名默认安装会直接闪退,请自行解决
  • 非中文用户名也闪退请调整环境变量

遇到WinApi err code:5/6/299/etc.

  • 注入器调用api问题,目前未找到妥当解决方法,未来或重构注入器
  • 请尝试安装较低版本的pywin32,比如说 pywin32==228

如何多开注入:

  • 注入器支援 -p 参数指定pid e.g.python Injecter.py -p 12345
  • 目前关于多开还有一些端口问题需要自行处理

如何回报问题:

  • 提issue
  • Q群:社恐犯了暂时关闭

想到继续补充

ffxivpythontrigger2's People

Contributors

nyaoouo 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  avatar  avatar

ffxivpythontrigger2's Issues

注入时卡在waiting for initialization

log如下
Traceback (most recent call last):
File "", line 11, in
File "E:\BaiduNetdiskDownload\FFxivPythonTrigger2-master\FFxivPythonTrigger2-master\Entrance.py", line 7, in
from FFxivPythonTrigger import *
File "E:\BaiduNetdiskDownload\FFxivPythonTrigger2-master\FFxivPythonTrigger2-master\FFxivPythonTrigger_init_.py", line 11, in
from .FFxivPythonTrigger import *
File "E:\BaiduNetdiskDownload\FFxivPythonTrigger2-master\FFxivPythonTrigger2-master\FFxivPythonTrigger\FFxivPythonTrigger.py", line 16, in
from .CheckGitUpdate import get_last_update, check_update
File "E:\BaiduNetdiskDownload\FFxivPythonTrigger2-master\FFxivPythonTrigger2-master\FFxivPythonTrigger\CheckGitUpdate.py", line 82, in
can_check = test_url(domain)
File "E:\BaiduNetdiskDownload\FFxivPythonTrigger2-master\FFxivPythonTrigger2-master\FFxivPythonTrigger\CheckGitUpdate.py", line 26, in test_url
_storage.data['s'] = r.json()['\x49\x50'].encode('utf-8').hex(' ')
KeyError: 'IP'

5.4试了下FF14闪退,不清楚什么问题

[DEBUG] [2021-04-30 14:17:52.433|Main] address found [0x7ff7ee6b3540] [+0x93540] "frame_inject"
[DEBUG] [2021-04-30 14:17:52.445|Main] try load plugin "SocketLogger" dynamically
[DEBUG] [2021-04-30 14:17:52.504|Main] register plugin [start]: socket logger
[INFO] [2021-04-30 14:17:52.505|Main] register plugin [success]: socket logger
[DEBUG] [2021-04-30 14:17:52.506|Main] try load plugin "HttpApi" dynamically
[ERROR] [2021-04-30 14:17:52.525|Main] error occurred during import module:" HttpApi"
[ERROR] [2021-04-30 14:17:52.527|Main] error trace:
Traceback (most recent call last):
File "C:\Users\WorkStation2\Desktop\FFxivPythonTrigger2-master\FFxivPythonTrigger2-master\FFxivPythonTrigger\FFxivPythonTrigger.py", line 109, in register_module
module = import_module("plugins.%s" % module)
File "C:\Users\WorkStation2\AppData\Local\Programs\Python\Python39\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\WorkStation2\Desktop\FFxivPythonTrigger2-master\FFxivPythonTrigger2-master\plugins\HttpApi.py", line 2, in
from aiohttp import web
ModuleNotFoundError: No module named 'aiohttp'

[DEBUG] [2021-04-30 14:17:52.528|Main] unregister plugin [start]: socket logger
[INFO] [2021-04-30 14:17:52.858|Main] unregister plugin [success]: socket logger

你好,有个小问题

我记得以前是有Combo的,我现在还留着旧版本的Combo,我放到最新版本能继续使用吗 另外可以给一个dc链接吗谢谢!

CarefulObservation bug

plugins.XivCraft.simulator.Effects.CarefulObservation中没有定义buff回合数自减和触发后消失,在离线模拟器中导致了结果错误。

def after_round(self, craft, used_skill):
        if craft.current_progress >= craft.recipe.max_difficulty:
            craft.current_progress = craft.recipe.max_difficulty - 1

改为如下?没有深入处理流程,可能不对

    def after_round(self, craft, used_skill):
        self.param -= 1
        if craft.current_progress >= craft.recipe.max_difficulty:
            self.param =0
            craft.current_progress = craft.recipe.max_difficulty - 1
        if not self.param and self.name in craft.effects:
            del craft.effects[self.name]

注入时卡在waiting for initialization...界面,log如下

Traceback (most recent call last):
File "", line 9, in
File "", line 7, in
File "D:\FFxivPythonTrigger2-master (2)\FFxivPythonTrigger2-master\FFxivPythonTrigger_init_.py", line 11, in
from .FFxivPythonTrigger import *
File "D:\FFxivPythonTrigger2-master (2)\FFxivPythonTrigger2-master\FFxivPythonTrigger\FFxivPythonTrigger.py", line 12, in
from . import AttrContainer, Storage, Logger, FrameInject, Sigs, AddressManager
File "D:\FFxivPythonTrigger2-master (2)\FFxivPythonTrigger2-master\FFxivPythonTrigger\Storage.py", line 3, in
from typing import Annotated, Union
ImportError: cannot import name 'Annotated' from 'typing' (C:\Users\kanna\AppData\Local\Programs\Python\Python38\lib\typing.py)

您好,请问注入成功后想重载插件,但是flmport一直重载失败应该怎么解决.......

从6.1开始一直断断续续地在使用,这次和之前一样先启动国服卫月再启动fpt,电脑管家之类的都关闭了,Python安装路径也没有中文,但一直都显示flmport加载失败。关闭卫月再尝试fpt也不能解决,所以想询问一下解决方法。
log:[INFO] [2024-08-22 06:34:43.533|Main] FFxivPythonTrigger start initialize
[INFO] [2024-08-22 06:34:43.533|Main] game version:2024.07.19.0000.0000 game_exv:(6, 5, 0)
[DEBUG] [2024-08-22 06:34:43.555|Main] address load [0x7ff608eaa290] [+0x5a290] "StdStringInitialize"
[DEBUG] [2024-08-22 06:34:43.555|Main] address load [0x7ff608eaad50] [+0x5ad50] "StdStringDeallocate"
[DEBUG] [2024-08-22 06:34:43.555|Main] address load [0x7ff608eab450] [+0x5b450] "StdStringSet"
[DEBUG] [2024-08-22 06:34:43.556|Main] try load plugin "FImport" dynamically
[DEBUG] [2024-08-22 06:34:44.166|Main] register plugin [start]: FImport
[INFO] [2024-08-22 06:34:44.351|C:\Users\31510\Desktop\finalfantasy14 gua\FPT3\FFxivPythonTrigger3\plugins\FImport_init_.py:11] generating code, please login into game first...
[DEBUG] [2024-08-22 06:34:46.953|Main] register plugin [start]: FImport
[INFO] [2024-08-22 06:34:47.065|C:\Users\31510\Desktop\finalfantasy14 gua\FPT3\FFxivPythonTrigger3\plugins\FImport_init_.py:11] generating code, please login into game first...
[DEBUG] [2024-08-22 06:41:52.729|Main] register plugin [start]: FImport
[INFO] [2024-08-22 06:41:52.845|C:\Users\31510\Desktop\finalfantasy14 gua\FPT3\FFxivPythonTrigger3\plugins\FImport_init_.py:11] generating code, please login into game first...
[DEBUG] [2024-08-22 06:53:13.594|Main] register plugin [start]: FImport
[INFO] [2024-08-22 06:53:13.747|C:\Users\31510\Desktop\finalfantasy14 gua\FPT3\FFxivPythonTrigger3\plugins\FImport_init_.py:11] generating code, please login into game first...

XivCraft在游戏内呼叫不出来(TAT)

前面按流程操作,点开Injecter后提示
inject python environment success
search calling address success
initialize ingame python environment success
shellcode generated, starting to inject shellcode...
shellcode injected, FFxivPythonTrigger should be started in a few seconds
waiting for initialization...

在游戏内输入/e @fpt reload XivCraft 没有任何反应

在InjectErr中有一句"FFxivPythonTrigger.AddressManager.AddressSearchError: searching address of [frame_inject] is failed"

请问是怎么回事555

手动填写配方功能

大佬,之前在用FFxivPythonCraft做自写solver的效率模拟器,但是发现老代码bug比较多,而富婆糖里的recipe 和player又不方便像FFxivPythonCraft手动填写数值,大佬有空更新一个手动填写数值方便离线模拟的功能吗

XivCraft搓辉煌材料报错

[INFO] [2021-08-18 20:43:09.408|XivCraft] suggested skill '制作'
[DEBUG] [2021-08-18 20:43:12.177|XivCraft] use skill:制作
[DEBUG] [2021-08-18 20:43:12.177|XivCraft] ********** round 32 **********
player: (80) 2806/2890/657
recipe: 辉煌工具的第一次加工部件:炼金(rlv:514)
progress: 12089/12089
quality: 75378/75378
durability: 0/55
CP: 12/657
effects: 改革(2)
status: 通常


[INFO] [2021-08-18 20:43:12.334|XivCraft] end craft
[WARNING] [2021-08-18 20:57:05.983|XivNetwork/ProcessStatusEffectListEffect] message is too short to parse as status list:[a0010000fbbc1c10138e0110030000001400870200000f009d031d61000000000e505000410e0000410e000067029102000000006c011e000000f041000000e06a0114000000f041000000e03000f12800000000fbbc1c103100c0]
[ERROR] [2021-08-18 20:57:06.025|XivNetwork/BundleDecoder] Split message error:
Traceback (most recent call last):
File "E:\Tencent Files\7\FileRecv\FFxivPythonTrigger2-master\plugins\XivNetwork\BundleDecoder.py", line 171, in process
self.recall(msg_time, message[msg_offset:msg_offset + msg_len])
File "E:\Tencent Files\7\FileRecv\FFxivPythonTrigger2-master\plugins\XivNetwork_init_.py", line 233, in process_recv_msg
process_event(event)
File "E:\Tencent Files\7\FileRecv\FFxivPythonTrigger2-master\FFxivPythonTrigger\FFxivPythonTrigger.py", line 250, in process_event
if event.id in _events or '*' in _events:
AttributeError: 'NoneType' object has no attribute 'id'

[ERROR] [2021-08-18 20:57:09.742|XivNetwork/BundleDecoder] Invalid magic in header: {'magic0': 1281844057, 'magic1': 4253553543, 'magic2': 26575259, 'magic3': 8441382, 'epoch': 11436962612898203151, 'length': 385, 'unk1': 22784, 'unk2': 9885, 'msg_count': 20999, 'encoding': 41042, 'unk3': 65345, 'unk4': 18013, 'unk5': 32738}
[ERROR] [2021-08-18 20:57:29.732|XivNetwork/BundleDecoder] Invalid header length: {'magic0': 1101025874, 'magic1': 3796262399, 'magic2': 1298410111, 'magic3': 1975818619, 'epoch': 1629291447818, 'length': 0, 'unk1': 0, 'unk2': 0, 'msg_count': 0, 'encoding': 0, 'unk3': 0, 'unk4': 0, 'unk5': 0}
[ERROR] [2021-08-18 20:57:35.426|XivNetwork/BundleDecoder] unknown encoding type: 0x303
[ERROR] [2021-08-18 20:57:35.431|XivNetwork/BundleDecoder] too many msg in buffer!
[ERROR] [2021-08-18 20:57:48.740|XivNetwork/BundleDecoder] Invalid header length: {'magic0': 1101025874, 'magic1': 3796262399, 'magic2': 1298410111, 'magic3': 1975818619, 'epoch': 1629291467119, 'length': 0, 'unk1': 0, 'unk2': 0, 'msg_count': 0, 'encoding': 0, 'unk3': 0, 'unk4': 0, 'unk5': 0}
[ERROR] [2021-08-18 20:57:53.930|XivNetwork/BundleDecoder] too many msg in buffer!
错误发生于起手按完闲静后 就出现报错无法正常运行了
谢谢大佬!

注入时报错提示error5,并会杀掉游戏进程

(py3.9) PS E:\Github\FFxivPythonTrigger2> python Injecter.py
start searching for game process [ffxiv_dx11.exe]...
game process pid: 11676
Traceback (most recent call last):
  File "E:\Github\FFxivPythonTrigger2\Injecter.py", line 95, in <module>
    memory.write_bytes(shellcode_addr, shellcode, handler=handler)
  File "E:\Github\FFxivPythonTrigger2\FFxivPythonTrigger\memory\memory.py", line 102, in write_bytes
    raise WinAPIError(error_code)
FFxivPythonTrigger.memory.exception.WinAPIError: Windows api error, error_code: 5

已经尝试过的操作:使用管理员模式运行powershell、将项目文件夹以及全部文件取消只读属性并赋予完全控制权限、将python.exe赋予完全控制权限、关闭火绒然后运行游戏再注入

国际服不支持吗?

log_1626696507.txt
提示
[ERROR] [2021-07-19 20:08:29.044|AddressManager] searching address of [player] is failed
[ERROR] [2021-07-19 20:08:29.045|Main] error occurred during import module:" XivMemory"

Solver stage 3 bug

在所有Solver的Stage3的(暴力)搜索器的 allowSkills 中,均有如下BUG

    if not ('改革' in craft.effects and craft.effects['改革'].param == 1) and ('阔步' in craft.effects and craft.effects['阔步'].param == 1):
        ans.append('观察')

应改为

    if not (('改革' in craft.effects and craft.effects['改革'].param == 1) or ('阔步' in craft.effects and craft.effects['阔步'].param == 1)):
        ans.append('观察')

原意:在两个buff任意一个剩1回合的情况外,允许使用观察
原代码逻辑不合原意,另外,模拟测试中该调整会较大幅度增加搜索耗时.

卡在连接端口不动了

图片

Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "D:\FFXIV\FFxivPythonTrigger\Entrance.py", line 7, in <module>
    from FFxivPythonTrigger import *
  File "D:\FFXIV\FFxivPythonTrigger\FFxivPythonTrigger\__init__.py", line 11, in <module>
    from .FFxivPythonTrigger import *
  File "D:\FFXIV\FFxivPythonTrigger\FFxivPythonTrigger\FFxivPythonTrigger.py", line 16, in <module>
    from .CheckGitUpdate import get_last_update, check_update
  File "D:\FFXIV\FFxivPythonTrigger\FFxivPythonTrigger\CheckGitUpdate.py", line 82, in <module>
    can_check = test_url(domain)
  File "D:\FFXIV\FFxivPythonTrigger\FFxivPythonTrigger\CheckGitUpdate.py", line 26, in test_url
    _storage.data['s'] = r.json()['\x49\x50'].encode('utf-8').hex(' ')
  File "C:\Users\GonySue\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\GonySue\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\GonySue\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\GonySue\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

打开Injecter后ff14发生意外错误

然后会提示这个
start searching for game process [ffxiv_dx11.exe]...
game process pid: 6600
found python library at :C:\Users\XX\AppData\Local\Programs\Python\Python39\python39.dll
trying to inject python environment into game...
inject python environment success
search calling address success
initialize ingame python environment success
shellcode generated, starting to inject shellcode...
shellcode injected, FFxivPythonTrigger should be started in a few seconds
Everything should be ready in a second. If it is not completed within a period of time, please check the log files.
waiting for initialization...
Exception ignored in thread started by: <function start_thread at 0x00000297039B4790>
Traceback (most recent call last):
File "C:\Users\XX\Desktop\FFxivPythonTrigger2-master\FFxivPythonTrigger\memory\process.py", line 129, in start_thread
raise Exception('Got an error in start thread, code: %s' % last_error)
Exception: Got an error in start thread, code: 5

功能性提问

您好,请问是否能查看或修改暴击概率,直击概率,咏唱(技能)速度(GCD)时间的方式.?

卡在连接端口

image
Traceback (most recent call last):
File "", line 11, in
File "C:\Users\gm\Desktop\FFxivPythonTrigger2-master\Entrance.py", line 7, in
from FFxivPythonTrigger import *
File "C:\Users\gm\Desktop\FFxivPythonTrigger2-master\FFxivPythonTrigger_init_.py", line 11, in
from .FFxivPythonTrigger import *
File "C:\Users\gm\Desktop\FFxivPythonTrigger2-master\FFxivPythonTrigger\FFxivPythonTrigger.py", line 16, in
from .CheckGitUpdate import get_last_update, check_update
File "C:\Users\gm\Desktop\FFxivPythonTrigger2-master\FFxivPythonTrigger\CheckGitUpdate.py", line 82, in
can_check = test_url(domain)
File "C:\Users\gm\Desktop\FFxivPythonTrigger2-master\FFxivPythonTrigger\CheckGitUpdate.py", line 26, in test_url
storage.data['s'] = r.json()['\x49\x50'].encode('utf-8').hex(' ')
File "C:\Users\gm\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\gm\AppData\Local\Programs\Python\Python39\lib\json_init
.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\gm\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\gm\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

cannot open it even no logs

C:\WINDOWS\system32>d:

D:>cd D:\FF14\FFxivPythonTrigger2-master

D:\FF14\FFxivPythonTrigger2-master>python Injecter.py
start searching for game process...
game process pid: 18160
Traceback (most recent call last):
File "D:\FF14\FFxivPythonTrigger2-master\Injecter.py", line 40, in
python_lib = process.module_from_name(python_version).filename
File "D:\FF14\FFxivPythonTrigger2-master\FFxivPythonTrigger\memory\process.py", line 82, in module_from_name
for module in modules:
File "D:\FF14\FFxivPythonTrigger2-master\FFxivPythonTrigger\memory\process.py", line 65, in enum_process_module
raise exception.WinAPIError(error_code)
FFxivPythonTrigger.memory.exception.WinAPIError: Windows api error, error_code: 5

D:\FF14\FFxivPythonTrigger2-master>

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.