STEAM 组
Payday 2 Mechanics PD2mech
STEAM 组
Payday 2 Mechanics PD2mech
19
游戏中
98
在线
成立于
2015 年 9 月 27 日
所有讨论 > 综合讨论 > 主题详情
ElizatronicWarfare 2015 年 10 月 3 日 下午 8:55
Rats Day 2 gangster spawns and behaviour
How many gangsters are set to spawn on Rats Day 2, and how are they set to behave? Do they try to exit the map? Does difficulty affect the number of gangsters spawned?
< >
正在显示第 1 - 6 条,共 6 条留言
ElizatronicWarfare 2015 年 10 月 4 日 上午 12:33 
After some experimentation I now know that Overkill produces somewhere around 26-33 gangsters per spawn, which indicates that difficulty might not affect it.
RandomKenny 2015 年 10 月 4 日 上午 5:26 
I believe there are 25 gangsters, I'm still learning how to read the lua so I might be wrong. This is what I was using to figure out it was 25.

´gangsters_scared´ ElementEnemyDummyTrigger 104226 TRIGGER TIMES 1 Upon any event: weapons_hot: ´ai_enemy_group_001´ weapons_hot: ´ai_enemy_group_002´ weapons_hot: ´ai_enemy_group_008´ weapons_hot: ´guard2_001´ weapons_hot: ´ai_spawn_enemy_010´ weapons_hot: ´ai_spawn_enemy_015´ weapons_hot: ´guard2_002´ weapons_hot: ´guard1_005´ weapons_hot: ´ai_spawn_enemy_003´ weapons_hot: ´guard2_003´ weapons_hot: ´guard1_004´ weapons_hot: ´ai_enemy_group_004´ weapons_hot: ´ai_enemy_group_005´ weapons_hot: ´ai_enemy_group_006´ weapons_hot: ´ai_enemy_group_007´ weapons_hot: ´ai_spawn_enemy_009´ weapons_hot: ´guard1_006´ weapons_hot: ´ai_enemy_group_003´ weapons_hot: ´ai_spawn_enemy_055´ weapons_hot: ´ai_spawn_enemy_022´ weapons_hot: ´ai_spawn_enemy_024´ weapons_hot: ´ai_spawn_enemy_032´ weapons_hot: ´ai_spawn_enemy_039´ weapons_hot: ´ai_spawn_enemy_044´ weapons_hot: ´ai_spawn_enemy_049´

And it sounds like 7 spawn after going loud
Upon any special objective event: "complete" - ´flee_gangster´ "complete" - ´flee_gangster002´ "complete" - ´gangster_sniper_flee005´ "complete" - ´gangster_sniper_flee003´ "complete" - ´gangster_sniper_flee004´ "complete" - ´gangster_sniper_flee002´ "complete" - ´gangster_sniper_flee001´
最后由 RandomKenny 编辑于; 2015 年 10 月 4 日 上午 5:28
ElizatronicWarfare 2015 年 10 月 4 日 下午 1:19 
Some of those initial spawns are listed as "group" which tells me that some spawn in clumps of 2 or more. Given that I've seen most sometimes-spawn gangsters hang around in groups divisible by 2, and assuming that each group is 2 gangsters each, that's a maximum of 33 gangsters if they ALL spawn which does seem to match observations.

I can only assume the "guard" gangsters are the stationary ones who block doorways, moving to let you up to the apartment?
最后由 ElizatronicWarfare 编辑于; 2015 年 10 月 4 日 下午 1:20
ElizatronicWarfare 2015 年 10 月 6 日 上午 1:20 
After a couple days of experimentation I can now confirm that the spawn rates do not vary by difficulty, and they probably do not flee (I've observed gangsters apparently move to a waypoint by an escape off the map, stop, and then turn back. Never seen one actually move through it).
Frankelstner 2015 年 10 月 6 日 上午 9:24 
引用自 RandomKenny
I believe there are 25 gangsters, I'm still learning how to read the lua so I might be wrong. This is what I was using to figure out it was 25.

Mission scripts are not lua but a kind of binary XML, which describes a flow graph. I've written a lossy converter from the original format to a somewhat legible text representation (with a Python-ish formatting). The editor used by the devs places the nodes directly on the map at reasonable places. Those editor coordinates are stored in the files as well but not shown in the text representation. Regardless of method, the system is a bit of a mess. It's a write-only language, so to speak (except that, well, you cannot modify the text output because it is lossy). I've written the converter so I know what each line of text means; I suppose that's another challenge for you.

The first thing you pasted is part of an ElementEnemyDummyTrigger node. It tells the game that it wants to be informed when any of those specified events occur. When such an event happens, the node is executed, and upon execution it executes the nodes given after "Execute:". So when any of those gangsters goes weapons_hot (which means uncool, basically), the deal is interrupted. The trigger node does not spawn any of these enemy groups, as group spawns are governed by nodes of other types. The trigger COULD cause spawns if it executed group spawn nodes (but it does not, it raises the alarm).

A few pointers:
The game executes ´hide_all_safes´ as soon as the script is done loading, while still in the loadout screen (as indicated by EXECUTE ON STARTUP). First it hides (removes) all safes, then it makes 2 of them show up again in different apartments. An apartment with a safe is also "enabled" for later on. That stuff can happen while still in the loadout screen should not be a surprise: http://psteamcommunity.yuanyoumao.com/app/218620/discussions/14/523897277918949896/


Player spawn is checked by ´player_spawned_trigger´ which is a relatively small box around the spawn location that asks the game to be informed as soon as a player enters it. The game then makes a check every "Interval: 0.1" seconds whether there is a player in that box. This is the standard way of checking player spawns. With some *bad* luck it is possible to escape (leave without informing the trigger) boxes on certain maps, e.g. Dockyard ended up with no keycards if you moved instantly (may or may not be fixed). I personally managed to get out of the box on Diamond Store.

0.5 s after player spawn, the game spawns some gangsters:

Spawn enemy: ene_gang_black_3 (1650.81, 2387.53, -598.76) (DELAY 0.5) 1 ´ai_enemy_group_001´ (DELAY 0.5) 2 ´ai_spawn_enemy_002´ (DELAY 0.5) 1 ´ai_spawn_enemy_010´ (DELAY 0.5) 1 ´guard2_001´ (DELAY 0.5) 1 ´guard1_002´ (DELAY 0.5) 2 ´ai_spawn_enemy_003´ (DELAY 0.5) 1 ´guard2_003´ (DELAY 0.5) 1 ´guard1_004´ (DELAY 0.5) 1 ´guard1_005´ (DELAY 0.5) 1 ´guard1_006´ (DELAY 0.5) 1

I've added the number of people per group or spawn at the end of each line, so there are 1+2+1+1+1+2+1+1+1+1+1 = 13 gangsters after the players spawn. Now, one question is why that first gangster is inlined, whereas the other nodes are not. Did my converter mess up? The thing is, the first gangster is never referenced by other nodes. As we've seen already, the game checks for weapons_hot of gangsters and groups. That's the kind of reference I mean. So this particular gangster is not affected by anything in the mission script. He can go uncool without consequences. Is that intended? I believe it to be a bug. Super easy to spot with my converted files, but then again I HAD to write an inlining algorithm to make the text files somewhat understandable while the devs have their fancy 3D editor. I'm sure they could write their own algorithms to detect this kind of behavior, it's just that they had no need.


2 s after player spawn, execute ´spawn_apartment´. This tries to spawn gangsters associated with all apartments. However, apartments are disabled by default. Only the 2 apartments enabled by the safes do spawn those gangsters.

2.5 s after player spawn, execute ´choose_decoy_apartment´. This selects one of the remaining two apartments and adds gangsters there. If the gangsters later on decide to ambush, this is where they will lead you to.

The aggressive inlining by the converter makes it a bit hard to recognize that the decoy and the ordinary apartments spawn the same amount of gangsters, so it takes a bit of copypasting to get all the relevant parts neatly grouped together.

´spawn_apartment001´ MissionScriptElement 101181 DISABLED Toggle off: ´decoy001´ If 75% chance to execute succeeds: Toggle on: ´hallway001´ ´ai_enemy_group_008´ 2 ´ai_spawn_enemy_055´ 1 ´ai_enemy_group_002´ 2 ´ai_spawn_enemy_022´ 1 ´spawn_apartment002´ MissionScriptElement 101173 DISABLED Toggle off: ´decoy002´ Toggle off: ´decoy003´ ´ai_enemy_group_003´ 2 ´ai_spawn_enemy_024´ 1 ´spawn_hallway002_003(75%)´ 3 ´spawn_apartment003´ MissionScriptElement 101174 DISABLED Toggle off: ´decoy003´ Toggle off: ´decoy002´ ´ai_enemy_group_005´ 3 ´ai_spawn_enemy_039´ 1 ´spawn_apartment004´ MissionScriptElement 101176 DISABLED Toggle off: ´decoy004´ If 75% chance to execute succeeds: Toggle on: ´hallway004´ ´ai_enemy_group_007´ 4 ´ai_spawn_enemy_049´ 1 ´ai_enemy_group_006´ 2 ´ai_spawn_enemy_044´ 1 ´decoy001´ MissionScriptElement 101182 Toggle on: ´apartment1_betrayal´ If 75% chance to execute succeeds: Toggle on: ´hallway001´ ´ai_enemy_group_008´ ´ai_spawn_enemy_055´ ´ai_enemy_group_002´ ´ai_spawn_enemy_022´ ´decoy002´ MissionScriptElement 101190 Toggle on: ´apartment2_betrayal´ ´ai_enemy_group_003´ ´ai_spawn_enemy_024´ ´spawn_hallway002_003(75%)´ ´decoy003´ MissionScriptElement 101191 Toggle on: ´apartment3_betrayal´ ´ai_enemy_group_005´ ´ai_spawn_enemy_039´ ´spawn_hallway002_003(75%)´ ´decoy004´ MissionScriptElement 101192 Toggle on: ´apartment4_betrayal´ If 75% chance to execute succeeds: Toggle on: ´hallway004´ ´ai_enemy_group_007´ ´ai_spawn_enemy_049´ ´ai_enemy_group_006´ ´ai_spawn_enemy_044´


I've added gangster numbers for the apartment part. Anyway, they do look pretty similar, right? Except that there is another bug. ´spawn_apartment003´ does not evaluate the 75% chance for corridor gangsters, whereas ´decoy003´ does. That corridor is special however as it appears to be the shared corridor in the right building. Take a closer look at the hallway

´spawn_hallway002_003(75%)´ ElementLogicChance 101197 TRIGGER TIMES 1 If chance to execute succeeds: Toggle on: ´hallway002´ Toggle on: ´hallway003´ ´ai_enemy_group_004´ 2 ´ai_spawn_enemy_032´ 1

When the node is executed, TRIGGER TIMES is reduced by 1. If it reaches 0, the node is disabled (execution of a disabled node does nothing at all). So if either apartment decides to spawn gangsters in this hallway, those spawns will not occur again if the other apartment also decides to spawn those gangsters. Trigger times is also the reason the other hallways are inlined, but the shared one is not. Inlining the hallway would remove the crucial knowledge that the node can be executed only once.


So that's 3 gangsters per apartment except apartment #3 which has 4. Each unbugged apartment has a 75% chance to spawn 3 gangsters in the hallway, except apartment #4 which spawns 5.


Lower bound for gangsters is 13 + 3+3+3 = 22 (no gangsters in the hallways). Upper bound for gangsters is 13 + 3+3+4 + 3+3+5 = 34.

This is assuming that I haven't missed any nodes that spawn more gangsters.

RandomKenny 2015 年 10 月 6 日 下午 8:59 
Thanks for clearing that up Frank. I'll have a easier time understanding some of this files now.
< >
正在显示第 1 - 6 条,共 6 条留言
每页显示数: 1530 50

所有讨论 > 综合讨论 > 主题详情