FAQ  •  Register  •  Login

Debugging

Moderator: MiRai

<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Fri Jul 08, 2011 8:54 pm

Debugging

I am having an issue with my script. In trying to work out where my logic is wrong, I have been using the popup text actions when I can. The problem is that I can only see the last message. It's hard to see a sequence of messages.

So I tried adding a new game and pointing it to notepad.exe in the windows folder so I could just dump out some keystrokes and see what order things were working in. When I execute a character set that has just one character in it, it throws an error - "Inner Space Launching Error Code -19". I also tried copying the notepad.exe to a different folder in case it was a permissions thing and that did not help. Is this a crazy idea or is there something I can do to make this work?
<<

lax

User avatar

Site Admin

Posts: 7301

Joined: Tue Nov 17, 2009 9:32 pm

Post Fri Jul 08, 2011 11:25 pm

Re: Debugging

Notepad is not currently supported ;)

I am planning some improvements to the popup text system, as well as specific features for debugging, for ISBoxer 39. I'll have to get back to you on that.

In the meantime you can apply a hack to InnerSpace/Scripts/isboxerui.iss. This code is about 25 lines down in the file:
Code:
   method PopupText(string text, int milliseconds=500, int fadeMS=500, string color="FFFFFFFF")
   {
      UIElement[text@isboxerpopup]:SetText["${text}"]
      UIElement[text@isboxerpopup].Font:SetColor["${color.Escape}"]
      UIElement[isboxerpopup]:Show:SetZOrder[movetop]:ResetFade
      UIElement[isboxerpopup]:SetFadeDelay[${milliseconds}]:SetFadeDuration[${fadeMS}]:SetFadeAlpha[0]
   }


Add another line to it (the first one after the { line) so it looks like this:
Code:
   method PopupText(string text, int milliseconds=500, int fadeMS=500, string color="FFFFFFFF")
   {
      UIElement[output@console]:Echo["${text}"]
      UIElement[text@isboxerpopup]:SetText["${text}"]
      UIElement[text@isboxerpopup].Font:SetColor["${color.Escape}"]
      UIElement[isboxerpopup]:Show:SetZOrder[movetop]:ResetFade
      UIElement[isboxerpopup]:SetFadeDelay[${milliseconds}]:SetFadeDuration[${fadeMS}]:SetFadeAlpha[0]
   }


This will give you a history of all Popup Text Actions, in the in-game Inner Space console.
<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Sat Jul 09, 2011 8:53 am

Re: Debugging

That sounds like a great solution! I'm going to play with it right now.

Looking forward to the new debugging features in the next version. Thanks once again for your help and great support!
<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Sat Jul 09, 2011 11:30 am

Re: Debugging

Your 'hack' was perfect. Thanks!

I was able to verify that it is doing what I thought it was doing. Not sure if this is meant to work this way or this is a bug:

2 mapped keys. The first we'll call 'Skill'. It has two steps. The first step would send a keystroke to a client to execute a skill. The second step would be empty but would be marked as "Do not advance to next step for at least 1 second".

The second mapped key is bound to a key which I will call from my main client. It has one step. The step calls the mapped key 'Skill' twice with each keypress.

The goal of this was to slow down skill rotations by class. (lotro). Some classes have inductions. Some don't. Depending what class I'm playing as my main, the main skill rotations have different speeds so I wanted different speeds for the other clients depending on what class I was using for my main.

When I press the second mapped key it correctly executes the keystroke in the first step of the 'Skill' mapped key. It also executes the second step and gets stuck there until the one second has elapsed. So far so good. Now, if I wait 5 seconds (more than enough time for the 1 second delay to expire) and I press my second mapped key, it executes the 2nd step of the 'Skill' mapped key twice. If I press it again, it has now advanced back to the first step and steps 1 and 2 both execute.

I was expecting it to execute the 2nd step once. It would see that the delay is complete and then advance to the first step which would also be executed because of my second call to the 'Skill' key map from the same keypress. Am I not understanding something?
<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Mon Jul 11, 2011 2:47 pm

Re: Debugging

Any advice for this one?
<<

lax

User avatar

Site Admin

Posts: 7301

Joined: Tue Nov 17, 2009 9:32 pm

Post Tue Jul 12, 2011 8:04 am

Re: Debugging

It sounds like the easiest solution for you is the "Reset to Step 1" option in the Advanced options for the Skill mapped key.

I agree with your analysis, though. It sounds like a bug in the advance checking. For me to test your case, I need to know the Pressed/Released and Hold options you have selected for the two Mapped Keys in the chain. (Or you could show me your config, see the "How to share your config" sticky at the top of each forum)
<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Tue Jul 12, 2011 10:37 pm

Re: Debugging

Your solution is much simpler than what I was trying. Not sure why I couldn't see that . . .

Here is my test config if you want to debug that issue ->

http://www.privatepaste.com/223daf3021

Return to General

Who is online

Users browsing this forum: No registered users and 0 guests