Decane / SRP

Sky Reclamation Project for S.T.A.L.K.E.R.: Clear Sky
http://www.moddb.com/mods/srp
124 stars 20 forks source link

Certain greeting strings are locked out in vanilla #138

Closed K0stov closed 3 years ago

K0stov commented 3 years ago

I’ll stress that I’m only sharing my observations from the vanilla game and am not sure whether it’s been fixed in SRP or not. Thought it would be worthwhile to share.

Characters not part of any squad (ex.: Ivan Trodnik, Shilov, Kolobok, diggers at the Garbage concentration camp), instead of outputting only squad-related lines when starting a dialogue with them, have their own generic greeting strings, some being shared across most factions whereas some are unique to their own faction. That means, instead of the widespread What's up with you? We're sitting around, keeping guard over the camp and all, with all kinds of enemies close by. So you just bugger off with your questions. you can get just a Hello, stalker.

Now, some lines within this category are locked out and inaccessible; if the NPC in question has greeting lines unique to the level they’re on, it will always take priority over ones that are available on all levels. In the vanilla configs\misc\dialog_manager.ltx, lines dm_intro_112–dm_intro_122 are a good example: most of the lines within this range are accessible to most factions, but the only one the player can ever see within the 112–122 range is dm_intro_120, because it has specific levels set (level = marsh, escape, garbage, darkvalley, agroprom, yantar, red_forest, military, limansk) and not level = all.

In summary, if talking to, say, Shilov, the only greeting lines the player can get are dm_intro_24dm_intro_31 (loner lines unique to the Cordon) and dm_intro_120 (usable by loners, Freedom, Duty and mercenaries, available on a large number of locations). In reality, he should be able to greet the player not just with these lines, but with lines 112–122 as well. This, however, never happens because of the above mentioned details.

I wanted to ask why this happens and whether it is fixed in SRP?

Decane commented 3 years ago

It's fixed in SRP v1.1.3.

I wanted to ask why this happens

Phrases are given priorities depending on whether their conditions (e.g. npc_community) specified in dialog_manager.ltx are matched. IIRC, vanilla code only draws phrases from the pool of highest-priority phrases. Thus, if there is only one highest-priority phrase, that phrase will keep getting repeated over and over again even though there are other phrases of a slightly lower priority that could be uttered for variation.

In the SRP, phrases are selected first from the highest-priority pool (as in vanilla), but then from the next-highest priority pool, etc. until we run out of valid phrases for the NPC in question, at which point the phrase is selected randomly from the pool of phrases already uttered.