Page 1 of 1

ISBoxer 2 build 2.2.302.2

PostPosted: Sat Mar 02, 2019 11:21 pm
by lax
ISBoxer 2 build 2.2.302.2 is now available as a development build of ISBoxer 2, with the following changelog...
- Visual Studio Code support added to Module Creator. A VS Code Marketplace extension is available for ISBoxer 2 and Lavish-related development.
- JSON Schemas now added to/for many things. This enables automatic GUI for configuring Modules and Tasks, and other parts of ISBoxer 2.
- As per request, tabs with a split-pane appearance now allow dragging the splitter to resize the panes
- A new Tasks tab provides your first taste of ISBoxer 2's replacements for "Key Maps" and "Mapped Keys" and "Steps" and "Actions"
- Fixed a couple remaining bugs with the Auth system, e.g. failing to automatically refresh its access token
- Module configuration initially supported
- Master Hotkey Toggle initial internal implementation
- It is technically possible to build ISBoxer 2 Modules, GUI, custom Hotkeys, etc with this build (with some caveats and known issues). Some tutorials will be available soon to help get started!




Before we go deeper ..
This build includes a pretty significant set of updates, but it is important to note that "out of the box" this is going to do basically the same stuff as the previous build. So while this is the first build that makes it relatively easy to add your first Hotkeys, there are still some loose ends that need to be tied together. And some known issues. :)

My goal therefore with this build is to make sure Modules and Hotkeys etc CAN be built, not to demonstrate Modules and Hotkey etc that are already built or will be built in. I will show you what to do to make a Hotkey, and we'll also have a walkthrough soon for creating a Module.

Task Libraries and Tasks
So first off a quick word about Tasks and Task Libraries, before I show how Hotkeys tie in. An ISBoxer 2 Task Library is a lot like a "Key Map" in ISBoxer 1 -- it has a collection of named things to do in it, like "Follow Me" or "Activate Maps"; ISBoxer 1 calls those "Mapped Keys" just in case you like being confused with similar terms for different things. ISBoxer 2 calls your things to do simply "Tasks".

So ISBoxer 1 has a Key Map called "ISB42 - Always On" and a Mapped Key in it called "Activate Maps". When the "Activate Maps" Mapped Keys is performed, it toggles your Hotkeys on or off. (By default it has the Hotkey Shift+Alt+M assigned to it.)

The equivalent in ISBoxer 2 would be a Task Library with a Task in it called "Activate Maps". However, ISBoxer 2 does not assign Hotkeys directly to Tasks in the way that ISBoxer 1 assigns Hotkeys directly to "Mapped Keys". I'll get to that part in a moment.

Let's follow a little further. ISBoxer 1's "Activate Maps" Mapped Key has an "Action" in it -- it happens to be a "Do Mapped Key Action" to do a different Mapped Key in a different Key Map. ISBoxer 1 has a handful of (25-ish) different Actions that can be used in Mapped Keys. "Do Mapped Key Action" is fairly commonly used, as is "Keystroke Action". You probably understand that a "Keystroke Action" is for sending a Keystroke to the game, and perhaps that a "Do Mapped Key Action"'s purpose is to perform some other entire Mapped Key. ISBoxer 2 provides a type of Task called "isboxer2.Keystroke" which is configured in much the same way as a "Keystroke Action". Likewise, ISBoxer 2 provides an equivalent to "Do Mapped Key Action", being a Task that specifies a Task Library and Task Name to perform instead (and is thus configured in much the same way as a "Do Mapped Key Action").

To demonstrate, here's side-by-side comparisons of Keystroke Action vs isboxer2.Keystroke Task, and a Do Mapped Key Action vs a referenced Task. Do note that the Keystroke Action in the screenshot goes to the Combat ATG, but the Task in the screenshot is essentially for Window:Current, but is otherwise the same thing. (Again we'll cover that later on)
Image
Image

This should give you a very basic understanding of what Task Libraries and Tasks are, and how they relate to Key Maps, Mapped Keys and Actions in ISBoxer 1.

Where Task Libraries and Tasks come from
How is babby formed?

ISBoxer 2 Modules -- some built in, some downloaded, etc -- will be adding all of these things for most ISBoxer 2 users. However, the Tasks tab in the Team Editor allows custom Task Library and Task management. Different sets of Tasks and Libraries are available for the ISBoxer 2 Launcher itself, versus Game Clients. That is to say, the ISBoxer 2 Launcher can be programmed by using the same methods used to program in-game behaviors, and this will allow a Module to dynamically provide features for its users.

What the hell does that mean exactly? Well, with ISBoxer 1 we have this Quick Setup Wizard that takes some initial parameters, and it generates a permanent set of Key Maps and Mapped Keys that sit there in your face, and you might go breaking them in your quest to make ISBoxer do what you want. The wizard controls are completely gone, you don't get just a check box after completing it to optionally set up Alt+1 through =, or a drop-down box to pick a different Follow/Assist Mode. With ISBoxer 2, a Module can provide that drop-down box for Follow/Assist Mode, which can then generate the necessary Hotkeys for the user, as well as any additional Tasks needed on the fly when launching the Team.

... and Task Types
Task Types, like "isboxer2.Keystroke" can be provided by ISBoxer 2 itself, or defined by Modules. ISBoxer 1 has no way for a user to define a new type of Action, so you are always left with exactly those built into ISBoxer. ISBoxer 2 is more extensible, and various types of Tasks will be added by different Modules for many different reasons.

Let's add a Hotkey!
Now that you should know what some of these words mean, let's add a Hotkey. Because this is the first build that gives this to you, there's still some annoyances we're going to work around, and you're not going to send a keystroke to a different window just yet. First things first, man!

So let's assume you've already got a Team set up in ISBoxer 2. If you click the Edit Team tab (pencil icon on the left), you can then select the Hotkeys tab at the bottom, to see an empty page. Empty pages are awesome! This page will automatically list any Hotkeys that could be available to ISBoxer 2 in-game. Later on you may be able to add a new Hotkey directly via this tab, but for the moment we're going to take the back road and add a new Hotkey with a Task. So click the Tasks tab.

The Tasks tab provides a drop-down box with "Game Client" and "ISBoxer 2 Launcher" options, and a + button. What we're going to do is add a Task Library called "isboxer2launcher.startup", and in it we're going to set up a Task that uses "isboxer2launcher.AddClientHotkey" Task Type. As you might guess, that type of Task will let us add a Hotkey for use in the Game Client. By placing it in a Task Library called "isboxer2launcher.startup", this will automatically AddClientHotkey when ISBoxer 2 Launcher starts up. That way, the Hotkeys tab will show an entry for our custom Hotkey -- yay!

Here's what that's going to look like..
Image

So what to do is..
1. Select "ISBoxer 2 Launcher" from the drop-down
2. Click the "+" button to pop up a "New Task Library" box, which just takes a Name for what you want to add.
2a. Type or paste in isboxer2launcher.startup in the box, and click the ✔ (or press Enter) to create the Task Library
3. An empty Task Library called "isboxer2launcher.startup" is now available, with + (Add Task) and x (Delete Task Library) buttons
3a. Click the + next to isboxer2launcher.startup to add a new Task. This works much like adding a Task Library, just requiring a Name and a ✔ button next to it
3b. Type or paste in add a hotkey in the box and click the ✔ (or press Enter) to create the Task (Note: Annoyance/known issue: This popup does not auto-close. Click the "+" to hide it for now.)
4. Expand the controls with the arrow on the left to see the Task Editor

Now you've got a blank Task in your Task Library, which will look something like this:
Image

At this point you can fill in details of the Task, and the available controls will change as you work with it. From the Task Type drop-down, select isboxer2launcher.AddClientHotkey. This will hide the "Task Library" and "Task Name" options, now replaced with a "Hotkey" box:
Image

Tick the Hotkey box, and the green box will fill in with available properties for the Hotkey:
Image

That's basically how configuring Tasks will go. Enable the "Instant" option by ticking the box to its left, and set it as Instant by ticking the box to its right -- the Duration option will disappear as you are doing so. Fill in values for the Hotkey as shown in the example screenshot above -- give it a Code Name ("myHotkey") and fill in the rest as you see fit. You may omit the Metadata and "Master Hotkey Toggle" option to allow the Hotkey to be toggled by the Master Hotkey Toggle (equivalent to ISBoxer's "Activate Maps" / Shift+Alt+M behavior).

NEXT KNOWN ISSUE HERE: You will want this to save. Saving will be automatic as much as possible. At the moment, changes you made to the Task itself after creating it may not automatically save, but tasks will be saved when a Task is added or deleted, or when a Task Library is added or deleted. So to make sure this has saved, create a new Task using the + button, and then delete the unnecessary Task using its "x" button. This is now saved.

If you've followed these instructions to this point, you can now restart ISBoxer 2 Launcher, and see your Hotkey in the Hotkeys tab.
Image
Just remember: This will not be the usual way you get Hotkeys. This is just the first way Alpha testers can learn/test.

NEXT KNOWN ISSUE HERE: Your Hotkey will not have a key configured when you launch ISBoxer 2, even if you set it now and restart ISBoxer 2. These will, obviously, save soon. ;) For testing purposes, go ahead and fill in a Hotkey to try out.

Now you've got a Hotkey, and hopefully even set the actual Hotkey to activate it with. You could almost launch the team right now and try it out, except for two minor details... 1. Your hotkey does nothing and you don't know how to make it do something... and 2. the Hotkey will not be toggled on by default when you launch your team.

Enabling Hotkeys
This will occur automatically in the future, and a built-in Hotkey for this toggle will be available as well, but at the moment we're enjoying some manual configuration. So here's what to do.

We need to make some Tasks for the "Game Client" context. In the previous section we set up to do "isboxer2launcher.AddClientHotkey" when the launcher starts, and now we're going to check out "isboxer2.MasterHotkeyToggle" to do when the Game Client starts. This is a Task Type which turns Hotkeys on/off, very similar to ISBoxer 1's "Activate Maps" Mapped Key and the "Key Map State Actions" that it ends up using.

Similar to how the special "isboxer2launcher.startup" Task Library sets up things to occur at launcher startup, we use "isboxer2.startup" for the Game Client.

Create the following Task Library and Task:
Image

NEXT KNOWN ISSUE HERE: As another known issue explained in the prior section, you will want this to save. Add and delete a Task to save your work (this will be fixed in the near future...)

At this point, you will have a Hotkey that enables when you launch the game, as per the Master Hotkey Toggle which we're now turning on at Game Client launch. The Hotkey still does nothing.

Making Hotkeys do stuff
ISBoxer 2 Hotkeys are designed to execute a Task. What Task Name is executed depends on the Code Name field ("myHotkey" in our example), and the Task Library will either be "isboxer2.hotkeys" or "isboxer2launcher.hotkeys" (depending on whether the Hotkey is a Launcher hotkey, or a Game Client hotkey).

The final Task for this tutorial will be called "myHotkey" (matching the Code Name from the added Hotkey) and placed in "isboxer2.hotkeys" for the Game Client. This example will use a "isboxer2.Keystroke" to send a key to the current window when the Hotkey is activated:
Image

Re-cap
That's it, let's quickly re-cap what we went over ..

1. Add a Client Hotkey at Launcher startup ("isboxer2launcher.startup" Task Library, "add a hotkey" Task -- name not important -- to do "isboxer2launcher.AddClientHotkey")
2. Enable the Master Hotkey Toggle at Game client startup ("isboxer2.startup" Task Library, "set master hotkey toggle" Task -- name not important -- to do "isboxer2.MasterHotkeyToggle")
3. Send a keystroke to current window when our Hotkey is activated ("isboxer2.hotkeys" Task Library, "myHotkey" Task -- name matching the Code Name from the isboxer2launcher.AddClientHotkey -- to do "isboxer2.Keystroke")
4. Make sure Hotkey is configured in the Hotkeys tab (known issue: this does not currently save when you close ISBoxer 2 Launcher)
5. Launch Team and test the working Hotkey




.... phew.