Class in reactor_objects_map.js

Game_CharacterBase

105 functions in 6 groups · hide internal

Everything here is tracked by Game Objects: the party, the map, its events.

Familiar territory. Game_CharacterBase keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

Quick Reference

Setup & Creation 2

initialize() Sets up a new instance.
initMembers() Initializes the members.

Getting Information 1

maxPattern() The maximum pattern.

Checks (True / False) 27

isNormalPriority() Whether it is normal priority.
isMoving() Whether it is moving.
isJumping() Whether it is jumping.
isStopping() Whether it is stopping.
isDashing() Whether it is dashing.
isDebugThrough() Whether it is debug through.
canPass() Whether it can pass.
canPassDiagonally() Whether it can pass diagonally.
isMapPassable() Whether it is map passable.
isCollidedWithCharacters() Whether it is collided with characters.
isCollidedWithEvents() Whether it is collided with events.
isCollidedWithVehicles() Whether it is collided with vehicles.
isTile() Whether it is tile.
isObjectCharacter() Whether it is object character.
isSortedAbovePriority() Whether it is sorted above priority.
isNearTheScreen() Whether it is near the screen.
isOriginalPattern() Whether it is original pattern.
isOnLadder() Whether it is on ladder.
isOnBush() Whether it is on bush.
isMovementSucceeded() Whether it is movement succeeded.
hasWalkAnime() Whether it has the walk anime.
hasStepAnime() Whether it has the step anime.
isDirectionFixed() Whether it is direction fixed.
isThrough() Whether it is through.
isTransparent() Whether it is transparent.
isAnimationPlaying() Whether it is animation playing.
isBalloonPlaying() Whether it is balloon playing.

Actions 27

moveSpeed() Move speed.
setMoveSpeed() Sets the move speed.
moveFrequency() Move frequency.
setMoveFrequency() Sets the move frequency.
setOpacity() Sets the opacity.
setBlendMode() Sets the blend mode.
setPriorityType() Sets the priority type.
jumpHeight() Jump height.
resetStopCount() Resets the stop count.
setPosition() Sets the position.
setDirection() Sets the direction.
setPattern() Sets the pattern.
resetPattern() Resets the pattern.
setTileImage() Sets the tile image.
setMovementSuccess() Sets the movement success.
moveStraight() Move straight.
moveDiagonally() Move diagonally.
jump() Jump.
setWalkAnime() Sets the walk anime.
setStepAnime() Sets the step anime.
setDirectionFix() Sets the direction fix.
setThrough() Sets the through.
setTransparent() Sets the transparent.
startAnimation() Starts the animation.
startBalloon() Starts the balloon.
endAnimation() Ends the animation.
endBalloon() Ends the balloon.

Updating & Drawing 8

update() Update.
updateStop() Updates the stop each frame.
updateJump() Updates the jump each frame.
updateMove() Updates the move each frame.
updateAnimation() Updates the animation each frame.
updateAnimationCount() Updates the animation count each frame.
updatePattern() Updates the pattern each frame.
refreshBushDepth() Redraws the bush depth.

Other 40

evenOut() Characters restored from a save, rebuilt so each kind has one shape: the fields in the order the fullest of i…
pos() Pos.
posNt() Pos nt.
opacity() Opacity.
blendMode() Blend mode.
rrTransformsOn() The drawn image's own turn, on top of the sheet: mirrored (it faces the other way), flipped (upside down), an…
reactorMirror() Reactor mirror.
reactorFlip() Reactor flip.
reactorRotate() Turn the drawn character to degrees clockwise; 0 stands it straight.
reactorRotateBy() Turn the drawn character on by degrees from where it stands now (a relative Rotate).
reactorImage() The image's turn as { mirror, flip, angle, pivot }.
reactorSetImage() Set the whole turn at once (an event page's Image options); a missing image straightens it.
reactorResetImage() Reset Image: not mirrored, not flipped, standing straight up (a Face Ceiling / Face Ground pose too).
checkStop() Check stop.
realMoveSpeed() Real move speed.
distancePerFrame() Distance per frame.
straighten() Straighten.
reverseDir() Reverse dir.
copyPosition() Copy position.
locate() Locate.
direction() Direction.
_reactorCanFace() Reactor can face.
shiftY() How far a character stands above its tile's bottom edge.
scrolledX() Scrolled x.
scrolledY() Scrolled y.
reactor3DScreenPoint() Where this character actually appears, when the map is drawn in 3D.
screenX() Screen x.
screenY() Screen y.
screenZ() Screen z.
animationWait() Animation wait.
pattern() Pattern.
terrainTag() Terrain tag.
regionId() Region id.
increaseSteps() Increase steps.
tileId() Tile id.
characterName() Character name.
characterIndex() Character index.
checkEventTriggerTouchFront() Check event trigger touch front.
checkEventTriggerTouch() Check event trigger touch.
bushDepth() Bush depth.

Setup & Creation

initialize

method source
Game_CharacterBase.prototype.initialize()

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

initMembers

method source
Game_CharacterBase.prototype.initMembers()

Initializes the members. (Same as the RPG Maker MZ method of this name.)

Getting Information

maxPattern

method source
Game_CharacterBase.prototype.maxPattern()

The maximum pattern. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isNormalPriority

method source
Game_CharacterBase.prototype.isNormalPriority()

Whether it is normal priority. (Same as the RPG Maker MZ method of this name.)

isMoving

method source
Game_CharacterBase.prototype.isMoving()

Whether it is moving. (Same as the RPG Maker MZ method of this name.)

isJumping

method source
Game_CharacterBase.prototype.isJumping()

Whether it is jumping. (Same as the RPG Maker MZ method of this name.)

isStopping

method source
Game_CharacterBase.prototype.isStopping()

Whether it is stopping. (Same as the RPG Maker MZ method of this name.)

isDashing

method source
Game_CharacterBase.prototype.isDashing()

Whether it is dashing. (Same as the RPG Maker MZ method of this name.)

isDebugThrough

method source
Game_CharacterBase.prototype.isDebugThrough()

Whether it is debug through. (Same as the RPG Maker MZ method of this name.)

canPass

method source
Game_CharacterBase.prototype.canPass(x, y, d)

Whether it can pass. (Same as the RPG Maker MZ method of this name.)

canPassDiagonally

method source
Game_CharacterBase.prototype.canPassDiagonally(x, y, horz, vert)

Whether it can pass diagonally. (Same as the RPG Maker MZ method of this name.)

isMapPassable

method source
Game_CharacterBase.prototype.isMapPassable(x, y, d)

Whether it is map passable. (Same as the RPG Maker MZ method of this name.)

isCollidedWithCharacters

method source
Game_CharacterBase.prototype.isCollidedWithCharacters(x, y)

Whether it is collided with characters. (Same as the RPG Maker MZ method of this name.)

isCollidedWithEvents

method source
Game_CharacterBase.prototype.isCollidedWithEvents(x, y)

Whether it is collided with events. (Same as the RPG Maker MZ method of this name.)

isCollidedWithVehicles

method source
Game_CharacterBase.prototype.isCollidedWithVehicles(x, y)

Whether it is collided with vehicles. (Same as the RPG Maker MZ method of this name.)

isTile

method source
Game_CharacterBase.prototype.isTile()

Whether it is tile. (Same as the RPG Maker MZ method of this name.)

isObjectCharacter

method source
Game_CharacterBase.prototype.isObjectCharacter()

Whether it is object character. (Same as the RPG Maker MZ method of this name.)

isSortedAbovePriority

method source
Game_CharacterBase.prototype.isSortedAbovePriority()

Whether it is sorted above priority. (Same as the RPG Maker MZ method of this name.)

isNearTheScreen

method source
Game_CharacterBase.prototype.isNearTheScreen()

Whether it is near the screen. (Same as the RPG Maker MZ method of this name.)

isOriginalPattern

method source
Game_CharacterBase.prototype.isOriginalPattern()

Whether it is original pattern. (Same as the RPG Maker MZ method of this name.)

isOnLadder

method source
Game_CharacterBase.prototype.isOnLadder()

Whether it is on ladder. (Same as the RPG Maker MZ method of this name.)

isOnBush

method source
Game_CharacterBase.prototype.isOnBush()

Whether it is on bush. (Same as the RPG Maker MZ method of this name.)

isMovementSucceeded

method source
Game_CharacterBase.prototype.isMovementSucceeded(/*x, y*/)

Whether it is movement succeeded. (Same as the RPG Maker MZ method of this name.)

hasWalkAnime

method source
Game_CharacterBase.prototype.hasWalkAnime()

Whether it has the walk anime. (Same as the RPG Maker MZ method of this name.)

hasStepAnime

method source
Game_CharacterBase.prototype.hasStepAnime()

Whether it has the step anime. (Same as the RPG Maker MZ method of this name.)

isDirectionFixed

method source
Game_CharacterBase.prototype.isDirectionFixed()

Whether it is direction fixed. (Same as the RPG Maker MZ method of this name.)

isThrough

method source
Game_CharacterBase.prototype.isThrough()

Whether it is through. (Same as the RPG Maker MZ method of this name.)

isTransparent

method source
Game_CharacterBase.prototype.isTransparent()

Whether it is transparent. (Same as the RPG Maker MZ method of this name.)

isAnimationPlaying

method source
Game_CharacterBase.prototype.isAnimationPlaying()

Whether it is animation playing. (Same as the RPG Maker MZ method of this name.)

isBalloonPlaying

method source
Game_CharacterBase.prototype.isBalloonPlaying()

Whether it is balloon playing. (Same as the RPG Maker MZ method of this name.)

Actions

moveSpeed

method source
Game_CharacterBase.prototype.moveSpeed()

Move speed. (Same as the RPG Maker MZ method of this name.)

setMoveSpeed

method source
Game_CharacterBase.prototype.setMoveSpeed(moveSpeed)

Sets the move speed. (Same as the RPG Maker MZ method of this name.)

moveFrequency

method source
Game_CharacterBase.prototype.moveFrequency()

Move frequency. (Same as the RPG Maker MZ method of this name.)

setMoveFrequency

method source
Game_CharacterBase.prototype.setMoveFrequency(moveFrequency)

Sets the move frequency. (Same as the RPG Maker MZ method of this name.)

setOpacity

method source
Game_CharacterBase.prototype.setOpacity(opacity)

Sets the opacity. (Same as the RPG Maker MZ method of this name.)

setBlendMode

method source
Game_CharacterBase.prototype.setBlendMode(blendMode)

Sets the blend mode. (Same as the RPG Maker MZ method of this name.)

setPriorityType

method source
Game_CharacterBase.prototype.setPriorityType(priorityType)

Sets the priority type. (Same as the RPG Maker MZ method of this name.)

jumpHeight

method source
Game_CharacterBase.prototype.jumpHeight()

Jump height. (Same as the RPG Maker MZ method of this name.)

resetStopCount

method source
Game_CharacterBase.prototype.resetStopCount()

Resets the stop count. (Same as the RPG Maker MZ method of this name.)

setPosition

method source
Game_CharacterBase.prototype.setPosition(x, y)

Sets the position. (Same as the RPG Maker MZ method of this name.)

setDirection

method source
Game_CharacterBase.prototype.setDirection(d)

Sets the direction. (Same as the RPG Maker MZ method of this name.)

setPattern

method source
Game_CharacterBase.prototype.setPattern(pattern)

Sets the pattern. (Same as the RPG Maker MZ method of this name.)

resetPattern

method source
Game_CharacterBase.prototype.resetPattern()

Resets the pattern. (Same as the RPG Maker MZ method of this name.)

setTileImage

method source
Game_CharacterBase.prototype.setTileImage(tileId)

Sets the tile image. (Same as the RPG Maker MZ method of this name.)

setMovementSuccess

method source
Game_CharacterBase.prototype.setMovementSuccess(success)

Sets the movement success. (Same as the RPG Maker MZ method of this name.)

moveStraight

method source
Game_CharacterBase.prototype.moveStraight(d)

Move straight. (Same as the RPG Maker MZ method of this name.)

moveDiagonally

method source
Game_CharacterBase.prototype.moveDiagonally(horz, vert)

Move diagonally. (Same as the RPG Maker MZ method of this name.)

jump

method source
Game_CharacterBase.prototype.jump(xPlus, yPlus)

Jump. (Same as the RPG Maker MZ method of this name.)

setWalkAnime

method source
Game_CharacterBase.prototype.setWalkAnime(walkAnime)

Sets the walk anime. (Same as the RPG Maker MZ method of this name.)

setStepAnime

method source
Game_CharacterBase.prototype.setStepAnime(stepAnime)

Sets the step anime. (Same as the RPG Maker MZ method of this name.)

setDirectionFix

method source
Game_CharacterBase.prototype.setDirectionFix(directionFix)

Sets the direction fix. (Same as the RPG Maker MZ method of this name.)

setThrough

method source
Game_CharacterBase.prototype.setThrough(through)

Sets the through. (Same as the RPG Maker MZ method of this name.)

setTransparent

method source
Game_CharacterBase.prototype.setTransparent(transparent)

Sets the transparent. (Same as the RPG Maker MZ method of this name.)

startAnimation

method source
Game_CharacterBase.prototype.startAnimation()

Starts the animation. (Same as the RPG Maker MZ method of this name.)

startBalloon

method source
Game_CharacterBase.prototype.startBalloon()

Starts the balloon. (Same as the RPG Maker MZ method of this name.)

endAnimation

method source
Game_CharacterBase.prototype.endAnimation()

Ends the animation. (Same as the RPG Maker MZ method of this name.)

endBalloon

method source
Game_CharacterBase.prototype.endBalloon()

Ends the balloon. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

update

method source
Game_CharacterBase.prototype.update()

Update. (Same as the RPG Maker MZ method of this name.)

updateStop

method source
Game_CharacterBase.prototype.updateStop()

Updates the stop each frame. (Same as the RPG Maker MZ method of this name.)

updateJump

method source
Game_CharacterBase.prototype.updateJump()

Updates the jump each frame. (Same as the RPG Maker MZ method of this name.)

updateMove

method source
Game_CharacterBase.prototype.updateMove()

Updates the move each frame. (Same as the RPG Maker MZ method of this name.)

updateAnimation

method source
Game_CharacterBase.prototype.updateAnimation()

Updates the animation each frame. (Same as the RPG Maker MZ method of this name.)

updateAnimationCount

method source
Game_CharacterBase.prototype.updateAnimationCount()

Updates the animation count each frame. (Same as the RPG Maker MZ method of this name.)

updatePattern

method source
Game_CharacterBase.prototype.updatePattern()

Updates the pattern each frame. (Same as the RPG Maker MZ method of this name.)

refreshBushDepth

method source
Game_CharacterBase.prototype.refreshBushDepth()

Redraws the bush depth. (Same as the RPG Maker MZ method of this name.)

Other

evenOut

static source
Game_CharacterBase.evenOut(characters)

Characters restored from a save, rebuilt so each kind has one shape: the fields in the order the fullest of its kind holds them, then the declared ones none of them holds yet.

Details

Characters restored from a save, rebuilt so each kind has one shape: the fields in the order the fullest of its kind holds them, then the declared ones none of them holds yet. Each keeps exactly its own fields (a plugin's included, accessors and hidden ones through their descriptors) plus the declared ones its prototype does not answer, as a new character has them. Anything not a character, or not extensible, is left out. Returns a map from each to its rebuilt self.

pos

method source
Game_CharacterBase.prototype.pos(x, y)

Pos. (Same as the RPG Maker MZ method of this name.)

posNt

method source
Game_CharacterBase.prototype.posNt(x, y)

Pos nt. (Same as the RPG Maker MZ method of this name.)

opacity

method source
Game_CharacterBase.prototype.opacity()

Opacity. (Same as the RPG Maker MZ method of this name.)

blendMode

method source
Game_CharacterBase.prototype.blendMode()

Blend mode. (Same as the RPG Maker MZ method of this name.)

rrTransformsOn

static source
Game_CharacterBase.rrTransformsOn()

The drawn image's own turn, on top of the sheet: mirrored (it faces the other way), flipped (upside down), and turned by any angle about its feet or its middle.

Details

The drawn image's own turn, on top of the sheet: mirrored (it faces the other way), flipped (upside down), and turned by any angle about its feet or its middle. Held on the character, so a save keeps it; a field never set stays undefined and is not written, so a plain MZ game saves as before. Sprite_Character (and a 3D map's billboard) draws it; the sheet is untouched. With Sprite Transforms off in Database > Reactor Features (a plugin turns characters), none of these does anything: a route's Mirror, Flip and Rotate steps and a page's Image options are passed over, as RPG Maker MZ would.

reactorMirror

method source
Game_CharacterBase.prototype.reactorMirror(on)

Reactor mirror. (Same as the RPG Maker MZ method of this name.)

reactorFlip

method source
Game_CharacterBase.prototype.reactorFlip(on)

Reactor flip. (Same as the RPG Maker MZ method of this name.)

reactorRotate

method source
Game_CharacterBase.prototype.reactorRotate(degrees, pivot)

Turn the drawn character to degrees clockwise; 0 stands it straight.

Details

Turn the drawn character to degrees clockwise; 0 stands it straight. pivot "center" turns it in place about its middle, else about its feet.

reactorRotateBy

method source
Game_CharacterBase.prototype.reactorRotateBy(degrees, pivot)

Turn the drawn character on by degrees from where it stands now (a relative Rotate).

reactorImage

method source
Game_CharacterBase.prototype.reactorImage()

The image's turn as { mirror, flip, angle, pivot }.

reactorSetImage

method source
Game_CharacterBase.prototype.reactorSetImage(image)

Set the whole turn at once (an event page's Image options); a missing image straightens it.

reactorResetImage

method source
Game_CharacterBase.prototype.reactorResetImage()

Reset Image: not mirrored, not flipped, standing straight up (a Face Ceiling / Face Ground pose too).

checkStop

method source
Game_CharacterBase.prototype.checkStop(threshold)

Check stop. (Same as the RPG Maker MZ method of this name.)

realMoveSpeed

method source
Game_CharacterBase.prototype.realMoveSpeed()

Real move speed. (Same as the RPG Maker MZ method of this name.)

distancePerFrame

method source
Game_CharacterBase.prototype.distancePerFrame()

Distance per frame. (Same as the RPG Maker MZ method of this name.)

straighten

method source
Game_CharacterBase.prototype.straighten()

Straighten. (Same as the RPG Maker MZ method of this name.)

reverseDir

method source
Game_CharacterBase.prototype.reverseDir(d)

Reverse dir. (Same as the RPG Maker MZ method of this name.)

copyPosition

method source
Game_CharacterBase.prototype.copyPosition(character)

Copy position. (Same as the RPG Maker MZ method of this name.)

locate

method source
Game_CharacterBase.prototype.locate(x, y)

Locate. (Same as the RPG Maker MZ method of this name.)

direction

method source
Game_CharacterBase.prototype.direction()

Direction. (Same as the RPG Maker MZ method of this name.)

_reactorCanFace

method internal source
Game_CharacterBase.prototype._reactorCanFace(d)

Reactor can face. (Same as the RPG Maker MZ method of this name.)

shiftY

method source
Game_CharacterBase.prototype.shiftY()

How far a character stands above its tile's bottom edge.

Details

How far a character stands above its tile's bottom edge. MZ lifts it 6 px; an imported game keeps its engine's own (System.json rrCharacterShiftY: 0 for 2000/2003 and XP, 4 for VX and VX Ace).

scrolledX

method source
Game_CharacterBase.prototype.scrolledX()

Scrolled x. (Same as the RPG Maker MZ method of this name.)

scrolledY

method source
Game_CharacterBase.prototype.scrolledY()

Scrolled y. (Same as the RPG Maker MZ method of this name.)

reactor3DScreenPoint

method source
Game_CharacterBase.prototype.reactor3DScreenPoint()

Where this character actually appears, when the map is drawn in 3D.

Details

Where this character actually appears, when the map is drawn in 3D.

The scroll-based answer below is where it would be in 2D, which on a 3D map is nowhere in particular: the ground is projected through a camera with pitch and yaw, so a cell's place on screen has nothing to do with the scroll offset. Reactor's own character sprites already project themselves; this is for everything else that asks a character where it is — lighting plugins, pop-ups, mini labels — which is why a light sat somewhere other than the thing it belonged to.

Returns null in 2D, and the stock answer is used.

screenX

method source
Game_CharacterBase.prototype.screenX()

Screen x. (Same as the RPG Maker MZ method of this name.)

screenY

method source
Game_CharacterBase.prototype.screenY()

Screen y. (Same as the RPG Maker MZ method of this name.)

screenZ

method source
Game_CharacterBase.prototype.screenZ()

Screen z. (Same as the RPG Maker MZ method of this name.)

animationWait

method source
Game_CharacterBase.prototype.animationWait()

Animation wait. (Same as the RPG Maker MZ method of this name.)

pattern

method source
Game_CharacterBase.prototype.pattern()

Pattern. (Same as the RPG Maker MZ method of this name.)

terrainTag

method source
Game_CharacterBase.prototype.terrainTag()

Terrain tag. (Same as the RPG Maker MZ method of this name.)

regionId

method source
Game_CharacterBase.prototype.regionId()

Region id. (Same as the RPG Maker MZ method of this name.)

increaseSteps

method source
Game_CharacterBase.prototype.increaseSteps()

Increase steps. (Same as the RPG Maker MZ method of this name.)

tileId

method source
Game_CharacterBase.prototype.tileId()

Tile id. (Same as the RPG Maker MZ method of this name.)

characterName

method source
Game_CharacterBase.prototype.characterName()

Character name. (Same as the RPG Maker MZ method of this name.)

characterIndex

method source
Game_CharacterBase.prototype.characterIndex()

Character index. (Same as the RPG Maker MZ method of this name.)

checkEventTriggerTouchFront

method source
Game_CharacterBase.prototype.checkEventTriggerTouchFront(d)

Check event trigger touch front. (Same as the RPG Maker MZ method of this name.)

checkEventTriggerTouch

method source
Game_CharacterBase.prototype.checkEventTriggerTouch(/*x, y*/)

Check event trigger touch. (Same as the RPG Maker MZ method of this name.)

bushDepth

method source
Game_CharacterBase.prototype.bushDepth()

Bush depth. (Same as the RPG Maker MZ method of this name.)