Level Blacklist

So I’ve been working on trying to get an item blacklist in my level config file to work. I’m trying to prevent players from being able to craft Horde Beacons on my map since the map has it’s own progression system for getting high cal weapons, and using horde beacons to get high cal loot on any navmesh ruins the progression.

Anyway, I’ve been using the documentation below to try to set up an output blacklist so that the player can’t craft horde beacons anymore. I’ve tried a few variations and still can’t seem to get the blacklist to work.

I also wasn’t able to find any examples of the blacklist asset in use other than the example provided in the documentation. In addition, I am not sure what “### this is a GUID number ###” is in reference to, as " ### guid ###" comes immediately after it. I wasn’t able to find reference to a “GUID number” anywhere else, other than just mentions of a GUID.

So I’ve used my knowledge of other asset pointers such as for weather to try to get this to work, and I’ve come up with the following best guess at how it should look. Here I have my asset pointer in my level asset file, and it’s nested inside the Asset { } section.


And this is the structure for my blacklist asset.

For the asset pointer I’ve tried using both the GUID in the metadata section, as well as the GUID for the actual blacklist class, but neither seem to work.

Again, any help would be greatly welcomed as I’m really unsure what has been done incorrectly here.

TL;DR: Here’s an example of what you could do. You’d need to replace the example GUIDs to whatever your GUIDs are.


	"Asset": { "GUID": "000111222333444555666777888999ff" }


			// CraftingBlacklist.asset
			"GUID" "0000000055555555aaaaaaaaffffffff"


			// Horde Beacon
			GUID 632632fea2f94952938100c6cb62c544

To actually answer your questions though:

This was placeholder text. You can specify multiple GUIDs (as this is an array), and assets support multiple formatting styles. The example only showed one style, but your customized crafting blacklist may differ.

It should probably just use real examples instead of placeholder text. I’ll see about having this changed to something more helpful.

Note that "Crafting_Blacklist" is an array [ ], not an object { }. This is probably why your setup wasn’t working.

This looked fine. Although you can optionally enclose body properties into an Asset sub-dictionary. If you’re new to working with asset files, you could skim through this doc: Asset Definitions — Unturned 0.1 documentation.

There’s a few different ways to write asset pointers. For example, we support an inline style as well.

The following example includes six (6) blacklisted inputs. All of the different formatting styles shown are valid ways you can blacklist an item:

	// Green Hoodie
	"GUID" "dc782f3ef7074af6a3fd3ada65d7a291"
		// Orange Hoodie
		GUID 67c76cdf16024bf68b6e5d14d4c617ab
		"ThisLineDoesntDoAnythingItsFunctionallyJustAComment" "Work Jeans"
		"GUID" "67a6ec52e4b24ffd89f75ceee0eb5179"
		// Blue Hoodie
		GUID 31fb8b58dd14474b8fb069f95f660163
	// Black Hoodie
	// Purple Hoodie

For the Level.asset file, would I want the GUID in the asset pointer to be the GUID in the metadata section of the blacklist.asset file?


"Crafting Blacklists"
           "GUID" "6b59210df14f4d46bb93f6a4ceca62ab"

You’re correct! You’d want the GUID in the asset pointer to be the GUID from the metadata section of the CraftingBlacklist.asset file. That’s the GUID of the asset file itself, similar to how items have GUIDs. Note that the property is "Crafting_Blacklists" (with an underscore), not "Crafting Blacklists".

Your level config points to your level asset, which can point to other asset files such as a crafting blacklist.

  • Level.config → Level.asset → CraftingBlacklist.asset

BTW: if you want to copy-paste code onto the forum, you can put it into a code block. E.g.,

This is my code
Surrounded by
three backticks ` (top and bottom)

I’ve edited your previous message to move it into a code block, so that it’s a bit easier to read as intended.

Thanks so much for your help, I got my asset pointer to work (there was also a few spelling mistakes I found lol).

1 Like

Following up on this: I’ve updated the documentation to replace the placeholder text from the code example. Crafting Blacklist Assets — Unturned 0.1 documentation

I hope the revision make this doc more helpful.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.