Class: Window_BattleLog

Window_BattleLog

new Window_BattleLog()

The window for displaying battle progress. No frame is displayed, but it is handled as a window for convenience.

Extends

Members

activebooleaninherited

The active state for the window

backOpacitynumberinherited

The opacity of the window background (0 to 255)
The bitmap used for the window contents

contentsBackBitmapinherited

The bitmap used for the window contents background

contentsOpacitynumberinherited

The opacity of the window contents (0 to 255)

cursorVisiblebooleaninherited

The visibility of the cursor

downArrowVisiblebooleaninherited

The visibility of the down scroll arrow

frameVisiblebooleaninherited

The visibility of the frame

heightnumberinherited

The height of the window in pixels

innerHeightnumberreadonlyinherited

The height of the content area in pixels

innerRectRectanglereadonlyinherited

The rectangle of the content area

innerWidthnumberreadonlyinherited

The width of the content area in pixels

marginnumberinherited

The size of the margin for the window background

opacitynumberinheritedoverrides

The opacity of the window without contents (0 to 255)

opennessnumberinherited

The openness of the window (0 to 255)
The origin point of the window for scrolling

paddingnumberinherited

The size of the padding between the frame and contents

pausebooleaninherited

The visibility of the pause sign

upArrowVisiblebooleaninherited

The visibility of the up scroll arrow

widthnumberinherited

The width of the window in pixels

windowskinBitmapinherited

The image used as a window skin

Methods

Activates the window

actorName(n)stringinherited

Gets an actor name from their id
NameTypeDescription
nnumberActor id
Returns:
TypeDescription
stringThe actor's name

addChildToBack(child)objectinherited

Adds a child between the background and contents
NameTypeDescription
childobjectThe child to add
Returns:
TypeDescription
objectThe child that was added

addInnerChild(child)objectinherited

Adds a child to the client area
NameTypeDescription
childobjectThe child to add
Returns:
TypeDescription
objectThe child that was added
Adds a new line of text to the window
NameTypeDescription
textstringThe text to add

backColor()string

Gets the background color
Returns:
TypeDescription
stringThe background color

backPaintOpacity()number

Gets the background opacity
Returns:
TypeDescription
numberThe opacity of the background
Gets the window background rectangle
Returns:
TypeDescription
RectangleThe Rectangle that contains the window background
Creates a rectangle for an item of text
Returns:
TypeDescription
RectangleRectangle that encompasses the text item

calcTextHeight(textState)stringinherited

Calculates the height of the text in a text state
NameTypeDescription
textStateObjectThe text state object
Returns:
TypeDescription
stringThe height of the text

callNextMethod()

Calls the next method queued up in the window
Throws:
Error if the method has no name or is not a valid method

changeOutlineColor(color)inherited

Changes the text outline color of text drawn to the window
NameTypeDescription
colorstringThe new outline color to use

changePaintOpacity(enabled)inherited

Changes the opacity of what is painted to the contents of the window
NameTypeDescription
enabledbooleanTrue = use full opacity | False = use translucent opacity

changeTextColor(color)inherited

Changes the text color of text drawn to the window
NameTypeDescription
colorstringThe new color to draw text in

checkRectObject(rect)booleaninherited

Checks if the given rect parameter is a valid Rectangle
NameTypeDescription
rect*The object to check for validity
Throws:
Error if the object is not a valid rectangle
Returns:
TypeDescription
booleanTrue if the object is a valid rectangle
Clears the lines and base line stack
Start closing the window

contentsHeight()numberinherited

Gets the height needed for the window contents
Returns:
TypeDescription
numberHeight needed for the window contents

contentsWidth()numberinherited

Gets the width needed for the window contents
Returns:
TypeDescription
numberWidth needed for the window contents

convertEscapeCharacters(text)stringinherited

Converts escape code characters in text, for example \v[x]
NameTypeDescription
textstringThe text to convert
Returns:
TypeDescription
stringText with escape characters converted
Creates the contents of the window

createDimmerSprite()inherited

Creates the background dimmer sprite

createTextBuffer(rtl)stringinherited

Creates a text buffer
NameTypeDescription
rtlbooleanIf the text is right to left (such as arabic text)
Returns:
TypeDescription
stringThe buffer for text embedding either right to left or left to right

createTextState(text, x, y, width)Objectinherited

Creates a text state object for drawing text with text codes
NameTypeDescription
textstringThe text to draw
xnumberThe x coordinate to draw the text
ynumberThe y coordinate to draw the text
widthnumberThe width of the text
Returns:
TypeDescription
ObjectThe text state object
Deactivates the window
Destroys the window
Destroys the contents of the window

displayAction(subject, item)

Handling for the display of an action
NameTypeDescription
subjectGame_BattlerThe subject of the action
itemObjectThe item of an action (skill or item)

displayActionResults(subject, target)

Displays action results
NameTypeDescription
subjectGame_BattlerThe subject
targetGame_BattlerThe target

displayAddedStates(target)

Displays added states
NameTypeDescription
targetGame_BattlerThe target

displayAffectedStatus(target)

Displays states or buffs
NameTypeDescription
targetGame_BattlerThe target

displayAutoAffectedStatus(target)

Displays auto affected status
NameTypeDescription
targetGame_BattlerThe target

displayBuffs(target, buffs, fmt)

Displays buffs
NameTypeDescription
targetGame_BattlerThe target
buffsArray.<number>Array of paramIds that are buffed
fmtstringThe message format

displayChangedBuffs(target)

Displays changed buffs
NameTypeDescription
targetGame_BattlerThe target

displayChangedStates(target)

Displays a change in state
NameTypeDescription
targetGame_BattlerThe target

displayCounter(target)

Displays a counter
NameTypeDescription
targetGame_BattlerThe target

displayCritical(target)

Displays a critical
NameTypeDescription
targetGame_BattlerThe target

displayCurrentState(subject)

Handling for displaying the current state of a subject
NameTypeDescription
subjectGame_BattlerThe subject

displayDamage(target)

Displays damage
NameTypeDescription
targetGame_BattlerThe target

displayEvasion(target)

Displays an evade
NameTypeDescription
targetGame_BattlerThe target

displayFailure(target)

Displays action failure
NameTypeDescription
targetGame_BattlerThe target

displayHpDamage(target)

Displays hp damage
NameTypeDescription
targetGame_BattlerThe target

displayItemMessage(fmt, subject, item)

Displays an item message
NameTypeDescription
fmtstringThe format of the message
subjectGame_BattlerThe subject
itemObjectThe item

displayMiss(target)

Displays a miss
NameTypeDescription
targetGame_BattlerThe target

displayMpDamage(target)

Displays mp damage
NameTypeDescription
targetGame_BattlerThe target

displayReflection(target)

Displays a reflection
NameTypeDescription
targetGame_BattlerThe target

displayRegeneration(subject)

Handling for displaying regeneration of a subject
NameTypeDescription
subjectGame_BattlerThe subject

displayRemovedStates(target)

Displays removed states
NameTypeDescription
targetGame_BattlerThe target

displaySubstitute(substitute, target)

Displays a substitute
NameTypeDescription
substituteGame_BattlerThe substitute
targetGame_BattlerThe original target

displayTpDamage(target)

Displays tp damage
NameTypeDescription
targetGame_BattlerThe target

drawBackground()

Draws the window background

drawCharacter(characterName, characterIndex, x, y)inherited

Draws a character at x/y coordinates
NameTypeDescription
characterNamestringThe name of the character sheet bitmap
characterIndexnumberThe index of the character on the sheet
xnumberThe x coordinate
ynumberThe y coordinate

drawCurrencyValue(value, unit, x, y, width)inherited

Draws a currency value
NameTypeDescription
valuenumberThe amount of currency
unitstringThe currency unit
xnumberThe x coordinate
ynumberThe y coordinate
widthnumberThe width available to draw the item name

drawFace(faceName, faceIndex, x, y, width, height)inherited

Draws a face at x/y coordinates with width/height
NameTypeDescription
faceNamestringThe name of the face sheet bitmap
faceIndexnumberThe index of the face on the sheet
xnumberThe x coordinate
ynumberThe y coordinate
widthnumberThe width of the face
heightnumberThe height of the face

drawIcon(iconIndex, x, y)inherited

Draws an icon at x/y coordinates
NameTypeDescription
iconIndexnumberThe index of the icon to draw
xnumberThe x coordinate
ynumberThe y coordinate

drawItemName(item, x, y, width)inherited

Draws an item's name with its icon
NameTypeDescription
itemObjectThe item object to draw, must at least have iconIndex and name properties
xnumberThe x coordinate
ynumberThe y coordinate
widthnumberThe width available to draw the item name

drawLineText(index)

Draws a line's text at a given line index
NameTypeDescription
indexnumberThe line index to draw

drawRect(x, y, width, height)inherited

Draws a rectangle of given width/height at given x/y coordinates
NameTypeDescription
xnumberThe X coordinate of the upper left corner of the rectangle
ynumberThe Y coordinate of the upper left corner of the rectangle
widthnumberThe width in pixels of the rectangle
heightnumberThe height in pixels of the rectangle
Draws the window shape into PIXI.Graphics object. Used by WindowLayer

drawText(text, x, y, maxWidth, align)inherited

Draws text to the window's contents. Does not support text codes in the text, but will fit the text within the maximum width without overflowing.
NameTypeDescription
textstringThe text to draw
xnumberThe x coordinate to begin drawing the text
ynumberThe y coordinate to begin drawing the text
maxWidthnumberThe maximum width in pixels of the text
alignstringThe alignment of the text

drawTextEx(text, x, y, width)numberinherited

Draws text to the window's contents. Does support text codes.
NameTypeDescription
textstringThe text to draw
xnumberThe x coordinate to draw the text
ynumberThe y coordinate to draw the text
widthnumberThe width of the text
Returns:
TypeDescription
numberThe width of the drawn text

endAction(subject)

Handling for the end of an action
NameTypeDescription
subjectGame_BattlerThe subject of the action

fittingHeight(numLines)numberinherited

Calculates the height needed for a given number of lines
NameTypeDescription
numLinesnumberThe number of lines to calculate the height of
Returns:
TypeDescription
numberThe height needed to fit the amount of lines

flushTextState(textState)inherited

Flushes the text state
NameTypeDescription
textStateObjectThe text state to flush
Stops displaying the window

hideBackgroundDimmer()inherited

Hides the background dimmer sprite
Initializes the window

isBusy()boolean

Check if the window is busy
Returns:
TypeDescription
booleanTrue if the window is busy

isClosed()booleaninherited

Checks whether the window is completely closed (openness == 0)
Returns:
TypeDescription
booleanTrue if the window is closed

isClosing()booleaninherited

Check if the window is closing
Returns:
TypeDescription
booleanTrue if window is currently closing

isFastForward()boolean

Check if the window should be fast forwarding
Returns:
TypeDescription
booleanTrue if the window is fast forwarding

isOpen()booleaninherited

Checks whether the window is completely open (openness == 255)
Returns:
TypeDescription
booleanTrue if the window is open

isOpening()booleaninherited

Check if the window is opening
Returns:
TypeDescription
booleanTrue if window is currently opening

itemHeight()numberinherited

Gets the height in pixels of an item
Returns:
TypeDescription
numberHeight of an item

itemPadding()numberinherited

Gets the padding for an item
Returns:
TypeDescription
numberAmount of item padding
Gets the width in pixels of an item
Returns:
TypeDescription
numberWidth of an item

lineHeight()numberinherited

Gets the height in pixels of one line
Returns:
TypeDescription
numberHeight of a line
Gets a rectangle object for a given line
NameTypeDescription
indexnumberThe line index
Returns:
TypeDescription
RectangleThe Rectangle that contains the line
Loads the windowskin for the window
Makes the font size bigger by 12
Makes the font size smaller by 12

makeHpDamageText(target)string

Gets the hp damage text to show
NameTypeDescription
targetGame_BattlerThe target
Returns:
TypeDescription
stringHP damage text to show

makeMpDamageText(target)string

Gets the mp damage text to show
NameTypeDescription
targetGame_BattlerThe target
Returns:
TypeDescription
stringMP damage text to show

makeTpDamageText(target)string

Gets the tp damage text to show
NameTypeDescription
targetGame_BattlerThe target
Returns:
TypeDescription
stringTP damage text to show

maxFontSizeInLine(line)numberinherited

Gets the max font size in a line of text
NameTypeDescription
linestringThe line of text
Returns:
TypeDescription
numberThe largest font size seen in the line of text

maxLines()number

Get the max lines the window should handle
Returns:
TypeDescription
numberMax number of lines

messageSpeed()number

Get the message speed in the window
Returns:
TypeDescription
numberThe message speed

move(x, y, width, height)inherited

Sets the x, y, width, and height of the window
NameTypeDescription
xnumberThe new x coordinate of the window
ynumberThe new y coordinate of the window
widthnumberThe new width of the window
heightnumberThe new height of the window

moveCursorBy(x, y)inherited

Moves the cursor position by the given amount
NameTypeDescription
xnumberThe amount of horizontal movement
ynumberThe amount of vertical movement

moveInnerChildrenBy(x, y)inherited

Moves the inner children by the given amount
NameTypeDescription
xnumberThe amount of horizontal movement
ynumberThe amount of vertical movement

numLines()number

Get the current number of lines in the window
Returns:
TypeDescription
numberThe number of lines in the window

obtainEscapeCode(textState)stringinherited

Gets an escape code
NameTypeDescription
textStateObjectThe text state object
Returns:
TypeDescription
stringThe escape code, will be empty string if none

obtainEscapeParam(textState)int | stringinherited

Gets an escape param
NameTypeDescription
textStateObjectThe text state object
Returns:
TypeDescription
int|stringThe escape param, will be empty string if none
Start opening the window

partyMemberName(n)stringinherited

Gets an actor name from their position in the party
NameTypeDescription
nnumberPosition in the party
Returns:
TypeDescription
stringThe actor's name

performAction(subject, action)

Performs an action
NameTypeDescription
subjectGame_BattlerThe subject of the action
actionGame_ActionThe action to perform

performActionEnd(subject)

Ends an action
NameTypeDescription
subjectGame_BattlerThe subject of the action

performActionStart(subject, action)

Starts an action
NameTypeDescription
subjectGame_BattlerThe subject of the action
actionGame_ActionThe action to start

performCollapse(target)

Performs a collapse
NameTypeDescription
targetGame_BattlerThe target that collapsed

performCounter(target)

Performs a counter
NameTypeDescription
targetGame_BattlerThe target that countered

performDamage(target)

Performs damage
NameTypeDescription
targetGame_BattlerThe target that took damage

performEvasion(target)

Performs an evade
NameTypeDescription
targetGame_BattlerThe target that evaded

performMagicEvasion(target)

Performs a magic evade
NameTypeDescription
targetGame_BattlerThe target that magic evaded

performMiss(target)

Performs a miss
NameTypeDescription
targetGame_BattlerThe target of the miss

performRecovery(target)

Performs recovery
NameTypeDescription
targetGame_BattlerThe target that recovered

performReflection(target)

Performs a reflection
NameTypeDescription
targetGame_BattlerThe target that reflected

performSubstitute(substitute, target)

Performs a substitute
NameTypeDescription
substituteGame_BattlerThe substitute
targetGame_BattlerThe original target
Plays the buzzer sound effect
Plays the cursor sound effect
Plays the ok sound effect
Pops the base line and any lines afterwards

popupDamage(target)

Pops up damage on a target
NameTypeDescription
targetGame_BattlerThe target where the damage popup should display

processAllText(textState)inherited

Processes all text within a text state object
NameTypeDescription
textStateObjectThe text state to process

processCharacter(textState)inherited

Processes a character in a text state at the current index of the text state
NameTypeDescription
textStateObjectThe text state object for processing a character

processColorChange(colorIndex)inherited

Processes a color change
NameTypeDescription
colorIndexnumberThe index of the color to change to

processControlCharacter(textState, c)inherited

Processes a control character within a text state
NameTypeDescription
textStateObjectThe text state object with the character
cstringThe character to process

processDrawIcon(iconIndex, textState)inherited

Processes drawing an icon
NameTypeDescription
iconIndexnumberThe index of the icon to draw
textStateObjectThe text state object

processEscapeCharacter(code, textState)inherited

Processes an escape character in a text state
NameTypeDescription
codestringThe escape character's code
textStateObjectThe text state object

processNewLine(textState)inherited

Processing for a new line
NameTypeDescription
textStateObjectThe text state object

push(methodName)

Pushes a method onto the method stack with arguments
NameTypeDescription
methodNamestringThe method name to push
Pushes the base line to the stack
Refreshes the window

refreshDimmerBitmap()inherited

Refreshes the background dimmer sprite

resetFontSettings()inherited

Resets font settings to defaults
Resets text and outline color to defaults

setBackgroundType(type)inherited

Sets the background type of the window
NameTypeDescription
typenumberThe type of background (0 = normal, 1 = dim, 2 = transparent)

setCursorRect(x, y, width, height)inherited

Sets the position of the command cursor
NameTypeDescription
xnumberThe x coordinate of the cursor
ynumberThe y coordinate of the cursor
widthnumberThe width of the cursor
heightnumberThe height of the cursor

setSpriteset(spriteset)

Associates the window with the spriteset
NameTypeDescription
spritesetSpriteset_BattleThe spriteset for the battle

setTone(r, g, b)inherited

Changes the color of the background
NameTypeDescription
rnumberThe red value in the range (-255, 255)
gnumberThe green value in the range (-255, 255)
bnumberThe blue value in the range (-255, 255)

setWaitMode(waitMode)

Sets the wait mode of the window. For example, "movement" if there is anyone moving on the spriteset
NameTypeDescription
waitModestringThe mode of the window's wait
Displays the window

showActorAttackAnimation(subject, targets)

Shows an actor attack animation
NameTypeDescription
subjectGame_BattlerThe subject of the animation
targetsArray.<Game_Battler>The target(s) of the animation

showAnimation(subject, targets, animationId)

Shows an animation
NameTypeDescription
subjectGame_BattlerThe subject of the animation
targetsArray.<Game_Battler>The target(s) of the animation
animationIdnumberThe ID of the animation to show

showAttackAnimation(subject, targets)

Shows a normal attack animation
NameTypeDescription
subjectGame_BattlerThe subject of the animation
targetsArray.<Game_Battler>The target(s) of the animation

showBackgroundDimmer()inherited

Shows the background dimmer sprite

showEnemyAttackAnimation()

Shows an enemy attack animation

showNormalAnimation(targets, animationId, mirror)

Shows a normal animation
NameTypeDescription
targetsArray.<Game_Battler>The target(s) of the animation
animationIdnumberThe ID of the animation to show
mirrorbooleanIf the animation should mirror

startAction(subject, action, targets)

Handling for the start of an action
NameTypeDescription
subjectGame_BattlerThe subject of the action
actionGame_ActionThe action
targetsArray.<Game_Battler>The target(s) of the action
Handling for battle turn start

systemColor()stringinherited

Gets the system text color
Returns:
TypeDescription
stringThe system text color

textSizeEx(text)Objectinherited

Calculates the width needed for a given string of text. Does support text codes.
NameTypeDescription
textstringThe text to calculate the width for
Returns:
TypeDescription
ObjectThe width and height of the text

textWidth(text)numberinherited

Calculates the width needed for a given string of text. Does not support text codes.
NameTypeDescription
textstringThe text to calculate the width for
Returns:
TypeDescription
numberThe width of the text

translucentOpacity()numberinherited

Gets the opacity to use for a translucent effect
Returns:
TypeDescription
numberThe opacity to use for a translucent effect
Updates the window

updateBackOpacity()inherited

Updates the window's background opacity

updateBackgroundDimmer()inherited

Updates the background dimmer sprite
Updates the closing effect
Updates the opening effect
Updates the window's padding
Updates the window's tone

updateTransform()inherited

Updates the transform on all children of this container for rendering

updateWait()boolean

Updates the wait of the window
Returns:
TypeDescription
booleanTrue if updated

updateWaitCount()boolean

Updates the wait count
Returns:
TypeDescription
booleanTrue if updated

updateWaitMode()boolean

Updates the wait mode
Returns:
TypeDescription
booleanTrue if the window is waiting
Starts the waiting process
Sets the wait mode for an effect wait

waitForMovement()

Sets the wait mode for a movement wait

waitForNewLine()

Waits for a new line