Unturned

Unturned

238 betyg
Custom NPCS ETC
Av maidmage
As of update 3.17.0.0, NPCS were added into the game. Nelson has told us that you can make your own, and this will make the process hopefully easier. The NPCS are still at an early stage in development, and no official NPC guide has come out. This guide is essentially complete, the main issues are the Quest Conditions.

(note : I haven't messed around with this system since October of 2016, which is 6 months ago from this note. All that I know is inside of this guide, as I learned how to make these NPCS whilst writing the guide. Please look for other tutorials rather than asking me questions from now on)
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
What you'll need
So despite the fact we're technically creating our own npcs, you will not need Unity, Blender, or any other programs.
I reccomend using Notepad++, but it should be fine if you don't get it.
For this guide I use Notepad++.

WARNING : DO NOT EDIT THE NPC FILES DIRECTLY OR ELSE YOU WILL SABOTAGE YOUR GAME FILES. DUPLICATE THE NPC FILES I HAPPEN TO BE USING AS EXAMPLES AND FOLLOW THE GUIDE, OR ELSE LIBERATOR NPCS WILL EITHER DESPAWN, BECOME BROKEN, OR FAIL IN OTHER ASPECTS.
Locating Files
So before you can actually make your own NPCS, you'll need to go to your game files. You can do this by going to your library, then right-click on Unturned.



















Afterwards, click on Properties. Click the tab that says Local Files. Afterwards click Browse Local Files. You should be now inside of the unturned directory.


Next click the 'Bundle' Folder.

Inside of there you will see NPCS. Open the folder.
Making the NPCS
Now that you have located your files, Copy one of the premade NPCS, and the paste it somewhere else inside of the NPCS tab. Open the copy and right-click Asset.dat
Click open with Notepad++, or open with Notepad.
Once you have opened the file, you should see something similar to this.
Before you begin customizing, remember to change the ID so that it doesnt collide with other models!

Customizing the NPC's Look
This part is pretty simple. Just remove the ID of the clothing with the ones you want.
If you want to give the NPC cosmetics that aren't listed in the item spawn lists- IE the Steam Inventory items, open up a folder to C:\SteamLibrary\steamapps\common\Unturned\Bundles\Items
Inside of here are all the items you'll need. Just explore through the folders and you'll find what you're looking for eventually.

But wait! The file you have doesn't contain a Hats line or Hair Color or ETC?
Dont worry, you can simply just add a new line with that in. Here's an example of an NPC I made.
Color
So how do you customize the color hair and skin?
Well thats pretty simple. All you really need to do is look Hex color in google, and it will load up a color customization prompt. It will tell you the HEX of the color after you pick it. Copy the Hex color and paste it into the Hair or Skin.

Weapons/Tools
There should be text in the code involving Primary or Secondary.
Simply change the ID next to the Primary/Secondary and it should appear on the NPC in-game.
If you have something else, such as a tool item that isnt equipped (Carjack, Gas, etc), you can have it as Tertiary. Just add a new line that says Tertiary underneath Secondary and Primary, and then put the ID next to it.
An example of this is the Pirate's Asset.dat.
Equip Stances
This part is pretty short.
Open up the NPC's Main Asset.dat file.
If you want the NPC to hold an item, simply add in this code underneath Primary and Secondary.
Equipped Primary
OR
Equipped Secondary
Afterwards, it should look something like this.
Dialogue
Inside of the Dialogues folder, copy one of the other dialogue folders, I suggest the Chef file.
We are going to start with the Welcome folder.
In the ASSET.DAT, nothing in here will quite be too important for now.
Change the ID to whatever you want, that doesnt already confilct with the other IDs.
Open the English.dat.
Now you should see something like this, "..." is simply the response that I put in, Put in whatever main message you wish the NPC to say. Responses 0-2 are the options the player can pick as a result of talking. Now remember that since this is the Chef, players can only trade after Response 1 is used. Put anything in these areas that you would like.


Afterwards, open the English.dat of the duplicated Chef_Supply folder.
Rename this folder to whatever the dialogue is going ot be.
Once again, change the dialogue ID to whatever you want.
Edit the English.dat to whatever you want aswell.
Afterwards copy the ID you have specified, and paste it in the main Dialogue Asset.dat









This should be the bottom set of code.
The top set of code, involving trading, is explained in the Shop Section of this guide.


The Shop
Copy one of the other Vendor folders and rename it whatever you want.
Inside of the English.dat for the vendor, rename it whatever you wish, change the Hex color if you also want, and description. Here's an example,




To edit the shop, open the Asset.dat.








The ID is the item being sold, simply swap it out with what you want him to sell.
The cost is also whatever you want, so change the value to how much EXP you want it to cost.
This should be the same with all the other items.

To make sure the dialogue for the shop is input, you will need to go back to your Asset.dat for the Dialogue. (I've been using the Chef's files as an example.)
You're going to want to replace these IDS with the proper response ID.















I havent figured out how to edit selling yet, so ill update once I get back to this.
Quests - Setup - PT 1
This is essentially the most complicated part of this whole entire creation. For this quest I'm copying the Police Chief's dialogues- besides the Chief_Welcome.
Rename these folders to whatever you want.

To start go into the original Welcome folder that you have.
Edit the file so that there are two new responses.
I suggest making the goodbye message the last one again.
Now just because you added the new response doesnt mean the code recognizes this, go to the Asset.dat for the Welcome and change the responses to +2 from your previous number.
If it said 2, then change it to 4.
Afterwards, go in and add the following code, whatever number is for the responses, put instead of X and Y.
// Need any help? Response_X_Dialogue 66 Response_X_Conditions 1 Response_X_Condition_0_Type Quest Response_X_Condition_0_Logic Equal Response_X_Condition_0_ID 64 Response_X_Condition_0_Status None // I took care of the paint // Police_Doughnuts_Completed Response_Y_Dialogue 68 Response_Y_Quest 64 Response_Y_Conditions 1 Response_Y_Condition_0_Type Quest Response_Y_Condition_0_Logic Equal Response_Y_Condition_0_ID 64 Response_Y_Condition_0_Status Ready Response_Y_Condition_0_Reset

Now your file should look something like this.
Quests - IDs - PT 2
So after you setup nearly everything, its time to edit the code.
Open your Duplicated Chief_Secret folder, open the Asset.dat and change the ID.
Put the new ID to the main Dialogue Asset.dat from the Welcome folder.
Return to the Duplicated Chief_Secret Asset.dat.
Put any IDS in these areas.















After you put those IDS in, go to the Duplicated Chief_Police_Doughnuts_Accepted Asset.dat.
Put the new IDs you made previously, here.
Now go to the NPCS>Quests folder, and copy the Police quest.
Change the ASSET.Dat ID again, and put that new ID in the Welcome Dialogue.


















Now then lastly, go to the Duplicated Police_Secret folder and go to the Asset.dat.
Replace these with the ID for the quest ID.

Go to the Quests folder again, and edit the quest you've been working on.
You can change the reward values of XP and Rep to anything you want.

Quests - Conditions - PT 3 (WIP)
Now that you're in the Asset.dat for your quest, you should see conditions.
There are many types of conditions,
Conditions_X_Type Item
Conditions_X_Type Flag_Bool
Conditions_X_Type Skillset
Conditions_X_Type Kills_Zombie
Conditions_X_Type Kills_Horde
Currently these are the only known types. The first two are already in the game, whilst Kills_Zombie was demonstrated in the Progress report.

Here's a quick explaination of the conditions.
  • Item : Obtain some item and give it to the NPC.
  • Flag_Bool : Complicated, involves the player activating something around the map.
  • Skillset : Presumably requires you to have a skillset for the quest.
  • Kills_Zombie : Kill a certain amount of zombies.
  • Kills_Horde: Kill a certain amount of zombies in a Horde.

Setting up the Quest
You can have as many conditions as you like, there isn't any limit as far as I am aware.
Simply to add multiple conditions, copy the premade conditions and duplicate them. Just remember to replace the 0 with a 1, a 1 with a 2, and so on.

Also don't forget to always change the value by Conditions in line 4 to the amount of conditions you currently have inside of the quest.

Item Conditions
For this part make sure your code looks something similar to this.
Condition_N_Type Item Condition_N_ID Y Condition_N_Amount X Condition_N_Reset
Ignore N, X, and Y. They are only there as placeholder variables.
  • N represents the condition number it is, if its the first condition it is 0.
  • X represents the amount of the item.
  • Y represents the ID of the item.
Simply put in whatever values you want and it should work perfectly.

Im testing the other item conditions at the moment, but expect an update soon.

Quest Details
Next, open up the English.dat for the quest.
Line 1 is Name, put anything after the name that you want.
Line 2 is the Description of the quest, put anything there you want.
Line 4 and onward is for the conditions of the quest. If the quest has somebody searching for
something, you can change Bake (If you used the Doughnut Quest) to Find.
If you have multiple conditions, just duplicate them.
Here is an example.
In-Game
So you've created yourself your very own NPC! Now you'll finally be able to spawn it in. Inside of the level editor, search the name of your NPC and you'll be able to spawn in the NPC. If you don't know how to do that, press E.


Now that your NPC is in the map, just save it and leave. You can test out the NPC in singleplayer.

If you added quests, hopefully it looks something like this!
Besides the 'Bake' part of the text.
Conclusion
So now that you have finished your new NPC, you can post it to the steam workshop or keep it to yourself. Whatever you do, have fun with your creations.

Please rate this guide if it helped you, and please keep in mind that all of this is hasn't really been officially explained. If there are any flaws or issues feel free to address them to me, and I'll fix them ASAP.


WARNING : YOU SHOULDN'T HAVE EDITED THE NPC FILES DIRECTLY, IF YOU DID YOU MAY HAVE TO REINSTALL YOUR GAME.
173 kommentarer
HydraliskHeirarch 17 aug, 2021 @ 11:07 
Anybody know how to randomize dialogue intros , mid conversation, and end dialogue?
Tactical Sharko ΘΔ 28 apr, 2020 @ 14:10 
I don't know if this counts as necro posting, but I've been working on npc's for a little while and I have the shop figured out if you want help updating the shop
.: SPY :. Neotom =4FUN= 15 apr, 2020 @ 17:22 
Still works for the GUID anything its allways on the top of the each files from the NPC files ?
MarcusTheGamer 21 dec, 2019 @ 4:13 
Holy fuck this is confusing o_O i have no fucking idea how to do the dialogue thing i read it like 6 times. Can someone help me please?
hawking's #1 midget 11 okt, 2019 @ 12:28 
I made my npc following your steps, and it now has the dialogues as the coalition, which I dont want.
dragonfew 21 sep, 2019 @ 0:12 
is it possible to make a repeatable quest?
Shard 6 aug, 2019 @ 12:06 
you need to use multiple dialogues for a single character then. Try linking one response into another dialogue using Response_0_Dialogue 4000 [in which 0 is the number of response and 4000 is the ID that you have put in the created dialogue Asset file.
R𝒶𝓎 Q𝓊𝒶𝓎 25 nov, 2018 @ 13:10 
the dialogue is where im having trouble because i want to have a convesation and not just a hi and goodbye type deal
⋅ʚ♡ɞ⋅Rose 17 jul, 2018 @ 15:22 
so how do i search the item? i got the hole globle and scale thing but no search bar or any thing els....(i'm new to this sorry)
sLmp 16 jul, 2018 @ 18:11 
chill