Git Product home page Git Product logo

ps4macro's People

Contributors

komefai 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  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

ps4macro's Issues

Press Options Button

Somehow my .dll script does not recognize:
script.Press(new DualShockState() { Options = true });

if I record a macro and play it afterwards, the options button will be used. But if i want to include this in my .dll script it the options button does not get recognized

ERROR WHEN RUNE DLL FILE WITH SCREENSHOT COMPARE

Hi i dont have problem when i open the dll file but i got an ERROR when i press PLAY on PS4Macro, that say:"MEMORIA INSUFFICIENTE", in english is:" INSUFFICIENT MEMORY".

screenshot 35

NB if i comment the line 28 to 32, when i press play i don't have problem, so i think that is the command :"HandleScenes"(line 28) that give me error

screenshot 36

Interceptor Not working

Yeah I dont Know what im doing wrong. Ive gone through every form talking about this issue and i still cant get it to work. any help would be awesome. thank you
image

Disable Looping

Is it possible to stop autocalling the update function so that it will only execute once?

Push and hold button

Is it possible to push and hold a button for a specific length of time? When writing macro in c#

Not an issuse but a question about the app

Hello , the app is great uve done good job on it, i am trying to use it in Destiny 2, but i am not good with C# at all , what i would want is a script that randomizes certain buttons and sticks so it never does the same commands over and over again. Also wanna ask if its possible to create a script where it has for example no recoil for some guns. I know crounsmax can do this and there are alot of scripts for it. But since i dont have one this is the closest thing to it. Would been Nice if this program had like a site where users can share scripts to help noobs like me cause i have no idea how to code in C.

I watched all of ur yt tutorials , do u think it would be possible to make a bot for destiny 2 ? or would that be really complicated ? I also heard you say u can make aimbots is that even possible in destiny 2 ?

Thank you for your time .

Touchpad PS4Macro

I'm currently writing my own PS4 Remote interceptor which is able to stream content to an Android Smartphone and also injects gamepad inputs by using your logic of the PS4RemotePlayInterceptor. However, I'm not able to emulate the Touchpad. Clicks are working but movements will not be detected or just be ignored. The PS4Macro is also not able to record Touchpad movements or is this just not implemented yet? Do you have any experience with this issue?

Wont Work

I do the usual checks and it wont register as a remote (when I start)

[Enhance] Integrate OCR to PS4Macro API

It could be usefull to integrate Tesseract to method MatchTemplate.

You already have PixelMap and RectMap to call it. I'd like to have a new type "TextMap" to call it. This one would use Tesseract.

namespace PS4MacroAPI
{
    public struct TextMap
    {
        public string ID { get; set; }
        public int X { get; set; }
        public int Y { get; set; }
        public string Text { get; set; }
    }
}

Remapper not working

After saving the remapper, it does not overwrite the script that is ran, the remapper keeps the controls, but not the script stays to default.

DS4 Touchpad left and right press remapping

Thank you for sharing this project. I've search for something like this for a while.

Am I correct that it's not possible to remap a left or right touchpad press? I can't start PS2 games on remote play without a right press on the touchpad.

Regardless, great work.

Creation of PS4Macro.PES2018Lite

Hi Komefai,

I don't find how to leave you a message, so I create an issue to say to you that I create a bot for PES2018Lite (free 2 play) simulation game mode.

This bot works only for FRENCH version of PES. Sorry for others, but french is the best 4 ever. ;c)

thancks for your work and your video. It permits me to create PES easely.

Bye.

Simulate R2/L2 button press

I have a quick question: How to simulate a R2/L2 press? Since R2/L2 is of type byte, I cannot use the same method call I would do with other buttons.

image

Some Remapper buttons not working

Currently having issues using PS4Macro. For some reason, some buttons work and some don't. For example, I've managed to get the following buttons to work ( X, O, Dpad Up, Dpad Down, Dpad Left, Dpad Right ). Those are the only buttons I can get working, I'm trying to get all of the buttons to work but I mainly need Triangle to work but I can't seem to do so.

In status checker with DS4 connected to PC via USB cable I have this:
Interceptor: Working
Keyboard: Working
Mouse: Working

But triangle still doesn't work.

In status checker WITHOUT DS4 connected to PC I have this:
Interceptor: Not Working
Keyboard: Working
Mouse: Working

I've tried running it as administrator but only the buttons I've posted above worked. Any ideas?

MatchTemplate() throws 'out of memory' exception

The method MatchTemplate() throws 'out of memory' exception in my computer. I don't really understand why, but it depends of ratio of remote screen. It probably comes from 'System.Drawing'. Maybe the 'Hash' value make it appends.

Any idea to fix it ?

Above the code of my scene

    class pressStart : Scene
    {
        public override string Name => "Root : Press start";

        public static RectMap pressStartScreen = new RectMap()
        {
            Width = 929,
            Height = 529,
            Hash = 8584986722532864
        };

        public override bool Match(ScriptBase script)
        {
            /* DEBUG */
            int i = 0;
            try
            {
                for (i = 100; i != 0 && !script.MatchTemplate(pressStartScreen, i); i--) { }
            }
            catch (System.OutOfMemoryException e)
            {
                Console.WriteLine("{0} : Error Message = {1} (i = {5}, W = {2}, H = {3}, Hash = {4})", Name, e.Message, pressStartScreen.Width, pressStartScreen.Height, pressStartScreen.Hash, i);
                return false;
            }
            Console.WriteLine("{0} : i= {1} %", Name, i);
            System.Diagnostics.Debug.WriteLine("{0} : i= {1} %", Name, i);

            return script.MatchTemplate(pressStartScreen, 98);
        }

        public override void OnMatched(ScriptBase script) => script.Press(new DualShockState() { Cross = true });
    }

I'm a beginner in C#.

edit1 : This exception appends when resizing remote screen while playing macro.
edit2: maybe values Width and Height makes it appends.

Provide another mechanism for comparing images

I had lots of trouble getting the internal Image Hashing to correctly identify frames and matching them without too many false positives.

I was able to utilize Emgu CV as an optimal library to match scenes. The basic gist of it is to ingest the Bitmap, transform it into grayscale, and use the Canny Edge Detection method to get all the outlines (based on various thresholds I would provide. (Demo) here. Finally I would compare this to a saved Canny image by normalizing the two values to get a similarity value. Depending on my thresholds, no false positives!

image

Thoughts?

Keyboard Text Input on Script

I'm trying to create a Bot that farm codes and apply it into a game. This Bot should be able to write text (a word with 10 characters). Do you know how this can be made by using PS4Macro (or even rewriting the base code)?

Switch Accounts

Is it possible to use this tool to log out of PSN account on PS4 and change/log into another account one. without having to restarting remote play tool?

PS4 Remote Play not detecting emulated controller

Dear developer,

I've downloaded the latest 0.5.1 BETA Version of PS4Macro because I wanted to try the keyboard mappings within PS4 Remote Play (Version 2.5.0.9220).

I opened PS4 Remote Play first and started the PS4Macro afterwards. I opened the Remapper Tool as you described it in your wiki and focused the PS4 Remote Play Windows afterwards again an started the session to my PS4 by clicking on "Start". I further tried to open the PS4Macro programm after the connection to my Playstation 4 was established, but same issue. Just the common keys are working (ENTER for X, ESX for Return, Left/Right Arrow Key).

Another step was to open PS4Macro with following configuration inside the settings.xml:



true
true
true

which gives me an "OnInjectionSuccess 7384". I guess this should be the process ID of the PS4 Remote Play Instance, but I'm still not able to use the extended key mapping (like R1 with E or R2 with O).

At the moment I have no PS4 Controller connected to my USB because as far as I understood this is not neccesary when using the "EmulateConntroller" Option?

Do I have any understanding trouble or is there any bug?

If you need further information, don't hesitate to ask me again.

Thank you very much in advance,
Michael

P.S.: I tried to use the Mapping Keys within the FIFA 18 Main Menu.

Mouse is VERY hard to use

The mouse is really hard to use. It doesn't work really at all and has really jerked moments, and I can't find any settings that will keep it smooth. What does makeup speed even do?

However I am really proud and exited for this project! Very nice work on this.

No Mouse check box

I would like to use my mouse in replacement for my analog stick. But there isn't a box for me to click as you described? What am i doing wrong? Also when do you think the next version of Ps4 Macro will be finished with mouse support?

Current Image size

I have issue when try to display/save CurrentFrame the size it is wrong (i tried to use 720p a 520p resolution the size it is always the same).
If i try to resize RP window it will zoom in/out. (property of size currentFrame are always width:1265 height:683) I don't understand why it get this size.

screen:
https://ibb.co/itqCwT

Also with Screenshot button on menu same issue.

Then can't work plugins cause it will miss information from image

I also download precompiled version and make a screenshot from menu, same issue.

Mouse not working

I've read everything on this site and you say "Click on enable mouse" but where? I'm having a hard time finding it.

[Feature Testing] Mouse input in Remapper

This issue is for anyone who want to try the "Mouse input" feature in Remapper. The feature not yet ready, and that is why I decided to delay the release of the next version and release this debug build here instead. You can help me improve this feature by testing it with different games and report the bugs in this issue.

Usage

Open Remapper and check "Enable Mouse", then click on PS4 Remote Play to focus the window. To stop, you can press Alt+Tab to focus other windows.

Mouse Input Settings

NOTE: Default settings are recommended (except for Sensitivity) but feel free to play around with it for different games.

Sensitivity - The amount used to multiply the speed of the mouse
Decay Rate - The amount used to divide the speed of the mouse every frame after the mouse stopped moving
Decay Threshold - Threshold of the speed (will decay until the speed drops below the threshold)
Deadzone - The offset amount from analog stick center to start from (use 0 to start from the center) [Value ranges from 0-127]
Makeup Speed - The amount used to multiply AFTER the mouse speed is scaled into analog values to compensate the lost from the decay

Example Deadzone=14.25 (green box represents the deadzone)

Analog stick movement will start at the green line instead of starting from the exact center.
remapper_mouse_deadzone


View source:
https://github.com/komefai/PS4Macro/blob/master/PS4Macro/Classes/Remapping/Remapper.cs

Screenshot

Screenshot

Download

LATEST (14/04/2018)

-> Multi-monitor support
-> Middle click bindings

PS4Macro_cf7ce2c.zip -[commit cf7ce2c]

Previous Builds (oldest first)
  1. PS4Macro_1408820.zip - [commit 1408820]
  2. PS4Macro_2d3d6e2.zip - [commit 2d3d6e2]
  3. PS4Macro_2ec5033.zip - [commit 2ec5033] (Special thanks to Y-T-G)
  4. PS4Macro_c43dbd4.zip - [commit c43dbd4]
  5. PS4Macro_658584b.zip - [commit 658584b] (Special thanks to Y-T-G again!)

Mouse and keyboard do not work at the same time

I cannot get both mouse and keyboard input working at the same time with PS4Macro. I'm using the latest development build, cf7ce2c.

If I open Remapper and leave Enable Mouse unchecked, then the keyboard mappings work great (WASD, Z, etc.). But then if I go back to Remapper and check Enable Mouse, the mouse works fine but the keyboard completely stops working.

I am running PS4Macro as Administrator, and I'm waiting until PS4 Remote Play is fully loaded before running PS4Macro. Here's my Status Checker output:

status

I suspect the problem may have something to do with this, but I'm not sure. I get the following exception when I run Remapper:

exception

How can i use My DS3 Controller with this, which is already emulated as Xbox360 Controller

I am wondering what would be the way to use DS3 controller with this program, also wanna ask one question, Is the macro noticeable or does it just recognize it as controller, cause i want to try using it in Destiny 2 and don't wanna get banned for it :) .

I wonder if there is ready to go xml file that emulates xbox 360

also sorry if i shouldnt have posted this here , dunno where else to ask for help. Thank You

Simple Remapper button press not working

Hi, I'm having difficulty with the Remapper.

Just as a simple test case, I was trying to hit the Triangle button:

  1. Launch PS4 Remote Play
  2. Launch PS4 Macro
  3. Open Tools > Remapper (notice that Triangle is mapped to V)
  4. Focus PS4 Remote Play
  5. Press V
  6. (Nothing happens)

I attempted to troubleshoot this with a settings.xml which included <ShowConsole>true</ShowConsole>. After restarting everything, the debugging console is launched but nothing is printed therein.

Any ideas? Am I missing something?

Important notes:

  • At this time, I am not using a controller
  • This is on Windows 10 Pro running on VirtualBox on Windows 7 (PS4 Remote Play does not work on Windows 7 directly)
  • The macro functionality also seems to not work
  • Screen resize does work

Recording/Playback won't play unless

There seems to be a weird issue with recording/playback. It will only record/playback if I'm active on another window scrolling, holding down a button or moving mouse. I can tell by what I assume to be frame numbers on bottom right corner. I don't know what could be causing the issue. Thanks for any feedback.

Compensate for DPI Resolution and Remote Play Border

I have a 4k Laptop, and everything can run reallly tiny so I need to use DPI Scaling on my Windows 10 machine to enrich some experiences. This messes with the ScriptConfig.TargetSize as it won't be accurate when plugging in coordinates.

I feel that determining a multipler and adding to these lines would help.

int width = windowRect.right - windowRect.left;
int height = windowRect.bottom - windowRect.top;

Since my Display Scaling is set to 200%, a multipler of 2 on both of these helped me.

The border is also not considered, so when trying to crop, you are offset by the left and top borders around the Remote Play window. If we can determine these values, we can get a coordinate system that's all aligned to the same axes.

Not enough memory

Hi Komefai I don't know why when detecting some areas I get "out of memory" error, or maybe the macro is working as intended and when the screen changes: error. Do you have any Ideas why some rectmaps are working and others don't for me?
Also why when I turn start play on the macro my remote play gets out of fullscreen? Is this optional?

Congrats on the great job and regards.

Recording no longer works correctly ?

Recording doesn't seem to work no longer. When recording like running in video game. and if that recording is played the left stick is like its barly going forward its not getting recorded correctly.

Error when launching version 0.2.2

When launching the exe (without RemotePlay actually opened), there is an "Unhandled" error with MainForm.cs at line 68. Reference is not defined to an object.

System.NullReferenceException

But it's working if you open it after launching the remote play app.

Pressing button

Hi Komefai. First of all, thank you for your work.
I have a question about pressing buttons. My script works well on my computer, but when it runs on my friend's computer, it sometimes does not pressing a button.
Press(new DualShockState() { DPad_Up = true }); // always pressing
Sleep(1000);
Press(new DualShockState() { Square = true }); // sometimes not
FYI, the loop delay is 3 seconds.
Do you have any idea?

Unable to start script

Hi. I'm writing heres since I don't really know where to report this problem.
Today I've downloaded your app and followed your tutorial to script a simple code as a test but when I tried to start it in the program i got this window
screenshot 7
I'm new to coding but the script was pretty simple, just a few button pressings without conditions. if needed I can load it here.
ps: I've only tried on one pc so I can't exclude the problem is mine, but I didn't have the time to test it elsewhere today.

Remote Play Cannot Detect PS4 Macros Emulated Controller

Hi, so I'm trying to get PS4 Macros working on Remote Play on my laptop, and I've been having issues with it getting to properly work with my Remote Play. I've already went over a couple of the issue threads posted here, and I've tried various things to fix this, but in the end I just can't get this working at all. Here's EXACTLY what I did, over and over again:

  1. I first installed PS4 Macros and extracted it onto my laptop.

  2. I then created a new text file inside the PS4 Macros file, naming it "settings.txt", and then copy and pasted these settings:

false true false
  1. Then I made the txt file into xml file.

  2. I FIRST ran Remote Play and after that, instead of hitting the "Start" button on it, I then ran the PS4 Macros application (ran it as administrator).

  3. Based on my research from Youtube tutorials and from issue threads here, it should say on the Remote Play "Press option to start" because that's when the Remote Play recognizes the emulator controller, but it doesn't happen for me at all.

Also note that I've installed the latest updated version of PS4 Macros.

So I'm not sure what's causing the problem. Did I do something wrong during the entire process? Did I forget to configure something or download something else before doing any of the steps that I mentioned above? I'm not able to use this on my Remote Play at all and I can only use the base controls (enter for X, esc for O, arrows for up, down, right, left). I've also tried configuring the Remapper and such but I just have absolutely no idea how to fix this. I also tried to load xml files in the Macros column of the Remapper (2nd column to the very left at the bottom) but I honestly don't know if that did anything as well. I'm not sure if I've missed something specific here. I've been trying to get this to work for hours but have absolutely no clue how to fix this. I'd appreciate it if anyone can help and advise me to get this to work.

Could someone please share a macro in XML format?

Greeting. This is not actually an issue.
Due to using of PS Remote play in a emulated environment (Virtual box) with win7 being a host system,any usage of wired DS4 controller crashes my system.
So I cannot record any macros with this great product.
But I still would like to test if those macros would be played and percepted by PS RP.
For that reason I would like to see any working macro in XML format so I could possibly adapt it for my needs. I am not any good in C# coding (can code a little with python/php/asm) and the limited emulated environment has no resources to install MS VS, so coding a dll is not an option for me :(
Thank you guys.
And thumbs up for good work for komefai!

Build error about easyload32.dll

Every time I try to build it it errors saying the easyload32.dll is locked by ps4 remote play and that it fails to copy easyload32.dll to bin\debug\EasyLoad32.dll because it cannot be accessed as it's being used by another process

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.