Members
"Engine.openRequest"
- Source:
"Engine.openRequest"
- Source:
"this.timeParameter"
Disclaimer
- Source:
accepted
- Source:
avgSpeed
- Source:
buttonCaptions
- Source:
buttonCaptions
- Source:
buttons[undefined]
- Source:
caption
- Source:
caption
- Source:
caption
- Source:
(constant) captions
- Source:
color
- Source:
current
- Source:
done
- Source:
elapsed
- Source:
error
- Source:
file
- Source:
filesize
- Source:
(constant) folder
- Source:
(constant) folder
- Source:
g_ColorDependenciesMet
- Source:
g_ColorDependenciesNotMet
- Source:
g_ColorNoModSelected
- Source:
g_Failure
Indicates if we have encountered an error in one of the network-interaction attempts.
We use a global so we don't get multiple messageBoxes appearing (one for each "tick").
Set to `true` by showErrorMessageBox
Set to `false` by init, updateModList, downloadFile, and cancelRequest
- Source:
g_FakeMod
- Source:
g_HasIncompatibleMods
- Source:
g_IncompatibleModsFile
g_InstalledMods
Name of the mods installed by the ModInstaller.
- Source:
(constant) g_ModIOState
- Source:
(constant) g_ModProperties
- Source:
g_Mods
Mod definitions loaded from the files, including invalid mods.
- Source:
g_ModsAvailableOnline
- Source:
(constant) g_ModsCompatibility
Cache mod compatibility recomputed when some mod is enbaled/disabled.
- Source:
g_ModsCompatibility[undefined]
- Source:
g_ModsDisabled
- Source:
g_ModsDisabledFiltered
- Source:
g_ModsEnabled
Folder names of all mods that are or can be launched.
- Source:
g_ModsEnabledFiltered
- Source:
g_ModsEnabled[undefined]
- Source:
g_ModsEnabled[undefined]
- Source:
g_PluralTranslations
- Source:
g_PluralTranslationsWithContext
- Source:
g_PluralTranslationsWithContext[undefined]
- Source:
g_PluralTranslationsWithContext[undefined][undefined]
- Source:
g_PluralTranslationsWithContext[undefined][undefined][undefined]
- Source:
g_PluralTranslations[undefined]
- Source:
g_PluralTranslations[undefined][undefined]
- Source:
(constant) g_RegExpComparison
Tests if a dependency compares a mod version against another, for instance "0ad<=0.0.16".
- Source:
(constant) g_RegExpLabel
The label may not be empty.
- Source:
(constant) g_RegExpName
Tests if the string only contains alphanumeric characters and _ -
- Source:
(constant) g_RegExpVersion
Tests if the version string consists only of numbers and at most two periods.
- Source:
g_RequestCancelled
Indicates if the user has cancelled a request.
Primarily used so the user can cancel the mod list fetch, as whenever that get cancelled,
the modio state reverts to "ready", even if we've successfully listed mods before.
Set to `true` by cancelRequest
Set to `false` by updateModList, and downloadFile
- Source:
g_RequestStartTime
- Source:
g_Terms
- Source:
g_TermsFile
- Source:
g_TermsPage
This implements a basic "Clickwrap agreement", which is an industry standard:
The European Court of Justice decided in the case El Majdoub (case nr C-322/14) that click-wrap agreements are acceptable under certain circumstances
as proof of the acceptance of terms and conditions (in the meaning of Regulation 44/2001, now replaced by Regulation 1215/2012).
See https://eur-lex.europa.eu/legal-content/en/TXT/HTML/?uri=uriserv%3AOJ.C_.2015.236.01.0019.01.ENG
The user should be able to save and print the text of the terms.
- Source:
g_TermsSprintf
- Source:
(constant) g_TestModsInvalid
- Source:
g_Translations
These functions rely on the JS cache where possible and
should be prefered over the Engine.Translate ones to optimize the performance.
- Source:
g_TranslationsWithContext
- Source:
g_TranslationsWithContext[undefined]
- Source:
g_TranslationsWithContext[undefined][undefined]
- Source:
g_Translations[undefined]
- Source:
(constant) g_ValidTestMods
- Source:
height
- Source:
height
- Source:
installedMods
- Source:
(constant) labels
This page allows to mix color using sliders one for each of three channels in range of 0 to 255 with
step of 1, returning sanitized color when closing
- Source:
message
- Source:
message
- Source:
mod
- Source:
modname
- Source:
mods
- Source:
mods
- Source:
number
- Source:
object[undefined]
- Source:
object[undefined]
- Source:
object[undefined]
- Source:
object[undefined]
- Source:
object[undefined]
- Source:
onMouseLeftDoubleClickItem
- Source:
onMouseLeftDoubleClickItem
- Source:
onMouseLeftDoubleClickItem
- Source:
onPress
- Source:
onSelectionChange
- Source:
onSelectionChange
- Source:
onSelectionChange
- Source:
onSelectionColumnChange
- Source:
onSelectionColumnChange
- Source:
onTextEdit
- Source:
page
- Source:
page
- Source:
percent
- Source:
(constant) regExpComparisonOperator
Version checks in mod dependencies can use these operators.
- Source:
(constant) regExpComparisonOperator
- Source:
remaining
- Source:
slider
- Source:
sprintf
- Source:
technicalDetails
- Source:
technicalDetails
- Source:
technicalDetails
- Source:
technicalDetails
- Source:
termsURL
- Source:
timeParameter
- Source:
timeout
- Source:
title
- Source:
title
- Source:
title
- Source:
total
- Source:
unit
- Source:
unit
- Source:
url
- Source:
url
- Source:
url
- Source:
url
- Source:
url
- Source:
urlButtons
- Source:
value
- Source:
value
- Source:
valueText
- Source:
version
- Source:
width
- Source:
width
- Source:
Methods
areDependenciesMet()
- Source:
cancelModListUpdate()
- Source:
cancelRequest()
- Source:
checkTerms()
- Source:
clearModList()
- Source:
colorMod()
- Source:
coloredText()
Add color to text string.
- Source:
comparedModsString()
Convert the required and active mods and their version into a humanreadable translated string.
- Source:
compatibilityColor()
Adds grey font if is not compatible.
- Source:
disableMod()
- Source:
displayModList()
- Source:
displayModLists()
- Source:
displayMods()
- Source:
distributeButtonsHorizontally()
- Source:
(async) downloadMod()
- Source:
downloadModsButton()
- Source:
downloadModsButton()
- Source:
enableMod()
- Source:
filesizeToObj(filesize)
Parameters:
| Name | Type | Description |
|---|---|---|
filesize |
In bytes. |
- Source:
Returns:
Object with quantized filesize and suitable unit of size.
filesizeToString()
- Source:
filterMod()
- Source:
getHotloadData()
- Source:
getMod()
Return fake mod for mods which do not exist
- Source:
getModColor()
- Source:
getSelectedModUrl() → {string}
- Source:
Returns:
The url of the currently selected mod.
- Type
- string
getTermsHash()
- Source:
globalRegExp()
- Source:
hasSameMods()
Check the mod compatibility between the saved game to be loaded and the engine.
This is a wrapper around an engine function to allow mods to to fancier or specific things.
- Source:
hideDialog()
- Source:
init(initialColor)
Parameters:
| Name | Type | Description |
|---|---|---|
initialColor |
String | initial color as RGB string e.g. 100 0 200 |
- Source:
(async) init()
- Source:
init()
init()
init()
- Source:
init()
- Source:
init()
- Source:
init()
- Source:
init()
- Source:
init()
- Source:
init()
Currently limited to at most 3 buttons per message box.
The convention is to have "cancel" appear first.
- Source:
init()
- Source:
init()
- Source:
(async) init()
- Source:
init()
- Source:
(async) init()
- Source:
init()
init()
initGUIButtons()
- Source:
initGUIFilters()
- Source:
initLanguageSelection()
- Source:
initMods()
- Source:
initTerms()
- Source:
initURLButtons()
- Source:
(async) initializeButtons()
- Source:
isDependencyMet(dependency)
Parameters:
| Name | Type | Description |
|---|---|---|
dependency |
is a mod name or a mod version comparison. |
- Source:
isSelectedModInvalid()
- Source:
isTranslatableString()
- Source:
loadEnabledMods()
- Source:
loadMods()
- Source:
loadTermsAcceptance()
- Source:
messageBox()
- Source:
modToString()
Print the shorthand identifier of a mod.
- Source:
modsToString()
Converts a list of mods and their version into a human-readable string.
- Source:
moveCurrItem()
Moves an item in the list up or down.
- Source:
onTick()
- Source:
(async) openModIo()
- Source:
(async) openTerms()
- Source:
openURL()
- Source:
(async) progressDialog()
- Source:
recomputeCompatibility()
- Source:
reloadDisabledMods()
- Source:
resizeChanel()
- Source:
saveMods()
- Source:
selectedMod()
- Source:
selectedModIndex()
- Source:
setButtonCaptionsAndVisibility()
- Source:
setStringTags(string, tags)
Set GUI tags on text string.
Parameters:
| Name | Type | Description |
|---|---|---|
string |
string | String to apply tags to. |
tags |
object | Object containing the tags, for instance { "color": "white" } or { "font": "sans-13" }. |
- Source:
showErrorMessageBox()
- Source:
showModDescription()
- Source:
sortEnabledMods()
- Source:
startMods()
- Source:
timeToString(time)
Convert time in milliseconds to [HH:]mm:ss string representation.
Parameters:
| Name | Type | Description |
|---|---|---|
time |
Time period in milliseconds (integer) |
- Source:
Returns:
String representing time period
timedConfirmation()
- Source:
translate()
Translates the specified English message into the current language.
- Source:
translateMessageObject()
The input object should contain either of the following properties:
• A ‘_string’ property that contains a message to translate.
• A ‘list’ property that contains a list of messages to translate as a
comma-separated list of translated.
Optionally, the input object may contain a ‘context’ property. In that case,
the value of this property is used as translation context, that is, passed to
the translateWithContext(context, message) function.
- Source:
translateObjectKeys()
Translates any string value in the specified JavaScript object
that is associated with a key included in the specified keys array.
it accepts an object in the form of
{
"translatedString1": "my first message",
"unTranslatedString1": "some English string",
"ignoredObject": {
"translatedString2": "my second message",
"unTranslatedString2": "some English string"
},
"translatedObject1": {
"_string": "my third singular message",
"context": "message context",
},
translatedObject2: {
"list": ["list", "of", "strings"],
"context": "message context",
},
}
Together with a keys list to translate the strings and objects
["translatedString1", "translatedString2", "translatedObject1",
"translatedObject2"]
The result will be (f.e. in Dutch)
{
"translatedString1": "mijn eerste bericht",
"unTranslatedString1": "some English string",
"ignoredObject": {
"translatedString2": "mijn tweede bericht",
"unTranslatedString2": "some English string"
},
"translatedObject1": "mijn derde bericht",
"translatedObject2": "lijst, van, teksten",
}
So you see that the keys array can also contain lower-level keys,
And that you can include objects in the keys array to translate
them with a context, or to join a list of translations.
Also, the keys array may be an object where properties are keys to translate
and values are translation contexts to use for each key.
- Source:
translatePlural()
Translates the specified English message into the current language for the specified number.
- Source:
translatePluralWithContext()
Translates the specified English message into the current language for the specified context and number.
- Source:
translateWithContext()
Translates the specified English message into the current language for the specified context.
- Source:
(async) updateModList()
- Source:
updateProgressBar()
- Source:
validateDependencies()
- Source:
validateLabel()
- Source:
validateMod()
Returns whether the mod defines all required properties and whether all properties are valid.
Shows a notification if not.
- Source:
validateMod()
- Source:
validateMods()
- Source:
validateName()
- Source:
validateVersion()
- Source:
versionSatisfied()
Compares the given versions using the given operator.
'-' or '_' is ignored. Only numbers are supported.
- Source:
visitModWebsite()
- Source: