ghost.zh#

Variables#

const int

GH_SHADOW_TILE

const int

GH_SHADOW_CSET

const int

GH_SHADOW_FRAMES

const int

GH_SHADOW_ANIM_SPEED

const int

GH_SHADOW_TRANSLUCENT

const int

GH_SHADOW_FLICKER

const int

GH_LARGE_SHADOW_TILE

const int

GH_LARGE_SHADOW_CSET

const int

GH_LARGE_SHADOW_FRAMES

const int

GH_LARGE_SHADOW_ANIM_SPEED

const int

GH_LARGE_SHADOW_MIN_WIDTH

const int

GH_LARGE_SHADOW_MIN_HEIGHT

const int

AUTOGHOST_MIN_FFC

const int

AUTOGHOST_MAX_FFC

const int

AUTOGHOST_MIN_ENEMY_ID

const int

AUTOGHOST_MAX_ENEMY_ID

const int

GH_DRAW_OVER_THRESHOLD

const int

GH_GRAVITY

const int

GH_TERMINAL_VELOCITY

const int

GH_SPAWN_SPRITE

const int

GH_FAKE_Z

const int

__GH_FAKE_EWEAPON_Z

const int

GH_ENEMIES_FLICKER

const int

GH_PREFER_GHOST_ZH_SHADOWS

const int

GH_BLANK_TILE

const int

GH_INVISIBLE_COMBO

const int

__GH_ALWAYS_USE_NAME

const int

AUTOGHOST_READ_NAME

const int

AUTOGHOST_DELIMITER

const int

__GH_INVISIBLE_ALT

const int

__GH_INVISIBLE_EXTEND

const int

__GH_USE_DRAWCOMBO

const int

__GH_FLASH_TIME

const int

__GH_KNOCKBACK_TIME

const int

__GH_KNOCKBACK_STEP

const int

__GH_DEFAULT_IMPRECISION

const int

__GH_CLEAR_FFC_LINK

const int

__GH_FIX_255_ANONE

const int

__GH_ETHEREAL

const int

__GH_WEAPONS_HIT_PLATFORMS

const int

__GH_FIX_EWM_FALL

const int

__GH_FIX_EWM_THROW

const int

__GHI_NPC_DATA

const int

__EWI_FLAGS

const int

__EWI_ID

const int

__EWI_XPOS

const int

__EWI_YPOS

const int

__EWI_WORK

const int

__EWI_WORK_2

const int

__EWI_MOVEMENT

const int

__EWI_MOVEMENT_ARG

const int

__EWI_MOVEMENT_ARG_2

const int

__EWI_LIFESPAN

const int

__EWI_LIFESPAN_ARG

const int

__EWI_ON_DEATH

const int

__EWI_ON_DEATH_ARG

const int

__EWI_DUMMY_SOUND

const int

__EWI_DUMMY_STEP

const int

__EWI_DUMMY_SPRITE

Functions#

bool

__IsPit(int combo)

bool

__HaveAmulet()

bool

ghost2__OnSidePlatform(int x, int y, int xOff, int yOff, int h, int w)

Variable descriptions#

const int GH_SHADOW_TILE = 27400 πŸ”— Source

See docs/ghost/index.html for documentation. All User Settings Standard settings ———————————————————– Small (1x1) shadow settings


const int GH_SHADOW_CSET = 7 πŸ”— Source


const int GH_SHADOW_FRAMES = 4 πŸ”— Source


const int GH_SHADOW_ANIM_SPEED = 8 πŸ”— Source


const int GH_SHADOW_TRANSLUCENT = 1 πŸ”— Source

0 = No, 1 = Yes


const int GH_SHADOW_FLICKER = 0 πŸ”— Source

0 = No, 1 = Yes


const int GH_LARGE_SHADOW_TILE = 27392 πŸ”— Source

Top-left corner


const int GH_LARGE_SHADOW_CSET = 7 πŸ”— Source


const int GH_LARGE_SHADOW_FRAMES = 4 πŸ”— Source


const int GH_LARGE_SHADOW_ANIM_SPEED = 8 πŸ”— Source


const int GH_LARGE_SHADOW_MIN_WIDTH = 3 πŸ”— Source

Enemies must be at least this wide


const int GH_LARGE_SHADOW_MIN_HEIGHT = 3 πŸ”— Source

and this high to use large shadows


const int AUTOGHOST_MIN_FFC = 1 πŸ”— Source

Min: 1, Max: 32


const int AUTOGHOST_MAX_FFC = 32 πŸ”— Source

Min: 1, Max: 32


const int AUTOGHOST_MIN_ENEMY_ID = 20 πŸ”— Source

Min: 20, Max: 511


const int AUTOGHOST_MAX_ENEMY_ID = 511 πŸ”— Source

Min: 20, Max: 511


const int GH_DRAW_OVER_THRESHOLD = 32 πŸ”— Source

Other settings


const int GH_GRAVITY = 0.16 πŸ”— Source


const int GH_TERMINAL_VELOCITY = 3.2 πŸ”— Source


const int GH_SPAWN_SPRITE = 22 πŸ”— Source

Min: 0, Max: 255, Default: 22


const int GH_FAKE_Z = 0 πŸ”— Source

0 = No, 1 = Yes


const int __GH_FAKE_EWEAPON_Z = 0 πŸ”— Source

0 = No, 1 = Yes


const int GH_ENEMIES_FLICKER = 0 πŸ”— Source

0 = No, 1 = Yes


const int GH_PREFER_GHOST_ZH_SHADOWS = 0 πŸ”— Source

0 = No, 1 = Yes


const int GH_BLANK_TILE = 65456 πŸ”— Source

Min: 0, Max: 65456


const int GH_INVISIBLE_COMBO = 1 πŸ”— Source

Min: 1, Max: 65279


const int __GH_ALWAYS_USE_NAME = 0 πŸ”— Source

Always read script name and combo from the enemy’s name, freeing up attributes 11 and 12


const int AUTOGHOST_READ_NAME = -1 πŸ”— Source

End standard settings β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”- Advanced settings ———————————————————– AutoGhost will read a script name from the enemy’s name if attribute 12 is set to this. Must be a negative number.


const int AUTOGHOST_DELIMITER = 64 πŸ”— Source

When reading a script from the enemy name, this character marks the beginning of the script name. Default: 64 ( @ )


const int __GH_INVISIBLE_ALT = -1 πŸ”— Source

Misc. attribute 11 can be set to this instead of GH_INVISIBLE_COMBO. Must be a negative number.


const int __GH_INVISIBLE_EXTEND = -2 πŸ”— Source

This will use the invisible combo, but also set npc->Extend to 3 or 4, hiding the initial spawn puff. Must be a negative number.


const int __GH_USE_DRAWCOMBO = 1 πŸ”— Source

If enabled, the FFC will be invisible, and Screen->DrawCombo will be used to display enemies.


const int __GH_FLASH_TIME = 32 πŸ”— Source

Enemies flash or flicker for this many frames when hit. This does not affect enemies that use the invisible combo. Default: 32


const int __GH_KNOCKBACK_TIME = 16 πŸ”— Source

Enemies will be knocked back for this many frames when hit. Default: 16 Max: 4095


const int __GH_KNOCKBACK_STEP = 4 πŸ”— Source

The speed at which enemies are knocked back, in pixels per frame. Default: 4


const int __GH_DEFAULT_IMPRECISION = 2 πŸ”— Source

The imprecision setting used when a movement function is called internally (except for walking functions).


Whether to set ffc->Link=0 when cleaning up an FFC. In 2.50.3 RC1 and before, this does not work due to a bug. Set this to 1 only if you’re using a newer ZC version than 2.50.3 RC1.


const int __GH_FIX_255_ANONE = 1 πŸ”— Source

For ZC Versions where Animation Style (None) does not set ->Tile, enable this.


const int __GH_ETHEREAL = 1 πŸ”— Source

Set to 1 to make ghost ffcs Ethereal so that they cannot block other combo types/flags on the screen. Added in 2.8.12. The prior versions did not have this. Set to 0 if this causes bugs in legacy quests or scripts.


const int __GH_WEAPONS_HIT_PLATFORMS = 1 πŸ”— Source

If set to 1, weapons in sideview will die when they hit a solid sideview platform. Set to 0 if this causes bugs in legacy quests or scripts.


const int __GH_FIX_EWM_FALL = 1 πŸ”— Source

If set to 1, this will patch bugs where falling weapons can be inappropriately destroyed because of their position. Set to 0 if this causes bugs in legacy quests or scripts.


const int __GH_FIX_EWM_THROW = 1 πŸ”— Source

If set to 1, this will patch bugs where thrown weapons can be inappropriately destroyed because of their position. Set to 0 if this causes bugs in legacy quests or scripts.


const int __GHI_NPC_DATA = 15 πŸ”— Source

npc->Misc[] index Set this so it doesn’t conflict with other scripts. Legal values are 0-15.


const int __EWI_FLAGS = 15 πŸ”— Source

Every index but this one can be used by non-ghost.zh EWeapons


const int __EWI_ID = 3 πŸ”— Source


const int __EWI_XPOS = 4 πŸ”— Source


const int __EWI_YPOS = 5 πŸ”— Source


const int __EWI_WORK = 6 πŸ”— Source


const int __EWI_WORK_2 = 7 πŸ”— Source

Only used by a few movement types


const int __EWI_MOVEMENT = 8 πŸ”— Source


const int __EWI_MOVEMENT_ARG = 9 πŸ”— Source


const int __EWI_MOVEMENT_ARG_2 = 10 πŸ”— Source


const int __EWI_LIFESPAN = 11 πŸ”— Source


const int __EWI_LIFESPAN_ARG = 12 πŸ”— Source


const int __EWI_ON_DEATH = 13 πŸ”— Source


const int __EWI_ON_DEATH_ARG = 14 πŸ”— Source


const int __EWI_DUMMY_SOUND = 2 πŸ”— Source

These are only used by dummy EWeapons; they can use the same values as __EWI_XPOS and __EWI_YPOS


const int __EWI_DUMMY_STEP = 4 πŸ”— Source


const int __EWI_DUMMY_SPRITE = 5 πŸ”— Source


Function descriptions#

bool __IsPit(int combo) πŸ”— Source

Returns true if the given combo should be considered a pit.


bool __HaveAmulet() πŸ”— Source

Returns true if enemies are visible on screens with the β€œAll Enemies Are Invisible” flag enabled


bool ghost2__OnSidePlatform(int x, int y, int xOff, int yOff, int h, int w) πŸ”— Source

Used to determine if a weapon hit a platform in sideview.