Forums » Community Projects
LegionHail plugin
LegionHail v1.1
by Pizzasgood
legionhail-1.1.zip
md5sum
/legionhail gui
/legionhail
/legionhail cycle
/legionhail-cycle
This is a plugin to allow you to have multiple hails grouped into multiple modes. For example, I have a "PVP" mode, a "Pirating" mode, and "Newbie Pirating" mode. Each mode has a number of different hails associated with it. When I am playing, I set the plugin to whichever activity I am doing, and when I run it, it selects a hail at random from that mode and sends it to my target. If I'm between PVP fights in B8 and see a tasty behemoth fly through, I can easily switch to "Pirating" mode and send him a pirate hail, and when I have finished I can switch back to my standard PVP hails. I only have to bind a total of two keys, rather than having one key for each type of hail.
Additionally, this plugin will automatically integrate with KombatTunes - if you have KombatTunes installed and you send a hail to somebody, LegionHail will automatically tell KombatTunes to start playing a song if it isn't already. Imagine this: you are floating in B8 when your longtime rival jumps in. You exchange hails, and the game automatically starts playing the Mortal Kombat theme song. Bliss.
So, how to use this wonderful plugin? Install it, then use the command "/legionhail gui" to bring up the gui. Initially there will just be one default mode and one default hail. You can click the "Rename Mode" button to change the mode's name, and next to it are the buttons to add and delete modes. You can have as many as you want. To change which mode you are editing, use the arrow buttons at the top-left of the window. There is no way yet to re-order them though, so try to create them in the order you would want to cycle through them, with the first mode being the one that will be used when you log on. (I will eventually add an option to record the current mode and restore it at login, along with a way to re-order them, but for now you'll have to plan ahead.)
You can edit the default hail by either double-clicking it (any speed will work currently), or by clicking it and then clicking the "Edit Hail" button below. This will open a dialog box that lets you change the message to be sent. There will also be a field that allows you to enter a weight. The weight doesn't do anything when you only have one hail in the mode, but when you have more than one hail in a mode you can set different weights to modify the likelihood that each hail will be chosen. A hail with a weight of 5 is 5 times more likely to be chosen than a hail with the default weight of 1.
To add a new hail, you use the "Add Hail" button, which is next to the "Edit Hail" button. It pops up a dialog that works the same way that the editing dialog does.
To delete a hail, simply select it from the list and click the "Delete Hail" button.
When you are finished, either click the "Close" button at the bottom-right, or press "Escape".
Now, to actually send a hail, you merely need to target a ship and then use the command "/legionhail". A hail will be selected at random from the current mode and sent. If KombatTunes is installed, a song will be triggered if one isn't already active. LegionHail uses the KombatTunes.fight() function, so if you make additional hails while the song is still playing, the song will not be interrupted by a new song.
To change which mode is active, you can use either "/legionhail cycle" or "/legionhail-cycle" (the latter is for convenience when making keybinds, so that you don't have to first create an alias). It will move to the next mode in the list and output its name to the screen. When you reach the end, it will jump back to the beginning.
One limitation of LegionHail is that right now, there is no option to configure whether or not to use KombatTunes - if it exists, it will be used. The next update I do to this plugin (other than possibly bug-fixes) will be to add an option to each mode as to whether or not it should use KombatTunes. That way if you are the type who would have a "Friendly Greetings" mode, you could use it without suddenly initiating battle music. I will also look into allowing the user to specify an arbitrary lua command to be run when hailing, for easy integration with other plugins. Not sure off the top of my head if VO's lua implementation will allow that, but we'll see.
Note: The KombatTunes functionality requires at least KombatTunes version 1.2. Prior versions used the "kombattunes" namespace rather than the "KombatTunes" one. This was changed to be more in-line with VO's coding standards, which dictate CamalCase for global variables.
I also intend to add a color field to each mode as well, so that they can be color coded. That makes it easier to switch modes without having to actually move your eyes up and read to see which one you're in - just check the color with your peripheral vision.
Perhaps a reverse cycle command would be useful as well...
by Pizzasgood
legionhail-1.1.zip
md5sum
/legionhail gui
/legionhail
/legionhail cycle
/legionhail-cycle
This is a plugin to allow you to have multiple hails grouped into multiple modes. For example, I have a "PVP" mode, a "Pirating" mode, and "Newbie Pirating" mode. Each mode has a number of different hails associated with it. When I am playing, I set the plugin to whichever activity I am doing, and when I run it, it selects a hail at random from that mode and sends it to my target. If I'm between PVP fights in B8 and see a tasty behemoth fly through, I can easily switch to "Pirating" mode and send him a pirate hail, and when I have finished I can switch back to my standard PVP hails. I only have to bind a total of two keys, rather than having one key for each type of hail.
Additionally, this plugin will automatically integrate with KombatTunes - if you have KombatTunes installed and you send a hail to somebody, LegionHail will automatically tell KombatTunes to start playing a song if it isn't already. Imagine this: you are floating in B8 when your longtime rival jumps in. You exchange hails, and the game automatically starts playing the Mortal Kombat theme song. Bliss.
So, how to use this wonderful plugin? Install it, then use the command "/legionhail gui" to bring up the gui. Initially there will just be one default mode and one default hail. You can click the "Rename Mode" button to change the mode's name, and next to it are the buttons to add and delete modes. You can have as many as you want. To change which mode you are editing, use the arrow buttons at the top-left of the window. There is no way yet to re-order them though, so try to create them in the order you would want to cycle through them, with the first mode being the one that will be used when you log on. (I will eventually add an option to record the current mode and restore it at login, along with a way to re-order them, but for now you'll have to plan ahead.)
You can edit the default hail by either double-clicking it (any speed will work currently), or by clicking it and then clicking the "Edit Hail" button below. This will open a dialog box that lets you change the message to be sent. There will also be a field that allows you to enter a weight. The weight doesn't do anything when you only have one hail in the mode, but when you have more than one hail in a mode you can set different weights to modify the likelihood that each hail will be chosen. A hail with a weight of 5 is 5 times more likely to be chosen than a hail with the default weight of 1.
To add a new hail, you use the "Add Hail" button, which is next to the "Edit Hail" button. It pops up a dialog that works the same way that the editing dialog does.
To delete a hail, simply select it from the list and click the "Delete Hail" button.
When you are finished, either click the "Close" button at the bottom-right, or press "Escape".
Now, to actually send a hail, you merely need to target a ship and then use the command "/legionhail". A hail will be selected at random from the current mode and sent. If KombatTunes is installed, a song will be triggered if one isn't already active. LegionHail uses the KombatTunes.fight() function, so if you make additional hails while the song is still playing, the song will not be interrupted by a new song.
To change which mode is active, you can use either "/legionhail cycle" or "/legionhail-cycle" (the latter is for convenience when making keybinds, so that you don't have to first create an alias). It will move to the next mode in the list and output its name to the screen. When you reach the end, it will jump back to the beginning.
One limitation of LegionHail is that right now, there is no option to configure whether or not to use KombatTunes - if it exists, it will be used. The next update I do to this plugin (other than possibly bug-fixes) will be to add an option to each mode as to whether or not it should use KombatTunes. That way if you are the type who would have a "Friendly Greetings" mode, you could use it without suddenly initiating battle music. I will also look into allowing the user to specify an arbitrary lua command to be run when hailing, for easy integration with other plugins. Not sure off the top of my head if VO's lua implementation will allow that, but we'll see.
Note: The KombatTunes functionality requires at least KombatTunes version 1.2. Prior versions used the "kombattunes" namespace rather than the "KombatTunes" one. This was changed to be more in-line with VO's coding standards, which dictate CamalCase for global variables.
I also intend to add a color field to each mode as well, so that they can be color coded. That makes it easier to switch modes without having to actually move your eyes up and read to see which one you're in - just check the color with your peripheral vision.
Perhaps a reverse cycle command would be useful as well...
Cool. Will test it out this weekend.
I like this plugin. Enables random hails, enables differing character hails. I love it.
Updated to 1.1 to remove the hail echo, since the client itself handles that now, resulting in the hail appearing in the chat log twice when using 1.0 (this was purely a visual issue; the recipient was not receiving duplicate hails).
I'm getting errors uploading to Voupr right now, so use the link in the OP instead.
I'm getting errors uploading to Voupr right now, so use the link in the OP instead.