Info remarkable: Difference between revisions
m (Add internal name of Subject context keyval key) |
No edit summary |
||
(13 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Ent not in fgd}} | ||
{{CD|CInfoRemarkable|file1=1}} | |||
{{this is a|point entity|name=info_remarkable|game=Left 4 Dead series}} {{also|{{Entropy: Zero 2|4}}}} An object in the world such that characters seeing it will speak a TLK_REMARK concept. This entity can be placed with the [[Commentary Editor]] | |||
{{stray ent|{{asw}}{{portal2}}{{csgo}}}} | |||
{{note|Upon being sighted will create speech event with following. | |||
concept:TLK_REMARK | |||
who:<talker name of the player that sighted info_remarkable> | |||
Subject:<contextsubject keyvalue> | |||
Distance:<distance to the player that sighted this info_remarkable> | |||
When a rule match is found the info_remarkable is disabled (by default it's 1 match per round per info_remarkable controlled by cvar mentioned lower) | |||
}} | |||
__NOTOC__ | |||
== Keyvalues == | == Keyvalues == | ||
{{KV|Subject context|intn=contextsubject|string|Text to put in the SUBJECT context of the TLK_REMARK fired upon sighting this object.}} | {{KV|Subject context|intn=contextsubject|string|Text to put in the SUBJECT context of the TLK_REMARK fired upon sighting this object.}} | ||
== | == Convars == | ||
{{ | {{varcom|start}} | ||
{{varcom|rr_remarkable_maxdist (not in {{l4d}})|1500|[[unit]]s|info_remarkables more distant than this from a player will not even be tested to see if a rule matches them.}} | |||
{{varcom|rr_remarkable_world_entities_replay_limit|1|count|TLK_REMARKs will be dispatched no more than this many times for any given info_remarkable per round}} | |||
{{varcom|end}} | |||
== | == Usage == | ||
{{ | Info_remarkable in {{l4d2|4}} official maps can be found in the commentary text file located in the '''maps''' directory within pak01_dir.vpk. {{l4d|4}} commentary files can be found in the '''maps''' folder of the Left 4 Dead installation for Left 4 Dead (No VPK extraction necessary). | ||
== Tutorial/How to - Step by Step | {{note|Editing talker scripts for a custom campaign is not ideal since it will conflict if multiple campaigns do this or custom vocallizer is in use. In {{l4d2}} it's preferrable to use vscript talker features. Talker scripts are also loaded when the game is started instead of on each map load. }} | ||
'''So here is a mock scenario:''' | {{Expand|title={{l4d2}} Vscript example| | ||
Let's say we have info_remarkable in a map with contextsubject {{=}} our_custom_subject. For the speech to trigger upon seeing this remarkable we can have the following vscript inside scripts/vscripts/response_testbed_addon.nut | |||
<source lang=js> | |||
if(Director.GetMapName() != "our_map") { | |||
return; //response_testbed_addon runs in every map so it's good to have check that prevents adding these rules pointlessly | |||
} | |||
local rules = [ | |||
{ | |||
name = "OurRule1", | |||
criteria = [ | |||
["concept", "TLK_REMARK"], | |||
["who", "Gambler"], | |||
["subject", "our_custom_subject"], | |||
["distance", 0, 300] | |||
], | |||
responses = [ | |||
{ scenename = "scenes/Gambler/World119.vcd" } //You ever eat horse? Tasty. | |||
{ scenename = "scenes/Gambler/WorldC5M3B16.vcd" } //Do you still smell sewer? | |||
], | |||
group_params = RGroupParams() | |||
} | |||
{ | |||
name = "OurRule2", | |||
criteria = [ | |||
["concept", "TLK_REMARK"], | |||
["who", "Coach"], | |||
["subject", "our_custom_subject"], | |||
["distance", 0, 300] | |||
], | |||
responses = [ | |||
{ scenename = "scenes/Coach/WorldC2M2B23.vcd" } //I find a Burger Tank in this place? I'm-a be a one-man cheeseburger apocalypse. | |||
], | |||
group_params = RGroupParams() | |||
} | |||
]; | |||
rr_ProcessRules(rules); | |||
</source> | |||
}} | |||
{{todo|talker script tutorial cleanup}} | |||
{{Expand|title=Tutorial/How to - Step by Step|'''So here is a mock scenario:''' | |||
You have a rooftop on your campaign. You want the survivors to comment on the rooftop as we would hear in Valve's campaigns. Here's how we do it. | You have a rooftop on your campaign. You want the survivors to comment on the rooftop as we would hear in Valve's campaigns. Here's how we do it. | ||
Line 21: | Line 71: | ||
First -- There are files that let you know what the survivors can say and what the 'Subject Context' is in these files: | First -- There are files that let you know what the survivors can say and what the 'Subject Context' is in these files: | ||
For | For {{l4d|4.1}} - '''common\left 4 dead\left4dead\scripts\talker'''<br> | ||
For | For {{l4d2|4.1}} - You'd have to look around in the files with [[GCFScape]] from the [[VPK]] dir at: '''common\left 4 dead 2\left4dead2\pak01_dir.vpk''' | ||
Once inside the folder structure, navigate to: '''\scripts\talker''' | Once inside the folder structure, navigate to: '''\scripts\talker''' | ||
Line 55: | Line 105: | ||
---- | ---- | ||
IsMechanic = Is Ellis<br/ > | IsMechanic {{=}} Is Ellis<br/ > | ||
Isc2m4_upbarna = I assume this is variable set then referred to for the criterion's sake<br/ > | Isc2m4_upbarna {{=}} I assume this is variable set then referred to for the criterion's sake<br/ > | ||
IsNotSaidc2m4_upbarna = Hasn't, or is not currently saying this.<br/ > | IsNotSaidc2m4_upbarna {{=}} Hasn't, or is not currently saying this.<br/ > | ||
The rest are fairly self explanatory. | The rest are fairly self explanatory. | ||
---- | ---- | ||
Line 74: | Line 124: | ||
So now we have this in Hammer<br /> | So now we have this in Hammer<br /> | ||
[[ | [[File:info remarkable hammer.jpg]] | ||
'''Be aware that the most important criteria, although not listed with the others, is the player having line of sight with the info_remarkable. This needs to be met first, before radius and the other criteria.''' | '''Be aware that the most important criteria, although not listed with the others, is the player having line of sight with the info_remarkable. This needs to be met first, before radius and the other criteria.''' | ||
We are basically done. When a survivor gets within 300 units of this info_remarkable, they will say, "''We can climb across the roofs!''". It is nice that Valve has the actual text spoken in the .txt files so you can Ctrl-F with whatever program you use and search for specific sayings. | We are basically done. When a survivor gets within 300 units of this info_remarkable, they will say, "''We can climb across the roofs!''". It is nice that Valve has the actual text spoken in the .txt files so you can Ctrl-F with whatever program you use and search for specific sayings.}} | ||
== FGD Enhancement == | |||
To help with placement of the info_remarkables you can add radius visualisation in hammer by editing the info_remarkable fgd entry to the following | |||
<nowiki>@PointClass base(Origin,Targetname) sphere() = info_remarkable : "An object in the world such that characters seeing it will speak a TLK_REMARK concept" | <nowiki>@PointClass base(Origin,Targetname) sphere() = info_remarkable : "An object in the world such that characters seeing it will speak a TLK_REMARK concept" | ||
[ | [ | ||
Line 104: | Line 140: | ||
] | ] | ||
</nowiki> | </nowiki> | ||
== See also == | == See also == | ||
Line 111: | Line 145: | ||
* [[logic_scene_list_manager]] | * [[logic_scene_list_manager]] | ||
* [[GCFScape]] | * [[GCFScape]] | ||
* [[Response System]] |
Latest revision as of 08:37, 25 May 2025
![]() |
---|
CInfoRemarkable |
![]() |
info_remarkable
is a point entity available in Left 4 Dead series. (also in
Entropy : Zero 2) An object in the world such that characters seeing it will speak a TLK_REMARK concept. This entity can be placed with the Commentary Editor

concept:TLK_REMARK who:<talker name of the player that sighted info_remarkable> Subject:<contextsubject keyvalue> Distance:<distance to the player that sighted this info_remarkable>
When a rule match is found the info_remarkable is disabled (by default it's 1 match per round per info_remarkable controlled by cvar mentioned lower)
Keyvalues
- Subject context (contextsubject) <string>
- Text to put in the SUBJECT context of the TLK_REMARK fired upon sighting this object.
Convars
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
rr_remarkable_maxdist (not in ![]() |
1500 | units | info_remarkables more distant than this from a player will not even be tested to see if a rule matches them. |
rr_remarkable_world_entities_replay_limit | 1 | count | TLK_REMARKs will be dispatched no more than this many times for any given info_remarkable per round |
Usage
Info_remarkable in Left 4 Dead 2 official maps can be found in the commentary text file located in the maps directory within pak01_dir.vpk.
Left 4 Dead commentary files can be found in the maps folder of the Left 4 Dead installation for Left 4 Dead (No VPK extraction necessary).


So here is a mock scenario:
You have a rooftop on your campaign. You want the survivors to comment on the rooftop as we would hear in Valve's campaigns. Here's how we do it.
(If you know how to access the /talker scripts with GCFScape, skip to step 2.) First -- There are files that let you know what the survivors can say and what the 'Subject Context' is in these files: For Once inside the folder structure, navigate to: \scripts\talker The files for both L4D and L4D2 are associated with the survivor's name. So for instance in L4D2, Ellis's available remarks are in mechanic.txt. Rochelle's are in producer.txt etc. Be aware that The Passing talker scripts are in the own VPK structure located in: common\left 4 dead 2\left4dead2_dlc1\pak01_dir.vpk and additional DLC scripts are located in their respective folders as they become available.
Ok. Now that we know where the text files are, lets check out one of the responses. Response PlayerRemarkc2m4_upbarnaMechanic { scene "scenes/Mechanic/WorldC4M4B04.vcd" //We can climb across the roofs! } Rule PlayerRemarkc2m4_upbarnaMechanic { criteria ConceptRemark IsMechanic Isc2m4_upbarna IsNotSaidc2m4_upbarna IsNotCoughing NotInCombat IsTalk IsTalkMechanic IsWorldTalkMechanic IsSubjectNear300 AutoIsNotScavenge AutoIsNotSurvival IsNotSrcGrp_C2M4_003 IsNotSpeakingWeight0 ApplyContext "Saidc2m4_upbarna:1:0,SrcGrp_C2M4_003:1:0" applycontexttoworld Response PlayerRemarkc2m4_upbarnaMechanic }
First you have the VCD scene file it refers to: scenes/Mechanic/WorldC4M4B04.vcd and what is actually spoken. Next, is the Rule and the criteria that need to be met for it to be "spoken". There are a bunch of "Is" and "IsNot" criteria shown there. I.E.: IsMechanic = Is Ellis One that is important is 'IsSubjectNear300'. This is the radius that the player must be within the info_remarkable for it to fire. At the end of this writeup, I made a change to the FGD for both games that will show a mock radius(similar to ambient_generic's radius for sound distance) so you can place it right where you want it to be. Many remarks are able to be used by different survivors, so even if you find it in say, mechanic.txt, another survivor may comment on it also. --SOME TALKER REMARKS HAVE THE CRITERIA 'ISMAP', THESE WILL NOT WORK BECAUSE THEY LOOK FOR A SPECIFIC MAP NAME -- SO KEEP AN EYE OUT FOR THEM-- Back to it now. To use this particular remark in our info_remarkable we would take c2m4_upbarna from the text and put it in our 'Subject Context' field of our info_remarkable. You can always tell what the remarks are by the rule. Rule PlayerRemarkc2m4_upbarnaMechanic Forget about Rule PlayerRemark and forget about the survivor name at the end. It will be the text between them. So in this case, c2m4_upbarna. Don't forget to remove the survivor name at the end.
We are basically done. When a survivor gets within 300 units of this info_remarkable, they will say, "We can climb across the roofs!". It is nice that Valve has the actual text spoken in the .txt files so you can Ctrl-F with whatever program you use and search for specific sayings. |
FGD Enhancement
To help with placement of the info_remarkables you can add radius visualisation in hammer by editing the info_remarkable fgd entry to the following
@PointClass base(Origin,Targetname) sphere() = info_remarkable : "An object in the world such that characters seeing it will speak a TLK_REMARK concept" [ contextsubject(string) : "Subject context" : "" : "Text to put in the SUBJECT context of the TLK_REMARK fired upon sighting this object." radius(string) : "Mock Radius for Origin Placement" : "500" : "Allows you to set a mock radius to determine origin placement on info_remarkables based off their associated Remark radius" ]