bishop

So whats up with overwolf.games.events and Robocraft?

Recommended Posts

When I first got some dumps from the consumer app, I was getting the Correct name, but missing much other info (blocks count, weapon = NOWEAP, etc).

 

There is some messy stuff going on here, and ATM we're getting unreliable info back.

 

I've noticed quite a few issues about the data from 'consumer.exe'. 

  • at times, I'm not given the current bots name. It seems to completely omit this data after 1 or 2 times.
  • data is mismatched. Selecting BOT1 may or may not give you BOT1's data. even if it does, you're not likely to get entirely BOT1's data. 
  • other fields sometimes are missing as well
  • it seems that the first BOT info dumped to you after a fresh Robocraft log-in will contain many 0 values, and possibly a random bots name (as opposed to the default selected)

 

Some cleaner example of the data I'm getting while selecting different bots

Garage data snip - http://pastebin.com/i1MjYFkP

I've notated which bot to expect, and all of it's correct info, followed by 'consumer's output.

 

I also managed to get some battle data. If you leave 'consumer.exe' running for longer than about 5-8 mins during battle, you'll start to get the battle info (from my 1 experience).

 

Battle data snip - http://pastebin.com/2sRq9jeW

(I've noticed errors here as well, though haven't looked through it very much yet)

Edited by Vida.Sabudabu

Share this post


Link to post
Share on other sites

Woah nice job! It's odd because during our tests with the sample app the events had no problems being read, I wonder if it's because Robocraft is sending the data asynchronously. Still no luck with any events being fired?

Share this post


Link to post
Share on other sites

It's odd because during our tests with the sample app the events had no problems being read

Sample app could read the events? As in, a sample Overwolf (js) app could read gameUpdated events? I have yet to see any of that happening. I think I'm misunderstanding.

 

Also, no luck getting any outside info/events read in any Overwolf (js) apps here :/

So far, it seems that every event is registering in the consumer app (with/without problems), and nothing has made it to the js apps yet.

 

I have to say, I feel like I've entered into a competition to debug someone else's not-yet working programs :(

Share this post


Link to post
Share on other sites

Sample app could read the events? As in, a sample Overwolf (js) app could read gameUpdated events? I have yet to see any of that happening. I think I'm misunderstanding.

 

Also, no luck getting any outside info/events read in any Overwolf (js) apps here :/

So far, it seems that every event is registering in the consumer app (with/without problems), and nothing has made it to the js apps yet.

 

I have to say, I feel like I've entered into a competition to debug someone else's not-yet working programs :(

 

Yeah I meant just consumer. Sorry this is all getting way too complicated :P

 

And yeah it definitely feels like a "test our API" type contest, but it has to be hard for Overwolf becaue they can't really control the implementation/update schedule for the game developers. Plus this way we all get to feel like elite hackers trying to crack some code.

Share this post


Link to post
Share on other sites

 

-snip-

 

Some cleaner example of the data I'm getting while selecting different bots

Garage data snip - http://pastebin.com/i1MjYFkP

I've notated which bot to expect, and all of it's correct info, followed by 'consumer's output.

 

I also managed to get some battle data. If you leave 'consumer.exe' running for longer than about 5-8 mins during battle, you'll start to get the battle info (from my 1 experience).

 

Battle data snip - http://pastebin.com/2sRq9jeW

(I've noticed errors here as well, though haven't looked through it very much yet)

 

Why isn't your username the same as the Robocraft forums? XD

 

On a more related note, consumer.exe for me picks up events as soon as 30 seconds into the game.

http://pastebin.com/cZJcGfxZ

Share this post


Link to post
Share on other sites
 

Do you guys have Overwolf/Consumer running at the same time? I wonder if that has any affect (positive or negative) no how the events are delivered.

 

 

I've run both, separate, etc. I went nuts trying to figure out why I couldn't receive events in 'consumer.exe' while you guys could (I use the steam launcher, apparently I got the patch few hours later..). 

I've decided it doesn't matter what's running with what. Though I play around and run them separately, since I'm a bit OCD at times :P

 

@Cappycot dunno, just kinda happened. I wasn't planning on being so vocal in these forums, kinda expected this stuff to be tested before announcing a contest >;P

 

And yea, I wasn't too sure how long it took for the battle events to be triggered/caught. I had setup a bat script to just run and dump 'consumer.exe's output to a log file and was monitoring the file size while playing a battle. I didn't notice a change in it's size until well into the game. 

 

 

Edit-

by the way, this might be helpful for gathering that info from the 'consumer' app.

Just place this in a bat file next to the 'consumer.exe' and run. It'll generate the 'log.txt' file for you and keep it until next run, non-appending. 

consumer.exe 10480 > log.txt | type log.txt
Edited by Vida.Sabudabu

Share this post


Link to post
Share on other sites

Boo looks like Overwolf updated but still no luck here. What kindof format is the output in Vida.Sabudabu?

 

I tried to decompile consumer.exe and the events DLLs with no luck. I was able to get a little bit from Overwolf browser though, as far as I can tell it looks like there is some sort of interface for events:

namespace ODKv2API
{
  public interface IOverwolfGameEvents
  {
    event EventHandler onError;

    event EventHandler onInfoUpdates;

    event EventHandler onNewEvents;
  }
}

For reference this is what the games interface looks like:

namespace ODKv2API
{
  public interface IOverwolfGames
  {
    IOverwolfGameEvents events { get; }

    IOverwolfInputTracking inputTracking { get; }

    event EventHandler onGameInfoUpdated;

    event EventHandler onGameLaunched;

    event EventHandler onMajorFrameRateChange;

    void getRunningGameInfo(JSFunctionDescriptor callback);
  }
}

This was kind of interesting, IOverrwolfGameEvents wasn't mentioned in the IOverwolfAPI interface. I was thinking for a bit maybe there's a separate permission we were missing:

namespace ODKv2API
{
  public interface IOverwolfAPI
  {
    [RequiredPermissions(Permissions.Logging)]
    IOverwolfLog log { get; }

    [RequiredPermissions(Permissions.Streaming)]
    IOverwolfStreaming streaming { get; }

    IOverwolfWindows windows { get; }

    IOverwolfSettings settings { get; }

    [RequiredPermissions(Permissions.GameInfo)]
    IOverwolfGames games { get; }

    [RequiredPermissions(Permissions.Media)]
    IOverwolfMedia media { get; }

    [RequiredPermissions(Permissions.Extensions)]
    IOverwolfExtensions extensions { get; }

    [RequiredPermissions(Permissions.Profile)]
    IOverwolfProfile profile { get; }

    IOverwolfUtils utils { get; }

    IOverwolfBenchmarking benchmarking { get; }

    [DefaultValue("0.88.77.0")]
    string version { get; }
  }
}

But most likely it's GameInfo.

 

Edit:

Just a random thought but wouldn't it be possible to write something in Node.JS to execute consumer.exe and parse/broadcast the output?

Edited by bishop

Share this post


Link to post
Share on other sites

 

Edit:

Just a random thought but wouldn't it be possible to write something in Node.JS to execute consumer.exe and parse/broadcast the output?

 

hahah you know, I've been tempted with that idea tonight. But i feel it wouldn't help much, at least at this state with the data problems (bot info being mixed up, and such).

 

Also, the format that the bat script would just dump it as you see it in the cmd window, is all. I've been thinking of throwing together a rough parser, and then trailed exactly into something with node.js

 

I really just hope a fix comes along soon so I'm no longer tempted to create such a Frankenstein work-around.

Edited by Vida.Sabudabu

Share this post


Link to post
Share on other sites

Copy paste from the other post:

 

Okay, the issue has been found! We were sending a wrong parameter that messed everything up.

It's fixed for the next Overwolf version, and we'll push it to the developer version of Overwolf once it clears basic QA tests, either this weekend, or early next week.

 

Sorry for all of the confusion.

Share this post


Link to post
Share on other sites

Events are up and running! They are pretty easy to work with but I wanted to share how I am accessing them just in case anyone was having trouble.

overwolf.games.events.onNewEvents.addListener(
    function (value) {
        var i = 0;
	for(; i < value.events.length; i++){
	    console.log('event name');
	    console.log(value.events[i].name);
	}	
    }
);
Edited by NathanSchwartz

Share this post


Link to post
Share on other sites

It looks like there is still a problem with the data that Robocraft is sending out, for GarageData at least.

This is likely a robocraft issue, though I used to think it might had something to do with 'consumer.exe's reading.

 

Output from reading the events in an OW app - 

1511 cpu, t10 bot :

Objectinfo: Array[6]
  0: Objectcategory: "currentGarageSlot"
  key: "robotTier"
  value: "0"
  valueLength: 1
  __proto__: Object
1: Objectcategory: "currentGarageSlot"
  key: "robotClass"
  value: "SMGHover"
  valueLength: 8
  __proto__: Object
2: Objectcategory: "currentGarageSlot"
  key: "armorClass"
  value: "0"
  valueLength: 1
  __proto__: Object
3: Objectcategory: "currentGarageSlot"
  key: "movementClass"
  value: "Hover"
  valueLength: 5
  __proto__: Object
4: Objectcategory: "currentGarageSlot"
  key: "weaponClass"
  value: "NotAWeapon"
  valueLength: 10
  __proto__: Object
5: Objectcategory: "currentGarageSlot"
  key: "cubesNumber"
  value: "0"
  valueLength: 1

Anyone else still getting bogus data like this?

Share this post


Link to post
Share on other sites

Here are the results of me loading the Same Robot more than a few times. Notice how some info is not given every time, and some info is never given.

 

http://pastebin.com/bkBaD6iM

 

(this problem does not change when loading different bots, rather than 1 bot back-to-back-to-back)

(this is basically the same issue I posted about above)

 

@NathanSchwartz, are you not running into these issues when extracting the Garage data?

Would you mind sharing an example of the data you receive, and maybe a code-snip you are using to retrieve it?

From my understanding, onNewEvent is not triggered in the Garage.

Edited by Vida.Sabudabu

Share this post


Link to post
Share on other sites

Interesting, seems to display info on every other load. I'm working with Warface and we have a Safehouse that is probably similar to the Garage of Robocraft and I don't receive events in there. My app doesn't concern the Safehouse so i don't have to worry about it, but if onNewEvents doesn't trigger you might be SOL.

 

I wouldn't mind showing the data I recieve, but it seems like it might not be useful since you specified GarageData and my data is in the same format as yours. Let me know if you still want to see it.

 

All I am doing to retrieve info is calling onNewEvents and then iterating through the array to see if any of the objects have a key or name that I am interested in. Most of the events I am working with don't return data back to me (like who killed who or when it happened) they just let me know that the event happened.

 

An example using the data you posted previously would probably look something like this:

var myRobotsClass = " ";

overwolf.games.events.onNewEvents.addListener(
	function (result) {
		var i = 0;
		for(; i < result.events.length; i++){
			if (result.events[i].key = "robotClass"){
			      myRobotsClass = result.events[i].value;
                        }
		}
	}
);

Disclaimer:

I have to make a few assumptions since you cut off the snippet before the end of that array but there should be a value called "Length" that tells you how many objects are in the array.

 

 

No idea if this was helpful but if it was and you want more clarification let me know.

Share this post


Link to post
Share on other sites

Ah I was under the impression you were working with the Robocraft API. It seems that this issue is due to Robocraft's API implementation, which is what I figured.

 

I may have found another pattern here.. this might be in @Viking! 's interest..

It seems that the 'robotName' value is only ever received on the first 'onInfoUpdates' call, and never again.

I'm not sure if there is a way to un-register a listener on this, But every time I close my OW app and relaunch, 'onInfoUpdates' is called sometime immediately after, and the 'robotName' value is received.

The value of 'roboName' doesn't seem to be accurate (always returns garage1 bot's name) as well.

 

In short, Robocraft will never send 'robotName' unless it's right after my OW app is launched.

Share this post


Link to post
Share on other sites

Unfortunately there's no tagging on the forum yet, might look into upgrading to ver. 4.x.

 

On the issue at hand - I'll contact the Robocraft guys, as it seems to be on their side. We should only funnel the information, and therefore, doubt we can mess it up. Would be great if you could also post the issue on their forum, as first-person reports are always better.

Share this post


Link to post
Share on other sites

After a lot of experimenting I finally got the in-battle events such as kills etc to work (Only in Battle Arena). Here is my setup currently: 

overwolf.games.events.onNewEvents.addListener(
  function (result) {
    var i = 0;
    for (; i < result.events.length; i++) {
      var e = result.events[i];
      console.log(e.name + " " + e.data);
    }
  }
);

That would output something like:

player_near_to_enemy {
"player" : psycholurch,
"nearTo" : BombenVogel,
"atTime" : 1674.438
} 

So I thought great, can just parse that to JSON and make use of the data. Except its not JSON. It's half way there. Strings such as player names are not strings so break JSON.parse(). 
 

Am I just doing something wrong to get an output like that or is it something on FJ's end?

Edited by PhyscoKillerMonkey

Share this post


Link to post
Share on other sites

So I thought great, can just parse that to JSON and make use of the data. Except its not JSON. It's half way there. Strings such as player names are not strings so break JSON.parse(). 

 

Am I just doing something wrong to get an output like that or is it something on FJ's end?

Seb said it's on their side and he's going to release a massive API update next week.

Share this post


Link to post
Share on other sites

Well I guess I'll have to recode the event data extraction then.

Did he said what structure the api will use?

I personally wrote kind of wrapper to parse these strange things into valid JSON object.

I'd expect the structure to be JSON, just like info db update details. I'm not 100% sure about that, I didn't ask Seb about this, just reported the bug.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now