SRP icon indicating copy to clipboard operation
SRP copied to clipboard

Several unused way-points need attention

Open Decane opened this issue 4 years ago • 0 comments

Waypoint path index parsing begins at 1 in gulag_general.script and is performed to the highest contiguous index. That is, in order for path 'mar_smart_terrain_5_12_sleep_3' to be used by NPCs, paths 'mar_smart_terrain_5_12_sleep_1' and 'mar_smart_terrain_5_12_sleep_2' must also exist.

The following paths are not used because their index is unreachable via contiguous incrementation from 1:

  • [x] Unused sleep_\d+ path 'mar_smart_terrain_5_12_sleep_3' on smart with name 'mar_smart_terrain_5_12'.

Screenshot5028

  • [mar_smart_terrain_5_12_sleep_3] is the only sleep_\d+ path for this smart terrain, so this could be fixed by decrementing 3 to 1. Whether this is an improvement is debatable; the NPC sleeping in my game usually sits by the campfire instead when this path's index isn't fixed.

  • [x] Unused sniper_\d+_walk path 'esc_smart_terrain_6_8_sniper_2_walk' on smart with name 'esc_smart_terrain_6_8'.

Screenshot20245

  • [esc_smart_terrain_6_8_sniper_2_walk] is the only sniper_\d+_walk path for this smart terrain, so this could be fixed by decrementing 2 to 1. Doing so breaks several exclusive jobs on the smart terrain, including the role of the NPC who warns Scar against approaching before talking to Sidorovich. So, better leave this alone for now.

  • [esc_smart_terrain_6_8_sniper_2_look] is the only sniper_\d+_look path for this smart terrain, so we could similarly fix this by decrementing 2 to 1. Not useful to fix since [esc_smart_terrain_6_8_sniper_2_walk] is being left unfixed.


  • [x] Unused walker_\d+_walk path 'red_smart_terrain_monsters_2_walker_2_walk' on smart with name 'red_smart_terrain_monsters_2'.

    • This is unused because path 'red_smart_terrain_monsters_1_walker_2_walk' is wrongly named; it should instead be 'red_smart_terrain_monsters_2_walker_1_walk'.

  • [ ] Unused \w+_sniper_\d+_walk path 'agr_smart_terrain_1_6_sniper_2_walk' on smart with name 'agr_smart_terrain_1_6'.

  • [ ] Unused guard_\d+_walk path 'agr_smart_terrain_4_6_guard_2_walk' on smart with name 'agr_smart_terrain_4_6'.

  • [ ] Unused guard_\d+_walk path 'agr_smart_terrain_4_6_guard_3_walk' on smart with name 'agr_smart_terrain_4_6'.

  • [x] Unused guard_\d+_walk path 'agr_smart_terrain_4_4_near_1_guard_2_walk' on smart with name 'agr_smart_terrain_4_4_near_1'.

[error]Description : any vertex in patrol path [agr_smart_terrain_4_4_near_1_guard_2_walk] is inaccessible for object [sim_default_stalker_216262]

  • Enabling this causes the game to eventually crash.

  • [ ] Unused guard_\d+_walk path 'agr_smart_terrain_4_4_near_1_guard_3_walk' on smart with name 'agr_smart_terrain_4_4_near_1'.

  • [ ] Unused guard_\d+_walk path 'agr_smart_terrain_4_4_near_1_guard_4_walk' on smart with name 'agr_smart_terrain_4_4_near_1'.

  • [ ] Unused guard_\d+_walk path 'agr_smart_terrain_4_4_near_1_guard_5_walk' on smart with name 'agr_smart_terrain_4_4_near_1'.

  • [ ] Unused \w+_to_\w+_patrol_\d+_walk path 'yan_smart_terrain_6_2_to_yan_smart_terrain_4_2_patrol_2_walk' on smart with name 'yan_smart_terrain_6_2'.

  • [ ] Unused \w+_to_\w+_patrol_\d+_walk path 'yan_smart_terrain_4_2_to_yan_smart_terrain_quest_saharov_patrol_2_walk' on smart with name 'yan_smart_terrain_4_2'.

I discovered these smart terrains by inserting a variation of the following code after each while path_exists(path_name) do ... end block in gulag_general.script whose path_name makes use of path_idx:

if path_idx == 1 then
	for i = 2, 20 do
		local paaath = gname.."_sleep_"..i
		if path_exists(paaath) then
			dbglog("Unused 'sleep' path '%s' on smart with name '%s'.", paaath, gname)
		end
	end
end

Decane avatar May 25 '20 23:05 Decane