Jump to content
Yputi

Animation selection tool - How to get your own UI for all animations!

Recommended Posts

Version 3.0.2

Script that can be used to select animations. This tool should help you find any animation you want or discover any new animations you might not have notices. With this tool, you don't have to use /anim 1, /anim 2, etc to view them all.

Please see video below for a preview:
https://youtu.be/2ipmYxG-vF4

uyn1BqV.png

How to download/use this script?

  1. First you will need to have AutoHotKey (AHK) installed. Just installed, you don't need to use it. Click here for AHK's download page
     
  2. Download the latest release of the animation menu from GitHub: https://github.com/Yputi/ECRP-Anim-Selector/releases
     
  3. Unpack the .zip file.
     
  4. Put the script (.AHK) file anywhere you want, as long as you can find it back.
     
  5. Run the .AHK file! Do this every time when you want to go use the script. (Or put a hyperlink to the .ahk file in the "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup" folder if you want to automatically start the script when Windows starts)
     
  6. You should now see the AutoHotKey Icon in your System Tray. This means the script is ready!
     
  7. Press F10 to open the menu and enjoy!

uyn1BqV.png

How to close the script

The script will always run, even when GTA itself is running or not. There is an "Exit Application" button added to the menu when you press F10. This will close the script.
To confirm, check your system tray to see if its still active in there.

uyn1BqV.png

Can I change the F10 key?

Yes. You can edit the .AHK file and first laugh at the mess I made. Then you can scroll all the way to the top and replace "F10" with anything you like. See the image below with the yellow arrow.
If you want to use special keys or key combinations, please google how AHK wants you to put it in the file.

7a1004fa47f41e7c3783ae8bc54e2b36.png

uyn1BqV.png

How do I add favorites?

Once you right click on the .AHK file and choose your program to edit the file, you should see something similar to this all the way at the top:

67a04534e9c25bea1ff25032b1b4a140.png

Replace the text "FAVORITEx" with the Exact animation name you want. You can add more than 10 favorites if you want, just copy and paste one line as many times as you want.
(Make sure to save it and start the script again once you have edited this)

uyn1BqV.png

Is this trusted?

If you have concerns, please feel free to DM me on Discord (@yputi) and ask anything about the script.

uyn1BqV.png

Can I get your list with all the categories you made?

This is included in the GitHub repo (and releases) in the form of an Excel sheet.
https://github.com/Yputi/ECRP-Anim-Selector

uyn1BqV.png

Why do I see some animations double?

Some animations fit well in multiple categories. Please see the list above to see what categories every animation is placed in.

uyn1BqV.png

Sometimes the typing goes too fast/it doesn't fully type the command

If you experience any issues like this, please update line 3 to use

SetKeyDelay, 1

to replace

SendMode Input

uyn1BqV.png


Please comment if you find any issues, would like a certain change or anything else. Feel free to tinker with the file yourself and maybe expand it!
Tip: People who slightly understand AHK scripts could add their own "Favorites" menu tab!
 

Edited by Yputi
Updated version type
  • Like 27
  • PogU 3
  • Upvote 3
  • chill 1
  • POG 2
Link to comment
Share on other sites

To also build on Ramo's note.
The incorrectly named Nose Pick has the same menu number as a duplicated Shy.
Menu, SubMenu2, Add, Nose Pick, :SubMenu2.11 < -- should be Sexy

Menu, SubMenu2, Add, Shy, :SubMenu2.11

Note 2, simply renaming the Nose Pick to Sexy does not completely fix the issue. as then Shy and Sexy have duplicate submenu items. However, Shy is duplicated under stances and emotions.

Menu, SubMenu7, Add, Shy, :SubMenu7.7
and 
Menu, SubMenu2, Add, Shy, :SubMenu2.11

Edited by Arrta
Link to comment
Share on other sites

How to add a Favorites tab?

For those wishing to add a "Favorites" category you can place this code after the F10:: on line 7:

Quote

 

Menu, SubMenu0, Add, animationname, MenuHandler
Menu, SubMenu0, Add, animationname, MenuHandler
Menu, SubMenu0, Add, animationname, MenuHandler

Menu, FullMenu, Add, FAVORITES, :SubMenu0

 

by replacing animationname with whatever anim you fancy e.g. yoga3

From there you can just copy and paste any of the first 3 lines in a repeatable fashion to expand your favourites, replacing the animationname. This will add the tab at the top of the list:

This is an example of my favorites:

Quote

 

Menu, SubMenu0, Add, knock, MenuHandler
Menu, SubMenu0, Add, knock2, MenuHandler
Menu, SubMenu0, Add, think, MenuHandler
Menu, SubMenu0, Add, lean2, MenuHandler

Menu, FullMenu, Add, FAVOURITES, :SubMenu0

 


IC0dYc2.png

Link to comment
Share on other sites

5 hours ago, Arrta said:

To also build on Ramo's note.
The incorrectly named Nose Pick has the same menu number as a duplicated Shy.
Menu, SubMenu2, Add, Nose Pick, :SubMenu2.11 < -- should be Sexy

Menu, SubMenu2, Add, Shy, :SubMenu2.11

Note 2, simply renaming the Nose Pick to Sexy does not completely fix the issue. as then Shy and Sexy have duplicate submenu items. However, Shy is duplicated under stances and emotions.

Menu, SubMenu7, Add, Shy, :SubMenu7.7
and 
Menu, SubMenu2, Add, Shy, :SubMenu2.11

Issue will be resolved soon.

Duplicates are on purpose. Animations are assigned to multiple categories when they suit multiple.

Edited by Yputi
Link to comment
Share on other sites

Updated:
Please download the file from the main post to use the newest version

- Renamed "anrgy" to "angry", making it work again. (Sorry, I can't type).
- Added a SubMenu for Menu "Sexy", solving the issue of Shy, nosepick and Sexy combining.
- Added "#SingleInstance Force", Forcing the new instance to run if you execute it while one instance is already running.
- Added "Favorites" preset in menu. Please see main post with instructions on how to add your favorites.

- Adjusted/added names to make it compatible with the newest update of today.

- Added the Category list in the main post for anyone that is interested.

Thank you for the kind messages and love. 

Link to comment
Share on other sites

First off thanks for this amazing script, it really makes the massive amount of animations much more fun.

 

If anybody is having a issue with the inventory UI sometimes popping up while using this, you can change 1 line to ever slightly slow down the text speed, which should fix your issue.

 

"SendMode Input ; Recommended for new scripts due to its superior speed and reliability."

changed to

"SetKeyDelay, 1"

  • Like 1
Link to comment
Share on other sites

11 hours ago, Arrta said:

Not sure this is a mistake or something I just don't understand, but Flip group containing flip and flip2 are under Medial/Injuries?

I hope this didn't cause medics or injured people to do flips! 👀
Updated:
Download the file from the main post to use the newest version

- SubMenu numbering fixed, moving "Flip" to "Sports/Tricks"

Link to comment
Share on other sites

3 hours ago, AustiNova said:

I just cant get it to open after following all the steps.. putting the file on my desktop doesnt effect anything does it?

Hello!

Did you try to open the file using AHK?
It should look like the picture below:
4bd34727a21d786a1a6d3bad2f62a6ea.png

If it does not state that the "Type"  is a " AutoHotkey Script", please try to see if the file type is set correctly to .ahk. You can also do this yourself by editing the name.

Please let me know if this appears to be the case.

Edited by Yputi
Link to comment
Share on other sites

Hey! Thanks for creating such an amazing script! I have taken some time to repurpose it for my own use which is for LSC repair commands, as seen below.

LfYPe7u.png

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Menu, SubMenu0, Add, /me takes the person's license and inspects it. He then takes out his PDA and checks the person's name against the LSC Blacklist., MenuHandler
Menu, SubMenu0, Add, /me takes out his PDA and begins entering the customer's details onto an invoice. He then finalises the invoice and sends it over to the customer to sign., MenuHandler
Menu, SubMenu0, Add, /r Waldo clocking on{!} 10-8 shopfloor, MenuHandler
Menu, SubMenu0, Add, /gate, MenuHandler

Menu, FullMenu, Add, Mechanic Misc, :SubMenu0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MenuHandler:
send, t%A_ThisMenuItem%{enter}

return

However, I am having a few issues with the length of time it takes for the command to be typed out.. any suggestions how to speed this up? I've consdered reworking the sendinput section to copy to clipboard and then manually paste but it takes the autonomy out of it a bit. 

 

Also, do you know how I could modify the script so that it can send multiple lines of text after clicking one menu option? I was thinking maybe I could get it to trigger another script like the below?

numpad0::
SendInput t/me grabs a tool kit from his workbench and carries it over to the vehicle, placing it down on the ground.{enter}
sleep 100
SendInput t/me takes out a hammer and raises it above his head before quickly slamming it down on the engine, hitting it.{enter}
return

 

Link to comment
Share on other sites

For a multiline, what you would want to do is this.

Menu, SubMenu0, Add, Get Screwdriver, obtainScrewdriver

And then create a subroutine like this

obtainScrewdriver:
	sendinput t/me would open their toolbox.
	sleep 100
	sendinput t/me would take out a screwdriver and hold it in their hand.
return

Notice the above has only a single : instead of the double :: that the hotkey uses.

Link to comment
Share on other sites

@BillyBWhat Arrta mentioned above would probably be more efficient indeed! The original script worked with a MenuHandler function which just used the name of each button as a string to process. This was done to prevent making a function for every single animation (and there are MANY animations, so I think you can understand why it has been made this way).
By creating a different function instead of MenuHandler as explained above you can make your menu look a lot more organized.

To answer your questions:

  • The speed can technically be adjusted. However, this speed has been set on purpose as when you do not set a speed, the inputs can be so fast that it will cause error's. Rage doesn't really like it and you will see your chat potentially getting flooded with certain logs, also causing the script to (partially) not function. This was tested when I made the original version and later added in my updated version as it became unreliable without this delay.
     
  • Arrta already explained the part where multiple lines could be linked to a single menu button. Instead of referring to MenuHandler, create a separate and unique function yourself with everything you want it to do.
    I used and expanded Arrta's example a little in an attempt to visualize how this would work and hopefully help you understand:
    f970c745897b5b01bdcf999c2fee46a0.png

What I personally use for some scripts is putting the contents of a .txt file on my clipboard and paste those in my chat to bypass the input speed issue. I've done that using the "FileRead" function. For example in one of my scripts I have:

Quote

FileRead, GetFromFile, %A_ScriptDir%\REQUIRED_DONT_TOUCH.txt
clipboard := Result

This would then the .txt file in the same directory as the script that has the name you filled in, then putting it on your clipboard.

You could then simply use the following if you also want AHK to paste the contents:

Quote

Send, ^v

 

Hope this helps!

Link to comment
Share on other sites

I actually shared a subroutine about a year ago in Discord that does the paste command rather than you having to repeat the same commands multiple times in multiple routines over and over.

Paste(ClipIt, Ent)
{
	ClipBoard := ClipIt
	send, t
	sleep, 250
	send, ^v
	if ( Ent = "True" )
	{
		sleep, 250
		send, {enter}
	}
	return
}

You would then call out to this like this

	Paste("/melow would open their toolbox.", "True")
	sleep, 750
	Paste("/melow would locate and pull out a screwdriver.", "True")

I include extra long sleeps between commands, because the pasting of text is SUPER fast compared to the sendinput method.

Link to comment
Share on other sites

Not to revive an old thread, but I love this script and have used it for a while. I recently decided to play in Fullscreen for performance reasons, but now, this script makes me tab out of the game completely to use the menu. Is this a common issue? Is there a solution? I'm not super familiar with AutoHotKey, but I'd love to find a way to continue using this menu.

Link to comment
Share on other sites

11 hours ago, RelaxingVibe said:

Not to revive an old thread, but I love this script and have used it for a while. I recently decided to play in Fullscreen for performance reasons, but now, this script makes me tab out of the game completely to use the menu. Is this a common issue? Is there a solution? I'm not super familiar with AutoHotKey, but I'd love to find a way to continue using this menu.

Hi. With the current version of the script posted in here I don't think it will be possible.
I am not too familiar with AHK specifically, but after some research I have found some possible solutions. I plan on moving my scripts that I made to GitHub. I have already done that to a few other ones, but not with this script yet.
After that, I will try and improve it regarding what you mentioned. When that's done, this topic will be updated.

Link to comment
Share on other sites

13 hours ago, RelaxingVibe said:

Not to revive an old thread, but I love this script and have used it for a while. I recently decided to play in Fullscreen for performance reasons, but now, this script makes me tab out of the game completely to use the menu. Is this a common issue? Is there a solution? I'm not super familiar with AutoHotKey, but I'd love to find a way to continue using this menu.

I've been trying to find a solution for fullscreen users for close to 2 hours now, but it appears I can't find a solution for that. The only solution would be to play in windowed borderless.

Due to no changes going to be made till I find a solution, I will just leave this topic as it is. If anyone that sees this has any possible solution, please comment.

  • Like 1
Link to comment
Share on other sites



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and our Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.