PlayerSetup

The PlayerSetup entity is used to provide various information for setting up the state of the level. This entity is required by Reality Factory and, if it is not present, will cause an error exit from the game. Only one PlayerSetup entity is allowed per level.

Field Descriptions

The fields for the PlayerSetup entity are:

Field Description
ActorName Name of player actor
ActorRotation Rotation values in degrees required to orient player correctly
ActorScaleFactor Amount to scale player actor by - 1.0 equals 100% of normal size
AttributeInfoFile Name of the Attribute initialization file
DeathFogColor Color of fog used at death
DeathFontSize Font size of death message
Deathlevel Level to change to after dying
DeathMessage Message to display at death
HeadBobbing True if players head bobs when moving in 1st person
HeadBobLimit Maximum amount of head bob, in total units
HeadBobSpeed Speed of head bob in increments per move
HUDInfoFile Name of the HUD initialization file
JumpSpeed Player upward jump speed
KeepAttrAtDeath if TRUE then retain all current attributes after dying
LevelViewPoint Player viewpoint: 0=1st person, 1=3rd person, 2=isometric, 3=fixed camera
LockView True if viewpoint is unchangeable in level
MovieMode True if player input is disabled and ESC sets KeyMonitor to on
OpeningCutScene Name of the AVI or Gif file to play as the opening cut scene
PlayerScaleFactor Amount to scale player by - 1.0 equals100% of normal size
RealJumping if true use realistic jumping
ShadowAlpha Transparency of actor shadow bitmap (0 to 255)
ShadowAlphamap Name of alpha bitmap to use for shadow
ShadowBitmap Name of bitmap to use for shadow
ShadowSize Size of actor shadow bitmap, 0 is none
SlideSlope Minimum slope required before player will start to slide
SlideSpeed Maximum speed factor when player is sliding
Speed Player speed
StepHeight Highest step a player automatically climbs
UseDeathFog If true use fog swirl at death
UseProjectedShadows Use projected shadows for the player
UseStencilShadows Use stencil shadows for the player (not used in 1st person view)

In order to allow in-game movies it is necessary that the keyboard input to the player be disabled and the player not be displayed. It is also necessary for the player to be able to terminate the movie at any time, rather than having to wait until the movie ends. If the MovieMode entry is true then the player is not rendered and the only keyboard input allowed is the ESC key. If the ESC key is pressed a trigger named MovieMode is set to on. This trigger can be used to trigger the forced Change Level used to end the movie. Normal keyboard control returns after this happens. See the document on Making In-Game Movies for more details.

The LevelViewPoint value determines what type of view is initially used. The valid entries for this are:

LevelViewPoint View Type
0 1st Person
1 3rd Person
2 Diablo Style Isometric
3 Fixed Camera

The PlayerScaleFactor is used to make the player larger or smaller in relation to the level. The ActorScaleFactor is used to scale the player actor so that it fits the level properly. For example, the standard Reality Factory actor is 76 units high. If you wish to use an actor that is 152 units high you must scale it down to half size for it to match a level made for the standard actor. The ActorScaleFactor in this case would be 0.5. You then can scale the whole player up or down using PlayerScaleFactor and still have everything fit properly. Scaling the actor and the player does not cause a performance hit for the level.

The ActorRotation values are the values, in degrees, necessary to make your player actor stand up properly. Depending on the origin of the actor, these values will vary. For example, for an actor converted from a Half-Life model the values are:

X = 0
Y = 180
Z = 0

For an actor made in 3DStudio Max the values required are:

X = -90
Y = 180
Z = 0

If Deathlevel is not blank it is assumed to be the name of the level (with .bsp extension) that you will be changed to upon dying.

If ActorName is not blank then it refers to the name of the player actor to use in this level. It overrides the player actor defined in the RealityFactory.ini file.

If RealJumping is true then the player will jump and fall more like the real world. No movement is allowed during jumping and falling and only the initial speed the player has will be used, and it will decrease over time.

The value of SlideSlope ranges from 1 for a flat surface to 0 for a vertical surface. A normal slope will range from 0.84 to 0.95, with a larger value causing the player to slide on a flatter slope. The value of SlideSpeed is the maximum speed factor applied to the player on a near vertical slope. The actual sliding speed will decrease as the slope becomes flatter.

Examples

Here are some examples of the PlayerSetup entity in different configurations.

PlayerSetup Example 1
Example #1
PlayerSetup Example 2
Example #2

Example #1 is for a converted Half-Life actor of the proper size and provides a 1st person view for the level. It loads hud.ini for the initial values for the HUD and player.ini for the initial values for the player attributes.

Example #2 scales the player to 80% of its normal size. 3rd person is the type of view that is initially used. An opening cut scene is specified to be the AVI file opening.avi.