• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

[COMPLETE] openborvariant list

O Ilusionista

Captain 80K
I was searching for this info since long time, so I got into the source code and here is the list of all openborvariants.

Really thanks to everyone who helped us, specially White Dragon :)

**”background", - is the BG used in a level
**"blockade", - Limit x scroll back
**"branchname", - Gets level branch name. Works ONLY if you touch the item to branch and gets reseted once you leave the stage.
**"cheats" - TRUE if cheats are activated, otherwise FALSE.
**"count_enemies", - counts how many enemies are active
**"count_entities", - counts how many entities are active
**"count_npcs", - counts how many npc are active
**"count_players", - counts how many enemies are active
**"current_branch", - Gets the current branch name.
**"current_level", - Level index of current set, start from 0.
**"current_palette", - gets current system palette
**"current_scene", - gets current scene
**"current_set", - Current difficulty set index, start from 0.
**"current_stage", - Stage index of current set, start from 1.
**"effectvol", - gets Sound fx volume
**"elapsed_time", - gets the elapsed time until the moment
**"ent_max", - get the maximum number of entities
**"freeram", - gets the ammount of free ram
**"game_paused", detects if the game is paused
**"game_speed", detects the game speed
**"gfx_x_offset", - Enable X offset adjustment by modders. X coords of the screen.
**"gfx_y_offset", - Enable Y offset adjustment by modders. Y coords of the screen.
**"gfx_y_offset_adj", - is the shift relative to gfx_y_offset.
**"hResolution", - Get screen width (Horizontal resolution)
**"in_cheat_options", - detects cheat options
**"in_control_options", - detects control options
**"in_gameoverscreen", - detects GAME OVER screen
**"in_halloffamescreen", detects HALL OF FAME screen
**"in_level", Whether you are in a level (e.g., select screen is not a level).
**"in_load_game", - detects LOAD GAME screen
**"in_menuscreen", - detects MENU screen
**"in_new_game", - detects NEW GAME screen
**"in_options", - detects OPTIONS screen
**"in_selectscreen", detects CHARACTER SELECT screen
**"in_showcomplete", detects COMPLETE SCREEN screen
**"in_sound_options", detects SOUND OPTIONS screen
**"in_start_game", detects GAME OVER screen
**"in_system_options", detects START GAME option
**"in_titlescreen", detects TITLE screen (the one with PRESS START)
**"in_enginecreditsscreen", detects if the engine's credits is displayed, but placed the variables for it in the shutdown command so that it can be called for even if the credits is not displayed.
**"in_video_options", detects VIDEO OPTIONS screen
**"lasthita", - Same of  lasthity (deprecated)
**"lasthity", - Get Y axis of last hit
**"lasthitc", - Confirms the last hit
**"lasthitt", - is the last hit type (ex. ATK_NORMAL)
**"lasthitx", - Get X axis of last hit
**"lasthitz", - Get the Z value of last hit
**"levelheight", - Gets the level height (set on the LEVELS.txt)
**"levelpos", - Gets the curretn position on the level
**"levelwidth", - Gets the total level width (how long is the level)
**"lightx", - Gets the Light X value
**"lightz", - Gets the Light Z value
**"maxanimations", - gets the maximum number of animations
**"maxattacktypes", - gets the maximum number of attack types
**"maxentityvars", - gets maximum number of variables in each entity which is accessible by index
**"maxglobalvars",- gets maximum number of global variables which is accessible by name.
**"maxindexedvars", - gets maximum number of global variables which is accessible by index.
**"maxplayers", -gets how many players could play at same time
**"maxscriptvars", - gets maximum number of variables in each script which is accessible by index.
**"models_cached", - gets the ammount of cached models
**"models_loaded", - gets the ammount of loaded models
**"musicvol", - gets the music volume
**"nofadeout", - controls if the bgmusic can be faded out or not
**"nogameover", // don't show gameover (4396+)
**"nohof", // don't show hall of fame before gameover (4396+)
**"nojoin", - controls if the other players can join the game
**"nopause", - controls if you can or cannot pause the game
**"nosave", - controls if the game will be saved or not
**"noscreenshot", - controls of you can take snapshots or not inside the game
**"noshowcomplete" // don't show complete screen after NEXT (4396+)
**"numbasemaps", // number of basemaps in the current level (4396+)
**"numholes", // number of holes in the current level (4396+)
**”numlayers", // number of layers in the current level (4396+)
**"numpalettes", - gets the amount of palette from an entity
**"numwalls", // number of walls in the current level (4396+)
**"pakname", - gets the name of the game .pak
**"pause", - detects if the game is paused
**“pixelformat", - detects the pixel format (8 bit ,16bit, 32bit)
**"player", - detects if the entity is a player
**"player1", - detects the player 1
**"player2", - detects the player 2
**"player3", - detects the player 3
**"player4", - detects the player 4
**"player_max_z", - gets the maximum z position of the stage (how much "downward" on the stage an entity can go to).
**"player_min_z", - gets the minimum z position of the stage (how much "upward" on the stage an entity can go to).
**"porting" - gets the console version (4396+)
**"sample_play_id", - is the last sound ID played (useful to stop the last sound played for example)
**"scrollmaxx", - max scroll size that a level can scroll when you walk in X axis
**"scrollmaxz", - max scroll size that a level can scroll when you walk in Z axis
**"scrollminx", - min scroll size that a level can scroll when you walk in X axis. Example "scrollmaxx-scrollminx = 0" if you level has the same length of the game resolution (the level doesn't scroll)
**"scrollminz", - min scroll size that a level can scroll when you walk in Z axis.
**"self", - deprecated. Is a global pointer in the engine code that refers to entity currently being updated. It's used by several internal functions and is essential to the engine.
**"shadowalpha", - gfxshadow alpha mode
**"shadowcolor" - gfxshadow color index.
**"skiptoset", - Useful to change the active set (difficult).
**"slowmotion", - detects it the slowmotion is active. Useful to detect boss kill (if the slowmotion isn't disabled)
**"slowmotion_duration", - detects the duration of the slowmotion
**"smartbomber", - detects if the player's special is a "smart bomb" which damages all onscreen enemies, regardless of position.
**"soundvol", - controls the sound (samples) volume
**"textbox", - is the textbox entity
**"ticks", - is the MAIN time count like "elapsed_time" but is the elapsed time from engine run. Ticks is the time passed from engine run.
**"totalram", - gets the total RAM available
**"usedram", - gets the total used RAM
**"vResolution", Get screen height (Vertical resolution)
**"viewporth", - Height value for scrolling backgrounds/foregrounds
**"viewportw",  - Width value for scrolling backgrounds/foregrounds
**"viewportx",  - X value for scrolling backgrounds/foregrounds
**"viewporty",  - Y value for scrolling backgrounds/foregrounds
**"vscreen", - allocated MAIN screen handler
**"waiting", - is a var that is 1 if player waiting in a stage (set by wait at in level#.txt)
**"xpos", - Level coords in x position, count from the left side of panels.
**"ypos", - Level coords in y position, count from the top of panels.
 
Sorry, I'd been meaning to get you one but things have gone nuts lately. Anyway, be careful - some of those are subject to change (though if they do I'll let you know).

DC
 
its alright. I will dig the code for the description of all listed values.

but there is things which I will be in trouble, like the difference betwee:
"gfx_y_offset", -
"gfx_y_offset_adj"
 
List updated. Still need some exaplantions, like the difference between:

- "gfx_y_offset" and  "gfx_y_offset_adj"
-  "lasthita"  and "lasthity"
- "hResolution" and "viewporth" (is the last one related to screen, like in drawtoscreen?)
 
O Ilusionista said:
List updated. Still need some exaplantions, like the difference between:

- "gfx_y_offset" and  "gfx_y_offset_adj"
-  "lasthita"  and "lasthity"
- "hResolution" and "viewporth" (is the last one related to screen, like in drawtoscreen?)

gfx_x_offset and gfx_y_offset are the X,Y coords of the screen.
gfx_y_offset_adj is the shift relative to gfx_y_offset
lasthita == lasthity (lasthita is deprecated)
lasthitt is the last hit type (ex. ATK_NORMAL)
sample_play_id is the last sound ID played (useful to stop the last sound played for example)
viewportx, viewporty, viewportw, viewporth are X,Y and Width, Height values for scrolling backgrounds/foregrounds
hresolution/vresolution are the horizontal/vertical screen resolutions
vscreen allocated MAIN screen handler
waiting is a var that is 1 if player waiting in a stage (set by wait at in level#.txt)
textbox is the textbox entity
background is the used BG in a level
ticks is the MAIN time count like "elapsed_time" but is the elapsed time from engine run. Ticks is the time passed from engine run.


added:
    "nogameover", // don't show gameover
    "nohof", // don't show hall of fame before gameover
    "noshowcomplete" // don't show complete screen after NEXT
    "numbasemaps", // number of basemaps in the current level
    "numholes", // number of holes in the current level
    "numlayers", // number of layers in the current level
    "numwalls", // number of walls in the current level
 
Almost there, thanks!

"pause" detects if the game was paused, right?
"pixel format" detects the pixel aspect ratio, right?
What is the difference between "player" and "player#"? The first one detects any of the players, while the other detects only the specific player?

"scrollmaxx", "scrollmaxz", "scrollminx", "scrollminz", are the max and min values of how much the players can scroll in X and Z axis on a stage?

What is the difference between openborvariant "self" and the localvar self?
 
O Ilusionista said:
Almost there, thanks!

"pause" detects if the game was paused, right?
"pixel format" detects the pixel aspect ratio, right?
What is the difference between "player" and "player#"? The first one detects any of the players, while the other detects only the specific player?

"scrollmaxx", "scrollmaxz", "scrollminx", "scrollminz", are the max and min values of how much the players can scroll in X and Z axis on a stage?

What is the difference between openborvariant "self" and the localvar self?

all ok!
just pixel format is the video mode: 8 bit 16, 32 etc...
pause ok and pause == game_paused
player == player1
player#: player entity
 
Pixel format gets...the video color depth? But this doesn't makes sense, since the pixel format is the same for 8, 16 or 32bits.
It would change if you modify the pixel aspect (4:3, 16:9, etc).

And about the SELF, what is the difference?

Thanks for your help :)
 
O Ilusionista said:
Pixel format gets...the video color depth? But this doesn't makes sense, since the pixel format is the same for 8, 16 or 32bits.
It would change if you modify the pixel aspect (4:3, 16:9, etc).

And about the SELF, what is the difference?

Thanks for your help :)

Not at all!
sorry, difference from SELF and...?
 
getlocalvar("self") - is defined by any script called from an entity event, and is the pointer to calling entity.

openborvariant("self") - Is a global pointer in the engine code that refers to entity currently being updated. It's used by several internal functions and is essential to the engine. For authors though, I honestly can't think of a practical use for it that isn't better handled another way. Still, it's available just in case.

DC
 
Damon Caskey said:
For authors though, I honestly can't think of a practical use for it that isn't better handled another way. Still, it's available just in case.

I agree.
I noticed studying the code, that the globalvar SELF was designed to be used at each iteration during the update cycle.
Then this idea has been gradually to lose over time, and I dare say that if they have made improper use of this variable (changing it and exchanging it without a good yardstick).
In fact it is the subject of a bug on lasthitc (strange speedy effect nullify lasthitc) I solved long ago.
For now, I leave it alone, but the present state of things, for modders not only useless, but it can create ambiguity.
I am inclined to comment this openborvariant in reading and writing.
I would say... marked as deprecated!
 
White Dragon said:
I would say... marked as deprecated!

I don't have a problem with that. For that matter, there are way too many non-encapsulated globals in the code period, and by that I mean "more than 0". Unfortunately right now I just don't have the time to go back and trace all the logic flows to get rid of them. When I'm finished with animation properties and boxes, I might make that my new project.

DC
 
Thanks guys, I will update the list

"scrollmaxx", "scrollmaxz", "scrollminx", "scrollminz", are the max and min values of how much the players can scroll in X and Z axis on a stage?
Or how much the camera can scroll?
 
Thanks dude. I think all of that script reference is included on the game manual, but I will update. I am just waiting for what "scrollmaxx", "scrollmaxz", "scrollminx", "scrollminz" means.
 
msmalik681 said:
:o  how did i not know about that its very very useful thank you.


its missing documentation about settextobj I cover the script to get the text object properties in this post: http://www.chronocrash.com/forum/index.php?topic=3158.msg43450#msg43450


if I find anything else how can I contribute ? is there a thread or do i pm you ?

Sure you can. There are two topics:

The topic where you can help us to document everything. Report what is missing there
http://www.chronocrash.com/forum/index.php?topic=2022.0

Where I post the last updates
http://www.chronocrash.com/forum/index.php?topic=1895.0
 
Back
Top Bottom