Unturned

Unturned

B.E - NPC Quests+
 This topic has been pinned, so it's probably important
xXIBlackFireIXx  [developer] 14 Jul, 2024 @ 5:18pm
HOW TO MAKE NPC'S
Want To Make Your Own NPC's or Change/Add Items/Points/Cost ETC?

Lets Begin.... :MCCMONITOR:

Please Refer To THIS & THIS

Step 1:
Prepare the Mod and Extract Files

Download the Mod:
Ensure you have subscribed to the NPC Mod on Steam Workshop. (The One You Want To Either Edit For Personal use & or learn from)
Locate the mod files in your Unturned workshop directory, typically found in Steam\steamapps\workshop\content\304930\<mod_id>. (GO TO MANAGE MODS IN UNTURNED AND CLICK BROWSE FILES)

Extract Mod Files:
Copy the entire mod folder to a location where you can edit the files (e.g., your Unity project or a separate folder).

Step 2:
Locate and Copy NPC Files

Identify NPC Files:
In the mod folder, look for .dat files related to NPCs, typically found in folders named NPCs, Quests, or Vendors.

Copy NPC Files:
Copy the .dat files you want to use as a base. For example, if you want to use NPC_001.dat, copy this file and rename it to something unique, such as MyCustomNPC_001.dat.

Step 3:
Edit NPC Files

Edit NPC Data:

Open your copied .dat file in a text editor.

Change the ID to a unique number that does not conflict with other IDs.

Modify the Name, Dialogue, and any other properties to suit your needs.

Example:

plaintext

Name MyCustomNPC
ID 5001
Dialogue
{
Text "Hello, survivor! Need any help?"
Responses
{
1 "Sure, what can I do?"
2 "Not now, thanks."
}
}

Step 4:
Create or Edit Quest and Vendor Files

Create/Edit Quest File:

If your NPC will have a quest, create or copy a quest .dat file.

Edit the quest details as needed, ensuring you change the ID to a unique number.

Example:
-------
Name MyCustomQuest
ID 6001
Conditions
{
Has_Killed_Animals 5
}
Rewards
{
Experience 100
}
-------

Create/Edit Vendor File:

If your NPC will be a vendor, create or copy a vendor .dat file.

Edit the vendor details, ensuring you change the ID to a unique number.

Example:
-------
Name MyCustomVendor
ID 7001
Buy
{
4 5 50
}
Sell
{
15 20 10
}
-------
Step 5:
Link NPC with Quest and Vendor

Edit the NPC File to Include Quest and Vendor:

Open your NPC .dat file.

Add lines to link the quest and vendor to the NPC.

Example:
-------
Name MyCustomNPC
ID 5001
Quests
{
6001
}
Vendor
{
7001
}
Dialogue
{
Text "Hello, survivor! Need any help?"
Responses
{
1 "Sure, what can I do?"
2 "Not now, thanks."
}
}
-------

Step 6:
Repack and Upload the Mod

Repack the Mod: (Submit it from Unturned!)
Once you have edited all necessary files, repack the mod using Unity or another packing tool if necessary.
Make sure all paths and file references are correct.

HOW TO SUBMIT TO STEAM
1. Click Submit in Game
2. Find Your Folder that has the mod, and make sure you make it similar to the other mods you find when you click "Browse" from "Manage" section ((It should just be random numbers!)
3. right click the folder you've named random numbers and have drag and dropped into the place of the rest of your mods from steam workshop for unturned, RIGHT CLICK IT and find "copy as path" - Paste this in unturned, "*REMOVE THE QUOTES!*"
same thing goes for your preview image! remove the quotes, too!
4. click submit.

:selike:
Last edited by xXIBlackFireIXx; 16 Jul, 2024 @ 6:54pm