markdwags / Razor

Razor is a free tool designed to help with simple tasks while playing Ultima Online.
https://www.razorce.com
GNU General Public License v3.0
139 stars 97 forks source link

[BUG] Script 'Walk' command desync #143

Closed taylor-russ closed 3 years ago

taylor-russ commented 3 years ago

This is using ClassicUO on UORenassiance. Using Razor v1.6.8.15.

Using the script command 'Walk' (either with the running parameter or not) will cause a desync. I call it a desync because actions in the game will then lag after playing a script with the walk command. The command only fails when used via the Scripting engine. Traditional Macro 'Walk' works as intended.

Steps to reproduce:

  1. Create a new script with walk 'North'
  2. Execute the script.
  3. -> Notice that your character won't move.
  4. -> Try to do other stuff and you will eventually get 'synced', but you will lag for a bit.

It does not matter which character I do this on. Another option to test is:

  1. Create a normal macro(macro, not a script!), which walks you into your house.
  2. Convert that macro to a script in Razor.
  3. Run the macro. It should work (mine does).
  4. Now try the converted script. The converted script won't move your character smoothly, if at all.

Let me know if there is any other detail I can add to this.

Great job on Razor btw. I love the new scripting engine and editor.

taylor-russ commented 3 years ago

I figured out the issue here. If you have razor maximized and not ClassicUO, then it appears that you get lower CPU time/perf on ClassicUO. So the reason I'm having this happening is because I had the Macro "open door" bound to a hot key, which meant that UO was focused and thus wasn't lagging/showing lower perf at all. If you just make a script and try to use "walk" in it, then press the Play button in razor and leave UO unfocused, you will reproduce this issue. However, if you bind the script to a hotkey, you are good to go, just like the Macro version.

I could close this as NAB - I'll leave it open just for information sharing. Feel free to close when desired.

markdwags commented 3 years ago

Thanks for the follow up -- tagging this information for future references.

taylor-russ commented 3 years ago

One other note - I found the reason that the CPU time/perf is lower in ClassicUO is actually a feature flag/option that is on by default. If you want to enable 'normal behavior' when the app is in the background, you can open the ClassicUO options and go to Video ->FPS and uncheck 'reduce FPS when game is inactive'. I assume any stories I've heard about scripts/macros not working unless 'the game is maximized' is due to this option being on. I turned it off and don't notice any slowdowns anymore, even when running three clients with heavy macro/script usage.