ameaeth 50 Posted February 23, 2018 Share Posted February 23, 2018 (edited) Hi friends. I hope this is the right place to post this. Since Sacred 2 is not the most stable of games for me espacially in multiplayer which to play I like best, I thought an auto-save feature would save me and my friends the possible trouble of lost main quest progress. So I tinkered a bit and created an AHK Script. However, at this point I have no Idea why the script won't recognize Sacred 2 running. (AHK complied script running as admin). #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #MaxThreadsPerHotkey 2 #Persistent ; Not really needed with this script, but included anyway. ToggleS2 := False $PgDn:: ToggleS2 := Not ToggleS2 If ToggleS2 SetTimer, S2Repeat, 2000 Else SetTimer, S2Repeat, Off Return S2Repeat: IfWinActive, AHK_CLASS Sacred2 Main { Send F7 } Return In essence I'm really just looking for some kind of auto-save so if anyone has a solution I'd be happy. Cheers Edited February 23, 2018 by ameaeth Link to comment
Popular Post MageMaster 8 Posted March 2, 2018 Popular Post Share Posted March 2, 2018 (edited) There was a post when CM160 came out about putting some lines in your options.txt. Let me see if I can find the post. Just had to hit escape and every time certain events would happen it would save. Its in the very first post in this thread. Just hit escape.. But when ever you do that you can see all the other times the game has save as well. Edited March 2, 2018 by MageMaster 2 Link to comment
Popular Post ameaeth 50 Posted October 13, 2018 Author Popular Post Share Posted October 13, 2018 Hi everyone, after an inspiration hit me while I was working on a script for another game (Legends of Aria) I finally got the auto hot key 'Sacred 2 Auto Save' script to work. If anyone is still interested in this, you just need to have auto hotkey installed, copy & paste the code below into a newly created ahk script file and run it. Starting/stopping the auto save function works with page down key. Ctrl + Escape key exits the script. The script simulates pressing the default save key 'F7' every 5 minutes. If you want to change the repetition rate of auto-saves, change the large number 300000 (default, in miliseconds), I.e. every 60000 represents one minute on the timer. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. #MaxThreadsPerHotkey 2 #Persistent SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;----Sacred 2 Auto Save----; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;1: start/stop auto save with page down key ;2: Ctrl + Escape key to exit the script ToggleS2AS := False PgDn:: ;page down key to start/stop IfWinActive, ahk_class Sacred2 Main { ToggleS2AS:= Not ToggleS2AS If ToggleS2AS SetTimer, S2autosave, 300000 ;300 seconds between saves Else SetTimer, S2autosave, Off Return } return S2autosave: IfWinActive, ahk_class Sacred2 Main { Send {F7 down}{F7 up} ;save default key } Return ^Esc::Exitapp ;Ctrl + Escape to exit script Cheers 1 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now