Player messages

Lithtech Jupiter engine

Post Reply
User avatar
Spawn
Admin
Admin
Posts: 1310
Joined: Sun Jul 25, 2004 12:50 am
Location: Norway
Contact:

Player messages

Post by Spawn » Fri Aug 06, 2021 12:15 am

Player Messages

The “player” (or ActivePlayer in MP)object handles a number of different trigger messages. This document will list the syntax and results of these various messages. In the syntax definitions below, parameters that appear in angle brackets, i.e. < > are required parameters. Parameters that appear in square brackets, i.e. [ ] are optional.




Rewards
Rewards give the player experience points. The <reward name> parameter specifies the name of the reward given. The amount of experience received is set in missions.txt and is indexed by <reward name>

Reward <reward name>

It is somewhat unclear if the level in question needs to be tied to missions.txt in order to function. The Dedit PreCheckMsg funtion says that it needs to be a <Mission sensitive reward>.

Chapter 1 - Cate Archer Must Die! - Japan offers these rewards
Reward0 = "01Village,100,30002"
Reward1 = "01Manual,300,30003"
Reward2 = "02Rendezvous,400,30004"
Reward3 = "02Discover,400,30005"
Reward4 = "02Briefcase,300,30006"
Reward5 = "01SpyManual,200,30009"
Reward6 = "02SpyManual,200,30009"
Reward7 = "02Manual,300,30010"

Where for instance:
Reward5 lists 01SpyManual which seems to be the name, 200 the score, 30009 refers to the message %1!d! skill points awarded for recovering four pages of the UNITY field manual! in cres.dll






Objectives, Optional Objectives, and Mission Parameters

Image

The player’s objectives are divided into three classes.
Objectives are goals which must be accomplished to complete the mission.
Optional Objectives are goals that may be accomplished, but are not required.
Mission Parameters are rules for how your objectives may be accomplished.

The objective IDs referred to in these commands are the ids of strings in the CRes.dll string table.

example:
STRINGTABLE
BEGIN
IDS_MISSION_OBJ_5000 "<CHAPTER 1 & 2 OBJECTIVES>"
IDS_MISSION_OBJ_5001 "Rendezvous with Hatori-san."
IDS_MISSION_OBJ_5002 "Discover the new location for the meeting."
IDS_MISSION_OBJ_5003 "Report back to Hatori-san."
IDS_MISSION_OBJ_5004 "Infiltrate the estate grounds."
IDS_MISSION_OBJ_5005 "Photograph the meeting."
IDS_MISSION_OBJ_5006 "Return to Yamata-san at the bridge."
IDS_MISSION_OBJ_5007 "Recover remaining three pages of this letter."
END
Adding Items
These commands will add a new required item.

Objective add <objective id>

Option add <optional id>

Parameter add <parameter id>

example:
msg player (objective add 5005);

Removing Items
These commands will remove an item.

Objective remove <objective id>

Option remove <optional id>

Parameter remove <parameter id>

Removing All Items
These command will remove all items.

Objective removeall

Option removeall

Parameter removeall

Complete Items
This command will mark an objective or optional objective as completed. Parameters cannot be marked for completion.

Objective completed <objective id>


Option completed <optional id>





Keys

Image

The key IDs referred to in these commands are the ids of entries in the KEYITEMS.TXT attributes file.
This is aprop class that you can interact with or pick up ingame. But you can also control these by player messages

Add Key
This command will add a new key item to your inventory.

Key add <key id>

Remove Key
This command will remove a key item.

Key remove <key id>

Remove All Keys
This command will remove all key items.

Key removeall

Example:

Let's use the keyitem Wrench from KEYITEMS.TXT:
/*
** KeyItem7 - Wrench - c09s01
*/

[KeyItem7]
Name = "Wrench"
NameId = 4510
DescriptionId = 4760
Image = "Interface\photos\keyitems\Wrench.dtx"
Filename = "Props\Models\GenWrenchC.ltb"
Skin0 = "Props\Skins\GenWrenchC.dtx"
Chrome = 0
Chromakey = 0
FXName = ""
SoundName = "wrench"
A valid message here would be:

msg player (key add 7);

Which will give you a wrench in the inventory.





Transmission

Image
Transmissions are text messages that are sent to the player.
The transmission ID referred to in this command is the id of a string in the CRes.dll string table.

The ActivePlayerComm is an optional parameter set to 1 or 0.
If set to 1, then the transmission will be displayed with the MP name of the ActivePlayer in this format: “<ActivePlayerName>: <Message>”.

The TeamNumber is an optional parameter set to 1 or 0, referring to the team numbers. Only players on the TeamNumber team will receive the transmission.

Transmission <transmission id> [ActivePlayerComm][TeamNumber]

Examples:
msg player (transmission 32667 0 0) will send the transmission "This is very alarming!" to all available players.





Credits
The credits message starts or stops the on screen credits.

This message will start the display of credits.

Credits on

This message will stop the display of credits.

Credits off

This message will start the display of the intro credits.

Credits intro





Intel
This message will give the player an intelligence item.

The <text id> parameter is the ID of a string in the CRes.dll string table.

The <popup id> parameter is the ID of an entry in the PopupItems.txt attributes file which will define how the item will be displayed in popups and in the menus.

The [intel] parameter should be 1 if the item should be considered as valuable intelligence data and 0 if it should be considered general information. This will be 0 by default.

The [show] parameter should be 1 if the popup up should be displayed and 0 if it should not. This will be 0 by default.


intel <text id> <popup id> [intel] [show]

msg player (Intel 8002 7 1 1);





Fade In, and Fade Out
These messages cause the screen to fade in or fade out over the given number of seconds.

FadeIn <time>

FadeOut <time>


example: msg player (fadeout 2);





Mission Text

Image
This message will cause text to appear teletype style on the screen. The text id is the id of a string in the CRes.dll string table.

MissionText <text id>

Example:

This line from cres.dll:
6001 "7:01 p.m.\nInotakimura, Japan"
And would be presented as
7:01 p.m.
Inotakimura, Japan

You can test it by sending this command: msg player (MissionText 6001);





Mission Failed
This message will let the Mission Failure screen to appear and display the specified text. The text id is the id of a string in the CRes.dll string table.

MissionFailed <text id>

Example:
6503 "You were sucked into the tornado!"
You can test it by sending this command: msg player (MissionFailed 6503);





Pickup Items
PickupItems are any item that the player can pickup throughout the levels. They may also be acquired through searching or by being a default of the mission. For a whole list of available weapons, check weapons.txt in the attributes directory

Weapons
This message will give the player the specified weapon and will switch to that weapon.
AcquireWeapon <weapon name>

example: msg player (AcquireWeapon ak-47);
msg activeplayer (AcquireWeapon ak-47); for MP




This message tells the player to change to the specified weapon if they currently have the weapon. The <weapon name> parameter refers to the name of a weapon definition in weapons.txt.
ChangeWeapon <weapon name>

example: msg player (ChangeWeapon ak-47);
msg activeplayer (ChangeWeapon ak-47); for MP



Ammo
This message will give the player the specified ammo.
AcquireAmmo <ammo name>

example: msg player (AcquireAmmo 7.62x39 fmj);
msg activeplayer (AcquireAmmo 7.62x39 fmj); for MP



Mods
This message will give the player the specified weapon mod.
AcquireMod <mod name>

example: msg player (AcquireMod Sniper Scope);
msg activeplayer (AcquireMod Sniper Scope); for MP



Gear
This message will give the player the specified gear.
AcquireGear <gear name>

example: msg player (AcquireGear Body Armor);
msg activeplayer (AcquireGear Body Armor); for MP


Health

This message will give the player the max amount of health.
FullHealth

example: msg player FullHealth;
msg activeplayer FullHealth; for MP



This message will clear the sleeping damage from the player
Wakeup

example: msg player Wakeup;
msg activeplayer Wakeup; for MP






Vehicles
The player can have vehicle physics applied to them in a number of circumstances. Riding a PlayerVehicle, a snowmobile, is the most obvious but following a PlayerLure is also considered riding a vehicle.

PlayerVehicles
This message will force the player to get off on vehicle they currently are on and use the normal player physics

Dismount

example: msg player Dismount;
msg activeplayer Dismount; for MP


PlayerLures
This message tells the player to begin following the specified PlayerLure. The <PlayerLure name> parameter must refer to the name of a PlayerLure object on the level.

FollowLure <PlayerLure name>

example: msg player (FollowLure Playerlure00);
msg activeplayer (FollowLure Playerlure00); for MP



This message will tell the player to stop following any lure it is currently following.

CancelLure

example: msg player CancelLure;
msg activeplayer CancelLure; for MP






Overlays
Overlays are sprites that are displayed on screen such as the scope crosshairs, and certain cinematic specific overlays. To define what sprites are displayed per overlay look in the Overlay section of layout.txt.

This message turns the specified overlay on or off. The <Overlay Id> parameter is the id of the overlay to use. For a list of overlay Ids see ClientShellDLL\ClientShellShared\Overlays.h. The <On or Off> parameter specifies if the overlay should be rendered on the screen or not.
//exclusive overlays
OVM_SCOPE = 0,
OVM_BINOC,
OVM_SS_MASK,

//non-exclusive overlays
OVM_NON_EXCLUSIVE,
OVM_STATIC = OVM_NON_EXCLUSIVE,
OVM_CAMERA,
OVM_CAMERA_TARGET,
OVM_ZOOM_IN,
OVM_ZOOM_OUT,

//cinematic overlays
OVM_CINEMATIC_1,
OVM_CINEMATIC_2,
OVM_CINEMATIC_3,
OVM_CINEMATIC_4,
OVM_CINEMATIC_5,
OVM_CINEMATIC_6,
OVM_CINEMATIC_7,
OVM_CINEMATIC_8,
OVM_CINEMATIC_9,
Overlay <OverlayId> <On or Off>

example: msg player (Overlay OVM_SS_MASK on);
(which basically gives you a sniper view, nothing exiting...)





Dropping Objects
Objects that the player can carry, such as bodies and DoomsDayPieces, may be dropped through a message. The message name is misleading but all carried objects can be dropped through this message.

DropBody





Scoring
This message provides a way to modify the players score for any event. The <+/- amount> parameter is simply the amount you want the players score to change by, positive or negative. When in team games, the players team score will also change by the new amount.

Score <+/- amount>

example: msg player (score +20);





Remove Bodies
This message will remove all body objects that are currently in the level.

RemoveBodies





Remove Bad AI
This message will remove all AI in the level that are considered “Bad” to the player.


RemoveAllBadAI





Resetting Inventory
This message will reset all the weapons and give only the default weapon for the mission.


ResetInventory
Image

User avatar
Spawn
Admin
Admin
Posts: 1310
Joined: Sun Jul 25, 2004 12:50 am
Location: Norway
Contact:

Re: Player messages

Post by Spawn » Sun Mar 13, 2022 2:12 pm

Music
Most of the player messages to affect the game music take an optional timing parameter. This parameter may be any of the following:

Default - Will use the default value that is defined in the Control File or by DirectMusic

Immediately - Will happen immediately

Beat - Will happen on the next beat

Measure - Will happen on the next measure

Grid - Will happen on the next grid

Segment - Will happen on the next segment transition

Intensity
This command changes the intensity of the music.



Music i <intensity> [timing]

Music intensity <intensity> [timing]

Secondary Segment

This command will play a secondary segment.



Music secondary <segment name> [timing]

Music ps <segment name> [timing]

Motif
This command will play a motif.



Music motif <motif style> <motif name> [timing]

Music pm <motif style> <motif name> [timing]



Volume
This command will adjust the volume of the music.



Music volume <volume adjustment in db> Music v <volume adjustment in db>





Stop Secondary Segment
This command will stop a secondary segment.



Music stopsecondary <segment name> [timing]

Music ss <segment name> [timing]

Stop Motif
This command will stop a motif.



Music stopmotif <motif name> [timing]

Music sm <motif name> [timing]



Play
This command will start the music playing.



Music play

Music p

Stop
This command will stop playing the music.



Music stop [timing]

Music s [timing]

Lock Mood
This command will lock the music in the current mood.



LockMood

LockMusic

Unlock Mood
This command will unlock the music from the currently locked mood.



LockMood

LockMusic



Lock Event
This command will lock the music in the current motif.



LockMotif

LockEvent





Unlock Event
This command will unlock the music from the currently locked motif.



LockMotif

LockEvent
Image

Post Reply
jedwabna poszewka 50x60