[Home]

Jailbreak Developer Network: Jailbreak Add-Ons


Jailbreak Add-Ons are mutators specially designed for use with Jailbreak 200x – release protection and the popular llama hunt, for example. Users can select and configure Jailbreak Add-Ons in a special Add-Ons tab in both the Instant Action and Host Multiplayer Game setup dialogs.

For Add-Ons in development, see [p] Release Reference.

Creating a Jailbreak Add-On

There are only a few small technical differences between a regular mutator and a Jailbreak Add-On:

Otherwise Jailbreak Add-Ons work like any other mutator. Specifically, your JBAddon subclass should set the following property defaults:

string FriendlyName (required)
Short name, displayed next to the add-on's checkbox in the left half of the Add-Ons tab. Keep it short and to-the-point – otherwise it might be truncated at certain screen resolutions. If it fits on the tab button at a screen resolution of 800x600 pixels, you are on the safe side.
string Description (required)
Brief description of the add-on's purpose. Displayed in a text box at the top of the right half of the Add-Ons tab.
string GroupName (optional)
Like a regular mutator, a Jailbreak Add-On can belong to a group identified by the GroupName property. Only one add-on of a certain group can be selected at once; if a user selects an add-on that belongs to a group, all other add-ons in the same group will automatically be unselected.
string ConfigMenuClassName (optional)

Fully qualified class name of the add-on's configuration panel, if it has one. Example:

ConfigMenuClassName = "JBAddonDummy.JBGUIPanelConfigDummy"

If you do not set this, the Add-Ons tab will display a message to inform the user that no user-set options exist for the currently selected add-on. The specified class must be a subclass of GUIPanel (whereas for regular mutators it must be a subclass of GUIPage).

The Jailbreak naming scheme for the class is JBGUIPanelConfigAddonName. The configuration panel is displayed in the lower part of the right half of the Add-Ons tab. It is instantiated and initialized the first time the user opens the corresponding add-on tab.

Hooking into Jailbreak

Jailbreak provides several gameplay notification and modification hooks via the JBGameRules class. You can register and use it like a normal GameRules class, but it'll receive several more Jailbreak-specific notifications and queries.

Drawing on the HUD

Add-ons can easily draw on the user's HUD by setting the bIsOverlay property to True and overwriting the RenderOverlays function:

class JBAddonSomething extends JBAddon;

simulated function RenderOverlays(Canvas Canvas)
{
    // draw items on screen
}

defaultproperties
{
    bIsOverlay = True;

    RemoteRole = ROLE_SimulatedProxy;
    bAlwaysRelevant = True;
}

If you have problems getting this to work client-side, check the Network Debugging section on Unreal Wiki: Debugging Techniques first. You likely just forgot to add a ServerPackages line to your test server's configuration.

Adding Web Admin Support

If your Jailbreak Add-On has any user-editable configuration settings, you should add web admin support for them.

var config bool bMyFirstSetting;
var config bool bMySecondSetting;


function MutatorFillPlayInfo(PlayInfo PlayInfo)
{
    // add current class to stack
    PlayInfo.AddClass(Class);

    // now register any mutator settings
    PlayInfo.AddSetting(PlayInfoGroup(), "bMyFirstSetting",  "First mutator setting",  0, 0, "Check");
    PlayInfo.AddSetting(PlayInfoGroup(), "bMySecondSetting", "Second mutator setting", 0, 0, "Check");

    // remove mutator class from class stack
    PlayInfo.PopClass();

    // call default implementation
    Super.MutatorFillPlayInfo(PlayInfo);
}

The call to PlayInfoGroup() adds a standard prefix to your Add-on's name so they are grouped together in the web interface.

See PlayInfo for more information.