Unturned

Unturned

Not enough ratings
NPC Guide
By Wolf_Maniac
A guide for the process and creation of NPC's in the game of Unturned. This guide contains the neccessary information and steps used to create your own custom NPC!!!

-I will update this guide the best I can so you guys can have the most accurate and updated versions of NPC creation!!!
***More information and updates to this guide will be coming***

-I provided NPC Templates to make your guys' lives easier when creating NPC's!!! Templates can be found on my discord, until I can figure out a way you guys can access/download them from this guide!!!
https://discord.gg/Xkh6cDn

Google drive link to NPC Templates (hopefully it works):
https://drive.google.com/drive/folders/14lc71rQVmW5xvEEztHqi1sOfS4eRmBEp?usp=sharing

Discord:
https://discord.gg/eCD6VY5

-Let me know if you have any suggestions or questions for the guide!!!
   
Award
Favorite
Favorited
Unfavorite
Where do you start?
1. Navigate to your Unturned files by going to your steam library, right clicking Unturned and browse local files.

2. Once you have navigated to your Unturned files go to "Bundles" and then "NPCs."

3. Now you should see 4 different folders labeled, "Characters, Dialogues, Quests and Vendors."

4. Open up the folder called "Character."
Characters
1. Once you have accessed the folder called "Characters" we can now begin the process of making NPC's!!! Characters is where you will design the looks and identity of your NPC.

2. Make a new folder and name it to whatever you would like. I recoommend something you would could easily determine what it is (like the name of your NPC).

3. Once you have made a brand new folder and named it; open up a folder of a pre-existing NPC. There should be two files within that folder, an Asset.dat and an English.dat file.

4.Copy both the Asset.dat and English.dat files. Then paste both those files in your newly made NPC folder. MAKE SURE YOU COPY AND PASTE, so then you don't remove those files from the pre-existing NPC.

5. Open up both the Asset.dat and English.dat. Here you will see a couple of items. In the Asset.dat you will see the coding or programming aspect of the NPC. The Asset.dat controls what your NPC will look like and what "path" it will take. For example what dialogue the NPC will use and what happens after it does so.
In the image above you can see what each thing in the Asset.dat files mean.

6. Edit the Asset.dat and give the NPC an unique GUID and ID that won't interfer with Nelson's or others work.

7. After the Asset.dat is filled out you can move onto the English.dat file. The English.dat is basically the details to your Asset.dat file. In this case it's the details about the "Character" or identity of your NPC.
In the image above you can see what each thing in the English.dat files mean.

8. Edit the English.dat completely

9. After completing BOTH the Asset.dat and English.dat files your NPC now has an identity and you may proceed to the next step in the NPC process; "Dialogue."

Pose:
"Sit", "Stand", "Rest", "Prone", "Crouch", "Under_Arrest"
Dialogues
1. Go back to where you can see the four dfferent folders for the creation of NPC's; "Characters, Dialogues, Quests and Vendors."

2. Open up the folder called "Dialogues." Dialogues is where you will create the conversations that the players and NPC's will be having.

3. Make a new folder and name it to whatever you like. I recommend something easy that you'll know what it is (I also recommend naming it the same as what you named your "Character" folder).

4. Once you have made a brand new folder and named it; open up a folder of a pre-existing NPC. I recommned to use the NPC "Harry" because it is very simple. Inside the NPC "Harry" for example there will be another folder, most NPC's will have multiple folders in them, but "Harry" only has one.

5. There should be two files within that folder, an Asset.dat and an English.dat file just like seen before. Copy both the Asset.dat and English.dat files. Then paste both those files in your newly made NPC folder. MAKE SURE YOU COPY AND PASTE, so then you don't remove those files from the pre-existing NPC.

6. Open up both the Asset.dat and English.dat files. The following images will show you what each part of the Asset.dat and English.dat files mean.

***Above is the Asset.dat file***

***Above is the English.dat file***

7. Edit the Asset.dat and English.dat files. And after BOTH files are completed your NPC now has a "Dialogue" and should be able to carry out a conversation with a player. After completion you may proceed to the next step, which is making quests for your NPC to give to the players.

***If you want a response from a player to lead to another dialogue use Response_#_Dialogue (ID of dialogue)***
Quests Part 1
1. Go back to where you can see the four dfferent folders for the creation of NPC's; "Characters, Dialogues, Quests and Vendors."

2. Open up the folder called "Quests." Quests are where you will create the quests a player can receive from an NPC.

3. Make a new folder and name it to whatever you like. I recommend something easy that you'll know what it is (I also recommend naming it the same as what you named your "Character" and "Dialogue" folders or the name of the quest itself).

4. Once you have made a brand new folder and named it; open up a folder of a pre-existing NPC. I recommned to use the "Police_Doughnuts" which is a folder in "Quests" because it very easy to use and is very simple.

5. There should be two files within that folder, an Asset.dat and an English.dat file just like seen before. Copy both the Asset.dat and English.dat files. Then paste both those files in your newly made NPC folder. MAKE SURE YOU COPY AND PASTE, so then you don't remove those files from the pre-existing NPC.

***Before we go any further we are going to review the different type of quests, rewards, etc and how they are used***

Experience:
Targeted Experience

Condition_#_Value: Amount of experience that'll be recieved

Reputation:
Targeted Experience

Condition_#_Value: Amount of reputation that'll be received

Condition_#_Logic: Compares the current state to the targeted state of the condition."Less_Than", "Less_Than_Or_Equal_To", "Equal", "Not_Equal", "Greater_Than_Or_Equal_To" or "Greater_Than".

Flag_Bool:
Condition_#_ID: ID of condition/flag ID on the player to check.
Condition_#_Value: Target value for the flag "True" or "False"
Condition_#_Allow_Unset: Pass condition if the player doesn't hasn't completed condition/flag

Flag_Short:
Condition_#_ID: ID of condition/flag ID on the player to check.
Condition_#_Value: Target value for the flag, 16 bit integer meaning the range [-32768, 32767].
Condition_#_Allow_Unset: Pass condition if the player doesn't hasn't completed condition/flag

Quest:
Indicated there is a quest (meaning there will be conditions before something else can happen; like completing a quest or recieving another quest/dialogue etc).

Condition_#_ID: Quest ID
Condition_#_Status: What state the quest is in; "None" doesn't have the quest, "Active" has the quest, "Ready" can complete or ready to recieve rewards, "Completed" already finished.

Skillset:
Condition_#_Value: "Fire", "Police", "Army", "Farm", "Fish", "Camp", "Work", "Chef", "Thief" or "Medic".

Time_Of_Day:
Condition_#_Second: Second of the 24 hour clock to compare against.
Noon=43200
Full Day=86400
It's formatted in military time 00:00:00. This will pass regardless of the current in-game day of the year.

Item:
The player has to collect a certain item to complete the quest.

Condition_#_ID: Item ID
Condition_#_Amount: Number of the item required
Condition_#_Reset: Set back to equivelant of 0 when completed; allows the NPC to take the items from the player's inventory

Kills_Zombie:
The player will have to kill a certain amount of zombies (or a specific type) to complete the quest.

Condition_#_Zombie: Type of zombie you need to kill to complete the quest. "Normal", "Mega", "Crawler", "Sprinter", "Flanker_Friendly", "Flanker_Stalk", "Burner", "Acid", "Boss_Electric", "Boss_Wind" or "Boss_Fire". Set to "None" for any zombies.
Condition_#_ID: Short flag to track stat, (Unique separate ID from the Quest ID)
Condition_#_Value: Number of a specific zombie to kill to complete the quest
Condition_#_Spawn: Specified if zombie should be generated/spawned (like for bosses), will be killed when you leave the area.
Condition_#_Nav: ID of the navmesh of the specific area that the Horde Beacon needs to be performed in (Navmesh ID is located in the map editor)

Kills_Horde:
The player will have to do a Horde Beacon in a certain area (navmesh/navigation) to complete the quest.

Condition_#_ID: Short flag to track stat, (Unique separate ID from the Quest ID)
Condition_#_Value: Number of Horde Beacons that need to be done to complete the quest
Condition_#_Nav: ID of the navmesh of the specific area that the Horde Beacon needs to be performed in (Navmesh ID is located in the map editor)

Kills_Player:
The player will have to kill a certain amount of players in the game to complete the quest.

Condition_#_ID: Short flag to track stat, (Unique separate ID from the Quest ID)
Condition_#_Value: Number of that specific animal to kill to complete the quest

Kills_Animal:
The player will have to kill a certain amount of a specific animal to complete the quest.

Condition_#_Animal: ID of animal
Condition_#_ID: Short flag to track stat, (Unique separate ID from the Quest ID)
Condition_#_Value: Number of that specific animal to kill to complete the quest

Kills_Object:
The player will have to destroy a certain amount of specified structures/objects to complete the quest.

Condition_#_ID
Condition_#_Value Number of that specific structure/object to destroy to complete the quest
Condition_#_Nav (optional) ID of the navmesh of the specific area of where the structure/object needs to be destroyed
Condition_#_Object GUID of the structure/object that needs to be destroyed
Condition_#_Logic Compares the current state to the targeted state of the
Quests Part 2
Rewards:
Number of rewards to grant.
Reward_#_Type: "Experience", "Reputation", "Flag_Bool", "Flag_Short", "Quest", "Item", "Item_Random", "Vehicle"

Experience/Reputation:
Reward_#_Value: Amount of experience/reputation that will be granted

Flag_Bool:
Reward_#_ID: Similar to normal IDs, flag ID on the player to set
Reward_#_Value: Set to "True" or "False"

Flag_Short:
Reward_#_ID: Similar to normal IDs, flag ID on the player to set.
Reward_#_Value: Adjust value for the flag, 16 bit integer meaning the range [-32768, 32767].
Reward_#_Modification: "Assign" to set equal to value, "Increment" to add value, "Decrement" to subtract the value.

Flag_Short_Random:
Reward_#_ID: Similar to normal IDs, flag ID on the player to set.
Reward_#_Min_Value: Min inclusive value for the flag, 16 bit integer meaning the range [-32768, 32767].
Reward_#_Max_Value: Max inclusive value for the flag, 16 bit integer meaning the range [-32768, 32767].
Reward_#_Modification: "Assign" to set equal to value, "Increment" to add value, "Decrement" to subtract the value. Will pick a random value in the range [Min_Value, Max_Value].

Quest:
Reward_#_ID: Quest ID NPC will give to the player

Item:
Reward_#_ID: Item ID NPC will give to the player
Reward_#_Amount: Number of the item

Item_Random:
Reward_#_ID: Spawn ID to pick an item from
Reward_#_Amount: Number of the randomly selected item.

Vehicle:
Reward_#_ID: Vehicle ID to give.
Reward_#_Spawnpoint: name of the spawnpoint (set in the inspector) in the level to spawn at. The spawnpoint option can be found in the "Type Browser" in the Devkit and then named in the "Inspector" in the Devkit as well.

Teleport:
Reward_#_Spawnpoint: name of the spawnpoint (set in the inspector) in the level to spawn at. The spawnpoint option can be found in the "Type Browser" in the Devkit and then named in the "Inspector" in the Devkit as well.


The following images will show you what an Item Quest looks like:
***Above is the Asset.dat file***

***Above is the English.dat file***

6. Edit the Asset.dat and English.dat files. And after BOTH files are completed your NPC now has a "Quest", which will be given to a player. After completion you may proceed to the next step, which is making a shop (vendor) to offer to a player.

***Mind you that an NPC can have multiple conditions for a quest and they can be different conditions too!!!***
Vendors
1. Go back to where you can see the four dfferent folders for the creation of NPC's; "Characters, Dialogues, Quests and Vendors."

2. Open up the folder called "Vendors." Vendors is where you will create the shop that the players will be offered by the NPC.

3. Make a new folder and name it to whatever you like. I recommend something easy that you'll know what it is (I also recommend naming it the same as what you named your "Character", "Dialogue" or "Quest" folders).

4. Once you have made a brand new folder and named it; open up a folder of a pre-existing NPC.

5. There should be two files within that folder, an Asset.dat and an English.dat file just like seen before. Copy both the Asset.dat and English.dat files. Then paste both those files in your newly made NPC folder. MAKE SURE YOU COPY AND PASTE, so then you don't remove those files from the pre-existing NPC.

6. Open up both the Asset.dat and English.dat files. The following images will show you what each part of the Asset.dat and English.dat files mean.

***Above is the Asset.dat file***

***Above is the English.dat file***

7. Edit the Asset.dat and English.dat files. And after BOTH files are completed your NPC now has a "Vendor", which is accessable to a player. After completion of the following, "Character", "Dialogue", "Quest", and "Vendor" files you should now have a functional NPC with all those features if you wish to do so.

***If you want a response from a player to lead to a vendor/shop use Response_#_Vendor (ID of vendor)***

Selling Vehicles:

If you want the NPC to sell a vehicle you must include:
Selling_#_Type Vehicle
Selling_#_ID {ID of vehicle}
Selling_#_Spawnpoint {name of the spawnpoint (set in the inspector) in the level to spawn at. The spawnpoint option can be found in the "Type Browser" in the Devkit and then named in the "Inspector" in the Devkit as well}.
Selling_#_Cost {Cost of vehicle)
Vendors Part 2
Changing Currency:

1. Go to Bundles>>Items>>Supplies. Create an ASSEt (class v2) file. For example the contents will look similar to this:

"Metadata"
{
"GUID" "5150ca8f765d4a68bfe54912146da410"
"Type" "SDG.Unturned.ItemCurrencyAsset, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
}
"Asset"
{
"ValueFormat" "${0:N0} CAD"
"Entries"
[
{
"Item"
{
"GUID" "a89067f6a8694f02b2fd04989561b30c"
}
"Value" "1"
}
{
"Item"
{
"GUID" "1c7d632c79f4454fb1fba211cb5ab49b"
}
"Value" "2"
}


2. This file must have it's own unique GUID.

3. Here the Canadian Currency was used. Each item's coordinating GUID was used and the value was set. The first one in this example was the Loonie (one dollar currency) and it's value was set to one. You can also do this for custom currency as well.

4. After creating this file and setting values on currency you have to open up your vendor file of your NPC. Add the line Currency {then insert the GUID of the currency asset file} to your NPC Vendor Asset.dat

Resource: https://github.com/SmartlyDressedGames/U3-Docs/blob/master/Currency.md
Overview/Vocab
Character: The identity of your NPC.

Dialogue: What an NPC will say to a player (interactions).

Quest: A task or set of task a player will receive from an NPC.

Vendor: A shop that a player can either buy or sell items to an NPC (using experience give/gain).

Condition: A task or requirement that needs to be fulfilled to complete the quest.

Reward: Something given by an NPC to a player.

GUID: Unique identification of a file.

Asset.dat file: The programming/coding aspect of the NPC. It controls what "path" the NPC takes, which can include another dialogue, quest or vendor. It controls what's happening at a specific time.

English.dat file: The description/details of the Asset.dat file.
22 Comments
Spoxu The Forgotten Lord 31 Aug, 2024 @ 8:46am 
Hello my friend! I have a question...
Can I somehow add an NPC to an already played map? I have a save with my friends on the Germany map. We want to add a custom NPC to our town.
Wolf_Maniac  [author] 10 Sep, 2023 @ 6:13am 
@ttv.loeloebeer I would make a second vendor shop that is the only one the player can access once the quest is completed. I don't believe there to have shop prices updated, so you will have to have a separate file.
ttv.loeloebeer 4 Sep, 2023 @ 9:50am 
is it possible to update a vendor's prices of sold items after a quest is completed for the vendor. so yes how?
TheMeterGriffin #PUNJABIPOPSHOT 2 Aug, 2023 @ 11:34am 
Kazuhikuo just use a GUID generator thats what i did...

oh yea and also do i need to add anything else after doing the vendors and stuff?!?!!
Wolf_Maniac  [author] 7 May, 2022 @ 7:31pm 
If it doesn't generate by itself yo can use an online GUID generator (uncheck the hyphen box)
Kazuhikuo 28 Mar, 2022 @ 7:48pm 
how do i get the guid is there an easy way
Kampsie 17 May, 2021 @ 11:15am 
How do I submit them as a mod now?
Enoch 16 May, 2021 @ 1:11pm 
I'm afraid I am missing something here... I'm currently working on an NPC for a REVAMP map, and I have everything exactly as what is shown. I'm trying to make an NPC's Dialogue continue in into the next phase, yet when I go to talk to them in game, all that is does is close the entire text menu. I even did the "Response_1_Dialogue (INSERT DIALOGUE NUMBER)" and created different dialogue sets under the NPC's dialogue file am I missing something?
B! 9 May, 2021 @ 10:25pm 
how do you make it repeatable?

i tried and kind of having problem with quest log

the quest seems to disappear from quest log if you leave the server and rejoin

and you also can't get the quest again from npc as well

Jack 1 May, 2020 @ 9:41pm 
thanks