World Attributes

Aus EnigmaWiki

Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

World attributes

All attributes on this page are so called global world attributes. They all can be read like this:

value = wo["AttributName"]

Most of the values can also be set by the levelauthor like this:

wo["AttributName"] = value

List of global attributes

ActorimpulseStrength

Technical data:
Type: number
Values: float number
Default: +200.0
Access: read and write
Support: st_actorimpulse

Description:
A global scalar default factor for the actorimpulse stone bumping force. This global value is only used if no object specific value is set.

AllowSuicide

Technical data:
Type: bool
Values: true, false
Default: true
Access: read and write
Support: no object

Description:
A global variable that enables the user to commit suicide with all owned actors by pressing ‘F3’. As this legacy feature can cause unexpected shortcuts, you can deny this freedom. A single actor suicide as committed by activation of an it_spoon is not affected by this global variable.

AllowSingleOxyds

Technical data:
Type: bool
Values: true, false
Default: false
Access: read and write
Support: st_oxyd

Description:
A global variable that enables the existence of single unmatched st_oxyd stones. Setting this variable to true allows you to set uneven numbers of oxyd stones for fixed colors. If a level deletes or adds oxyd stones during runtime a true value avoids possible problems due to temporary uneven oxyd stone numbers. The default false value causes an error message on detection of uneven oxyd numbers.

AutoRespawn

Technical data:
Type: bool
Values: true, false
Default: false
Access: read and write
Support: ac_marble and ac_pearl

Description:
A global variable that determines, if in absence of an it_flag drop given respawn position, the last recorded secure actor position should be taken instead of the starting position, in case the actor dies and is resurrected.
The recorded auto respawn position will be appropriate for common actor deaths like sinking in fl_water, falling into fl_abyss, hitting of st_death, slipping from an it_strip, being hit by an it_laserbeam. Even a jump into one these lethal destinations resurrects the actor onto the position from where the actor started its jump. There is no danger of being resurrected on floors without adhesion.
The usage of it_flag in combination with AutoRespawn is fully supported. On drop of a flag, the flag position remains the valid respawn position until a flag is picked up. After a pickup of the flag, what delete the flag defined position the AutoRespawn position gets active until a flag is dropped again.
Deaths caused by actor collisions, it_crack and floor shattering explosions can lead to leathal AutoRespawn positions. Either avoid setting AutoRespawn to true in such cases or provide an it_flag in such cases.
Shortcuts introduced by AutoRespawn are unlikely, but not generally impossible.

ConserveLevel

Technical data:
Type: bool
Values: true, false
Default: true
Access: read and write
Support: no objects

Description:
A global variable that determines if a dead actor will be resurrected in case of it_extralifes in the gamer's inventory.

If true, dead actors attached to a player will be resurrected as long as extralives are available. If a player has no living actor to control or is missing the actor's essential constraints, the player is dead. The level may still continue if a second player is alive. If the gamer has an it_yinyang in his inventory in single user mode, the control switches to the second player. If all players are dead, a new level game is started.

If the conserve mode is false, no actors will be resurrected. As soon as the player is dead and the control cannot switch to another player, all dead actors are resurrected by using extralives, and the level is restarted without finishing the level game.

Use false if the level can either be not solved in case of resurrected actors or would provide a major shortcut. In all other cases, mode true with proper usage of actors essential constraints will be preferable.

CrackSpreading

Technical data:
Type: number
Values: float number between 0.0 and 1.0
Default: 0.5
Access: read and write
Support: it_crack

Description:
A global default value denoting the probability that a brittle floor plate causes direct neighboring floors to either start or to desintegrate further when an actor enters or leaves this plate at the center of the affected area. A value of 1.0 ensures that the crack spread to the direct neighbors, a value of 0.0 prohibits the spreading to neighbor grids.

CreatingPreview

Technical data:
Type: bool
Values: true, false
Default: false
Access: read only
Support: object independent

Description:
A global read only variable that indicates if the current level load is just for creating a preview thumbnail of the level or a real game play. If true, you can, e.g., change the start-position of the main actor to display another part of the level in the preview, or hide objects from it. When changing the initial position, it might be advantageous to also set the Display Follow Strategy to permanent smooth scrolling:

Example:

if wo["CreatingPreview"] then
    wo["FollowGrid"] = false
    wo["FollowMethod"] = FOLLOW_SCROLL
end

ElectricStrength

Technical data:
Type: number
Values: float number
Default: 15.0
Positve number are attracting, negative numbers are repelling.
Access: read and write
Support: st_charge

Description:
A global scalar default factor for electrical forces. Positive numbers are attracting forces for opposite charges where as negative numbers are repelling forces for opposite charges. This global value is always multiplied by the charge load of the affected actors.

ExtralifeGlasses

Technical data:
Type: number
Values: positive integer number. A sum out of the constants SPOT_DEATH, SPOT_HOLLOW, SPOT_ACTORIMPULSE, SPOT_SENSOR, SPOT_LIGHTPASSENGER, SPOT_TRAP
Default: SPOT_DEATH + SPOT_HOLLOW + SPOT_LIGHTPASSENGER
Access: read and write
Support: it_extralife

Description:
A global variable that defines the it_glasses type that is generated on the laser light convertion of an it_extralife.

FallenPuzzle

Technical data:
Type: string
Values: any floor object kind, "it_strip", "it_pipe" or "=key", whith key being a valid tile key
Default: "fl_gray"
Access: read and write
Support: st_puzzle

Description:
A global object replacement kind for st_puzzles fallen into fl_water or fl_abyss. Besides any floor kind you can use any key of a tile declaration preceeded by an equal sign ’=’. By this second method you can use attributed floor kinds with special values for friction and adhesion.
Additionally you can set this global FallenPuzzle attribute to "it_pipe" or "it_ stip". In both cases fallen puzzle objects will be replaced by items of the given class with the identical connections as the fallen puzzle stones. Just in case that an item of the given class is already present at one of the affected grid positions the connections of these will be adjusted in a special way. An existing "it_pipe" remains unchanged, but an "it_stip" will add the connections of the fallen puzzle to its own connections.

FollowAction

Technical data:
Type: number or position
Values: 0, FOLLOW_FULLSCREEN, HALFSCREEN. The distance of display readjustment. Positions are used to supply different values for x and y. The value {19, 12} is a standard full screen move. The value {9.5, 6} is a standard half screen move. A value 0 is a minimal smooth move or the default value for grid based moves. Default: {19, 12}. Actually the default is mode based (Display Follow Strategy).
Access: read and write
Support: no objects

Description:
A global variable that describes the action of the display on relocation. This attribute is introduced for future extensions, but is currently just partially supported. Just the values listed below are used. Please use this attribute just as explained in Display Follow Strategy.

FollowGrid

Technical data:
Type: bool
Values: true, false
Default: true
Access: read and write
Support: no objects

Description:
A global variable that determines if the display is fixed in its static positions to grids or if it can be scrolled to any pixel position (Display Follow Strategy).

FollowMethod

Technical data:
Type: number
Values: FOLLOW_NO, FOLLOW_SCROLL, FOLLOW_FLIP
Default: FOLLOW_FLIP
Access: read and write
Support: no objects

Description:
A global variable that describes the method how the display moves, either not at all, by pixelwise scrolling, or by flipping to another screen or region (Display Follow Strategy).

FollowThreshold

Technical data:
Type: number or position
Values: 0 or positive number, or a pair of two positive numbers. The distance from the screen boundary at which the displays readjusts. Positions are used to supply different values for x and y. All values need to be less than half of the screen size.
Default: 0.5
Access: read and write
Support: no objects

Description:
A global variable that describes the threshold at which a crossing active marble triggers the display to relocate. It is given as the distance to the screen boundary (Display Follow Strategy).

Fragility

Technical data:
Type: number
Values: float number between 0.0 and 1.0
Default: 1.0
Access: read and write
Support: it_crack and Floor Objects

Description:
A global default value denoting the probability that a brittle floor plate, that is a floor with an it_crack on top, continues to disintegrate on events like an actor entering, passing a neighboring it_crack nearby explosions or fire heating. A value of 1.0 ensures that the crack continues to disintegrates on these events, a value of 0.0 prohibits visible cracks to get larger. This default is superseded by fragility and it_crack specific values.

GlobalForce

Technical data:
Type: Position Values: pair of float numbers
Default: po(0.0, 0.0)
Access: read and write
Support: all floors

Description:
A global constant force that is added to every actor on every grid. The force is given as a vector constant by a value of type Position

FrictionStrength

Technical data:
Type: number
Values: float number
Default: 1.0
Access: read and write
Support: all floors

Description:
A global scalar default factor for floor friction values. This global value is always multiplied by the floor specific friction on calculation of the friction forced applied to actors.

Height

Technical data:
Type: number
Values: positive integer number
Default: ?
Access: read only
Support: object independent

Description:
A global read only variable reports the height of the world in grid units. This is set by the initial world constructor call (World Creation and Resolver Chaining).

InfiniteReincarnation

Technical data:
Type: bool
Values: true, false
Default: false
Access: read and write
Support: object independent

Description:
A global variable that switches off the it_extralife consumption on resurrection of a dead actor. Usually the number of extralifes is counted, the items are explicitly set or an st_dispenser for extralifes is located at strategic positions. The main purpose of this flag is the support of easy modes for very lethal levels, that should give the user the opportunity to exercise difficult patterns. Usage of this flag for the regular difficult mode is deprecated.

IsDifficult

Technical data:
Type: bool
Values: true, false
Default: true
Access: read only
Support: object independent

Description:
A global read only variable that defines the current diffculty mode selected by the user. All differences of easy and difficult mode within the level should be coded solely in dependence of this flag. If a level that supports an easy mode the author needs to declare it in the XML header in the element el:modes.

MagnetRange

Technical data:
Type: number
Values: positive float number or zero
Default: 10.0
Access: read and write
Support: it_magnet

Description:
A global default distance up to which magnets apply forces to actors. This global value is only used if no object specific value is set.

MagnetStrength

Technical data:
Type: number
Values: float number
Default: 30.0
Positve number are attracting, negative numbers are repelling.
Access: read and write
Support: it_magnet

Description:
A global scalar default factor for magnet forces. Positive numbers are attracting forces where as negative numbers are repelling forces. This global value is only used if no object specific value is set.

MaxOxydColor

Technical data:
Type: number
Values: OXYD_BLUE, ... OXYD_BROWN
Default: OXYD_BLACK
Access: read and write
Support: st_oxyd

Description:
A global variable that limits the number of colors assigned to autocolored st_oxyd. Be careful with increasing this value beyond its default.

MeditationStrength

Technical data:
Type: number
Values: float number
Default: 1.0
Access: read and write
Support: it_meditation

Description:
A global scalar default factor for @it_meditation slope forces. Positive numbers are downhill forces that let actors roll into dents and hollows and roll down from hills and bumps.

ProvideExtralifes

Technical data:
Type: bool
Values: true, false
Default: true
Access: read and write
Support: object independent

Description:
A global variable that causes two it_extralifes to be added to both player inventories on start of a new level. Set it to false if a gamer could misuse these items. It is important to set this attribute before the world is created (World Creation and Resolver Chaining).

RubberViolationStrength

Technical data:
Type: number
Values: positive float number
Default: 50.0
Access: read and write
Support: it_magnet

Description:
A global scalar default factor for the ot_rubberband force that is applied to actors if the length of the rubberband exceeds the given min or max limits. This can happen due to extraordinary events like actor warping, actor resurrection, moving anchor stones or simply new rubberbands that are created with off limit length.

ShowMoves

Technical data:
Type: bool
Values: true, false
Default: false
Access: read and write
Support: object independent

Description:
A global variable that enables or disables the display of the stone push counter besides the level time. It is mainly used in Sokoban like levels.

SlopeStrength

Technical data:
Type: number
Values: float number
Default: 25.0
Access: read and write
Support: fl_slope

Description:
A global scalar default factor for fl_slope floor gradient forces. This global value is used if no slope object specific strength factor is supplied.

SubSoil

Technical data:
Type: int
Values: SUBSOIL_ABYSS, SUBSOIL_WATER, SUBSOIL_AUTO
Default: SUBSOIL_ABYSS
Access: read and write
Support: it_explosion

Description:
A global variable that defines the subsoil which replaces a floor on its physical destruction. it_bombs and ot_cannonballs can cause it_explosion debris which in turn dissolves the floor to the base subsoil. The special value SUBSOIL_AUTO determines the subsoil based on the surrounding floors. Any fl_water on a direct neighboring floor causes the floor to be replaced by water, too. Otherwise the default fl_abyss will be used as replacement.

SurviveFinish

Technical data:
Type: bool
Values: true, false
Default: true
Access: read and write
Support: object independent

Description:
A global variable that defines if the essential actors have to survive the finish of the game (Ending Conditions). With this attribute set to false a gamer can sacrifice an essential actor to finish the level in the same step in some subtle cases.

SwampSinkTime

Technical data:
Type: number or nil
Values: positive float number or zero or nil. Sink time in seconds or nil for an inifinite time aka not sinking. Time values smaller than appr. 0.7 ms will be rounded down to 0 ms.
Default: 1.75
Access: read and write
Support: fl_swamp

Description:
A global default for the time it takes a static actor to sink in fl_swamp. Fast moving actors will needs slightly more time than static actors.

WaterSinkTime

Technical data:
Type: number or nil
Values: positive float number or zero or nil. Sink time in seconds or nil for an inifinite time aka not sinking. Time values smaller than appr. 0.7 ms will be rounded down to 0 ms.
Default: 0.0
Access: read and write
Support: fl_water

Description:
A global default for the time it takes an actor to sink in fl_water.

Width

Technical data:
Type: number
Values: positiv integer number
Default: ?
Access: read only
Support: object independent

Description:
A global read only variable reports the width of the world in grid units. This is set by the initial world constructor call (World Creation and Resolver Chaining).

WormholeRange

Technical data:
Type: number
Values: positive float number or zero
Default: 10.0
Access: read and write
Support: it_wormhole

Description:
A global default distance up to which wormholes apply forces to actors. This global value is only used if no object specific value is set.

WormholeStrength

Technical data:
Type: number
Values: float number
Default: 30.0
Positive number are attracting, negative numbers are repelling.
Access: read and write
Support: it_wormhole

Description:
A global scalar default factor for wormhole forces. Positive numbers are attracting forces where as negative numbers are repelling forces. This global value is only used if no object specific value is set.

Persönliche Werkzeuge