Modme Forums

Lost and Found

Game Asset Reversing | Releases


func_vehicle:

Demo Video


The Lost and Found is a feature from Infinite Warfare Zombies that allows players to recover their weapons should they bleed out in a coop game. When they respawn, they must run to the location of the Lost and Found and pay a fee to get their weapons back within a limited amount of time. This is a great feature to keep players who die motivated and help them get back in the game.

This version of the Lost and Found will retain their weapons (including their Mule Kick weapon, should they happen to reobtain Mule Kick before buying back their loadout), and will also remember the ammo and AATs they had for each of them. It will also return the tactical and lethal grenades they died with, as well as their knife, shield, and trip mines.

Installation
Download the .zip that contains everything you need here! (Click 'Source code (zip)')

IMPORTANT: If you already have a custom HUD, don't accidentally overwrite it with the provided HUD file! Use a diffchecker to see what you need to add.

1. Drag the source_data and texture_assets folders into your Black Ops III directory, and the contents of ZM_YOURMAPNAME into your map's folder inside usermaps.

2. Change the following file names:
<root>\usermaps\ZM_YOURMAPNAME\gamedata\tables\zm\ZM_YOURMAPNAME_objectives.json - Replace ZM_YOURMAPNAME with the map name (eg. zm_testlevel_objectives.json)
<root>\usermaps\ZM_YOURMAPNAME\gamedata\tables\zm\WORKSHOPID_objectives.json - Replace WORKSHOPID with the map's workshop ID (eg. 123456789_objectives.json)
If you have not uploaded your map to the workshop yet, remember to do this once you have and immediately put out an update for it. The ID can be found in the URL of your workshop submission.

3. In your zm_levelname.gsc file, add this line to the top of the file:

#using scripts\zm\_zm_lost_n_found;

4. In your zm_levelname.csc file, again add this line to the top of the file:
#using scripts\zm\_zm_lost_n_found;

Also, we'll need to LuiLoad the custom HUD. Add this line to the top of main():
LuiLoad( "ui.uieditor.menus.hud.t7hud_zm_custom" );

5. In your zm_levelname.zone file, add these lines (changing the filenames here too):
structuredtable,gamedata/tables/zm/ZM_YOURMAPNAME_objectives.json
structuredtable,gamedata/tables/zm/WORKSHOPID_objectives.json

localize,lostnfound

image,uie_t7_zm_hud_generic_arrow
material,uie_t7_zm_hud_generic_arrow
image,uie_t7_zm_hud_lostnfound_skull
material,uie_t7_zm_hud_lostnfound_skull

rawfile,ui/uieditor/menus/hud/t7hud_zm_custom.lua
rawfile,ui/uieditor/widgets/hud/zm_lostnfound/zm_lostnfoundwaypointcontainer.lua
rawfile,ui/uieditor/widgets/hud/zm_lostnfound/zm_lostnfoundwaypoint.lua
rawfile,ui/uieditor/widgets/hud/zm_lostnfound/zm_lostnfoundwidget.lua

scriptparsetree,scripts/zm/_zm_lost_n_found.gsc
scriptparsetree,scripts/zm/_zm_lost_n_found.csc

IMPORTANT: For Lua to actually compile as part of your map, you need L3akMod.

IMPORTANT: By default, the MR6 and Bloodhound are considered 'limited weapons', similar to wonder weapons such as the Thundergun, however the limit for these weapons is 0. The Lost and Found will not return weapons if it would cause the players to exceed the weapon limit (to prevent duping wonder weapons), and will therefore NOT return these weapons. You should fix this by removing their limit in zm_levelcommon_weapons.csv, firstly by setting the is_limited column to FALSE, and then by making the limit column blank.

Placing Recover Points
Placing the location for players to retrieve their weapons in Radiant is very easy. Simply place a script_struct, and give it the targetname
lnf_recover_point
. It is recommended that you place the recover point somewhere in the spawn room, so that it is accessible no matter what. Having multiple recover points on the map is possible, but this is not recommended because they will clutter the respawning player's HUD. You should decorate the recover point appropriately, good props include cardboard boxes or drawers.

Customization
By default, the player has 75 seconds to retrieve their weapons, but this can be changed in _zm_lost_n_found.gsh. For example, you may want to give the player 90 seconds if your map is quite large (Origins size).

Remarks
If possible, you should test this feature in splitscreen or with a friend to ensure it works correctly. This has been rigorously tested with most things in the base game that could break it, such as Gobblegums or Widow's Wine, however custom stuff will probably cause issues, especially underbarrel weapons and D-pad down equipment such as the Hacker tool.

Please credit me if you use my Lost and Found script on your map, as it took a lot of time to create and test.

Credits
Scobalula - Cerberus, HydraX
DTZxPorter - Wraith
JariK - Lua decompiler
The D3V Team (DTZxPorter, SE2Dev, Nukem) - L3akMod, t7hud_zm_custom.lua
oper10 - Waypoint Icon
Green Donut - Testing

Update #1 (28/01/2021)
Fixed the Lost and Found not actually taking away the cost from the player's points when purchased.
Added 'cha-ching' sound when purchasing the Lost and Found.

Only the GSC needs to be updated.

Update #2 (28/02/2021)
Fixed a crash for maps on the Steam Workshop when returning to the main menu after the match ends.
Fixed AATs not being restored.
Fixed camos possibly not being restored correctly.
The GSC and JSON files need to be updated. Please look at the installation tutorial to see what's changed. You should delete gamedata/tables/common/objectives.json and uncomment the line in zone_source.


jfuvv:

now this is mint well do my guy <3


pmr360:

Very nice, I really like d this feature in iw and ww2 hopefully more maps start using it.


mrlednor:

ok i want to use this but have no clue how to use the lua hud i do have a custom lua hud atm .. but dnt know what a diffchecker is or how to use one to install what is needed for the hud i have to work with this one aswell some one wanna help ?


func_vehicle:

ok i want to use this but have no clue how to use the lua hud i do have a custom lua hud atm .. but dnt know what a diffchecker is or how to use one to install what is needed for the hud i have to work with this one aswell some one wanna help ?


If you go to a website like https://www.diffchecker.com you can paste the contents of your t7hud_zm_custom.lua into the 'original' side, and my t7hud_zm_custom.lua on the 'changed' side, and press find difference. Then the right side will (hopefully) show you in green what you need to add to your hud file to get it working.

At the top of the file:
require("ui.uieditor.widgets.HUD.Waypoint.GenericWaypointContainer")
require("ui.uieditor.widgets.MPHudWidgets.WaypointBase")
require("ui.uieditor.widgets.HUD.ZM_LostNFound.ZM_LostNFoundWaypointContainer")

Everything between the requires and
function LUI.createMenu.T7Hud_zm_factory(InstanceRef)


Everything between the START and END LnF comments in
function LUI.createMenu.T7Hud_zm_factory(InstanceRef)


In
local function HudCloseCallback(SenderObj)
:
SenderObj.GenericWaypointContainer:close()
SenderObj.WaypointBase:close()
SenderObj.ZM_LostNFoundWaypointContainer:close()


After that just follow the rest of the instructions in the original post.


mrlednor:

If you go to a website like https://www.diffchecker.com you can paste the contents of your t7hud_zm_custom.lua into the 'original' side, and my t7hud_zm_custom.lua on the 'changed' side, and press find difference. Then the right side will (hopefully) show you in green what you need to add to your hud file to get it working.

At the top of the file:
require("ui.uieditor.widgets.HUD.Waypoint.GenericWaypointContainer")
require("ui.uieditor.widgets.MPHudWidgets.WaypointBase")
require("ui.uieditor.widgets.HUD.ZM_LostNFound.ZM_LostNFoundWaypointContainer")

Everything between the requires and
function LUI.createMenu.T7Hud_zm_factory(InstanceRef)


Everything between the START and END LnF comments in
function LUI.createMenu.T7Hud_zm_factory(InstanceRef)


In
local function HudCloseCallback(SenderObj)
:
SenderObj.GenericWaypointContainer:close()
SenderObj.WaypointBase:close()
SenderObj.ZM_LostNFoundWaypointContainer:close()


After that just follow the rest of the instructions in the original post.

thanks


LogicalEdits:

DM me on discord, I'd like to ask you something :)
Logical Edits#4463