public abstract class Console
extends Object
subModeEnter("Simulation", "Editor"); //your editor command here; subModeLeave("Simulation", "Editor"); modeEnter("pregame"); modeEnter("Simulation"); subModeEnter("Simulation", "Singleplayer");
Modifier and Type | Method and Description |
---|---|
void |
alignResources()
Realigns all resources in the world to tile boundaries.
|
void |
alignSelectedUnits()
Realigns all selected units to tile boundaries.
|
void |
blackmap(int state)
Toggles or sets unexplored black map rendering.
|
void |
cancelAutoPatcher()
Cancel the auto patcher.
|
void |
categoryFlash(int catID,
bool flash)
Turns UI category flashing on/off.
|
void |
click()
Plays the default UI click sound.
|
void |
confirmAutoPatcher()
Used to tell auto patcher user pressed OK on exit or error dialog.
|
void |
console()
Toggles the state of the console dialog.
|
string[] |
databaseFindByType(string typeName)
Deprecated.
|
void |
dropToMainMenu()
Drop back to the main menu.
|
void |
echo(string message)
Sends a message to the console output.
|
void |
echoLocalized(int stringID)
Fetched a message from the language dll file
and calls
echo on that. |
void |
echoNum(string message)
Sends a number to the console output.
|
void |
editMode(string modeName)
Changes the edit mode.
|
void |
erosionClear()
Deprecated.
|
void |
exit()
Exits the game.
|
void |
exitMPSetupSubScreen()
Leave the current MP screen and return to the MP setup menu.
|
void |
fog(int state)
Toggles or sets LOS fog.
|
void |
handlePostGame()
Opens the postgame dialog if allowed.
|
void |
hideGameMenu()
Hide the in-game menu.
|
void |
IMEEnable(bool enable)
Enables or disables IME.
|
void |
leaveGame()
Destroys the world and returns to main menu.
|
void |
map(string key,
string context,
string command)
Maps an input event to the given command, in the given context.
|
void |
minimapRotateMode(int mode)
Changes the minimap rotation mode.
|
void |
minimapZoom(float zoom)
Sets the zoom factor of the minimap.
|
void |
minimapZoomDelta(float zoomDelta)
Changes the zoom factor of the minimap up or down by that amount (remaining centered on the current view)
|
void |
musicPlaySong(string songname,
int fadetime)
Play a sound as if it were a music track.
|
void |
musicToggleBattleMode()
Toggles between battle mode and normal mode.
|
void |
outputBlankLine()
Deprecated.
|
void |
pause(int state)
With no arguments, toggles pause state on/off, otherwise, sets pause state.
|
void |
player(int player)
With no arguments, outputs current player.
|
void |
playerResign()
Resigns the currently controlled player.
|
void |
playMovie()
Plays movies from a playlist in the AVI directory.
|
void |
postGamePlayAgain()
Restarts the current game from postgame.
|
void |
redo()
Re-does the last undone operation.
|
void |
researchByID(int techID,
int researchingUnitID,
int playerID)
Start the research of techID from ResearchingUnitID.
|
void |
researchByName(string techName)
Deprecated.
|
void |
researchCancelByID(int techID,
int unitID,
int playerID)
Cancel the research techID from UnitID.
|
void |
resetDefaultPlayerColors()
Reloads the default player colors from the XML file.
|
void |
resourceMarket(int playerID,
string resourceTo,
float amount,
string resourceFrom)
Trades resources at the market for the given player.
|
void |
restart()
Re-launch current scenario.
|
void |
restartCurrentGame()
Restarts current game.
|
void |
scoreUpdate()
Causes score to update even if it isn't supposed to yet, time wise.
|
void |
screenshot()
Take a screen shot.
|
void |
setMinimapUnitFilter()
Sets the minimap filter.
|
void |
setMultiPlayerSetupFile(string file)
Sets a custom UI definition file for the multiplayer setup screen.
|
void |
showBrowser(bool show)
Shows or hides the embedded browser.
|
void |
showGameFromPostGame()
Goes back to the default in-game screen.
|
void |
showGameMenu()
Show the in-game menu.
|
void |
startAutoPatcher(bool manualMode)
Start the auto patcher.
|
void |
startRandomGame()
Begins a new random game with default settings.
|
void |
startRandomGame2(string filename,
int nbPlayers,
int randomSeed,
string scenarioFilename,
bool debug,
int teamCount,
int mapsize,
int resources)
Begins a new random game with the given parameters.
|
void |
startRandomGame3(string mapFilename,
int civ1ID,
int civ2ID)
Begins a 2 player random map AI versus AI game with the given parameters.
|
void |
strategicMap()
For showing/hiding the (big) strategic map.
|
void |
supaScreenshot(int xRes,
string singleImage)
Take a screen shot of the whole map, might take a while.
|
void |
techFlash(int techID,
bool flash)
Turns technology buttons flashing on/off.
|
string |
techNameByID(int techID)
Deprecated.
|
void |
toggleScore()
Handles the score toggling.
|
void |
toggleTime()
Handles the time display toggling.
|
void |
trainFlash(int protoID,
bool flash)
Turns train buttons flashing on/off.
|
void |
uiAgeUpDialog(string techName)
Brings up the age advancement dialog with a suitable set of minor god choices.
|
void |
uiAIChatSelectLocation()
Passes the location selected in the world to the AI Chat dialog.
|
void |
uiApplyWorldEditor()
Do an application of the current world editor at the cursor's location.
|
void |
uiBuildMode(int type)
Enters building editMode and sets the proper cursor protounit, after verifying sufficient resources for the current player.
|
void |
uiBuildWallAtPointer()
Instructs the currently selected unit(s) to build the current
proto unit cursor building type at the pointer location,
with wall-like endpoint behavior.
|
void |
uiChangeCommandPage()
Changes page of buttons, options.
|
void |
uiChangeObserverPerspective(int player)
If a valid index is given, changes the perspective/FOW of the observer player to the indexed player.
|
void |
uiClearGatherPoint()
Clears the gather point for the selected unit(s), returning it to a default state.
|
void |
uiClearMenu()
Removes any dangling child menus off of the given gadget.
|
void |
uiCopyToClipboard()
Copies the brush selection to the clipboard.
|
void |
uiCreateNewWorldEditor()
Creates a new world editor with the given name and type.
|
void |
uiDumpAIIUnitHotKeyMappings()
Deprecated.
|
void |
uiDumpKeyMappings(string context)
Deprecated.
|
void |
uiDumpUnmappedKeys(string context)
Deprecated.
|
void |
uiEditCurrentWorldEditor()
Bring up an editing dialog for current world editor.
|
void |
uiEjectAtPointer()
Sends an ejection command with waypoint for the selected unit.
|
void |
uiEjectGarrisonedUnits()
Sends an ejection command for the selected unit.
|
void |
uiEmpowerAtPointer()
Commands the selected unit(s) to Empower the target building at the pointer position.
|
void |
uiEnterContext(string context)
Enters the specified UI context.
|
void |
uiFindKeyMapping(string keyname)
Deprecated.
|
void |
uiFlareAtPointer()
Sends out a flare at the pointer position.
|
void |
uiGarrisonToPointer()
Commands the selected unit(s) to garrison in a building at the pointer position.
|
void |
uiGuardAtPointer()
Sends an guard order.
|
void |
uiHandleIdleBanner(string typeName)
Does the right thing.
|
void |
uiHandleUserTab(string listSel,
string parent)
Handles toggle of user textures.
|
void |
uiHideCursor()
Hides the cursor.
|
void |
uiHideTributeDialog()
Hides the tribute dialog.
|
void |
uiInitOptionsScreenProfileEditDialog()
Initializes the Profile Edit Dialog inside the OptionsScreen.
|
void |
uiLeaveContext(string context)
Leaves the specified UI context.
|
void |
uiLeaveModeOnUnshift()
Causes game to return to editMode("none") only when the shift hotkey is released.
|
void |
uilgnoreNextKey()
Used when activating a text box with a key to prevent that key from going into the text box too.
|
void |
uiMaximizeMainBackground()
Maximizes main UI.
|
void |
uiMessageBox(string text,
string command)
Pops up a message box with some text and an OK button.
|
void |
uiMinimizeMainBackground()
Minimizes main UI and brings up the minimized UI.
|
void |
uiMultiplayerSave()
Shows the save dialog, but only when in a multiplayer game
(and stops playing stupid music at 11pm).
|
void |
uiNewScenario()
Creates a new blank scenario.
|
void |
uiPasteFromClipboard()
Pastes the contents of the clipboard to the brush selection.
|
void |
uiPatrolAtPointer()
Sends an patrol order.
|
void |
uiRefreshEditorMenu()
Reconstitutes the entire editor menu.
|
void |
uiReleaseDownKeys()
Pops up all downed keys.
|
void |
uiRepairAtPointer()
Commands the selected unit(s) to repair the target building at the pointer position.
|
void |
uiRepairBuilding()
Repairs the selected building if it's in a failed state.
|
void |
uiRotateClipboard(int degrees)
Rotate the clipboard by amount.
|
void |
uiSetClipboardRotation(int degrees)
Sets the clipboard rotation amount.
|
void |
uiSetCombatCommands()
Switches the command panel to show "normal commands".
|
void |
uiSetCurrentMix(int index)
Chooses which mix to use.
|
void |
uiSetCurrentWorldEditor(int index)
Chooses which WorldEditor to use.
|
void |
uiSetGatherPointAtPointer()
Sets the gather points for the selected unit(s) to the pointer position.
|
void |
uiSetSpecialPower(int techNodeID)
Specifies what god power will be used in the god power editmode.
|
void |
uiShowFakeTechTree()
Shows the fake-o technology tree with the current civilization.
|
void |
uiShowObjectivesDialog()
Shows the objectives dialog, if available.
|
void |
uiShowTributeDialog()
Shows the tribute dialog.
|
void |
uiShowVoteDialog()
Shows the vote dialog.
|
void |
uiSpecialPowerAtPointer()
Use a special power at targeted location.
|
void |
uiSpewDownKeys()
Deprecated.
|
void |
uiStartScenarioTest()
Start testing a scenario.
|
void |
uiStopScenarioTest()
Stop testing a scenario.
|
void |
uiToggleCombatCommands()
Toggles the command panel to show either "normal commands" or "combat commands".
|
void |
uiToggleEditor()
Deprecated.
|
void |
uiToggleGame()
Turns off the game UI.
|
void |
uiToggleObserverFOW(bool reveal)
Reveals or covers up the entire map's FOW.
|
void |
uiToggleObserverMode(int player)
Toggle the observer Mode Tab.
|
void |
uiToggleTerrainPasteMode()
This is not what you are looking for.
|
void |
undo()
Undoes the last editing operation.
|
void |
unitTransform(string proto1,
string proto2)
Replaces all of one with the other, via mutation.
|
void |
uploadDesyncLog()
Forces a pre-prepared desync log file to upload.
|
public void map(string key, string context, string command)
key
- The input key to be bound to an action.
When prefixed with a plus, the given action is executed on both keydown and keyup, with param keyState 0 and 1 respectively.
context
- General contexts:
Building contexts:
Gadgets: all gadget names can be used as context, but may only execute if the mapping is defined in the same file as the gadget (e.g. in uimain.xml).
All Edit Modes
command
- Any sequence of functions found in this package. There is a rather short length limit on this parameter. This limitation does not apply to keys bound in the data/DefaultKeyMap.xml file or commands in e.g. UI buttons.InputConfig.allowMultipleBinds
,
editMode(string)
,
uiEnterContext(string)
,
uiLeaveContext(string)
,
ScriptConfig.developer
,
ScriptConfig.aiDebug
map("control-shift-alt-F12", "root", "configToggle(\"flashHitpointBarsOnDamage\")")
public void uiEnterContext(string context)
public void uiLeaveContext(string context)
public void echo(string message)
public void echoLocalized(int stringID)
echo
on that.public void echoNum(string message)
public void IMEEnable(bool enable)
public void console()
configSet(\"showConsole\")
call.public void pause(int state)
public void exit()
public void screenshot()
public void supaScreenshot(int xRes, string singleImage)
public void undo()
public void redo()
public void alignResources()
public void alignSelectedUnits()
public void outputBlankLine()
public void resourceMarket(int playerID, string resourceTo, float amount, string resourceFrom)
public void restart()
public void strategicMap()
public string[] databaseFindByType(string typeName)
public string techNameByID(int techID)
public void musicPlaySong(string songname, int fadetime)
public void musicToggleBattleMode()
public void player(int player)
trPlayerSetActive(int)
public void fog(int state)
public void blackmap(int state)
public void resetDefaultPlayerColors()
public void setMinimapUnitFilter()
public void startAutoPatcher(bool manualMode)
public void cancelAutoPatcher()
public void confirmAutoPatcher()
public void playMovie()
public void unitTransform(string proto1, string proto2)
public void erosionClear()
public void researchByID(int techID, int researchingUnitID, int playerID)
public void researchByName(string techName)
public void researchCancelByID(int techID, int unitID, int playerID)
public void click()
public void editMode(string modeName)
modeName
- public void uiBuildWallAtPointer()
public void uiSetGatherPointAtPointer()
public void uiClearGatherPoint()
public void uiFlareAtPointer()
public void uiGarrisonToPointer()
public void uiRepairAtPointer()
public void uiEmpowerAtPointer()
public void uiStartScenarioTest()
public void uiStopScenarioTest()
public void uiBuildMode(int type)
public void uiHandleIdleBanner(string typeName)
public void uiMessageBox(string text, string command)
text
- The text to show.command
- The command to execute when the OK button is pressed.public void uiCopyToClipboard()
public void uiPasteFromClipboard()
public void uiSetClipboardRotation(int degrees)
public void uiRotateClipboard(int degrees)
public void uiEjectGarrisonedUnits()
public void uiEjectAtPointer()
public void uiPatrolAtPointer()
public void uiGuardAtPointer()
public void uiSetCurrentMix(int index)
public void uiSetCurrentWorldEditor(int index)
public void uiCreateNewWorldEditor()
public void uiApplyWorldEditor()
public void uiEditCurrentWorldEditor()
public void uilgnoreNextKey()
public void uiClearMenu()
public void uiDumpKeyMappings(string context)
public void uiDumpAIIUnitHotKeyMappings()
public void uiDumpUnmappedKeys(string context)
public void uiFindKeyMapping(string keyname)
public void uiHandleUserTab(string listSel, string parent)
public void techFlash(int techID, bool flash)
trUIFlashTech(int, bool)
public void trainFlash(int protoID, bool flash)
trUIFlashTrain(string, bool)
public void categoryFlash(int catID, bool flash)
trUIFlashCategory(int, bool)
public void uiRepairBuilding()
public void uiHideCursor()
trLetterBox(false)
public void uiLeaveModeOnUnshift()
public void uiToggleTerrainPasteMode()
public void uiAgeUpDialog(string techName)
researchByID(int, int, int)
public void uiReleaseDownKeys()
public void uiSpewDownKeys()
public void uiShowFakeTechTree()
public void uiAIChatSelectLocation()
public void startRandomGame()
public void startRandomGame2(string filename, int nbPlayers, int randomSeed, string scenarioFilename, bool debug, int teamCount, int mapsize, int resources)
public void startRandomGame3(string mapFilename, int civ1ID, int civ2ID)
public void restartCurrentGame()
public void leaveGame()
public void handlePostGame()
subModeEnter("simulation", "postgame")
public void showGameFromPostGame()
public void postGamePlayAgain()
public void minimapZoomDelta(float zoomDelta)
public void minimapZoom(float zoom)
public void minimapRotateMode(int mode)
public void uiSpecialPowerAtPointer()
public void uiSetSpecialPower(int techNodeID)
public void uiToggleGame()
trLetterBox(false)
public void uiToggleEditor()
public void uiRefreshEditorMenu()
public void uiMinimizeMainBackground()
public void uiMaximizeMainBackground()
public void uiShowTributeDialog()
public void uiHideTributeDialog()
public void uiChangeCommandPage()
public void uiSetCombatCommands()
public void uiToggleCombatCommands()
public void uiNewScenario()
EngineConfig.worldSizeX
,
EngineConfig.worldSizeZ
public void setMultiPlayerSetupFile(string file)
public void scoreUpdate()
public void toggleScore()
public void toggleTime()
public void exitMPSetupSubScreen()
public void playerResign()
public void showGameMenu()
public void hideGameMenu()
public void uiInitOptionsScreenProfileEditDialog()
public void uiMultiplayerSave()
public void dropToMainMenu()
public void uiShowObjectivesDialog()
public void uiShowVoteDialog()
public void showBrowser(bool show)
public void uiToggleObserverMode(int player)
public void uiChangeObserverPerspective(int player)
player
- public void uiToggleObserverFOW(bool reveal)
public void uploadDesyncLog()