• Announcements

    • Colorfulstan

      Windows XP\ Vista support dropped   11/19/2016

      It's been a while but I think some people (especially first time visitor's) don't know yet
    • ChriSKate

      Think you tried everything?! - Check out the Overwolf knowledge-base!   02/25/2017

      Dear gamers, how about some DIY? -   http://support.overwolf.com/ The knowledge-base for all your Overwolf related troubleshooting, faq, bugs, known issues and much more!
      Just start typing anything related to your issue (for example, 'fps' or 'heartharena') and discover new ways to work things out.
    • Raif

      Code of Conduct   02/26/2017

      In General
      Be respectful! There's another person on the other end of that conversation! The forums are a place to discuss anything related to Overwolf and beyond but want this to be a place where people feel comfortable to participate and have fun! Keep it on topic, keep it constructive - Threads should be constructive and have a clear topic. Replies to that topic should be relevant. Bumping a thread without adding relevant information is not considered constructive. Attacks or Accusations are not acceptable - Attacking another person is unacceptable, the circumstances are irrelevant, just don't do it. Read the topic - Know what people are talking about in the thread. Stick to the given topic and don't derail it. Search - We have a great search function, use it before you post a new thread as it's possible someone has asked your question before and there's info on it. Don't see something about your question or topic after searching? Post it! (keep in mind that bumping threads from a long time ago is not recommended, post your own). Don't post about locked or deleted topics; they were deleted for a reason. No petitions, demands or "When will.." We have places for asking for games, features and we will tell you when something is coming. We don't give dates for a reason. Don't try getting around the swear filter, it's not cute or funny. This is not a place to break NDA's, talk about something illegal or break any law from any country. We will contact the necessary parties involved and you will be pursued to the extent of the law. No spam. You will be banned and your post deleted. Please write in English. This is an international forum and we'd like everyone to be able to participate.
      Bad Behavior Insults, racial slurs, profanity, vulgarity. Trolling - You know who you are, and we will find you. Nudity, porn or anything obscene. Flaming - We don't have a trained fireman on staff, so don't do it. No advertising - No one wants to buy that shirt off of you, or that WoW gold. No insulting any religion (fake, real, or imagined), sexual orientation, gender or culture. No talking about drugs or performing illegal activities. Impersonation - Don't do it, people find out and you end up looking stupid.
      What will we do if you break a rule? Warnings - You get only one. Suspension - Temporary forum ban. Account termination - Permanent forum ban. Legal action or report violations to the appropriate legal authorities.

bishop

Members
  • Content count

    47
  • Joined

  • Last visited

  • Days Won

    7

bishop last won the day on September 26 2015

bishop had the most liked content!

4 Followers

About bishop

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  1. You're getting undefined in those cases because you're calling a function which hasn't been defined by the Overwolf object. If you print the Overwolf object to the console (just type "overwolf" and hit return) you can open it up to see what functions are available. The way the Overwolf API works is by broadcasting events which your app needs to listen to, you can read up about this here in the docs. These events contain playerData and all of the other things you see in the documentation. I've explained this in more detail in another post on here but basically you have to use addListener() to pass a function which then does stuff with the data it returns. Here's an example with all of the APIs, I've added comments to the top example to explain whats going on. overwolf.games.events.onError.addListener( //use addListener() to pass a callback function function (value) { //defining the callback function, value is the game data coming from OV console.log('error'); //this is just logging the event type name, not important console.log(value); //this is logging the game data being returned from OV } ); overwolf.games.events.onInfoUpdates.addListener( function (value) { console.log('onInfoUpdates'); console.log(value); } ); overwolf.games.events.onNewEvents.addListener( function (value) { console.log('onNewEvents'); console.log(value); }); overwolf.games.onGameInfoUpdated.addListener( function (value) { console.log('onGameInfoUpdated'); console.log(value); }); overwolf.games.onGameLaunched.addListener( function (value) { console.log('onGameLaunched'); console.log(value); });
  2. Hey guys, long time no see! I've been super busy with client work these past few months and have barely been getting any sleep. Anyway I'm back with a new dev app called Loggr! So what's it do? Basically logs in real-time anything and everything coming out of overwolf.games.events and prints it into a cool looking console. All the returned JSON data is pretty printed, time stamped, and the type of event is listed as well: The little cursor ticker on the bottom is a little buggy and the code is REALLY messy but I've been sitting on this for a month or two now and just wanted to get it out there. I'm attaching the code if anyone wants to check it out! Look for the binoculars icon in Overwolf once you have it loaded. Hope you guys find this useful Loggr.zip
  3. Nice! Maybe my little vacation was just long enough Are all game modes reported on now?
  4. Ahh I've been super busy with work haven't gotten a chance to even play Robocraft these past few weeks! How are the updates coming? Not smoothly I take it?
  5. Sweet! Hmm... I'd opt for a button visible in debug mode then to avoid having to open the console. Thanks for the tip that's a huge time saver!
  6. please explain! this concept is foreign to me.
  7. Thanks Viking! Both for keeping us in the loop and pushing a release on a weekend
  8. Nice one Nathan! Ah well those should be ready for developers sometime this weekend/early next week. In the mean time I've started a tutorial series here: http://forums.overwolf.com/index.php?/topic/6026-overwolf-app-tutorial/I'll do something for the RC stuff when it's ready.
  9. Hey guys so I'm going to be posting up a 5 part tutorial on making apps for Overwolf! If you want any help with specific APIs let me know and I'll include them into this tutorial. A little background on me: I was a web developer for around 9 years and now I'm working with a tonne of different technologies. I'm also a part time instructor at Lighthouse Labs where we teach you how to be a badass developer in 8 weeks (if you live in Vancouver or Toronto). Alright let's make an app called Blastin Fools! So first things first, Overwolf is in beta and things are constantly changing. It's very possible that the information here may be out of date in a few months or a few weeks. That being said the Overwolf API is really simple, while still being really powerful and having a tonne of cool stuff! It's a really exciting time for developers as more and more features are being added, and more games are being supported. Anyway let's do this! Prerequisites: You're down with me calling Overwolf OV for the rest of this You've got the dev version of OV You got the demo app somwhere You've skimmed through the "ODK introduction" and therefore know how to load an app into the OV software You're using SublimeText, Notepad++, or an equally decent text editor Project so far (github link) Setup Let's start with getting rid of the sub window from the demo. Open up the manifest and get rid of this: "SubWindow":{ "file":"Files/subwindow.html", "transparent":true, "resizable":false, "size":{"width":400, "height":300}, "in_game_only":true } Also in your index.html file we can get rid of these two bits: function openSubWindow(){ alert("the subwindow will only be visible inside a game"); overwolf.windows.obtainDeclaredWindow("SubWindow", function(result){ if (result.status == "success"){ overwolf.windows.restore(result.window.id, function(result){ console.log(result); }); } }); }; <button id="open-subwindow" onclick="openSubWindow();">Open Sub-Window</button> Remember any changes to the manifest require the app to be unloaded and reloaded in OV. Any other changes you can just close the app and reopen it. PRO TIP: Sublime has a JSON Lint plugin that will validate your manifest JSON for errors, otherwise you should be using something like http://jsonlint.com/ Now that we have that out of the way the first thing we want to do is clean up the code. It's always a good idea to seperate your layout (HTML), from business logic (Javascript), and presentation (CSS). It's easier to read smaller files and keeps things more modular. Cut out everything between the <script> tags in index.html and paste it into a new file called script.js. Save this in the Files folder and then include it back in the html right before the body close tag: <script type="text/javascript" src="script.js"></script> </body> </html> You can try loading the app at this point to make sure everything works. Project so far PRO TIP: Save a copy of this project so far somewhere and use it as a base for your apps until you come up with your own base project. Planning We're gonna make an app called BlastinFools! It's going to be pretty basic (and kind of lame actually) but it's the first thing that I could come up with. Basically it's going to let us set a hot key that gets fired automatically when we press a button (say you're playing a game where there's a weapon cooldown and you want to auto-fire) and then keep track of how many kills you've made with it. Before coding anything let's use user stories to plan this out: 1. As a user I want to see my username somewhere so I feel all warm and fuzzy 2. As a user I want to bind a hotkey and set a time frequency that it fires 3. As a user I want to keep track of how many kills I got in a match and in total 4. As a user I want to see a screenshot of my last kill 5. As a user I want to minimize and close the app User stories are a great way to plan out a project and also keep yourself focused on one task at a time. So let's get to work! Let the coding begin So taking all the requiements from our user stories I've put together a quick sketch of what I want the UI to look like. You always want to design your UI around your content, not your content around your UI, so it's a good to have a rough idea of what you're going to be displaying. 1. As a user I want to see my username somewhere so I feel all warm and fuzzy Alright so looking at the documentation section for overwolf.profile there's a method called getCurrentUser(callback) which seems like it should return the current user. At this point if you don't know what a callback is in javascript you might want to read up about it, to explain it very briefly you're passing a function with code that will be executed to another function which will then execute the code when it's ready. In this case we can't just use something like the code below because overwolf needs to get the data first. var playerData = overwolf.profile.getCurrentUser(); Instead we need to do something like: overwolf.profile.getCurrentUser(function(value){ var playerData = value; //Once the player data is ready we can access it from here }); Before coding anything let's punch this in to the console and try it out. Launch the app in OV and press ctrl+shift+i to bring up the dev tools and press the console button. We should modify the code a bit so it prints the result to the console: overwolf.profile.getCurrentUser(function(value){ var playerData = value; console.log(playerData); }); And let's see what happens when we copy/paste it to the console: Sweet we can see the result object in the console! Now let's print it in the app. Let's modify the existing "Hello, world!" code in index.html: <h1>Hello, world!</h1> We should add an ID and some default value: <h1 id="usernameContainer">Hello, unknown user!</h1> We want to update this label with the username so let's open up script.js and add our code to the bottom: overwolf.profile.getCurrentUser(function(value){ var playerData = value; document.getElementById('usernameContainer').innerHTML = playerData.username; }); Now before we run the app it says in the docs that accessing overwolf.profile requires the "Profile" permission. This is a good point to give our app a custom name too so we don't make things confusing. Let's update the manifest, all we need to do is change the name, description, and add a new "Permissions" key with the profile permission: { "manifest_version":1, "type":"WebApp", "meta":{ "name":"Blastin Fools", "version":"1.0.0", "minimum-overwolf-version":"0.77.10", "author":"Developer Name", "icon":"IconMouseOver.png", "icon_gray":"IconMouseNormal.png", "description":"Blastin Fools" }, "permissions": ["Profile"], "data": { "start_window":"MainWindow", "windows":{ "MainWindow":{ "file":"Files/index.html", "transparent":true, "resizable":true, "size":{"width":400, "height":300}, "min_size":{"width":200, "height":200}, "max_size":{"width":600, "height":500} } } } } If your app is loaded into OV unload it and load it again, once you launch it your name should now be displayed! User story #1 is done! Tommorow we'll look into some other Overwolf APIs and finish up user story #2. Project so far BONUS POINTS! If our app was running and a new user logged in the old username would still be displayed? What do the docs tell you about how to catch this? How would you implement a function to update the username?
  10. It works there's just one caveat: once an app has been launched at east once the position is remembered and will not change. I created a new app with our manifest and launched it: Then I uninstalled, set the top value to "500" and I think I changed the version number, then reinstalled it: Also remember any changes to the manifest require you to reinstall the application. Edit: Have you thought about using the changePosition() function on your window?
  11. Just in case anyone was wondering the version that came out today (88.101) seems like a public release so the dev release should be coming soon
  12. What are you specifically having troubles with? I'll whip up a quick tutorial tonight. Are there any specifc APIs you're interested in? Edit1: Oh and consumer.exe is a program that lets you view which events supported games are sending. You can download it from Overwolf's Github account here: https://github.com/overwolf/game-events-sdk/blob/master/libowgameevents/bin/consumer.exe(click on "raw" to download it). Edit2: I couldn't stop picturing this after reading the last line in your post haha:
  13. Thanks Viking! let the games begin
  14. Viking! is aware as far as I know from Overwolf. I haven't contacted FJ yet because consumer.exe isn't reliable enough to know what's actually being sent from the game.
  15. Yep I think Vida.Sabudabu is right. Until the issues with the API are resolved nobody knows for sure, but judging by the documentation and the other info we've dug up this is most likely how it will function.