Commit eedb3808 authored by sirjorj's avatar sirjorj Committed by GitHub

Update README.adoc

parent 8b1cb919
......@@ -30,7 +30,7 @@ Binaries are available http://sirjorj.com/jorj/xhud.html[here].
== Installation
Download the latest build and extract it in your home directory. The build files (after v0.1) contain the following:
The downloadable builds are ready to be extracted and run. They contain:
|===
|`xhud/` |A folder containing everything
......@@ -43,25 +43,66 @@ Download the latest build and extract it in your home directory. The build files
|`xhud/fonts/xwstats.ttf` |The stat numbers in the generated images
|===
NOTE: older version may be a little different
=== Intro to Unix Terminal commands
If you already have experince with a unix terminal, you can skip this section.
If you are new to the scary-looking unix "command line" mode, let's run through a little primer. NOTE: This applies to macOS Terminal, any linux terminal program you may be using, and Bash on Windows.
|===
| `cd` | command to change the directory you are currently in
| `~` | reference to current logged in user's home directory
| `.` | reference to the current directory
| `..` | reference to the parent directory
|===
NOTE: 'directory' is the proper name for 'folder'
NOTE: Another thing to remember is TAB autocomplete - when tying a command or directory or file name, if you press TAB partway through, it will autocomplete what you are typing. If there is only one file or command that matches what you have already typed, it will finish it. If there are more than one, hitting TAB a second time will show the possible results. This makes using the terminal a lot faster and easier.
At this point, let's propose an organizational structure for using xhud.
* `[home folder]`
** `xwing` - folder to contain everything
*** `squads` - folder to store the .xws files
*** `xhud` - folder to store the game you downloaded and extrated from the builds page
*** `xhud.png` - this is where the generated image will go
With this in place, alongside your `Documents` and `Music` and `Videos` directories, you will see an `xwing` directory. It will contain the `xhud` directory that is extracted from the downloaded build. This `xhud` directory will contain the items shown in the table above. We will also add a `squads` directory to the `xwing` directory. This is where you will put your xws files. When `xhud` is run, we will have it will create the overlay image `xhud.png` in the `xwing` directory. This is the image you will add to your streaming software.
Ok, lets make it.
In your home directory, create a directory called `xwing`. This can be done with macOS Finder or whatever GUI your linux distro uses or even from the terminal by typing `mkdir ~/xwing`.
Now, make a `squads` directory in the `xwing` directory (the command for this is `mkdir ~/xwing/squads`). When you create a squad with whatever tool you use, you can export it as an xws file, or copy the blob of text and paste it into a new file that you name something ending with `.xws`.
Download the latest build and extract it to `xwing`. This can be done by just double clicking on the downloaded file to extract the contents and moving the extracted `xhud` directory to the `xwing` directory we just made.
Let's make a point to not add anything to this `xhud` directory. The reason is this: when new versions of xhud are released, you can then just delete this xhud directory and replace it with a new one from the new build you download. If you would store your .xws squad files IN the xhud directory, it would make the update process more complicated.
With this directory structure in place, we can proceed.
== Usage
Open up a terminal and switch to the xhud directory (cd xhud). You can now use xhud to do things.
Open up a terminal and switch to the xhud directory (`cd ~/xwing/xhud`). You can now use xhud to do things.
NOTE: If you are using Bash on Windows, your Windows home directory will be available at /mnt/c/Users/*username*, so to switch to the xhud directoy, type 'cd /mnt/c/Users/*username*/xhud', where *username* is your windows username.
NOTE: If you are using Bash on Windows, your Windows home directory will be available at `/mnt/c/Users/*username*`, so to switch to the xhud directoy, type `cd /mnt/c/Users/*username*/xhud`, where *username* is your windows username. (When typing long directory paths like this, remember that TAB autocomplete feature I mentioned above.)
|===
|`./xhud` |Print version, usage, and options
|`./xhud check` |Check to make sure the required fonts are in place
|`./xhud ship` |Print a list of all the ships
|`./xhud ship awing` |Print info on the A-Wing
|`./xhud pilot` |Print a list of all the pilots
|`./xhud pilot lukeskywalker rebel xwing` |Print the info on Luke Skywalker
|`./xhud upgrade` |Print a list of all the upgrades
|`./xhud upgrade mod engineupgrade` |Print the info on 'Engine Upgrade' Modification
|`./xhud squad babyblues.xws` |Print a squad from an .xws file (this example assumes the squad file is in your xhod folder)
|`./xhud verify babyblues.xws` |Verifies a squad file
|`./xhud img babyblues.xws bb.png` |Generate a png image from a squad file
|`./xhud run s1.xws s2.xws out` |Run a game with the 2 specified lists and put the images in a folder called 'out' (more details below)
|`./xhud` |Print version, usage, and options
|`./xhud check` |Check to make sure the required fonts are in place
|`./xhud ship` |Print a list of all the ships
|`./xhud ship awing` |Print info on the A-Wing
|`./xhud pilot` |Print a list of all the pilots
|`./xhud pilot lukeskywalker rebel xwing` |Print the info on Luke Skywalker
|`./xhud upgrade` |Print a list of all the upgrades
|`./xhud upgrade mod engineupgrade` |Print the info on 'Engine Upgrade' Modification
|`./xhud squad ../squads/babyblues.xws` |Print a squad from an .xws file (this example assumes the squad file is in your xhod folder)
|`./xhud verify ../squads/babyblues.xws` |Verifies a squad file
|`./xhud img ../squads/babyblues.xws bb.png` |Generate a png image from a squad file
|`./xhud run ../squads/s1.xws ../squads/s2.xws ../xhud.png` |Run a game with the 2 specified lists, generating an image called xhud.png (more details below)
|===
Notes:
......@@ -72,29 +113,14 @@ Notes:
== Running a Game
To run a game, you use xhud's 'run' command. You then specify 2 .xws files (for P1 and P2, respectively) and a folder where the generated images will go. In the examples ablve, all the squad files are in the same 'xhud' folder as the program. For organizational purposes, you will probably have a 'squads' folder alongside the 'xhud' folder. For the output folder, lets say you also have an 'xhud_out' folder alongside 'xhud' and 'squads', like this:
* `[home folder]`
** `squads` - .xws files are stored here
** `xhud` - the contents of the xhud build you downloaded from here, plus the added fonts
** `xhud_out` - this is where the generated images will go
Or you could put these 3 folders in an 'xwing' folder for even better containment. Then, you would open terminal and type cd xwing/xhud to do the above examples.
Anyway, once you have this in place, open the terminal, cd to the proper folder and start a game with this:
To run a game, you use xhud's 'run' command. You then specify 2 .xws files (for P1 and P2, respectively) and an image to be generated. In the examples ablve, all the squad files are in the same 'xhud' folder as the program.
./xhud run ../squads/babyblues.xws ../squads/palpaces.xws ../xhud_out
[NOTE]
====
The equivalent line on Bash on Windows would be
Anyway, once you have this in place, open the terminal, cd to the proper folder (`cd ~/xwing/xhud`) and start a game with this:
./xhud run /mnt/c/Users/*username*/squads/babyblues.xws /mnt/c/Users/*username*/squads/palpaces.xws /mnt/c/Users/*username*/xhud_out
(Assuming the 'xhud', 'squads', and 'xhud_out' directories are in your Windows home folder.)
====
./xhud run ../squads/babyblues.xws ../squads/palpaces.xws ../xhud.png
Assuming the everything was entered correctly and the squads were valid, a game will be started. In the xhud_out directory, you will find p1.png and p2.png. These are the images to add to your streaming/recording program. I use OBS and put p1.png on the left and p2.png on the right. With OBS, when an image is overwritten, it will automatically refresh on screen, so that's all you have to do.
Assuming the everything was entered correctly and the squads were valid, a game will be started. In the `xwing` directory, you will find `xhud.png`. This is the image to add to your streaming/recording program. Make the image the full size of your streaming view so it will put the first squad you specify on the left and the second one on the right. I use OBS and when an image is overwritten, it will automatically refresh on screen, so that's all you have to do.
When the game starts, you are presented with a simple prompt. This is how you issue commands to change the game state. A '?' command will show you a list of options, and a 'qqq' command will exit the game. To change game state, you tell it what to do by passing in command codes. The basic syntax of these is:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment